Skip to content

Commit

Permalink
Merge pull request #252 from bcc-code/feature/auto-update
Browse files Browse the repository at this point in the history
install electron auto updater
  • Loading branch information
kkuepper authored Nov 19, 2023
2 parents 08ffdcf + da6d50b commit 8782199
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 8 deletions.
3 changes: 3 additions & 0 deletions electron/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { app, protocol, shell, dialog, BrowserWindow, net } from "electron";
import * as path from "path";
import * as fs from "fs/promises";
import { autoUpdater } from "electron-updater";

const PRODUCTION_APP_PROTOCOL = "bmm";
const PRODUCTION_APP_PATH = path.join(__dirname);
Expand Down Expand Up @@ -139,6 +140,8 @@ if (!gotTheLock) {

appReadyHasRun = true;
openWindow(initUrl);

autoUpdater.checkForUpdatesAndNotify();
});

// Event is triggered when another program opens a `bmm://` link.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@vueuse/core": "^10.5.0",
"class-variance-authority": "^0.7.0",
"cross-env": "^7.0.3",
"electron-updater": "^6.1.4",
"pinia": "^2.1.7"
},
"devDependencies": {
Expand Down
38 changes: 30 additions & 8 deletions pnpm-lock.yaml

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

0 comments on commit 8782199

Please sign in to comment.