diff --git a/electron/main/index.ts b/electron/main/index.ts index 653e747..7938ffe 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -83,11 +83,15 @@ app.whenReady().then(async () => { }) }) -app.on('window-all-closed', async () => { - await pythonBridge?.stop() +app.on('window-all-closed', () => { if (process.platform !== 'darwin') app.quit() }) -app.on('before-quit', async () => { - await pythonBridge?.stop() +app.on('before-quit', (event) => { + if (!pythonBridge) return + event.preventDefault() + pythonBridge.stop().finally(() => { + pythonBridge = null + app.quit() + }) }) diff --git a/package.json b/package.json index 7bc3bea..d27363f 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,8 @@ }, "nsis": { "oneClick": false, - "allowToChangeInstallationDirectory": true + "allowToChangeInstallationDirectory": true, + "disableWebInstaller": true }, "win": { "target": "nsis",