来自 入库分拣工作站_源代码_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 由用户侧打包分发,本次只推源码。
75 lines
2.2 KiB
RPMSpec
75 lines
2.2 KiB
RPMSpec
# -*- coding: utf-8 -*-
|
||
"""打包配置 · 单文件版(PyInstaller 6.x)
|
||
|
||
产物:dist_onefile/入库分拣工作站.exe —— 就一个文件,拷到能跑的 Windows 上双击即用。
|
||
|
||
和 main.spec(onedir 绿色版)的区别只有两处:
|
||
* EXE 里带 binaries/datas(exclude_binaries=False),不再产出 COLLECT 目录;
|
||
* 运行时要解压到 %TEMP%\\_MEIxxxx,冷启动比绿色版慢几秒。
|
||
|
||
摄像头取帧仍是 exe 自己分发(main.py 的 --wb-child),单文件版一样能跑,
|
||
只是每个子进程会各自解压一次运行库——只影响启动,不影响识别。
|
||
"""
|
||
import os
|
||
|
||
ROOT = os.path.abspath(SPECPATH) # noqa: F821 (PyInstaller 注入)
|
||
|
||
HIDDEN = [
|
||
'core.evidence._cam_child',
|
||
'core.evidence._probe_child',
|
||
'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',
|
||
'core.devices',
|
||
'core.handwrite',
|
||
'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=[
|
||
(os.path.join(ROOT, "models", "cls"), "bundled_cls"),
|
||
(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,
|
||
a.binaries,
|
||
a.datas,
|
||
[],
|
||
name='入库分拣工作站',
|
||
debug=False,
|
||
bootloader_ignore_signals=False,
|
||
strip=False,
|
||
upx=False,
|
||
runtime_tmpdir=None,
|
||
console=False,
|
||
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'),
|
||
)
|