windows-installer
windows-installer copied to clipboard
Question: how to build separate windows installer based on architecture? why no arch option is given?
Hi,
I used electron-packager packed two separate folder, one is for windows 32-bit, another is for windows 64-bit.
Questions: When use this package to build the installer for each architecture,
- what's the correct syntax should be? Why no arch option is given?
- can they run parallel?
- if want to debug this package,
DEBUG=electron-windows-installer:main node tasks/electron-winstaller.jsworks in the command line. If I want to use an npm command to run it, it doesn't work.scripts: {"build": "DEBUG=electron-windows-installer:main node tasks/electron-winstaller.js"}
I tried the below code but doesn't work, it can only create one installer.
var electronInstaller = require('electron-winstaller');
resultPromise = electronInstaller.createWindowsInstaller({
appDirectory: '/tmp/build/my-app-64',
outputDirectory: '/tmp/build/installer64',
authors: 'My App Inc.',
exe: 'myapp.exe'
},
{
appDirectory: '/tmp/build/my-app-32',
outputDirectory: '/tmp/build/installer32',
authors: 'My App Inc.',
exe: 'myapp.exe'
});
resultPromise.then(() => console.log("It worked!"), (e) => console.log(`No dice: ${e.message}`));
Compared electron-windows-installer with this package: it has arch option, and can use gulp to schedule two parallel task to creating windows 32-bit and 64-bit installer at the same time, it is more efficient.
@junjunruan So, you are suggesting that with electron-windows-installer one could use the following:
var gulp = require('gulp');
var winInstaller = require('electron-windows-installer');
gulp.task('create-windows-installer-32', function(done) {
winInstaller({
appDirectory: './build/win32',
outputDirectory: './release-32',
arch: 'ia32'
}).then(done).catch(done);
});
gulp.task('create-windows-installer-64', function(done) {
winInstaller({
appDirectory: './build/win64',
outputDirectory: './release-64',
arch: 'x64'
}).then(done).catch(done);
});
Right?