# -*- mode: python ; coding: utf-8 -*-

a = Analysis(
    ['starter.py'],
    pathex=[],
    binaries=[],
    datas=[('config.ini', '.'), ('xtquant/xtdata.ini', 'xtquant')],  # 明确包含配置文件和xtdata.ini
    hiddenimports=['brotli', 'brotli.encoding'],
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=['PyQt5', 'PyQt6', 'PySide2', 'PySide6', 'matplotlib', 'numpy', 'pandas', 'jupyter', 'notebook', 'ipython'],  # 排除不必要的包
    noarchive=False,
    optimize=2,  # 启用最高级别优化
)
pyz = PYZ(a.pure)

exe = EXE(
    pyz,
    a.scripts,
    a.binaries,
    a.datas,
    [],
    name='神之一手',
    debug=False,
    bootloader_ignore_signals=False,
    strip=True,  # 去除调试符号
    upx=True,
    upx_exclude=[],
    runtime_tmpdir=None,
    console=False,
    disable_windowed_traceback=False,
    argv_emulation=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None,
    icon='logo.png'  # 添加图标文件
)