fix(flash-gui): 窗口构建期隐藏改为延迟显示, 修复双击'闪退'; 打包改 onedir 提速
This commit is contained in:
@@ -87,7 +87,7 @@ def version(exe):
|
||||
"""openocd --version 首行(如 Open On-Chip Debugger 0.12.0), 失败返回 None"""
|
||||
try:
|
||||
out = subprocess.run([exe, "--version"], capture_output=True, text=True,
|
||||
timeout=10, creationflags=subprocess.CREATE_NO_WINDOW
|
||||
timeout=5, creationflags=subprocess.CREATE_NO_WINDOW
|
||||
if os.name == "nt" else 0)
|
||||
line = (out.stdout or out.stderr or "").strip().splitlines()
|
||||
return line[0].strip() if line else None
|
||||
|
||||
Reference in New Issue
Block a user