diff --git a/electron-builder.json b/electron-builder.json new file mode 100644 index 0000000..dc824aa --- /dev/null +++ b/electron-builder.json @@ -0,0 +1,23 @@ +{ + "appId": "com.github.JLueke.electronupdaterexample", + "mac": { + "category": "your.app.category.type", + "target": [ + "zip", + "dmg" + ] + }, + "win": { + "target": [ + "nsis" + ] + }, + "nsis": { + "oneClick": false, + "packElevateHelper": true, + "perMachine": true, + "guid": true, + "createDesktopShortcut": true, + "createStartMenuShortcut": true + } +} diff --git a/main.js b/main.js index 5f3d5a9..0ad2dc2 100644 --- a/main.js +++ b/main.js @@ -94,7 +94,10 @@ autoUpdater.on('update-downloaded', (info) => { buttons: ['Sure', 'No'] }, (buttonIndex) => { if (buttonIndex === 0) { - autoUpdater.quitAndInstall(); + + win.removeAllListeners(); + app.removeAllListeners('window-all-closed'); + autoUpdater.quitAndInstall(); } }); }); diff --git a/package-lock.json b/package-lock.json index abaa200..ef54690 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "electron-updater-example", - "version": "0.7.1", + "version": "0.8.10", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -833,6 +833,21 @@ "source-map-support": "^0.5.9" } }, + "electron-updater-bin": { + "version": "git+https://github.com/WesterosCraftCode/electron-updater-bin.git#5280cdce2b5b0c776387254e6e8b97ff5f53884f", + "from": "git+https://github.com/WesterosCraftCode/electron-updater-bin.git", + "requires": { + "bluebird-lst": "^1.0.5", + "builder-util-runtime": "~4.4.1", + "electron-is-dev": "^0.3.0", + "fs-extra-p": "^4.6.1", + "js-yaml": "^3.12.0", + "lazy-val": "^1.0.3", + "lodash.isequal": "^4.5.0", + "semver": "^5.5.1", + "source-map-support": "^0.5.9" + } + }, "env-paths": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz", diff --git a/package.json b/package.json index 77d642e..b110928 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "electron-updater-example", "productName": "Electron updater example", - "version": "0.8.8", + "version": "0.8.11", "main": "main.js", "description": "electron-updater example project", "author": "Matt Haggard", @@ -14,24 +14,7 @@ }, "dependencies": { "electron-log": "^1.3.0", - "electron-updater": "^3.1.2" - }, - "build": { - "appId": "com.github.JLueke.electronupdaterexample", - "mac": { - "category": "your.app.category.type", - "target": [ - "zip", - "dmg" - ] - }, - "nsis": { - "oneClick": false, - "packElevateHelper": true, - "perMachine": true, - "guid": true, - "createDesktopShortcut": true, - "createStartMenuShortcut": true - } + "electron-updater": "^3.1.2", + "electron-updater-bin": "git+https://github.com/WesterosCraftCode/electron-updater-bin.git" } }