forked from DannyNoam/casinocoin-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreateWinInstaller.js
36 lines (32 loc) · 1.4 KB
/
createWinInstaller.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 createWindowsInstaller = require('electron-winstaller').createWindowsInstaller
const path = require('path')
const appVersion = require('./package.json').version;
const argv = require('minimist')(process.argv.slice(1));
const arch = argv.arch || 'ia32';
const iconUrlPath = "https://raw.githubusercontent.com/stoxum/Stoxum-Assets/master/v4/stoxum-icon-256x256.png";
getInstallerConfig(arch)
.then(createWindowsInstaller)
.catch((error) => {
console.error(error.message || error)
process.exit(1)
});
function getInstallerConfig(arch) {
console.log('creating windows installer for: ' + arch);
const rootPath = path.join('./');
const appPath = path.join(rootPath, 'app-builds');
const outPath = path.join(rootPath, 'release-builds');
return Promise.resolve({
appDirectory: path.join(appPath, 'stoxum-wallet-win32-' + arch + '/'),
authors: 'Stoxum Platform',
noMsi: true,
noDelta: true,
outputDirectory: path.join(outPath, 'windows-' + arch),
exe: 'stoxumWallet.exe',
setupExe: 'stoxumWallet-' + arch + '-' + appVersion + '.exe',
setupIcon: path.join(rootPath, 'src', 'assets', 'brand', 'stoxum-icon-256x256.ico'),
iconUrl: iconUrlPath,
loadingGif: path.join(rootPath, 'src', 'assets', 'brand', 'setup.gif'),
certificateFile: 'C:/Users/a.jochems/Documents/Crypto Service/Comodo/code-signing-cert.p12',
certificatePassword: 'Lziio1wob716A4mLXxrF'
})
}