-
-
Notifications
You must be signed in to change notification settings - Fork 345
/
electron-builder.config.js
79 lines (73 loc) · 1.61 KB
/
electron-builder.config.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
67
68
69
70
71
72
73
74
75
76
77
78
79
/* eslint-disable no-console */
let arch = ['x64']
switch (process.env.ARCH) {
case 'x64':
arch = ['x64']
break
case 'arm64':
arch = ['arm64']
break
case 'all':
arch = ['x64', 'arm64']
break
}
const isFullTarget = process.env.FULL_TARGET === 'true'
console.log('Building arch:', arch)
const createTargets = (targets) =>
targets.map((target) => ({
target,
arch,
}))
module.exports = {
appId: 'org.poooi.poi',
asar: true,
npmRebuild: false,
copyright: `Copyright ©${new Date().getFullYear()} poi Contributors`,
mac: {
publish: [],
icon: 'assets/icons/poi.icns',
category: 'public.app-category.games',
provisioningProfile: 'poi.provisionprofile',
target: createTargets(isFullTarget ? ['dmg', 'zip'] : ['zip']),
},
win: {
publish: [],
icon: 'assets/icons/poi.ico',
verifyUpdateCodeSignature: false,
target: [
...createTargets(isFullTarget ? ['nsis', '7z'] : ['7z']),
{ target: '7z', arch: 'ia32' },
],
},
linux: {
publish: [],
target: createTargets(isFullTarget ? ['7z', 'deb', 'rpm', 'pacman', 'AppImage'] : ['7z']),
icon: 'assets/icons',
},
dmg: {
contents: [
{
x: 410,
y: 220,
type: 'link',
path: '/Applications',
},
{
x: 130,
y: 220,
type: 'file',
},
],
},
nsis: {
artifactName: 'poi-setup-${version}.${ext}',
oneClick: false,
allowToChangeInstallationDirectory: true,
multiLanguageInstaller: true,
},
directories: {
app: 'app_compiled',
output: 'dist',
buildResources: 'build',
},
}