This commit is contained in:
hunlongyu
2020-01-10 14:50:29 +08:00
parent 393ca2ce7a
commit 8fb287abdd
5 changed files with 42 additions and 6 deletions

View File

@@ -4,6 +4,7 @@ import { app, protocol, ipcMain, BrowserWindow } from 'electron'
import {
createProtocol
} from 'vue-cli-plugin-electron-builder/lib'
import { autoUpdater } from 'electron-updater'
const isDevelopment = process.env.NODE_ENV !== 'production'
@@ -23,8 +24,7 @@ function createWindow () {
webPreferences: {
webSecurity: false,
nodeIntegration: true
},
icon: `${__static}/app.ico`
}
})
if (process.env.WEBPACK_DEV_SERVER_URL) {
@@ -35,6 +35,7 @@ function createWindow () {
createProtocol('app')
// Load the index.html when not in development
win.loadURL('app://./index.html')
autoUpdater.checkForUpdatesAndNotify()
}
win.on('closed', () => {