From 7b1f49c182a54ac290e580e4d69af74d9f7d156c Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Mon, 6 Jul 2026 22:31:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20compile-windows=20=E4=BC=A0=20ISCC?= =?UTF-8?q?=20=E7=94=A8=20Windows=20=E8=B7=AF=E5=BE=84(cygpath)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 首个 Windows CI 失败:ISCC 'Unknown option: /c/pangolin-build/.../pangolin.iss'—— ISCC 是原生 Windows 程序,MSYS /c/... 路径被当成选项。用 cygpath 转 C:\... 再传。 Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u --- scripts/ci/compile-windows.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/ci/compile-windows.sh b/scripts/ci/compile-windows.sh index 357ffe3..9f18390 100755 --- a/scripts/ci/compile-windows.sh +++ b/scripts/ci/compile-windows.sh @@ -109,9 +109,17 @@ ISS="${BUILD_CLIENT}/windows/installer/pangolin.iss" sed -i "s/^#define MyAppVersion .*/#define MyAppVersion \"${VER}\"/" "$ISS" echo "==> building installer with Inno Setup (version ${VER})" -# MSYS_NO_PATHCONV / MSYS2_ARG_CONV_EXCL disable Git Bash's automatic conversion -# of paths, matching jiu's ISCC invocation fix. -MSYS_NO_PATHCONV=1 MSYS2_ARG_CONV_EXCL='*' "$ISCC" "$ISS" +# ISCC 是原生 Windows 程序,只认 Windows 路径(C:\...);传 MSYS 风格 /c/... 会被它 +# 当成选项 → "Unknown option: /c/...pangolin.iss"。故先用 cygpath 把 .iss 转成 +# Windows 路径再传(jiu 是直接写死 C:\ 字面量;这里用 cygpath 更稳)。 +# 不用 $() 命令替换(仓库约定):cygpath 输出落临时文件、read 读回。 +cygpath -w "$ISS" > /tmp/pangolin_iss_win.$$ +ISS_WIN="" +read -r ISS_WIN < /tmp/pangolin_iss_win.$$ +rm -f /tmp/pangolin_iss_win.$$ +# MSYS_NO_PATHCONV / MSYS2_ARG_CONV_EXCL 关掉 Git Bash 对 /-开头参数的自动路径转换 +# (否则会把 .iss 里将来可能的 /D 定义也改坏)。ISS_WIN 已是 Windows 路径,原样传即可。 +MSYS_NO_PATHCONV=1 MSYS2_ARG_CONV_EXCL='*' "$ISCC" "$ISS_WIN" # pangolin.iss has no explicit OutputDir -> Inno defaults to {src}\Output # (relative to the .iss file), filename OutputBaseFilename=pangolin-setup-.