禁用win arm版本的自动下载更新

pull/590/head
lyswhut 2021-07-18 14:56:18 +08:00
parent 9c21e96538
commit 724c6be85b
1 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,4 @@
const { log } = require('../../common/utils')
const { log, isWin } = require('../../common/utils')
const { autoUpdater } = require('electron-updater')
const { mainOn, mainSend, NAMES: { mainWindow: ipcMainWindowNames } } = require('../../common/ipc')
@ -120,6 +120,11 @@ module.exports = () => {
}, 1000)
})
autoUpdater.checkForUpdates()
// 由于集合安装包中不包含win arm版这将会导致arm版更新失败
if (isWin && process.arch.includes('arm')) {
handleSendEvent({ type: ipcMainWindowNames.update_error, info: 'failed' })
} else {
autoUpdater.checkForUpdates()
}
}