From cef86fa3e6f9fad798abf636f0e8b4da76b5c22e Mon Sep 17 00:00:00 2001 From: Yuya Ochiai Date: Tue, 14 Jun 2016 23:21:16 +0900 Subject: [PATCH] Specify x64 explicitly to create windows-installer --- script/installer.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/script/installer.js b/script/installer.js index 9cd45c4e..fa832a0b 100644 --- a/script/installer.js +++ b/script/installer.js @@ -4,7 +4,7 @@ const createWindowsInstaller = require('electron-winstaller').createWindowsInsta const path = require('path') const rimraf = require('rimraf') -deleteOutputFolder() +deleteOutputFolder('x64') .then(getInstallerConfig) .then(createWindowsInstaller) .catch((error) => { @@ -12,27 +12,27 @@ deleteOutputFolder() process.exit(1) }) -function getInstallerConfig() { +function getInstallerConfig(arch) { const rootPath = path.join(__dirname, '..') const outPath = path.join(rootPath, 'release') return Promise.resolve({ - appDirectory: path.join(outPath, 'Mattermost-win32-x64'), + appDirectory: path.join(outPath, `Mattermost-win32-${arch}`), iconUrl: 'https://raw.githubusercontent.com/mattermost/desktop/master/resources/icon.ico', //loadingGif: path.join(rootPath, 'assets', 'img', 'loading.gif'), noMsi: true, - outputDirectory: path.join(outPath, 'windows-installer'), - setupExe: 'mattermost-setup.exe', + outputDirectory: path.join(outPath, `windows-installer-${arch}`), + setupExe: `mattermost-setup-${arch}.exe`, setupIcon: path.join(rootPath, 'resources', 'icon.ico'), skipUpdateIcon: true, exe: 'Mattermost.exe' }) } -function deleteOutputFolder() { +function deleteOutputFolder(arch) { return new Promise((resolve, reject) => { - rimraf(path.join(__dirname, '..', 'out', 'windows-installer'), (error) => { - error ? reject(error) : resolve() + rimraf(path.join(__dirname, '..', 'out', `windows-installer-${arch}`), (error) => { + error ? reject(error) : resolve(arch) }) }) }