Skip to content

Commit 0c1e9c3

Browse files
3
1 parent 5b99135 commit 0c1e9c3

4 files changed

Lines changed: 218 additions & 310 deletions

File tree

build/installer.nsh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# https://github.com/electron-userland/electron-builder/issues/6865#issuecomment-1871121350
2+
!macro customInit
3+
Delete "$INSTDIR\Uninstall*.exe"
4+
!macroend

main.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,9 @@ const attach = (event, webContents) => {
9090
// - if it's a remote host, open in external browser
9191
webContents.opened = true
9292
} else {
93-
console.log("will-navigate", { event, url })
93+
// console.log("will-navigate", { event, url })
9494
let host = new URL(url).host
9595
let localhost = new URL(root_url).host
96-
console.log({ host, localhost })
9796
if (host !== localhost) {
9897
event.preventDefault()
9998
shell.openExternal(url);
@@ -590,7 +589,17 @@ document.querySelector("form").addEventListener("submit", (e) => {
590589
if (BrowserWindow.getAllWindows().length === 0) createWindow(PORT)
591590
})
592591
app.on('window-all-closed', function () {
593-
if (process.platform !== 'darwin') app.quit()
592+
console.log("window-all-closed")
593+
if (process.platform !== 'darwin') {
594+
// Reset all shells before quitting
595+
pinokiod.kernel.shell.reset()
596+
// wait 1 second before quitting the app
597+
// otherwise the app.quit() fails because the subprocesses are running
598+
setTimeout(() => {
599+
console.log("app.quit()")
600+
app.quit()
601+
}, 1000)
602+
}
594603
})
595604
app.on('browser-window-created', (event, win) => {
596605
if (win.type !== "splash") {

0 commit comments

Comments
 (0)