fix: continue released verify batches and bound automation shutdown
This commit is contained in:
1 parent
477a5a46e3
commit
00db1cf5f2
23 files changed
+550
-115
No files matched your search
@@ -1,8 +1,23 @@
|
||||
from pathlib import Path
|
||||
import os
|
||||
import struct
|
||||
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'
|
||||
# App-local x86 runtime belongs beside the x86 bridge, separate from Qt/Python.
|
||||
bridge_runtime = []
|
||||
if bridge_path.is_file():
|
||||
runtime_root = Path(os.environ.get('WINDIR', r'C:\Windows')) / 'SysWOW64'
|
||||
for name in ('mfc140.dll', 'msvcp140.dll', 'vcruntime140.dll', 'concrt140.dll'):
|
||||
runtime = runtime_root / name
|
||||
if not runtime.is_file():
|
||||
raise RuntimeError(f'Install the Microsoft VC++ 2015-2022 x86 runtime before packaging: {runtime}')
|
||||
data = runtime.read_bytes()
|
||||
pe_offset = struct.unpack_from('<I', data, 0x3c)[0]
|
||||
if data[pe_offset:pe_offset+4] != b'PE\x00\x00' or struct.unpack_from('<H', data, pe_offset+4)[0] != 0x14c:
|
||||
raise RuntimeError(f'Expected an x86 bridge runtime: {runtime}')
|
||||
bridge_runtime.append((str(runtime), 'tools/status_bridge/bin'))
|
||||
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'],
|
||||
@@ -12,7 +27,7 @@ a = Analysis(
|
||||
[(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'),
|
||||
datas=bridge_runtime + [(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'),
|
||||
|
||||
Reference in new issue
Block a user