3
This commit is contained in:
parent
5b99135940
commit
0c1e9c3c6b
4
build/installer.nsh
Normal file
4
build/installer.nsh
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# https://github.com/electron-userland/electron-builder/issues/6865#issuecomment-1871121350
|
||||||
|
!macro customInit
|
||||||
|
Delete "$INSTDIR\Uninstall*.exe"
|
||||||
|
!macroend
|
15
main.js
15
main.js
@ -90,10 +90,9 @@ const attach = (event, webContents) => {
|
|||||||
// - if it's a remote host, open in external browser
|
// - if it's a remote host, open in external browser
|
||||||
webContents.opened = true
|
webContents.opened = true
|
||||||
} else {
|
} else {
|
||||||
console.log("will-navigate", { event, url })
|
// console.log("will-navigate", { event, url })
|
||||||
let host = new URL(url).host
|
let host = new URL(url).host
|
||||||
let localhost = new URL(root_url).host
|
let localhost = new URL(root_url).host
|
||||||
console.log({ host, localhost })
|
|
||||||
if (host !== localhost) {
|
if (host !== localhost) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
shell.openExternal(url);
|
shell.openExternal(url);
|
||||||
@ -590,7 +589,17 @@ document.querySelector("form").addEventListener("submit", (e) => {
|
|||||||
if (BrowserWindow.getAllWindows().length === 0) createWindow(PORT)
|
if (BrowserWindow.getAllWindows().length === 0) createWindow(PORT)
|
||||||
})
|
})
|
||||||
app.on('window-all-closed', function () {
|
app.on('window-all-closed', function () {
|
||||||
if (process.platform !== 'darwin') app.quit()
|
console.log("window-all-closed")
|
||||||
|
if (process.platform !== 'darwin') {
|
||||||
|
// Reset all shells before quitting
|
||||||
|
pinokiod.kernel.shell.reset()
|
||||||
|
// wait 1 second before quitting the app
|
||||||
|
// otherwise the app.quit() fails because the subprocesses are running
|
||||||
|
setTimeout(() => {
|
||||||
|
console.log("app.quit()")
|
||||||
|
app.quit()
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
app.on('browser-window-created', (event, win) => {
|
app.on('browser-window-created', (event, win) => {
|
||||||
if (win.type !== "splash") {
|
if (win.type !== "splash") {
|
||||||
|
503
package-lock.json
generated
503
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Pinokio",
|
"name": "Pinokio",
|
||||||
"version": "2.1.14",
|
"version": "3.0.26",
|
||||||
"homepage": "https://pinokio.computer",
|
"homepage": "https://pinokio.computer",
|
||||||
"description": "pinokio",
|
"description": "pinokio",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
@ -17,10 +17,12 @@
|
|||||||
"build": {
|
"build": {
|
||||||
"appId": "computer.pinokio",
|
"appId": "computer.pinokio",
|
||||||
"asarUnpack": [
|
"asarUnpack": [
|
||||||
|
"node_modules/go-get-folder-size/**/*",
|
||||||
"node_modules/7zip-bin/**/*",
|
"node_modules/7zip-bin/**/*",
|
||||||
"node_modules/sweetalert2/**/*",
|
"node_modules/sweetalert2/**/*",
|
||||||
"node_modules/node-pty-prebuilt-multiarch-cp/**/*"
|
"node_modules/@cocktailpeanut/**/*"
|
||||||
],
|
],
|
||||||
|
"nsis": { "include": "build/installer.nsh" },
|
||||||
"extraResources": [
|
"extraResources": [
|
||||||
"./script/**"
|
"./script/**"
|
||||||
],
|
],
|
||||||
@ -106,7 +108,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"electron-store": "^8.1.0",
|
"electron-store": "^8.1.0",
|
||||||
"electron-window-state": "^5.0.3",
|
"electron-window-state": "^5.0.3",
|
||||||
"pinokiod": "^2.1.14"
|
"pinokiod": "^3.0.26"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@electron/rebuild": "3.2.10",
|
"@electron/rebuild": "3.2.10",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user