-
Notifications
You must be signed in to change notification settings - Fork 688
/
electron-builder-config.mjs
69 lines (65 loc) · 2.04 KB
/
electron-builder-config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// App is tagged with a .mjs extension to allow
import path from 'path';
import { fileURLToPath } from 'url';
/**
* 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 dirname = path.dirname(fileURLToPath(import.meta.url));
// const root = path.join(dirname, '..', '..');
const root = dirname; // redundant, but is meant to keep with the previous line
const buildDirPath = path.join(root, 'dist_electron', 'build');
const packageDirPath = path.join(root, 'dist_electron', 'bundled');
const frappeBooksConfig = {
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' },
],
files: '**',
extends: null,
directories: {
output: packageDirPath,
app: buildDirPath,
},
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: ['nsis', 'portable'],
},
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 frappeBooksConfig;