-
Notifications
You must be signed in to change notification settings - Fork 14
/
createinstaller.js
36 lines (34 loc) · 928 Bytes
/
createinstaller.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
const builder = require("electron-builder");
const Platform = builder.Platform;
const path = require('path');
const os = require('os');
const rootPath = path.join('./');
const outPath = path.join(rootPath, 'builds');
if (os.platform() === 'win32') {
builder.build({
targets: Platform.WINDOWS.createTarget(),
prepackaged: path.join(outPath, 'Star Trek Timelines Crew Management-win32-x64'),
config: {
win: {
target: ['nsis', '7z'],
icon: path.join(rootPath, 'src/assets/icons/ATFleet.ico')
}
}
}).catch((error) => {
console.error(error);
});
}
else {
builder.build({
targets: Platform.MAC.createTarget(),
prepackaged: path.join(outPath, 'Star Trek Timelines Crew Management-darwin-x64/Star Trek Timelines Crew Management.app'),
config: {
mac: {
identity: null,
icon: path.join(rootPath, 'src/assets/icons/ATFleet.icns')
}
}
}).catch((error) => {
console.error(error);
});
}