Specify x64 explicitly to create windows-installer

This commit is contained in:
Yuya Ochiai
2016-06-14 23:21:16 +09:00
parent f87628a857
commit cef86fa3e6

View File

@@ -4,7 +4,7 @@ const createWindowsInstaller = require('electron-winstaller').createWindowsInsta
const path = require('path') const path = require('path')
const rimraf = require('rimraf') const rimraf = require('rimraf')
deleteOutputFolder() deleteOutputFolder('x64')
.then(getInstallerConfig) .then(getInstallerConfig)
.then(createWindowsInstaller) .then(createWindowsInstaller)
.catch((error) => { .catch((error) => {
@@ -12,27 +12,27 @@ deleteOutputFolder()
process.exit(1) process.exit(1)
}) })
function getInstallerConfig() { function getInstallerConfig(arch) {
const rootPath = path.join(__dirname, '..') const rootPath = path.join(__dirname, '..')
const outPath = path.join(rootPath, 'release') const outPath = path.join(rootPath, 'release')
return Promise.resolve({ 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', iconUrl: 'https://raw.githubusercontent.com/mattermost/desktop/master/resources/icon.ico',
//loadingGif: path.join(rootPath, 'assets', 'img', 'loading.gif'), //loadingGif: path.join(rootPath, 'assets', 'img', 'loading.gif'),
noMsi: true, noMsi: true,
outputDirectory: path.join(outPath, 'windows-installer'), outputDirectory: path.join(outPath, `windows-installer-${arch}`),
setupExe: 'mattermost-setup.exe', setupExe: `mattermost-setup-${arch}.exe`,
setupIcon: path.join(rootPath, 'resources', 'icon.ico'), setupIcon: path.join(rootPath, 'resources', 'icon.ico'),
skipUpdateIcon: true, skipUpdateIcon: true,
exe: 'Mattermost.exe' exe: 'Mattermost.exe'
}) })
} }
function deleteOutputFolder() { function deleteOutputFolder(arch) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
rimraf(path.join(__dirname, '..', 'out', 'windows-installer'), (error) => { rimraf(path.join(__dirname, '..', 'out', `windows-installer-${arch}`), (error) => {
error ? reject(error) : resolve() error ? reject(error) : resolve(arch)
}) })
}) })
} }