add auto updater

This commit is contained in:
Vendicated
2024-07-04 19:22:26 +02:00
parent 021aca4089
commit 281885a87e
9 changed files with 43 additions and 165 deletions

View File

@@ -7,7 +7,7 @@
import "./ipc";
import { app, BrowserWindow, nativeTheme } from "electron";
import { checkUpdates } from "updater/main";
import { autoUpdater } from "electron-updater";
import { DATA_DIR } from "./constants";
import { createFirstLaunchTour } from "./firstLaunch";
@@ -21,6 +21,8 @@ if (IS_DEV) {
require("source-map-support").install();
}
autoUpdater.checkForUpdatesAndNotify();
// Make the Vencord files use our DATA_DIR
process.env.VENCORD_USER_DATA_DIR = DATA_DIR;
@@ -74,7 +76,6 @@ function init() {
});
app.whenReady().then(async () => {
checkUpdates();
if (process.platform === "win32") app.setAppUserModelId("dev.vencord.vesktop");
registerScreenShareHandler();