Skip to content

Commit

Permalink
Add autoupdate feature
Browse files Browse the repository at this point in the history
  • Loading branch information
sebromero committed Nov 21, 2024
1 parent 566f8f8 commit d11e35a
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 2 deletions.
10 changes: 10 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
if (require('electron-squirrel-startup')) return;
const { app, BrowserWindow, ipcMain, shell } = require('electron');
const path = require('path');

// Handle events from windows squirrel installer
if (process.platform === "win32" && handleSquirrelEvent()) {
// squirrel event handled and app will exit in 1000ms, so don't do anything else
return;
}

const { updateElectronApp } = require('update-electron-app')
updateElectronApp()

let mainWindow;
let upyPackage;
const ARDUINO_VID = 0x2341;
Expand Down
56 changes: 54 additions & 2 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
"electron": "^31.3.1"
},
"dependencies": {
"electron-squirrel-startup": "^1.0.1",
"update-electron-app": "^3.0.0",
"upy-package": "github:arduino/upy-package"
}
}

0 comments on commit d11e35a

Please sign in to comment.