This commit is contained in:
Zamitto 2024-05-30 12:18:44 -03:00
parent eaa5b46b1f
commit 2a02936648
3 changed files with 6 additions and 3 deletions

View file

@ -1,12 +1,15 @@
import path from "node:path";
import { spawn } from "node:child_process";
import { app } from "electron";
import { logger } from "./logger";
export const startAria2 = () => {
const binaryPath = app.isPackaged
? path.join(process.resourcesPath, "aria2", "aria2c")
: path.join(__dirname, "..", "..", "aria2", "aria2c");
logger.info("startAria2 on:", binaryPath);
return spawn(
binaryPath,
[