add update

This commit is contained in:
hunlongyu
2020-01-19 17:16:32 +08:00
parent 23d221979e
commit b208dfc3b6
5 changed files with 41 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ import {
installVueDevtools
} from 'vue-cli-plugin-electron-builder/lib'
import path from 'path'
import { autoUpdater } from 'electron-updater'
const isDevelopment = process.env.NODE_ENV !== 'production'
// Keep a global reference of the window object, if you don't, the window will
@@ -37,6 +38,7 @@ function createWindow () {
createProtocol('app')
// Load the index.html when not in development
win.loadURL('app://./index.html')
autoUpdater.checkForUpdatesAndNotify()
}
win.on('closed', () => {