diff --git a/package.json b/package.json index 49ae0cf..e47832d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "altarik-launcher", "author": "Altarik", - "version": "1.2.0", + "version": "1.2.1", "description": "Altarik Launcher", "main": "src/server/main.js", "homepage": "https://altarik.fr/", diff --git a/src/server/main.js b/src/server/main.js index 99ab923..3f9d560 100644 --- a/src/server/main.js +++ b/src/server/main.js @@ -2,8 +2,8 @@ const { app, BrowserWindow, Menu, ipcMain, autoUpdater, dialog } = require('elec const logger = require('electron-log') const { join } = require('path') const updater = require('./updater.js') -let updaterInstance = null - +let updaterInstance = new updater.Updater(app, win, autoUpdater, dialog, logger, showNotification) +updaterInstance.configUpdater() if (require('electron-squirrel-startup')) { require("./install.js").handleSquirrelEvent(app) @@ -29,10 +29,7 @@ function createWindow () { frame: false }) //Menu.setApplicationMenu(null) - win.loadFile('src/client/checkingUpdate.html').then(() => { - updaterInstance = new updater.Updater(app, win, autoUpdater, dialog, logger, showNotification) - updaterInstance.configUpdater() - }) + win.loadFile('src/client/checkingUpdate.html') win.on("close", () => { app.quit() })