Files
windows-fenjian/main.spec
T
Ubuntu 4966345424 feat(1.0.75): 同步秤端 v1.0.75 源码(UI 抖动修复 + 严格入库/分拣样本)
来自 入库分拣工作站_源代码_v1.0.75:点商品名抖动的中间帧修复、ui/osk/tablet 调整、严格入库校验、分拣场景样本(review_queue station=picking);版本/安装包/说明同步 1.0.75。注意:本版 confirm_before_submit 恒 True、submit_on_remove 恒 False,1.0.71 的 inbound_auto_submit 账号开关被移除;models/cls 与 data/ 未入库。EXE 由用户侧打包分发,本次只推源码。
2026-12-03 16:26:17 +08:00

86 lines
2.4 KiB
RPMSpec
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.
# -*- coding: utf-8 -*-
"""打包配置(PyInstaller 6.x)
产物:dist/入库分拣工作站/ (onedir,启动快;摄像头取帧子进程也靠这个 exe 分发)
├─ 入库分拣工作站.exe
├─ _internal/ 运行库
├─ config.json 现场可直接改
├─ 使用说明.txt
└─ data/photos/ 卡片兜底图片
"""
import os
ROOT = os.path.abspath(SPECPATH) # noqa: F821 (PyInstaller 注入)
HIDDEN = [
# 摄像头子进程是 runpy 动态加载的,静态分析看不到,必须显式声明
'core.evidence._cam_child',
'core.evidence._probe_child',
# pywin32 / comtypes / 打印机
'win32com', 'win32com.client', 'pythoncom', 'pywintypes',
'win32print', 'win32api', 'win32con', 'win32job', 'win32event',
'comtypes', 'comtypes.client', 'comtypes.stream',
'pygrabber', 'pygrabber.dshow_graph',
# 串口枚举
'serial.tools.list_ports', 'serial.tools.list_ports_windows',
# 设备自动识别(在函数里 import,显式声明更保险)
'core.devices',
'core.handwrite',
# Pillow 与 Tk 的衔接
'PIL._tkinter_finder',
]
EXCLUDES = [
'matplotlib', 'scipy', 'pandas', 'PyQt5', 'PyQt6', 'PySide2', 'PySide6',
'IPython', 'jupyter', 'notebook', 'nbconvert', 'pytest', 'sphinx',
]
a = Analysis(
[os.path.join(ROOT, 'main.py')],
pathex=[ROOT],
binaries=[],
datas=[
# 首跑兜底用的默认配置(main.py 里 _ensure_config 复制到 exe 旁边)
(os.path.join(ROOT, 'assets', 'config.default.json'), '.'),
],
hiddenimports=HIDDEN,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=EXCLUDES,
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='入库分拣工作站',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
console=False, # 现场不弹黑窗;崩溃写 data/crash.log + 弹窗
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=os.path.join(ROOT, 'assets', 'app.ico'),
version=os.path.join(ROOT, 'assets', 'version_info.txt'),
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=False,
upx_exclude=[],
name='入库分拣工作站',
)