From cf3c109c36f097f5c89b6b7374264741daa7b5d7 Mon Sep 17 00:00:00 2001 From: liyepan Date: Fri, 23 Oct 2026 14:55:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20v0.12.5=20=E2=80=94=E2=80=94=20NSIS=20?= =?UTF-8?q?=E7=9A=84=20/D=20=E5=8F=82=E6=95=B0=E5=88=AB=E8=A2=AB=20Git=20B?= =?UTF-8?q?ash=20=E5=BD=93=E8=B7=AF=E5=BE=84=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Git Bash(MSYS)会把以 / 开头的参数当成 Unix 路径, /DAPP_VERSION=0.12.5 被换成 C:/Program Files/Git/DAPP_VERSION=0.12.5, makensis 以为那是脚本名就报 Can't open script。 调用 makensis 时设 MSYS2_ARG_CONV_EXCL='*',参数原样传给 NSIS。 --- .github/workflows/packages.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index b03c388..93a83ed 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -189,7 +189,9 @@ jobs: icon=$(cygpath -w "$PWD/packaging/voiletmark.ico") script=$(cygpath -w "$PWD/packaging/windows/installer.nsi") - "$makensis" \ + # Git Bash(MSYS)会把 /D... 当成 Unix 路径,转换成 + # C:/Program Files/Git/DAPP_VERSION=...;这里关掉参数转换 + MSYS2_ARG_CONV_EXCL='*' "$makensis" \ "/DAPP_VERSION=$APP_VERSION" \ "/DDEPLOY_DIR=$deploy" \ "/DICON_FILE=$icon" \