-
Notifications
You must be signed in to change notification settings - Fork 0
/
createinstaller.js
29 lines (26 loc) · 947 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
const createWindowsInstaller = require('electron-winstaller').createWindowsInstaller
const path = require('path')
const VERSION = process.env.npm_package_version;
getInstallerConfig()
.then(createWindowsInstaller)
.catch((error) => {
console.error(error.message || error)
process.exit(1)
})
function getInstallerConfig() {
console.log('creating windows installer')
const rootPath = path.join('./')
const outPath = path.join(rootPath, 'build')
return Promise.resolve({
appDirectory: path.join(outPath, 'vitrin-pos-win32-x64/'),
// appDirectory: path.join(outPath, 'vitrin-pos-win32-ia32/'),
authors: 'mrafei',
noMsi: true,
outputDirectory: path.join(outPath, 'installable'),
exe: 'vitrin-pos.exe',
setupExe: `VitrinPOS-${VERSION}-64bit.exe`,
setupIcon: path.join(rootPath, 'assets', 'icon.ico'),
skipUpdateIcon: true,
loadingGif: path.join(rootPath, 'assets', 'loading.gif'),
})
}