51 lines
1.1 KiB
Python
51 lines
1.1 KiB
Python
# -*- mode: python ; coding: utf-8 -*-
|
|
import os
|
|
|
|
def get_version():
|
|
with open('version.txt', 'r', encoding='utf-8') as f:
|
|
version = f.read().strip()
|
|
return version
|
|
|
|
version = get_version()
|
|
|
|
a = Analysis(
|
|
['main.py'],
|
|
pathex=[],
|
|
binaries=[],
|
|
datas=[('icon', 'icon'), ('version.txt', '.')],
|
|
hiddenimports=[
|
|
'win32gui', 'win32con', 'win32process', 'psutil', # Windows API 相关
|
|
'tkinter', 'tkinter.ttk', # GUI 相关
|
|
'requests', 'urllib3', 'certifi', # 网络请求相关
|
|
'json', 'uuid', 'hashlib', 'logging' # 基础功能相关
|
|
],
|
|
hookspath=[],
|
|
hooksconfig={},
|
|
runtime_hooks=[],
|
|
excludes=[],
|
|
noarchive=False,
|
|
optimize=0,
|
|
)
|
|
pyz = PYZ(a.pure)
|
|
|
|
exe = EXE(
|
|
pyz,
|
|
a.scripts,
|
|
a.binaries,
|
|
a.datas,
|
|
[],
|
|
name=f'听泉cursor助手{version}',
|
|
debug=False,
|
|
bootloader_ignore_signals=False,
|
|
strip=False,
|
|
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=['icon\\two.ico'],
|
|
) |