fix(setup): recover incomplete Windows SDK installations #590

Manually merged
github merged 4 commits from github-bot/gh-590 into main 2026-12-05 17:30:11 +00:00 AGit
Owner

@⁠tommiehansen on GitHub · 2026-12-05 13:25 UTC · original
tommiehansen:fix/sdk-incomplete-install-583 → main · +125 −9 · 4 files · 4 commits · merged 2026-12-05 17:26 UTC

Problem

Refs #583. Current main (8bf4878) treats the presence of deps/msvc/VC as proof that the SDK is installed. An interrupted xwin splat can leave that directory without Windows headers or libraries, and both setup and build then incorrectly proceed.

Changes

  • Check that the selected SDK can compile and link a minimal x64 Windows program, rather than relying on directory existence.
  • Install into a staging directory; replace an incomplete SDK only after the probe succeeds, retaining the old tree and keeping the download cache on failure.
  • Fail early in build.sh with the SDK repair command.
  • Add a shell regression test for failed and incomplete downloads, successful retry, a clean install, and reuse of a valid installation (including paths with spaces).

Verification

  • Reproduced the directory-only acceptance condition on the current upstream implementation.
  • Local shell regression test passed with mocked xwin and compiler.
  • Actual clang-cl rejects an incomplete synthetic SDK layout.
  • Real pinned xwin download and compiler/linker verification (2/2 CI jobs passed): fork CI.
  • Reporter confirmation (their exact revision was not supplied).

No runtime, renderer, or game changes; no new dependencies. The full Microsoft CDN download itself may still fail for network reasons, but a failed download will no longer be treated as a successful installation.

AI-assisted: yes.

**@⁠tommiehansen** on GitHub · 2026-12-05 13:25 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/590) `tommiehansen:fix/sdk-incomplete-install-583` → `main` · +125 −9 · 4 files · 4 commits · merged 2026-12-05 17:26 UTC ## Problem Refs #583. Current main (`8bf4878`) treats the presence of `deps/msvc/VC` as proof that the SDK is installed. An interrupted xwin splat can leave that directory without Windows headers or libraries, and both setup and build then incorrectly proceed. ## Changes - Check that the selected SDK can compile and link a minimal x64 Windows program, rather than relying on directory existence. - Install into a staging directory; replace an incomplete SDK only after the probe succeeds, retaining the old tree and keeping the download cache on failure. - Fail early in build.sh with the SDK repair command. - Add a shell regression test for failed and incomplete downloads, successful retry, a clean install, and reuse of a valid installation (including paths with spaces). ## Verification - [x] Reproduced the directory-only acceptance condition on the current upstream implementation. - [x] Local shell regression test passed with mocked xwin and compiler. - [x] Actual clang-cl rejects an incomplete synthetic SDK layout. - [x] Real pinned xwin download and compiler/linker verification (2/2 CI jobs passed): [fork CI](https://github.com/tommiehansen/VIctory-xmem/actions/runs/47524906648). - [ ] Reporter confirmation (their exact revision was not supplied). No runtime, renderer, or game changes; no new dependencies. The full Microsoft CDN download itself may still fail for network reasons, but a failed download will no longer be treated as a successful installation. AI-assisted: yes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 13:31:40 +00:00
github manually merged commit cf9afe4d8b into main 2026-12-05 17:30:11 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.