Specify x64 explicitly to create windows-installer
This commit is contained in:
@@ -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)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user