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-.