chage fastlis.exe location to not conflict with linux build

This commit is contained in:
Zamitto 2024-04-26 00:22:28 -03:00
parent fd6ab62e13
commit 7f7d4a1db3
3 changed files with 7 additions and 4 deletions

View File

@ -30,7 +30,6 @@ const config: ForgeConfig = {
executableName: "Hydra",
extraResource: [
"./resources/hydra.db",
"./resources/fastlist.exe",
"./resources/icon_tray.png",
"./resources/dist",
],

View File

@ -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")

View File

@ -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,