Add ability to load Vencord from custom location (dev install)

This commit is contained in:
Vendicated
2023-04-09 02:26:31 +02:00
parent 591d380160
commit 805b6fbcc4
14 changed files with 456 additions and 310 deletions

View File

@@ -3,16 +3,20 @@ import { join } from "path";
import { ICON_PATH } from "../shared/paths";
import { once } from "../shared/utils/once";
import { DATA_DIR, VENCORD_FILES_DIR } from "./constants";
import "./ipc";
import { createMainWindow } from "./mainWindow";
import { Settings } from "./settings";
import { createSplashWindow } from "./splash";
import { ensureVencordFiles } from "./utils/vencordLoader";
import "./ipc";
if (IS_DEV) {
require("source-map-support").install();
}
// Make the Vencord files use our DATA_DIR
process.env.VENCORD_USER_DATA_DIR = DATA_DIR;
const runVencordMain = once(() => require(join(VENCORD_FILES_DIR, "main.js")));
const runVencordMain = once(() => require(join(VENCORD_FILES_DIR, "vencordDesktopMain.js")));
let mainWin: BrowserWindow | null = null;