Skip to content

Commit

Permalink
Apply electron-updater patch
Browse files Browse the repository at this point in the history
  • Loading branch information
tkleinke committed Feb 12, 2025
1 parent 44863b6 commit 75543e5
Show file tree
Hide file tree
Showing 3 changed files with 298 additions and 1 deletion.
278 changes: 278 additions & 0 deletions desktop/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"build": "npm run copy-core && node --max_old_space_size=16000 node_modules/@angular/cli/bin/ng build --base-href ./ --localize --configuration production",
"build:scripts": "rimraf src/config/Scripts/dist && tsc -p src/config/Scripts/tsconfig.json",
"preinstall": "export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 || set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1",
"postinstall": "npm run update-version-info && gulp copy-fonts && gulp copy-gdal",
"postinstall": "npm run update-version-info && gulp copy-fonts && gulp copy-gdal && patch-package",
"lint": "ng lint",
"test": "jest --config=./test/unit/jest.config.ts --runInBand",
"e2e": "npm-run-all -p -r ng:serve:no-reload e2e:run",
Expand Down Expand Up @@ -200,6 +200,7 @@
"node-gyp": "^10.1.0",
"npm-run-all": "4.1.5",
"parameterize": "^1.0.0",
"patch-package": "^8.0.0",
"pouchdb-adapter-memory": "8.0.1",
"pouchdb-node": "9.0.0",
"replace-in-file": "^6.1.0",
Expand Down
18 changes: 18 additions & 0 deletions desktop/patches/electron-updater+6.5.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/node_modules/electron-updater/out/BaseUpdater.js b/node_modules/electron-updater/out/BaseUpdater.js
index f441eaa..b4e8f0a 100644
--- a/node_modules/electron-updater/out/BaseUpdater.js
+++ b/node_modules/electron-updater/out/BaseUpdater.js
@@ -14,11 +14,11 @@ class BaseUpdater extends AppUpdater_1.AppUpdater {
// If NOT in silent mode use `autoRunAppAfterInstall` to determine whether to force run the app
const isInstalled = this.install(isSilent, isSilent ? isForceRunAfter : this.autoRunAppAfterInstall);
if (isInstalled) {
- setImmediate(() => {
+ setTimeout(() => {
// this event is normally emitted when calling quitAndInstall, this emulates that
require("electron").autoUpdater.emit("before-quit-for-update");
this.app.quit();
- });
+ }, 1000);
}
else {
this.quitAndInstallCalled = false;

0 comments on commit 75543e5

Please sign in to comment.