onekeydiag/oneketdiag.spec
leimingsheng 63d36548aa code sync
2025-08-22 21:19:53 +08:00

47 lines
1.3 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
# 定义所有需要打包的文件和依赖
a = Analysis(
['./src/main.py'], # 程序入口文件
pathex=['./'], # 工程根目录(确保能找到子模块)
binaries=[],
# 配置资源文件(子模块会自动识别,主要配置非.py文件
datas=[
# 若有其他资源(如.ui文件、图片等按此格式添加
],
# 隐藏依赖(若打包后提示缺少模块,添加在这里)
hiddenimports=[
],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[], # 排除不需要的模块(减小体积)
noarchive=False,
cipher=block_cipher,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='OneKeyDiag', # 生成的EXE文件名
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True, # 启用压缩(推荐)
upx_exclude=[],
runtime_tmpdir=None,
console=False, # 隐藏控制台GUI程序
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)