From 81c17e510420dca9d89d58a850c347cdfbdd958b Mon Sep 17 00:00:00 2001 From: hunlongyu Date: Sun, 26 Apr 2020 20:51:29 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=BC=20=E5=A2=9E=E5=8A=A0=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/background.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/background.js b/src/background.js index b7f2eff..ff99a10 100644 --- a/src/background.js +++ b/src/background.js @@ -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 @@ -27,6 +28,7 @@ function createWindow () { webSecurity: false, nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION }, + // eslint-disable-next-line icon: path.join(__static, 'icon.png') }) @@ -35,6 +37,7 @@ function createWindow () { if (!process.env.IS_TEST) win.webContents.openDevTools() } else { win.loadURL('app://./index.html') + autoUpdater.checkForUpdatesAndNotify() } win.on('closed', () => {