|
|
@@ -3,7 +3,7 @@ const yaml = require('js-yaml')
|
|
|
const { app, BrowserWindow, Menu, dialog } = require('electron')
|
|
|
const { autoUpdater } = require('electron-updater')
|
|
|
|
|
|
-const useUpdater = (win) => {
|
|
|
+const updateHandle = (win) => {
|
|
|
if (app.isPackaged) {
|
|
|
const fileContents = fs.readFileSync('resources/app-update.yml', 'utf-8')
|
|
|
const data = yaml.load(fileContents)
|
|
|
@@ -84,7 +84,7 @@ const createWindow = () => {
|
|
|
|
|
|
win.maximize()
|
|
|
win.loadFile('dist/index.html')
|
|
|
- win.on('ready-to-show', () => useUpdater(win))
|
|
|
+ win.on('ready-to-show', () => updateHandle(win))
|
|
|
}
|
|
|
|
|
|
app.whenReady().then(() => {
|