mirror of
https://github.com/jhbruhn/respira.git
synced 2026-01-27 02:13:41 +00:00
Add update electron app handler
This commit is contained in:
parent
7d7d17f918
commit
3d57853928
3 changed files with 34 additions and 3 deletions
|
|
@ -2,6 +2,7 @@ import { app, BrowserWindow, ipcMain, dialog } from 'electron';
|
|||
import { join } from 'path';
|
||||
import { promises as fs } from 'fs';
|
||||
import Store from 'electron-store';
|
||||
import { updateElectronApp, UpdateSourceType } from 'update-electron-app';
|
||||
|
||||
import started from 'electron-squirrel-startup';
|
||||
|
||||
|
|
@ -10,6 +11,13 @@ if (started) {
|
|||
app.quit();
|
||||
}
|
||||
|
||||
updateElectronApp({
|
||||
updateSource: {
|
||||
type: UpdateSourceType.StaticStorage,
|
||||
baseUrl: `https://jhbruhn.github.io/respira/update/${process.platform}/${process.arch}`
|
||||
}
|
||||
})
|
||||
|
||||
// Enable Web Bluetooth
|
||||
app.commandLine.appendSwitch('enable-web-bluetooth', 'true');
|
||||
app.commandLine.appendSwitch('enable-experimental-web-platform-features');
|
||||
|
|
|
|||
26
package-lock.json
generated
26
package-lock.json
generated
|
|
@ -19,7 +19,8 @@
|
|||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"react-konva": "^19.2.1",
|
||||
"tailwindcss": "^4.1.17"
|
||||
"tailwindcss": "^4.1.17",
|
||||
"update-electron-app": "^3.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-forge/cli": "^7.10.2",
|
||||
|
|
@ -9231,6 +9232,14 @@
|
|||
"omggif": "^1.0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/github-url-to-object": {
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/github-url-to-object/-/github-url-to-object-4.0.6.tgz",
|
||||
"integrity": "sha512-NaqbYHMUAlPcmWFdrAB7bcxrNIiiJWJe8s/2+iOc9vlcHlwHqSGrPk+Yi3nu6ebTwgsZEa7igz+NH2vEq3gYwQ==",
|
||||
"dependencies": {
|
||||
"is-url": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
|
|
@ -10034,6 +10043,11 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/is-url": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz",
|
||||
"integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww=="
|
||||
},
|
||||
"node_modules/is-utf8": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
|
||||
|
|
@ -11437,7 +11451,6 @@
|
|||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/murmur-32": {
|
||||
|
|
@ -14564,6 +14577,15 @@
|
|||
"browserslist": ">= 4.21.0"
|
||||
}
|
||||
},
|
||||
"node_modules/update-electron-app": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/update-electron-app/-/update-electron-app-3.1.2.tgz",
|
||||
"integrity": "sha512-htLyPJv7mEoCpaSzCg0W3Hxz7ID0GC7BIhhpK32/ITG7McrWak4aOkLEOjJheKAI94AxtBVTjCk4EFIvyttw2w==",
|
||||
"dependencies": {
|
||||
"github-url-to-object": "^4.0.4",
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/uri-js": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
|
||||
|
|
|
|||
|
|
@ -29,7 +29,8 @@
|
|||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"react-konva": "^19.2.1",
|
||||
"tailwindcss": "^4.1.17"
|
||||
"tailwindcss": "^4.1.17",
|
||||
"update-electron-app": "^3.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-forge/cli": "^7.10.2",
|
||||
|
|
|
|||
Loading…
Reference in a new issue