-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathelectron-builder.js
55 lines (49 loc) · 1.53 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
const { APP_CONFIG } = require('./app.config')
const { APP_ID, AUTHOR, TITLE, DESCRIPTION, FOLDERS, ARTIFACT_NAME } =
APP_CONFIG
const CURRENT_YEAR = new Date().getFullYear()
// take off the suffix '- App' -- we only want that to appear on the window title
let adjustedAppName = TITLE.replace(' - App', '')
module.exports = {
appId: APP_ID,
productName: adjustedAppName,
copyright: `Copyright © ${CURRENT_YEAR} — ${AUTHOR.name}`,
artifactName: ARTIFACT_NAME + '-${version}-${os}.${ext}',
directories: {
app: FOLDERS.DEV_TEMP_BUILD,
output: 'dist',
},
mac: {
icon: `${FOLDERS.RESOURCES}/icons/logo.icns`,
category: 'public.app-category.utilities',
identity: 'US Fund for DAISY (SAMG8AWD69)',
hardenedRuntime: true,
target: 'pkg',
},
pkg: {
isRelocatable: false,
scripts: '../buildmac/pkg-scripts',
},
dmg: {
icon: false,
artifactName: ARTIFACT_NAME + '-setup-${version}.${ext}',
},
linux: {
category: 'Utilities',
synopsis: DESCRIPTION,
target: ['AppImage', 'deb', 'pacman', 'freebsd', 'rpm'],
},
win: {
icon: `${FOLDERS.RESOURCES}/icons/logo_256x256.png`,
target: ['nsis', 'portable', 'zip'],
},
nsis: {
include: 'build/installer.nsh',
},
afterSign: 'buildtools/notarize.js',
asarUnpack: ['resources/daisy-pipeline'],
nsis: {
runAfterFinish: true,
artifactName: ARTIFACT_NAME + '-setup-${version}.${ext}',
},
}