From 090a9f5caf8ec28da06fdbc7c9cd7a489087428a Mon Sep 17 00:00:00 2001 From: Vendicated Date: Fri, 19 Jul 2024 22:01:04 +0200 Subject: [PATCH] don't use asar in dev --- scripts/build/build.mts | 4 ++-- scripts/runInstaller.mjs | 2 +- src/preload.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/build/build.mts b/scripts/build/build.mts index d4c702b44..52e52ddae 100755 --- a/scripts/build/build.mts +++ b/scripts/build/build.mts @@ -231,7 +231,7 @@ if (existsSync("dist/renderer.js")) { ); await Promise.all([ - writeFile("dist/patcher.js", 'require("./desktop.asar")'), - writeFile("dist/vencordDesktopMain.js", 'require("./vesktop.asar")') + writeFile("dist/patcher.js", 'require("./desktop")'), + writeFile("dist/vencordDesktopMain.js", 'require("./vesktop")') ]); } diff --git a/scripts/runInstaller.mjs b/scripts/runInstaller.mjs index 52b1e586d..bdc01017b 100644 --- a/scripts/runInstaller.mjs +++ b/scripts/runInstaller.mjs @@ -124,7 +124,7 @@ try { env: { ...process.env, 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" } }); diff --git a/src/preload.ts b/src/preload.ts index 5d9dd180e..7c61a181d 100644 --- a/src/preload.ts +++ b/src/preload.ts @@ -19,7 +19,7 @@ import { debounce } from "@shared/debounce"; import { contextBridge, webFrame } from "electron"; import { readFileSync, watch } from "fs"; -import { dirname, join } from "path"; +import { join } from "path"; import VencordNative from "./VencordNative"; @@ -45,7 +45,7 @@ if (location.protocol !== "data:") { if (IS_DEV) { // persistent means keep process running if watcher is the only thing still running // 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"); }); }