-
Notifications
You must be signed in to change notification settings - Fork 0
/
squirrel.packager.js
38 lines (32 loc) · 1.12 KB
/
squirrel.packager.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
const dir = `blink-${process.platform}-${process.arch}/`;
const author = 'cairthenn';
if(process.platform === 'win32') {
const ei = require('electron-winstaller');
const result = ei.createWindowsInstaller({
appDirectory: dir,
authors: author,
exe: "Blink.exe",
setupExe: `setup-${process.platform}-${process.arch}.exe`,
loadingGif: `${process.cwd()}/loading.gif`,
iconUrl: `${process.cwd()}/dist/assets/icon.ico`,
setupIcon: `${process.cwd()}/dist/assets/icon.ico`,
noMsi: true,
});
result.then(() => console.log('Installer created successfully'))
.catch(err => console.log(`Error creating installer: ${err}`));
} else if(process.platform === 'darwin') {
const dmg = require('electron-installer-dmg')
dmg({
appPath: dir,
name: 'Blink',
out: 'installer',
icon: `${process.cwd()}/dist/assets/icon.icns`,
}, (err) => {
if(err) {
console.log(err);
} else {
console.log('Installer created successfully!')
}
})
} else if(process.platform == 'linux') {
}