Skip to content

fix(ci): ensure NSIS via a preinstalled/choco-retry/verified-download ladder - #23

Merged
dfattal merged 1 commit into
mainfrom
fix/nsis-install-ladder
Aug 18, 2026
Merged

dfattal merged 1 commit into
mainfrom
fix/nsis-install-ladder

Conversation

@dfattal

@dfattal dfattal commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

The Windows leg installed NSIS with a bare, single-attempt choco install nsis -y --no-progress. That is a hard dependency on the Chocolatey CDN with no retry: when the CDN started answering 503 it took DisplayXR/displayxr-shell-pvt's Windows build red for days (DisplayXR/displayxr-shell-pvt#104, fixed there in PR #106). The same line was here — and because this workflow also builds and attaches DisplayXRMCPSetup-*.exe on v* tags, a CDN blip would take an MCP release with it.

This ports the shell's proven Ensure NSIS step.

The ladder

  1. Preinstalled makensis (PATH, both Program Files roots, choco shim). The comment this replaces claimed "NSIS is not preinstalled on windows-latest" — no longer true: the GitHub windows-* images ship it at C:\Program Files (x86)\NSIS\makensis.exe, which is why displayxr-runtime's build-windows.yml has no install step at all and still builds its NSIS installer green. The happy path now has no network dependency.
  2. choco install nsis — pinned to 3.10, --no-progress, 3 attempts with 15 s / 30 s backoff. The last attempt is unpinned, so a bad pin can't be the thing that fails the build.
  3. Direct download of nsis-3.10-setup.exe from SourceForge, SHA-256 verified (4313d352…f24f7bdd) before it is executed, then a silent /S /D=C:\NSIS install.

Download uses in-box curl.exe, not Invoke-WebRequest: IWR -UseBasicParsing stops at SourceForge's interstitial and saves ~147 KB of HTML instead of the 1.5 MB installer. The checksum is the success criterion, so a mirror that serves markup rolls over to the next mirror rather than being run — and since NSIS releases are not Authenticode-signed, that checksum is the only integrity control there is.

Contract unchanged

CMakeLists.txt locates makensis via find_program(MAKENSIS makensis REQUIRED), so the step publishes the resolved directory on GITHUB_PATH — same contract as the old step, which appended a hardcoded path, but now correct whichever rung supplied makensis.

The step body is kept ASCII: PowerShell treats a U+201D as a string delimiter, so an em dash that gets mis-decoded turns the whole step into a parse error.

Origin: DisplayXR/displayxr-shell-pvt#104

🤖 Generated with Claude Code

… ladder

The Windows leg installed NSIS with a bare, single-attempt
`choco install nsis -y --no-progress`. That is a hard dependency on the
Chocolatey CDN with no retry: when the CDN started answering 503 it took
`DisplayXR/displayxr-shell-pvt`'s Windows build red for days
(displayxr-shell-pvt#104, fixed there in PR #106). The same line was
here, and because this workflow also builds and attaches
`DisplayXRMCPSetup-*.exe` on `v*` tags, a CDN blip would take an MCP
release with it.

Ported from the shell's proven `Ensure NSIS` step:

1. preinstalled makensis (PATH, both Program Files roots, choco shim).
   The step comment this replaces claimed "NSIS is not preinstalled on
   windows-latest" -- that is no longer true: the GitHub `windows-*`
   images ship it at `C:\Program Files (x86)\NSIS\makensis.exe`, which is
   why displayxr-runtime's build-windows.yml has no install step at all
   and still builds its NSIS installer green. The happy path now has no
   network dependency;
2. `choco install nsis` -- pinned to 3.10, `--no-progress`, 3 attempts
   with 15/30 s backoff (last attempt unpinned, so a bad pin can't be the
   thing that fails the build);
3. direct download of nsis-3.10-setup.exe from SourceForge, SHA-256
   verified (4313d352...f24f7bdd) before it is executed, then a silent
   `/S /D=C:\NSIS` install.

Download uses in-box `curl.exe`, not `Invoke-WebRequest`: IWR
`-UseBasicParsing` stops at SourceForge's interstitial and saves ~147 KB
of HTML instead of the 1.5 MB installer. The checksum is the success
criterion, so a mirror that serves markup rolls over to the next mirror
rather than being run -- and since NSIS releases are not
Authenticode-signed, that checksum is the only integrity control there is.

`CMakeLists.txt` locates makensis via `find_program(MAKENSIS makensis
REQUIRED)`, so the step publishes the *resolved* directory on
`GITHUB_PATH` -- same contract as the old step, which appended a
hardcoded path, but now correct whichever rung supplied makensis.

The step body is kept ASCII: PowerShell treats a U+201D as a string
delimiter, so an em dash that gets mis-decoded turns the whole step into
a parse error.

Origin: DisplayXR/displayxr-shell-pvt#104

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DKfVYJBmuWSLApa7a2yQPa
@dfattal
dfattal merged commit cedbfb9 into main Aug 18, 2026
5 checks passed
@dfattal
dfattal deleted the fix/nsis-install-ladder branch August 18, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant