diff --git a/app/main.js b/app/main.js index 3fe264e..9838902 100644 --- a/app/main.js +++ b/app/main.js @@ -24,11 +24,12 @@ function checkForUpdatesAndStart() { createMainWindow(); } else { let updateWindow = new BrowserWindow({width: 300, height: 300, frame: false, show:false}) - + updateWindow.loadURL(`file://${__dirname}/updateCheck.html`); + updateWindow.show(); autoUpdater.setFeedURL(updateFeed + app.getVersion()); autoUpdater.addListener("checking-for-update", (event) => { - updateWindow.show(); + //updateWindow.show(); }); autoUpdater.addListener("update-not-available", (event) => { @@ -62,8 +63,8 @@ function checkForUpdatesAndStart() { dialog.showErrorBox("HOTSBA Updater Exploded :(", "An error log was generated at " + process.cwd()); createMainWindow(); }); - autoUpdater.checkForUpdates(); + } function createMainWindow() { @@ -81,16 +82,17 @@ function checkForUpdatesAndStart() { win.once('ready-to-show', () => { win.show() }); + app.on('window-all-closed', function() { + app.quit(); + }); + + app.on('will-quit', saveConfigs); } } - app.on('ready', checkForUpdatesAndStart); - -app.on('will-quit', saveConfigs); - function saveConfigs () { //save screen stuff to configs before closing. } diff --git a/app/package.json b/app/package.json index 3cd6063..6141e82 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "hotsba", "productName": "HOTSBA", - "version": "1.0.1", + "version": "1.0.2", "homepage": "www.hotsba.com", "description": "A draft helper/ban aid for Heroes of the Storm.", "main": "main.js", diff --git a/app/updateCheck.html b/app/updateCheck.html index 8063323..ea8e465 100644 --- a/app/updateCheck.html +++ b/app/updateCheck.html @@ -1,6 +1,18 @@ +
+ + + + -