2
0
mirror of https://github.com/frappe/books.git synced 2024-11-08 06:44:06 +00:00

Updating electron-builder to a ts file

This commit is contained in:
Isaac-GC 2024-01-24 19:03:04 -08:00
parent f90143acb6
commit bfa96274af
3 changed files with 103 additions and 55 deletions

View File

@ -162,13 +162,6 @@ async function packageApp() {
...builderArgs, ...builderArgs,
}; };
/**
* electron-builder doesn't look for the APPLE_TEAM_ID environment variable for some reason.
* This workaround allows an environment variable to be added to the electron-builder.yml config
* collection. See: https://github.com/electron-userland/electron-builder/issues/7812
*/
buildOptions.mac = { notarize: { teamId: process.env.APPLE_TEAM_ID || "" } }
await builder.build(buildOptions); await builder.build(buildOptions);
} }

55
electron-builder.ts Normal file
View File

@ -0,0 +1,55 @@
import type { Configuration } from "electron-builder";
/**
* electron-builder doesn't look for the APPLE_TEAM_ID environment variable for some reason.
* This workaround allows an environment variable to be added to the electron-builder.yml config
* collection. See: https://github.com/electron-userland/electron-builder/issues/7812
*/
const config: Configuration = {
productName: "Frappe Books",
appId: "io.frappe.books",
asarUnpack: "**/*.node",
extraResources: [
{ from: 'log_creds.txt', to: '../creds/log_creds.txt' },
{ from: 'translations', to: '../translations' },
{ from: 'templates', to: '../templates' },
],
mac: {
type: "distribution",
category: "public.app-category.finance",
icon: "build/icon.icns",
notarize: {
teamId: process.env.APPLE_TEAM_ID || ""
},
hardenedRuntime: true,
gatekeeperAssess: false,
darkModeSupport: false,
entitlements: "build/entitlements.mac.plist",
entitlementsInherit: "build/entitlements.mac.plist",
publish: [ "github" ]
},
win: {
publisherName: "Frappe Technologies Pvt. Ltd.",
signDlls: true,
icon: "build/icon.ico",
publish: [ "github" ],
target: [ "portable", "nsis" ]
},
nsis: {
oneClick: false,
perMachine: false,
allowToChangeInstallationDirectory: true,
installerIcon: "build/installericon.ico",
uninstallerIcon: "build/uninstallericon.ico",
publish: [ "github" ]
},
linux: {
icon: "build/icons",
category: "Finance",
publish: [ "github" ],
target: [ "deb", "AppImage", "rpm" ]
}
};
export default config;