From 7f7d4a1db3ce94636200493d0899dd0830d2dd0f Mon Sep 17 00:00:00 2001 From: Zamitto Date: Fri, 26 Apr 2024 00:22:28 -0300 Subject: [PATCH] chage fastlis.exe location to not conflict with linux build --- forge.config.ts | 1 - postinstall.py | 6 +++++- src/main/helpers/ps.ts | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/forge.config.ts b/forge.config.ts index 4e6cdb21..94cfac57 100644 --- a/forge.config.ts +++ b/forge.config.ts @@ -30,7 +30,6 @@ const config: ForgeConfig = { executableName: "Hydra", extraResource: [ "./resources/hydra.db", - "./resources/fastlist.exe", "./resources/icon_tray.png", "./resources/dist", ], diff --git a/postinstall.py b/postinstall.py index 3fb85d8d..c55dca60 100644 --- a/postinstall.py +++ b/postinstall.py @@ -1,5 +1,9 @@ import shutil import platform +import os if platform.system() == "Windows": - shutil.copy("node_modules/ps-list/vendor/fastlist-0.3.0-x64.exe", "resources/fastlist.exe") + if not os.path.exists("resources/dist"): + os.mkdir("resources/dist") + + shutil.copy("node_modules/ps-list/vendor/fastlist-0.3.0-x64.exe", "resources/dist/fastlist.exe") diff --git a/src/main/helpers/ps.ts b/src/main/helpers/ps.ts index 449d103f..3d83cc7d 100644 --- a/src/main/helpers/ps.ts +++ b/src/main/helpers/ps.ts @@ -9,8 +9,8 @@ const execFile = promisify(childProcess.execFile); export const getProcesses = async (isPackaged: boolean) => { if (process.platform == "win32") { const binaryPath = isPackaged - ? path.join(process.resourcesPath, "fastlist.exe") - : path.join(__dirname, "..", "..", "resources", "fastlist.exe"); + ? path.join(process.resourcesPath, "dist", "fastlist.exe") + : path.join(__dirname, "..", "..", "resources", "dist", "fastlist.exe"); const { stdout } = await execFile(binaryPath, { maxBuffer: TEN_MEGABYTES,