mirror of
https://github.com/hyb-oyqq/FRAISEMOE-Addons-Installer-NEXT.git
synced 2026-01-01 11:40:45 +00:00
refactor(extraction_thread): 优化压缩包内容分析的日志输出格式
将文件类型判断逻辑提取为变量,提高代码可读性。
This commit is contained in:
@@ -6,6 +6,10 @@ from PyInstaller.utils.hooks import collect_submodules, collect_data_files
|
||||
|
||||
block_cipher = None
|
||||
|
||||
# 获取spec文件所在目录的绝对路径
|
||||
SPEC_ROOT = os.path.dirname(os.path.abspath(SPEC))
|
||||
ICON_PATH = os.path.join(SPEC_ROOT, 'assets', 'images', 'ICO', 'icon.ico')
|
||||
|
||||
# 收集所有子模块
|
||||
hiddenimports = []
|
||||
hiddenimports += collect_submodules('workers')
|
||||
@@ -67,5 +71,5 @@ exe = EXE(
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
icon='assets/images/ICO/icon.ico',
|
||||
icon=ICON_PATH,
|
||||
)
|
||||
|
||||
@@ -105,7 +105,9 @@ class ExtractionThread(QThread):
|
||||
debug_logger.debug(f"压缩包内容分析:")
|
||||
debug_logger.debug(f"- 文件总数: {len(file_list)}")
|
||||
for i, f in enumerate(file_list):
|
||||
debug_logger.debug(f" {i+1}. {f} - 类型: {'文件夹' if f.endswith('/') or f.endswith('\\') else '文件'}")
|
||||
is_folder = f.endswith('/') or f.endswith('\\')
|
||||
file_type = '文件夹' if is_folder else '文件'
|
||||
debug_logger.debug(f" {i+1}. {f} - 类型: {file_type}")
|
||||
|
||||
update_progress(20, f"正在分析 {self.game_version} 的补丁文件...")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user