createWin();
initAccount();
+
+ /* Check for an update every minunte */
+ setInterval(autoUpdater.checkForUpdates, 60000);
});
app.on("will-quit", terminateAudio);
// Prevents app from quitting on window close event
app.on('window-all-closed', (e) => e.preventDefault());
+
+// Update when a new update is downloaded.
+autoUpdater.on("update-downloaded", update);
+
--- /dev/null
+const { app, autoUpdater } = require("electron");
+
+autoUpdater.setFeedURL({ "https://crimata.com" });
+
+async function update()
+{
+ await dialog.showMessageBox({
+ buttons: ["Ok"],
+ title: "App Update",
+ detail: "A new version of the app is available"
+ });
+
+ autoUpdater.quitAndInstall();
+}
\ No newline at end of file