fix: validate library and data paths at the application boundary
This commit is contained in:
1 parent
47c2cfecc6
commit
6d2b6de027
10 files changed
+336
-36
No files matched your search
@@ -1,5 +1,6 @@
|
||||
from pathlib import Path
|
||||
import os
|
||||
from shutil import copyfile
|
||||
import struct
|
||||
project_root = Path(SPECPATH).parent
|
||||
assets_root = project_root / 'src' / 'cbb_refresh_verify' / 'assets'
|
||||
@@ -42,3 +43,4 @@ 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')
|
||||
copyfile(project_root / 'packaging' / '使用说明.txt', Path(coll.name) / '使用说明.txt')
|
||||
@@ -0,0 +1,27 @@
|
||||
CBB 刷新校验使用说明
|
||||
|
||||
将 ZIP 完整解压到可写文件夹,保留 CbbRefreshVerify.exe 和 _internal,
|
||||
双击 CbbRefreshVerify.exe。目标电脑需要安装 Mentor EE 7.9.5,
|
||||
并能访问中心库及其依赖。写入或恢复前请手动保留可用备份。
|
||||
|
||||
在「检验」页选择 .lmc 文件并点击「读取 CBB」。目录预览先出现,
|
||||
READY 和待验证状态会随后由 Mentor 核对。确认中心库和目标工程后
|
||||
开始校验。校验会保存工程,经 Mentor 确认为 READY 才显示通过。
|
||||
|
||||
点击「取消当前任务并停止队列」后,程序等待原生操作安全退出。
|
||||
重新提交同库任务时,若仍在收尾,界面会显示等待原因。可通过
|
||||
「释放残留会话」核对占用的库、工程和进程,查看历史操作记录。
|
||||
|
||||
应用默认把日志、批次报告和证据保存在程序旁的 data 目录下。
|
||||
可在「检验」页点「打开日志目录」。使用命令行时,可指定数据目录。
|
||||
data\logs\application.log 包含启动和任务状态,data\reports 包含批次结果。
|
||||
|
||||
PowerShell 批次示例(在 CbbRefreshVerify.exe 所在目录中运行)
|
||||
|
||||
$run = Start-Process .\CbbRefreshVerify.exe -ArgumentList '--batch-lmc', '"D:\测试库\mentor_lib.lmc"', '--block', 'CBB_01', '--data-root', '"D:\CBB日志"' -RedirectStandardError .\batch-error.txt -PassThru -Wait
|
||||
$run.ExitCode
|
||||
|
||||
--block 可重复指定工程。--auto-confirm-pcb-open 允许命令行在核验
|
||||
资源可写后继续处理已识别的 PCB 读写确认。退出码 0 表示所选项全部
|
||||
通过,1 表示输入或启动失败,2 表示批次有未通过项或命令参数错误。
|
||||
启动或输入错误写入重定向的 batch-error.txt。
|
||||
Reference in new issue
Block a user