更新到v0.2.3版本

This commit is contained in:
lyswhut
2019-08-22 23:02:59 +08:00
parent 893d20b4e9
commit 2b3aab2faf
19 changed files with 128 additions and 49 deletions
+3
View File
@@ -3,6 +3,7 @@ const { autoUpdater } = require('electron-updater')
const { mainOn } = require('../../common/icp')
autoUpdater.logger = log
// autoUpdater.autoDownload = false
autoUpdater.logger.transports.file.level = 'info'
log.info('App starting...')
@@ -62,12 +63,14 @@ module.exports = win => {
})
autoUpdater.on('update-available', (ev, info) => {
sendStatusToWindow('Update available.')
// win.webContents.send('update-available')
})
autoUpdater.on('update-not-available', (ev, info) => {
sendStatusToWindow('Update not available.')
})
autoUpdater.on('error', (ev, err) => {
sendStatusToWindow('Error in auto-updater.')
// win.webContents.send('update-error')
})
autoUpdater.on('download-progress', (ev, progressObj) => {
sendStatusToWindow('Download progress...')