From e5b8123a3dfb0ae9af487e66c3996619fcac7a7f Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Fri, 19 Jul 2024 00:32:58 -0400 Subject: [PATCH] compile vesktop asar as well --- scripts/build/build.mjs | 6 ++++-- src/main/updater/common.ts | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/build/build.mjs b/scripts/build/build.mjs index 1f1ad96d..04f75bdd 100755 --- a/scripts/build/build.mjs +++ b/scripts/build/build.mjs @@ -229,7 +229,8 @@ await Promise.all([ await Promise.all([ createPackage("dist/desktop", "dist/desktop.asar"), - createPackage("dist/vesktop", "dist/equibop.asar") + createPackage("dist/vesktop", "dist/equibop.asar"), + createPackage("dist/vesktop", "dist/vesktop.asar") ]); if (existsSync("dist/renderer.js")) { @@ -247,6 +248,7 @@ if (existsSync("dist/renderer.js")) { await Promise.all([ writeFile("dist/patcher.js", 'require("./desktop.asar")'), - writeFile("dist/vencordDesktopMain.js", 'require("./equibop.asar")') + writeFile("dist/vencordDesktopMain.js", 'require("./equibop.asar")'), + writeFile("dist/vencordDesktopMain.js", 'require("./vesktop.asar")') ]); } diff --git a/src/main/updater/common.ts b/src/main/updater/common.ts index 4d4d4461..451ff146 100644 --- a/src/main/updater/common.ts +++ b/src/main/updater/common.ts @@ -16,9 +16,10 @@ * along with this program. If not, see . */ -export const ASAR_FILE = IS_VESKTOP - ? "equibop.asar" - : "desktop.asar"; +export let ASAR_FILE; +if (IS_VESKTOP) ASAR_FILE = "vesktop.asar"; +if (IS_EQUIBOP) ASAR_FILE = "equibop.asar"; +if (!IS_VESKTOP && !IS_EQUIBOP) "desktop.asar"; export function serializeErrors(func: (...args: any[]) => any) { return async function () {