Setup: check for the C++ build tools and Windows SDK before choosing the game #44

Open
kilolimaVI wants to merge 1 commit from upstream-pr/44 into main
kilolimaVI commented 2026-11-25 20:25:04 +00:00 (Migrated from github.com)

Imported from DexNom/VIctory. Originally posted by kilolimaVI on 2026-11-25T20:25:04Z.


Without Visual Studio's C++ build tools or a Windows SDK, Setup.cmd asks for the game and then runs the whole release build, which fails only at the end with a linker error. Setup now checks both right after the Rust check, before the game picker, and names what is missing with a winget command that installs both.

  • C++ tools: vswhere -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64
  • SDK: KitsRoot10 from the registry, with an x64 kernel32.lib under Lib\*\um\x64

Tested (Windows 11 26300, Build Tools 2022 with the C++ workload)

  • With everything installed, Setup passes the check and opens the game picker as before.
  • Test-BuildTools alone: nothing missing on this machine; with a nonexistent vswhere.exe it reports the C++ build tools; with a nonexistent SDK root it reports the SDK.

Not tested

  • A real machine without the tools (simulated with wrong paths above).
  • Visual Studio installed somewhere vswhere does not find, e.g. a standalone MSVC.

AI use
Script change and description written with Claude (Claude Opus 5.5); I ran the checks above.

<!-- greyfinch-sync:DexNom/VIctory:issue:5498594278 --> Imported from [DexNom/VIctory](https://github.com/DexNom/VIctory/pull/44). Originally posted by [kilolimaVI](https://github.com/kilolimaVI) on 2026-11-25T20:25:04Z. --- Without Visual Studio's C++ build tools or a Windows SDK, `Setup.cmd` asks for the game and then runs the whole release build, which fails only at the end with a linker error. Setup now checks both right after the Rust check, before the game picker, and names what is missing with a `winget` command that installs both. - C++ tools: `vswhere -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64` - SDK: `KitsRoot10` from the registry, with an x64 `kernel32.lib` under `Lib\*\um\x64` **Tested** (Windows 11 26300, Build Tools 2022 with the C++ workload) - With everything installed, Setup passes the check and opens the game picker as before. - `Test-BuildTools` alone: nothing missing on this machine; with a nonexistent `vswhere.exe` it reports the C++ build tools; with a nonexistent SDK root it reports the SDK. **Not tested** - A real machine without the tools (simulated with wrong paths above). - Visual Studio installed somewhere `vswhere` does not find, e.g. a standalone MSVC. **AI use** Script change and description written with Claude (Claude Opus 5.5); I ran the checks above.
andrewDoing commented 2026-11-27 00:29:12 +00:00 (Migrated from github.com)

Imported from DexNom/VIctory. Originally posted by andrewDoing on 2026-11-27T00:29:12Z.


One narrow SDK-probe limitation at 4aea70d: I supplied a disposable SDK root containing only a genuine x64 kernel32.lib at the expected version path. The unmodified Test-BuildTools reported no missing components, but a native x64 MSVC link needing kernel32.lib and user32.lib then failed with LNK1181. The same object and command linked successfully against the complete installed SDK.

This was a deliberately simulated partial SDK, not an observed failure of a normal installation. The PR does detect a wholly missing SDK as intended. Verification was AI-assisted with GPT-6.2 Astra.

<!-- greyfinch-sync:DexNom/VIctory:comment:7206500138 --> Imported from [DexNom/VIctory](https://github.com/DexNom/VIctory/pull/44#issuecomment-7206500138). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-27T00:29:12Z. --- One narrow SDK-probe limitation at `4aea70d`: I supplied a disposable SDK root containing only a genuine x64 `kernel32.lib` at the expected version path. The unmodified `Test-BuildTools` reported no missing components, but a native x64 MSVC link needing `kernel32.lib` and `user32.lib` then failed with `LNK1181`. The same object and command linked successfully against the complete installed SDK. This was a deliberately simulated partial SDK, not an observed failure of a normal installation. The PR does detect a wholly missing SDK as intended. Verification was AI-assisted with GPT-6.2 Astra.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/44:upstream-pr/44'
git switch 'upstream-pr/44'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/44'
git switch 'upstream-pr/44'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/44'
git switch 'upstream-pr/44'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/44'
git switch 'main'
git merge --squash 'upstream-pr/44'
git switch 'main'
git merge --ff-only 'upstream-pr/44'
git switch 'main'
git merge 'upstream-pr/44'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
DexNom/VIctory!44
No description provided.