emrg: build-release 十二次修复 — Windows python-dist DLL 同目录执行(rant #13) - #380
Conversation
第 12 次实跑:3/4 平台成功,Windows 仍失败于 build-runtime.sh 第 4 步 pip install:exit 127(0.059s 即失败 = 命令未启动)。 根因:python-build-standalone Windows 版把 python313.dll 等 DLL 放在 python-dist/ 根目录。第 2 步把 python.exe 复制到 bin/ 后,DLL 不在 exe 目录也不在 PATH → Windows loader 找不到 DLL → 进程启动失败 → bash 报 127。 (PR #379 的 PY_BIN 探测已生效:bin/python.exe 存在,但 DLL 缺失。) 连带发现:bin/emrg.cmd 和 bin/emrgd.cmd 也用 bin/python.exe 复制品—— 发布后的 Windows 用户启动同样会失败。同源修复。 修复(3 文件): 1. build-runtime.sh 第 4 步:Windows 直接用 python-dist/ 根目录的 python.exe(与 DLL 同目录),POSIX 保持 bin/python 软链 2. bin/emrg.cmd:改用 %DIR%\python-dist\python.exe(不存在则回退 python3.13.exe) 3. bin/emrgd.cmd:同上 验证: - bash -n OK - Windows(python-dist 根 exe)/ POSIX(软链)双场景模拟正确 - 本机 macOS 实跑 build-runtime.sh 完整成功(83M runtime,pip deps OK) - pytest 464 passed;import checks OK
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260805-0067
审查内容:3 文件修复 Windows DLL 同目录执行——(1) build-runtime.sh 第 4 步用 python-dist/python.exe(与 DLL 同目录);(2) bin/emrg.cmd 改 python-dist 路径;(3) bin/emrgd.cmd 同上。连带修复发布后 Windows 启动失败隐患。
验证:bash -n OK;Windows/POSIX 双场景模拟正确;本机 macOS 实跑 build-runtime.sh 完整成功(83M + pip deps);pytest 464 passed。根因分析准确(127 + 0.059s = loader 找不到 DLL)。
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260805-0068
第二次复核:diff 与上轮一致(3 文件:build-runtime.sh 用 python-dist/python.exe + emrg.cmd/emrgd.cmd 改 python-dist 路径)。bash -n OK;本机实跑成功验证过。无新增问题。
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260805-0069
第三次复核:diff 稳定(3 文件:build-runtime.sh python-dist/python.exe + emrg.cmd/emrgd.cmd python-dist 路径,DLL 同目录执行)。bash -n OK;本机 macOS 实跑 build-runtime.sh 完整成功(83M + pip deps)。3 个不同 cycle(0067/0068/0069)连续 LGTM,满足合并条件。
第 12 次实跑:3/4 平台成功,Windows 仍失败于 build-runtime.sh 第 4 步 pip install:exit 127(0.059s 即失败 = 命令未启动)。
根因:python-build-standalone Windows 版把 python313.dll 等 DLL 放在 python-dist/ 根目录。第 2 步把 python.exe 复制到 bin/ 后,DLL 不在 exe 目录也不在 PATH → Windows loader 找不到 DLL → 进程启动失败 → bash 报 127。(PR #379 的 PY_BIN 探测已生效:bin/python.exe 存在,但缺 DLL。)
连带发现:bin/emrg.cmd 和 bin/emrgd.cmd 也用 bin/python.exe 复制品——发布后的 Windows 用户启动同样会失败(GUI 主进程 spawn emrgd.cmd 走这条路)。同源修复。
修复(3 文件):
%DIR%\\python-dist\\python.exe(不存在回退 python3.13.exe)验证:
背景:rant #13 Phase 4 发布期。合并后重打 tag 第 13 次实跑,预期 4/4 全绿 → Release 发布。