Files
cbb-refresh-verify-795/packaging/CbbRefreshVerify.spec
T

30 lines
2.9 KiB
RPMSpec

from pathlib import Path
project_root = Path(SPECPATH).parent
assets_root = project_root / 'src' / 'cbb_refresh_verify' / 'assets'
bridge_path = project_root / 'tools' / 'status_bridge' / 'bin' / 'CbbStatusBridge32.exe'
verify_probe_path = project_root / 'tools' / 'status_bridge' / 'bin' / 'VerifyProbe32.exe'
a = Analysis(
[str(project_root / 'src' / 'cbb_refresh_verify' / '__main__.py')],
pathex=[str(project_root / 'src'), r'F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\src'],
binaries=(
[(str(bridge_path), 'tools/status_bridge/bin')] if bridge_path.is_file() else []
) + (
[(str(verify_probe_path), 'tools/status_bridge/bin')]
if verify_probe_path.is_file() else []
),
datas=[(str(project_root / 'src' / 'cbb_refresh_verify' / 'save_verified_block.vbs'), 'cbb_refresh_verify'),
(str(project_root / 'src' / 'cbb_refresh_verify' / 'close_failed_block.vbs'), 'cbb_refresh_verify'),
(str(assets_root / 'cbb_refresh_verify.ico'), 'cbb_refresh_verify/assets'),
(str(assets_root / 'cbb_refresh_verify.png'), 'cbb_refresh_verify/assets'),
(str(assets_root / 'cbb_refresh_verify.svg'), 'cbb_refresh_verify/assets'),
(str(assets_root / 'dialog_rules.v1.json'), 'cbb_refresh_verify/assets')],
hiddenimports=['win32com.client','win32com.client.dynamic','pythoncom','pywintypes','win32job','pywinauto','pywinauto.uia_defines','pywinauto.controls.uiawrapper','pywinauto.win32_element_info','cbb_refresh_verify.dialog_agent','cbb_refresh_verify.dialog_probe','cbb_refresh_verify.dialog_rules','cbb_refresh_verify.ui.main_window','cbb_refresh_verify.ui.management_dialog','cbb_refresh_verify.management','cbb_refresh_verify.native_management','cbb_refresh_verify.library_lock','cbb_refresh_verify.content_check','cbb_refresh_verify.failed_session','cbb_refresh_verify.icdb_ownership','cbb_refresh_verify.native_repair','cbb_refresh_verify.native_repair_ui','dx_productivity.trial_task_center.logging_setup','dx_productivity.trial_task_center.errors','dx_productivity.trial_task_center.retention'],
excludes=['PySide6.QtDesigner','PySide6.QtMultimedia','PySide6.QtMultimediaWidgets','PySide6.QtOpenGL','PySide6.QtOpenGLWidgets','PySide6.QtPdf','PySide6.QtPdfWidgets','PySide6.QtQml','PySide6.QtQuick','PySide6.QtQuickWidgets','PySide6.QtWebChannel','PySide6.QtWebEngineCore','PySide6.QtWebEngineWidgets'],
)
excluded_qt_binaries = {'icudt78.dll','icuuc.dll','qpdf.dll','qt6pdf.dll','qt6qml.dll','qt6qmlmeta.dll','qt6qmlmodels.dll','qt6qmlworkerscript.dll','qt6quick.dll','qt6quickwidgets.dll'}
a.binaries = [entry for entry in a.binaries if Path(entry[0]).name.casefold() not in excluded_qt_binaries]
pyz = PYZ(a.pure)
exe = EXE(pyz, a.scripts, [], exclude_binaries=True, name='CbbRefreshVerify', console=False,
icon=str(assets_root / 'cbb_refresh_verify.ico'))
coll = COLLECT(exe, a.binaries, a.zipfiles, a.datas, name='CbbRefreshVerify-Background')