aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxxanqw <[email protected]>2025-11-26 15:36:09 +0200
committerxxanqw <[email protected]>2025-11-26 15:36:09 +0200
commite83f96724a5f1dd0ba5afda0f4d5903e73084253 (patch)
treede42a69350b4c8be3bc7e42f46eee261af1b0250
parent0b7a6dd97ba3572a00616c00b3c9c93b9022bc5a (diff)
downloadmikusays-c-e83f96724a5f1dd0ba5afda0f4d5903e73084253.tar.gz
mikusays-c-e83f96724a5f1dd0ba5afda0f4d5903e73084253.zip
Fix NSIS script: improve PowerShell command handling for downloading Redistributable and add debug output for ExecWait lines
-rw-r--r--.github/workflows/package-win.yml12
1 files 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'