diff options
author | Justice Almanzar <superdash993@gmail.com> | 2023-08-10 22:14:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-11 00:14:50 +0200 |
commit | fa124d8877ff5f9927a6524768774d5e68b888cc (patch) | |
tree | f63474d27c9efa434191eb6171fda483924e4a0a /src/main | |
parent | 135da2a5f35e89bf04cb9a9b2d03f9bb7e48c65d (diff) | |
download | Vencord-fa124d8877ff5f9927a6524768774d5e68b888cc.tar.gz Vencord-fa124d8877ff5f9927a6524768774d5e68b888cc.tar.bz2 Vencord-fa124d8877ff5f9927a6524768774d5e68b888cc.zip |
build: split preload & renderer.css into D. desktop / vesktop (#1629)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/index.ts | 1 | ||||
-rw-r--r-- | src/main/ipcMain.ts | 2 | ||||
-rw-r--r-- | src/main/patcher.ts | 2 | ||||
-rw-r--r-- | src/main/updater/common.ts | 4 |
4 files changed, 5 insertions, 4 deletions
diff --git a/src/main/index.ts b/src/main/index.ts index a8b9429..2e1a10e 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -44,6 +44,7 @@ if (IS_VENCORD_DESKTOP || !IS_VANILLA) { case "renderer.js.map": case "vencordDesktopRenderer.js.map": case "preload.js.map": + case "vencordDesktopPreload.js.map": case "patcher.js.map": case "vencordDesktopMain.js.map": cb(join(__dirname, url)); diff --git a/src/main/ipcMain.ts b/src/main/ipcMain.ts index c86268d..625f24f 100644 --- a/src/main/ipcMain.ts +++ b/src/main/ipcMain.ts @@ -138,7 +138,7 @@ ipcMain.handle(IpcEvents.OPEN_MONACO_EDITOR, async () => { autoHideMenuBar: true, darkTheme: true, webPreferences: { - preload: join(__dirname, "preload.js"), + preload: join(__dirname, IS_DISCORD_DESKTOP ? "preload.js" : "vencordDesktopPreload.js"), contextIsolation: true, nodeIntegration: false, sandbox: false diff --git a/src/main/patcher.ts b/src/main/patcher.ts index 066cb3d..2259b20 100644 --- a/src/main/patcher.ts +++ b/src/main/patcher.ts @@ -71,7 +71,7 @@ if (!IS_VANILLA) { constructor(options: BrowserWindowConstructorOptions) { if (options?.webPreferences?.preload && options.title) { const original = options.webPreferences.preload; - options.webPreferences.preload = join(__dirname, "preload.js"); + options.webPreferences.preload = join(__dirname, IS_DISCORD_DESKTOP ? "preload.js" : "vencordDesktopPreload.js"); options.webPreferences.sandbox = false; if (settings.frameless) { options.frame = false; diff --git a/src/main/updater/common.ts b/src/main/updater/common.ts index 69832d1..41b9837 100644 --- a/src/main/updater/common.ts +++ b/src/main/updater/common.ts @@ -18,9 +18,9 @@ export const VENCORD_FILES = [ IS_DISCORD_DESKTOP ? "patcher.js" : "vencordDesktopMain.js", - "preload.js", + IS_DISCORD_DESKTOP ? "preload.js" : "vencordDesktopPreload.js", IS_DISCORD_DESKTOP ? "renderer.js" : "vencordDesktopRenderer.js", - "renderer.css" + IS_DISCORD_DESKTOP ? "renderer.css" : "vencordDesktopRenderer.css", ]; export function serializeErrors(func: (...args: any[]) => any) { |