-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstaller.js
89 lines (80 loc) · 2.1 KB
/
installer.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
80
81
82
83
84
85
86
87
88
89
let path = require('path');
let builder = require('electron-builder');
let projectPath = path.resolve(process.cwd(), '.');
let name = 'Face Lock';
let publisher = 'Atom Space';
let year = new Date().getFullYear();
let id = 'com.atomspace.facelock';
let options = {
projectDir: projectPath,
// win: [],
// mac: [],
// linux: [],
config: {
appId: id,
productName: name,
copyright: `Copyright © ${year} ${publisher}`,
artifactName: '${name}-${version}.${ext}',
remoteBuild: false,
files: [
'src'
],
directories: {
output: 'dist'
},
win: {
icon: 'src/icons/icon.ico',
target: ['nsis', 'portable']
},
mac: {
target: 'default',
type: (process.env.NODE_ENV === 'development') ? 'development' : 'distribution',
category: 'public.app-category.utilities',
icon: 'src/icons/icon.icns'
// minimumSystemVersion
},
linux: {
executableName: '${productName}',
category: 'Utility',
icon: 'src/icons/icon-256.png' // 32
},
nsis: {
oneClick: false,
allowElevation: true,
allowToChangeInstallationDirectory: false,
deleteAppDataOnUninstall: false,
runAfterFinish: true,
createDesktopShortcut: true,
createStartMenuShortcut: true,
menuCategory: true,
shortcutName: '',
artifactName: '${name}-${version}-x32-x64.${ext}',
uninstallDisplayName: '${productName} ${version}',
installerIcon: 'src/icons/icon.ico', // relative to the build resources or project directory
uninstallerIcon: 'src/icons/icon.ico'
},
portable: {
requestExecutionLevel: 'user',
artifactName: '${name}-${version}-portable.${ext}'
},
dmg: {
icon: 'src/icons/icon.icns', // Defaults to the application icon (build/icon.icns).
title: '${productName} ${version}',
artifactName: '${name}-${version}.${ext}'
},
appImage: {
systemIntegration: 'ask'
// artifactName
}
}
// readonly effectiveOptionComputed?: (options: any) => Promise<boolean>;
// readonly prepackaged?: string | null;
};
builder.build(options);
// .then(function (result) {
// console.log(result);
// return result;
// })
// .catch(function (err) {
// console.error(err);
// });