Add build.ps1 + bridge/build.ps1 wrappers and Claude Code build skills#145
Add build.ps1 + bridge/build.ps1 wrappers and Claude Code build skills#145Kim2091 wants to merge 1 commit into
Conversation
413ab81 to
6dbd4ed
Compare
|
We already have several skills files in |
| PowerShell wrapper around the meson/ninja bridge build. Discovers | ||
| Visual Studio via vswhere, calls vcvarsall.bat by full path, and runs | ||
| meson setup + compile per arch in isolated cmd.exe shells (no env | ||
| contamination between x64 and x86). Streams output to the PowerShell | ||
| pipeline so progress and errors are visible. Throws on any non-zero | ||
| exit and verifies the expected build artifacts exist before reporting | ||
| success. | ||
|
|
||
| Resolves the failure mode in bridge/build_common.ps1::SetupVS where a | ||
| missing C++ workload silently no-ops: cmd writes "'vcvarsall.bat' is | ||
| not recognized" to stderr, the piped `set` dumps the existing env, | ||
| the ForEach loop re-sets the same vars, and the script proceeds with | ||
| no VC env loaded. Under build_bridge_release.bat the failure further | ||
| hides because the .bat captures cmd's empty stdout and exits 0 with | ||
| no client output. |
There was a problem hiding this comment.
Is there a reason the existing build scripts can't be upgraded with these advantages, rather than introducing a new wrapper around them?
There was a problem hiding this comment.
They very well can be if that's preferred! I wasn't sure if the original build scripts should be touched or not due to internal workflows or other similar things.
Claude does read the .claude folder by default, and it parses skills a bit differently than most agents. I'll see if I can find a workaround |
As promised, here are the Claude build skills from Remix Plus. This also includes a fix for a common issue people run into in the main build script.
Summary
Adds
build.ps1(runtime) andbridge/build.ps1(bridge) — PowerShell wrappers around the existing meson/ninja build flow that address two known build issues:nv-private/andtests/rtx/dxvk_rt_testing/. Stale content left in those directories from a prior build can cause subsequent installs to behave incorrectly.build.ps1pre-clears both before every install — this is the load-bearing fix the wrapper exists for.SetupVSfailure. When the detected Visual Studio install is missing the C++ build tools workload,vcvarsall.batlookup silently no-ops (cmdwrites'vcvarsall.bat' is not recognizedto stderr, but the script continues with no VC env loaded); meson then surfaces a crypticcl.exe not foundlater, hiding the real cause. Underbuild_bridge_release.batit's worse — the .bat capturescmd's empty stdout and exits0with no x86 client output. The wrappers resolvevcvarsall.batby full path with aTest-Pathguard, so the missing workload fails loudly at the wrapper instead.Plus two
.claude/skills/files documenting the canonical invocation for LLM-driven contributor workflows.Both wrappers are additive —
build_dxvk.ps1,build_common.ps1, andbridge/build_bridge_*.batare untouched, so existing CI and docs keep working.What the wrappers do
nv-private/andtests/rtx/dxvk_rt_testing/before each runtime build. These are untracked install-target directories that meson regenerates; stale content there causes the issue called out above. Known-issue workaround.vswhereandTest-Path-validate the install before doing anything else.vcvarsall.batby full path (call "$vcvars") so a missing C++ workload fails loudly at the wrapper, not later in meson.meson setup/compile/installin a single isolatedcmd.exeshell so VS env stays consistent across the chain.auto-deploy.local.ps1at repo root (gitignored) for contributors who want successful builds copied to a test game install. No-op when the file doesn't exist.Parameters
build.ps1:-Flavor release|debug|debugoptimized,-EnableTracy,-Cleanbridge/build.ps1:-Flavor release|debug|debugoptimized,-Arch x64|x86|both(defaultboth),-CleanSkills
.claude/skills/{rtx-build,bridge-build}/SKILL.mdare content files consumed by Claude Code / similar LLM tooling. They document the canonical invocation, when to invoke (and when not to), expected duration, success / error report patterns, and known-non-failure warnings (LNK4098, etc.). No effect on the build itself.Testing
Tested against a fresh shallow clone of
mainwith all submodules at--depth=1 --init --recursive:build.ps1 -Flavor releasecoldbuild.ps1 -Flavor release2nd passbuild.ps1 -Flavor release3rd pass with cleanup activebridge/build.ps1 -Flavor release -Arch bothcoldbridge/build.ps1 -Flavor release -Arch both2nd passZero compile errors, zero linker errors, zero matches for
error C\d|fatal error|FAILED:|ninja: build stopped|cl\.exe not found|vcvarsall.*not recognized.