Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update fastlist directory #136

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.vscode
node_modules
hydra-download-manager
fastlist.exe
__pycache__
dist
out
Expand Down
1 change: 1 addition & 0 deletions electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ directories:
extraResources:
- hydra-download-manager
- hydra.db
- fastlist.exe
files:
- "!**/.vscode/*"
- "!src/*"
Expand Down
6 changes: 1 addition & 5 deletions postinstall.cjs
Original file line number Diff line number Diff line change
@@ -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"
);
}
4 changes: 2 additions & 2 deletions src/main/helpers/ps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading