Skip to content

The only downloader you need. 下载器的集大成者。

取消 --debug 参数判断是否在编译后的 Runtime, 换成 nuitka 的 "__compiled__" in globals()

XiaoYouChR4461853fd8ea
diff --git a/Ghost-Downloader-3.py b/Ghost-Downloader-3.py
index bf62206c..9f920e54 100644
--- a/Ghost-Downloader-3.py
+++ b/Ghost-Downloader-3.py
@@ -10,7 +10,7 @@ from app.common.application import SingletonApplication
from app.common.config import cfg
# 设置程序运行路径, 便于调试
-if "--debug" in sys.argv: # 调试时候请使用相对路径!
+if not "__compiled__" in globals(): # 调试时候使用相对路径
cfg.appPath = "./"
qconfig.load('./Ghost Downloader 配置文件.json', cfg)
else: # 编译后
diff --git a/app/common/application.py b/app/common/application.py
index e28aaa34..0a309bfc 100644
--- a/app/common/application.py
+++ b/app/common/application.py
@@ -41,7 +41,7 @@ class SingletonApplication(QApplication):
logger.error(self.memory.errorString())
raise RuntimeError(self.memory.errorString())
- if not "--debug" in argv:
+ if "__compiled__" in globals(): # 编译后的错误捕捉
sys.excepthook = exception_hook
def exception_hook(exception: BaseException, value, tb):