-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathelectron-builder.js
66 lines (64 loc) · 1.96 KB
/
electron-builder.js
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
const packageJson = require('./package.json');
const versionArr = packageJson.version.split('-');
const bundleShortVersion = versionArr[0];
const bundleVersion = versionArr[1];
const config = {
asar: true,
productName: 'your product name',
appId: 'your app id',
directories: {
output: 'dist',
},
// icon: resolve(__dirname, "./icons/icon.icns"),
asarUnpack: '**\\*.{node,dll}',
files: ['./release/dist', 'node_modules', 'package.json'],
mac: {
// icon: resolve(__dirname, "./icons/icon.icns"),
target: ['dmg'],
bundleVersion: bundleVersion,
bundleShortVersion: bundleShortVersion,
artifactName: '${productName}-${version}-${arch}.${ext}',
extendInfo: {
ElectronTeamID: 'your apple account id',
ITSAppUsesNonExemptEncryption: 'NO',
},
asarUnpack: ['**/*.node'],
},
mas: {
hardenedRuntime: false,
gatekeeperAssess: false,
entitlements: 'mas/entitlements.mas.plist',
entitlementsInherit: 'mas/entitlements.mas.inherit.plist',
entitlementsLoginHelper: 'mas/entitlements.mas.loginhelper.plist',
provisioningProfile: 'mas/provisioning.provisionprofile',
},
masDev: {
hardenedRuntime: false,
gatekeeperAssess: false,
entitlements: 'mas/entitlements.mas.plist',
entitlementsInherit: 'mas/entitlements.mas.inherit.plist',
entitlementsLoginHelper: 'mas/entitlements.mas.loginhelper.plist',
provisioningProfile: 'your provisioning profile',
},
dmg: {
sign: false,
},
win: {
// icon: resolve(__dirname, "./icons/[email protected]"),
target: ['nsis'],
verifyUpdateCodeSignature: false,
signingHashAlgorithms: ['sha256'],
signDlls: false,
requestedExecutionLevel: 'asInvoker',
},
nsis: {
oneClick: false,
perMachine: false,
allowToChangeInstallationDirectory: true,
deleteAppDataOnUninstall: false,
createDesktopShortcut: true,
createStartMenuShortcut: true,
shortcutName: 'your app shortcut name',
},
};
module.exports = config;