73 lines
1.4 KiB
Python
73 lines
1.4 KiB
Python
# -*- mode: python ; coding: utf-8 -*-
|
|
"""
|
|
Linux 存储管理器 - PyInstaller 打包配置 (Tkinter 版本)
|
|
支持 Arch Linux 和 CentOS/RHEL 8
|
|
"""
|
|
|
|
import sys
|
|
import os
|
|
|
|
block_cipher = None
|
|
|
|
# 分析依赖
|
|
a = Analysis(
|
|
['main.py'],
|
|
pathex=[],
|
|
binaries=[],
|
|
datas=[],
|
|
hiddenimports=[
|
|
# 平台兼容模块
|
|
'platform_compat',
|
|
'system_compat',
|
|
# Tkinter 相关
|
|
'tkinter',
|
|
'tkinter.ttk',
|
|
'tkinter.messagebox',
|
|
'tkinter.filedialog',
|
|
'tkinter.simpledialog',
|
|
# 其他依赖
|
|
'pexpect',
|
|
'ptyprocess',
|
|
],
|
|
hookspath=[],
|
|
hooksconfig={},
|
|
runtime_hooks=[],
|
|
excludes=[
|
|
# 排除不需要的 GUI 库以减小体积
|
|
'PySide6',
|
|
'PySide2',
|
|
'PyQt5',
|
|
'PyQt6',
|
|
'matplotlib',
|
|
'numpy',
|
|
],
|
|
win_no_prefer_redirects=False,
|
|
win_private_assemblies=False,
|
|
cipher=block_cipher,
|
|
noarchive=False,
|
|
)
|
|
|
|
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
|
|
|
exe = EXE(
|
|
pyz,
|
|
a.scripts,
|
|
a.binaries,
|
|
a.zipfiles,
|
|
a.datas,
|
|
[],
|
|
name='disk-manager',
|
|
debug=False,
|
|
bootloader_ignore_signals=False,
|
|
strip=False,
|
|
upx=True,
|
|
upx_exclude=[],
|
|
runtime_tmpdir=None,
|
|
console=True,
|
|
disable_windowed_traceback=False,
|
|
argv_emulation=False,
|
|
target_arch=None,
|
|
codesign_identity=None,
|
|
entitlements_file=None,
|
|
)
|