From 03e3c33a681c2f0319269bf847054ef023ebd746 Mon Sep 17 00:00:00 2001 From: Justin Paul Date: Fri, 8 May 2026 13:48:55 -0400 Subject: [PATCH] Bisect: try minimal .iss before our real one The cwd-sync + temp-iss + /O fixes didn't move the needle - ISCC still prints its full banner (Russell + Laan + Yackimoff) then dies with "system cannot find the path specified." after 225ms with exit 2. That rules out cwd, /D, OutputDir-resolution, and DLL-load failures. Compile a truly minimal .iss (no #defines, no [Code], no [Files], CreateAppDir=no, Uninstallable=no) right before our real one. If the minimal compiles cleanly, the problem is in our .iss content and we can bisect from there. If even the minimal fails, ISCC is broken under the runner's SYSTEM context regardless of input - then the fix is to stop building under SYSTEM (run the runner under a regular user account, or skip ISCC altogether and ship the bare exe + scripts as a zip). --- scripts/build-installer.ps1 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/scripts/build-installer.ps1 b/scripts/build-installer.ps1 index ec50ff3..ade5a3e 100644 --- a/scripts/build-installer.ps1 +++ b/scripts/build-installer.ps1 @@ -142,6 +142,31 @@ try { Write-Host " PS location (post): $((Get-Location).Path)" Write-Host " .NET cwd (post): $([System.IO.Directory]::GetCurrentDirectory())" + # Sanity: compile a minimal .iss right next to ours BEFORE attempting the + # real one. Minimal has no #defines, no [Code], no [Files], no compression + # tweak - just the absolute floor of what ISCC will accept. If THIS fails + # under the same SYSTEM context with the same identical exit/error, the + # problem is environmental, not in our .iss content. + $minIss = Join-Path $issDir "min-test.iss" + @" +[Setup] +AppName=MinTest +AppVersion=1.0 +AppId={{12345678-1234-1234-1234-123456789ABC} +DefaultDirName={pf}\MinTest +CreateAppDir=no +Uninstallable=no +OutputBaseFilename=mintest +OutputDir=$dist +"@ | Set-Content -Path $minIss -Encoding ascii + Write-Host "" + Write-Host "--- bisect step 1: minimal .iss ---" -ForegroundColor Cyan + & $iscc (Split-Path $minIss -Leaf) *>&1 | ForEach-Object { Write-Host " $_" } + $minExit = $LASTEXITCODE + Write-Host " minimal exit: $minExit" + Remove-Item $minIss -ErrorAction SilentlyContinue + Write-Host "" + # Bake the version into a temp .iss and override OutputDir to an absolute # path so nothing in the build depends on cwd resolution. $tempIss = Join-Path $issDir "webhook-server.gen.iss"