don't use asar in dev

This commit is contained in:
Vendicated 2024-07-19 22:01:04 +02:00
parent d48f52e8c3
commit 090a9f5caf
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
3 changed files with 5 additions and 5 deletions

View file

@ -231,7 +231,7 @@ if (existsSync("dist/renderer.js")) {
); );
await Promise.all([ await Promise.all([
writeFile("dist/patcher.js", 'require("./desktop.asar")'), writeFile("dist/patcher.js", 'require("./desktop")'),
writeFile("dist/vencordDesktopMain.js", 'require("./vesktop.asar")') writeFile("dist/vencordDesktopMain.js", 'require("./vesktop")')
]); ]);
} }

View file

@ -124,7 +124,7 @@ try {
env: { env: {
...process.env, ...process.env,
VENCORD_USER_DATA_DIR: BASE_DIR, VENCORD_USER_DATA_DIR: BASE_DIR,
VENCORD_ASAR_FILE: join(BASE_DIR, "dist/desktop.asar"), VENCORD_DIRECTORY: join(BASE_DIR, "dist/desktop"),
VENCORD_DEV_INSTALL: "1" VENCORD_DEV_INSTALL: "1"
} }
}); });

View file

@ -19,7 +19,7 @@
import { debounce } from "@shared/debounce"; import { debounce } from "@shared/debounce";
import { contextBridge, webFrame } from "electron"; import { contextBridge, webFrame } from "electron";
import { readFileSync, watch } from "fs"; import { readFileSync, watch } from "fs";
import { dirname, join } from "path"; import { join } from "path";
import VencordNative from "./VencordNative"; import VencordNative from "./VencordNative";
@ -45,7 +45,7 @@ if (location.protocol !== "data:") {
if (IS_DEV) { if (IS_DEV) {
// persistent means keep process running if watcher is the only thing still running // persistent means keep process running if watcher is the only thing still running
// which we obviously don't want // which we obviously don't want
watch(dirname(rendererCss), { persistent: false }, () => { watch(rendererCss, { persistent: false }, () => {
document.getElementById("vencord-css-core")!.textContent = readFileSync(rendererCss, "utf-8"); document.getElementById("vencord-css-core")!.textContent = readFileSync(rendererCss, "utf-8");
}); });
} }