Merge pull request #136 from hydralauncher/fix/update-fastlist-location-after-electron-build-migration

fix: update fastlist directory
This commit is contained in:
Hydra 2024-04-30 22:24:23 +01:00 committed by GitHub
commit 42579b414d
4 changed files with 5 additions and 7 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
.vscode
node_modules
hydra-download-manager
fastlist.exe
__pycache__
dist
out

View File

@ -5,6 +5,7 @@ directories:
extraResources:
- hydra-download-manager
- hydra.db
- fastlist.exe
files:
- "!**/.vscode/*"
- "!src/*"

View File

@ -1,12 +1,8 @@
const fs = require("fs");
if (process.platform === "win32") {
if (!fs.existsSync("resources/dist")) {
fs.mkdirSync("resources/dist");
}
fs.copyFileSync(
"node_modules/ps-list/vendor/fastlist-0.3.0-x64.exe",
"resources/dist/fastlist.exe"
"fastlist.exe"
);
}

View File

@ -10,8 +10,8 @@ const execFile = promisify(childProcess.execFile);
export const getProcesses = async () => {
if (process.platform == "win32") {
const binaryPath = app.isPackaged
? path.join(process.resourcesPath, "dist", "fastlist.exe")
: path.join(__dirname, "..", "..", "resources", "dist", "fastlist.exe");
? path.join(process.resourcesPath, "fastlist.exe")
: path.join(__dirname, "..", "..", "fastlist.exe");
const { stdout } = await execFile(binaryPath, {
maxBuffer: TEN_MEGABYTES,