From 521921d90eeda4c56834af496679a35c8f856d38 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Thu, 30 May 2024 19:41:25 -0300 Subject: [PATCH] add some debug logs --- .github/workflows/build.yml | 2 +- requirements.txt | 5 ----- src/main/index.ts | 4 ++++ src/main/services/aria2c.ts | 3 +++ 4 files changed, 8 insertions(+), 6 deletions(-) delete mode 100644 requirements.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8a042273..6f6466ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,10 +52,10 @@ jobs: name: Build-${{ matrix.os }} path: | dist/win-unpacked/** + dist/*.dmg dist/*.zip dist/*.deb dist/*.rpm dist/*.tar.gz dist/*.yml dist/*.blockmap - dist/mac-arm64/*.app diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 6cee730a..00000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -libtorrent -cx_Freeze -cx_Logging; sys_platform == 'win32' -lief; sys_platform == 'win32' -pywin32; sys_platform == 'win32' diff --git a/src/main/index.ts b/src/main/index.ts index 74481090..cea2723a 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -12,6 +12,7 @@ import { import { dataSource } from "@main/data-source"; import * as resources from "@locales"; import { userPreferencesRepository } from "@main/repository"; +import { logsPath } from "./constants"; const { autoUpdater } = updater; autoUpdater.setFeedURL({ @@ -21,6 +22,9 @@ autoUpdater.setFeedURL({ }); autoUpdater.logger = logger; +console.log = logger.info; + +console.log("logsPath:", logsPath); const gotTheLock = app.requestSingleInstanceLock(); if (!gotTheLock) app.quit(); diff --git a/src/main/services/aria2c.ts b/src/main/services/aria2c.ts index b1b1da76..3994f030 100644 --- a/src/main/services/aria2c.ts +++ b/src/main/services/aria2c.ts @@ -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.log("starting aria2 at:", binaryPath); + return spawn( binaryPath, [