-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprinter_v5.2.spec
More file actions
142 lines (128 loc) · 3.03 KB
/
printer_v5.2.spec
File metadata and controls
142 lines (128 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# -*- mode: python ; coding: utf-8 -*-
from PyInstaller.utils.hooks import collect_all
import os
# 数据文件和二进制文件
datas = [
# 包含SumatraPDF目录
('external/SumatraPDF', 'external/SumatraPDF'),
# 包含资源文件
('resources', 'resources'),
# 包含配置文件目录
('data', 'data'),
]
binaries = []
# 隐藏导入模块
hiddenimports = [
# GUI相关
'tkinterdnd2',
'tkinterdnd2.TkinterDnD',
# Windows API
'win32com.client',
'win32print',
'win32api',
'win32con',
'comtypes.client',
'pythoncom',
# 文档处理库
'PyPDF2',
'openpyxl',
'xlwings',
'docx',
'pptx',
# 图像处理
'PIL',
'PIL.Image',
'PIL.ImageFile',
# 标准库模块
'pathlib',
'subprocess',
'threading',
'queue',
'json',
'datetime',
'time',
'os',
'sys',
# 项目模块 - 处理器
'src.handlers.pdf_handler',
'src.handlers.word_handler',
'src.handlers.powerpoint_handler',
'src.handlers.excel_handler',
'src.handlers.image_handler',
'src.handlers.text_handler',
'src.handlers.handler_registry',
'src.handlers.base_handler',
'src.handlers.print_utils',
# 项目模块 - 核心
'src.core.document_manager',
'src.core.print_controller',
'src.core.page_count_manager',
'src.core.settings_manager',
'src.core.printer_config_manager',
'src.core.models',
# 项目模块 - GUI
'src.gui.main_window',
'src.gui.print_settings_dialog',
'src.gui.page_count_dialog',
'src.gui.components.file_import_handler',
'src.gui.components.list_operation_handler',
'src.gui.components.window_manager',
'src.gui.components.tooltip',
# 项目模块 - 工具
'src.utils.config_utils',
'src.utils.path_utils',
]
# 收集tkinterdnd2相关文件
tmp_ret = collect_all('tkinterdnd2')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
a = Analysis(
['main.py'],
pathex=[],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[
# 排除不需要的模块以减小文件大小
'matplotlib',
'numpy',
'pandas',
'scipy',
'IPython',
'jupyter',
'pytest',
'unittest',
],
noarchive=False,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='办公文档批量打印器v5.2',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[
# 不压缩这些文件,避免运行时问题
'SumatraPDF.exe',
'vcruntime*.dll',
'msvcp*.dll',
'api-ms-win*.dll',
],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon='resources\\app_icon.ico',
version='version_info.txt',
)