From bf2552140338f8913c8d3b00ba200f7c6b087c47 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Fri, 19 Jul 2024 16:08:18 -0400 Subject: [PATCH] Asar stuff --- scripts/build/build.mjs | 6 +++--- scripts/runInstaller.mjs | 2 +- src/preload.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/build/build.mjs b/scripts/build/build.mjs index bf3d091b..b59ab0a9 100755 --- a/scripts/build/build.mjs +++ b/scripts/build/build.mjs @@ -303,8 +303,8 @@ if (existsSync("dist/renderer.js")) { ); await Promise.all([ - writeFile("dist/patcher.js", 'require("./desktop.asar")'), - writeFile("dist/equicordDesktopMain.js", 'require("./equibop.asar")'), - writeFile("dist/vencordDesktopMain.js", 'require("./vesktop.asar")') + writeFile("dist/patcher.js", 'require("./desktop")'), + writeFile("dist/equicordDesktopMain.js", 'require("./equibop")'), + writeFile("dist/vencordDesktopMain.js", 'require("./vesktop")') ]); } diff --git a/scripts/runInstaller.mjs b/scripts/runInstaller.mjs index 4fb9cc78..2a6daf50 100644 --- a/scripts/runInstaller.mjs +++ b/scripts/runInstaller.mjs @@ -124,7 +124,7 @@ try { env: { ...process.env, EQUICORD_USER_DATA_DIR: BASE_DIR, - EQUICORD_ASAR_FILE: join(BASE_DIR, "dist/desktop.asar"), + EQUICORD_DIRECTORY: join(BASE_DIR, "dist/desktop"), EQUICORD_DEV_INSTALL: "1" } }); diff --git a/src/preload.ts b/src/preload.ts index 5d9dd180..7c61a181 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"); }); }