From e83f96724a5f1dd0ba5afda0f4d5903e73084253 Mon Sep 17 00:00:00 2001 From: xxanqw Date: Wed, 26 Nov 2025 15:36:09 +0200 Subject: Fix NSIS script: improve PowerShell command handling for downloading Redistributable and add debug output for ExecWait lines --- .github/workflows/package-win.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/package-win.yml b/.github/workflows/package-win.yml index f9e99f8..3a4fc9c 100644 --- a/.github/workflows/package-win.yml +++ b/.github/workflows/package-win.yml @@ -228,9 +228,9 @@ jobs: ; Define temp path for the installer StrCpy $2 "$TEMP\vc_redist.exe" - ; Use PowerShell to download. We'll ensure the entire command is a single quoted string - ; ExecWait expects 1-2 parameters; to avoid tokenization use double-quoted command and escape inner double quotes - ExecWait "powershell -NoProfile -NonInteractive -Command \"Invoke-WebRequest -Uri '$1' -OutFile '$2'\"" $3 + ; Use PowerShell to download. We'll store the command in an $R9 var to avoid ExecWait tokenization + StrCpy $R9 'powershell -NoProfile -NonInteractive -Command "Invoke-WebRequest -Uri \"$1\" -OutFile \"$2\""' + ExecWait $R9 $3 ${If} $3 != 0 DetailPrint "Download failed (Error code: $3). Skipping Redistributable." @@ -291,6 +291,12 @@ jobs: if (-not (Test-Path $exe_x64)) { Write-Error "Missing expected asset $exe_x64"; exit 1 } if (-not (Test-Path $exe_arm)) { Write-Error "Missing expected asset $exe_arm"; exit 1 } + - name: Print ExecWait lines from installer.nsi + shell: pwsh + run: | + Write-Host "-- ExecWait lines from installer.nsi --" + Select-String -Path installer.nsi -Pattern 'ExecWait' | ForEach-Object { Write-Host $_.Line } + - name: Compile Installer shell: cmd run: '"C:\Program Files (x86)\NSIS\makensis.exe" installer.nsi' -- cgit v1.3-2-g0d8e