|
@@ -1,4 +1,5 @@
|
|
|
|
|
|
|
|
+"use strict";
|
|
//Taken from Electron API Demos
|
|
//Taken from Electron API Demos
|
|
//https://github.com/electron/electron-api-demos/blob/master/script/installer.js
|
|
//https://github.com/electron/electron-api-demos/blob/master/script/installer.js
|
|
|
|
|
|
@@ -10,20 +11,20 @@ deleteOutputFolder()
|
|
.then(getInstallerConfig)
|
|
.then(getInstallerConfig)
|
|
.then(createWindowsInstaller)
|
|
.then(createWindowsInstaller)
|
|
.catch((error) => {
|
|
.catch((error) => {
|
|
- console.error(error.message || error)
|
|
|
|
- process.exit(1)
|
|
|
|
- })
|
|
|
|
|
|
+ console.error(error.message || error);
|
|
|
|
+ process.exit(1);
|
|
|
|
+ });
|
|
|
|
|
|
function getInstallerConfig () {
|
|
function getInstallerConfig () {
|
|
- const rootPath = path.join(__dirname, '..')
|
|
|
|
- const outPath = path.join(rootPath, 'out')
|
|
|
|
|
|
+ const rootPath = path.join(__dirname, '..');
|
|
|
|
+ const outPath = path.join(rootPath, 'out');
|
|
|
|
|
|
return Promise.resolve({
|
|
return Promise.resolve({
|
|
- appDirectory: path.join(outPath, 'flasher.js-win32-x64'),
|
|
|
|
|
|
+ appDirectory: path.join(outPath, 'Flasher.js-win32-x64'),
|
|
iconUrl: 'https://raw.githubusercontent.com/thingssdk/flasher.js/resources/icon.ico',
|
|
iconUrl: 'https://raw.githubusercontent.com/thingssdk/flasher.js/resources/icon.ico',
|
|
loadingGif: path.join(rootPath, 'resources', 'loading.gif'),
|
|
loadingGif: path.join(rootPath, 'resources', 'loading.gif'),
|
|
noMsi: true,
|
|
noMsi: true,
|
|
- outputDirectory: path.join(outPath, 'windows-installer'),
|
|
|
|
|
|
+ outputDirectory: path.join(outPath, 'installers', 'windows'),
|
|
setupExe: 'FlasherjsSetup.exe',
|
|
setupExe: 'FlasherjsSetup.exe',
|
|
setupIcon: path.join(rootPath, 'resources', 'icon.ico'),
|
|
setupIcon: path.join(rootPath, 'resources', 'icon.ico'),
|
|
skipUpdateIcon: true
|
|
skipUpdateIcon: true
|
|
@@ -32,7 +33,7 @@ function getInstallerConfig () {
|
|
|
|
|
|
function deleteOutputFolder () {
|
|
function deleteOutputFolder () {
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
- rimraf(path.join(__dirname, '..', 'out', 'windows-installer'), (error) => {
|
|
|
|
|
|
+ rimraf(path.join(__dirname, '..', 'out', 'installers', 'windows'), (error) => {
|
|
error ? reject(error) : resolve()
|
|
error ? reject(error) : resolve()
|
|
});
|
|
});
|
|
});
|
|
});
|