Skip to content

build: write all build output to build/ instead of the repo root - #485

Merged
Maxaubert merged 1 commit into
mainfrom
refactor/build-dir
Oct 14, 2026
Merged

Maxaubert merged 1 commit into
mainfrom
refactor/build-dir

Conversation

@Maxaubert

Copy link
Copy Markdown
Owner

Closes #484

Review item 2026-10-13 ("build.bat writes .obj files and every exe/pdb into the repo root"), owner decision: all build output moves to build\.

Layout

  • build\: Wind.exe, WindTray.exe, WindConfig.exe, wind_tests.exe, their linker PDBs, and ui\dist mirrored by build.bat config (robocopy /MIR). This is the install layout, so ExeDir() lookups (WindTray.exe, WindConfig.exe, <exe dir>\ui\dist) work with no code change.
  • build\obj\<target>\: objects, compiler PDBs and .res files per target (wind, wind_uiaccess, tray, config, test, check\core|tray|config). Nothing goes to src\ any more either (the old tray/config objects and .res files did).
  • Working directory stays the repo root: build\wind_tests.exe still finds tests\fixtures, and WIND_SELFTEST=1 build\Wind.exe writes wind_selftest.png / wind_hdr_diag.txt to the cwd (root, still gitignored).
  • Dev ini/logs: build\ is writable, so ResolveIniPath() / ResolveLogDir() keep a dev build's magnifier.ini, profiles\ and logs\ next to build\Wind.exe. Documented in 11 (including: deleting build\ deletes them, and an old root ini is no longer read).

Consumers changed

  • build.bat: all targets (default, uiaccess via :core_exe, tray, config, test, check; installer unchanged apart from what wind.nsi packs)
  • installer\wind.nsi: every File "..\X.exe" -> ..\build\X.exe, !if /FileExists "..\build\WindUA.exe", comment
  • tools\release.ps1: $bin = $root\build; WindUA rename, missing-output check, signing
  • tools\uiaccess_setup.ps1: deploy sources build\Wind.exe|WindConfig.exe|WindTray.exe (ui\dist still from the source copy)
  • tools\installer_check.ps1: build\WindUA.exe probe for the local-signing checks
  • .github/actions/build-installer/action.yml, .github/workflows/build.yml: comment/step name only (they consume dist\ only, unchanged)
  • .gitignore: build/ first; root *.obj/*.exe/... and /magnifier.ini etc. kept with a comment (clones holding pre-build\ output, tools/testenv gamesim.exe)
  • README.md Development, CLAUDE.md Commands + selftest gotcha, installer\README.md, docs\VERIFICATION.md
  • docs/architecture: 11 (targets table, layout, dev runtime files, deploy, WindUA), 04 (selftest), 08 (dev ini), 12 (logs, selftest)
  • Not changed (checked): tools\testenv\* and the probe scripts run C:\Program Files\Wind\Wind.exe only; ui/ has no root-path lookups; release.yml/alpha.yml only touch dist\.

Gates (local, this branch)

  • build.bat check: exit 0
  • build.bat test: 643/643 cases, exit 0
  • build.bat uiaccess, build.bat tray, build.bat: exit 0 (only the pre-existing C4996 fopen warnings)
  • npm ci + build.bat config: exit 0, build\WindConfig.exe and build\ui\dist\index.html present
  • npm run test:rules: pass; npx playwright test: 205 passed
  • build.bat installer with a hand-made build\WindUA.exe (uiaccess build renamed, as release.ps1 does): exit 0, every File source exists: ..\build\*.exe ok, LOCAL_SIGN path packed; silent install smoke skipped (non-elevated shell)
  • git status --porcelain --ignored after all builds: nothing in the root besides the ignored build/, dist/ (installer), ui/dist, ui/node_modules
  • tools\release.ps1 and tools\uiaccess_setup.ps1 not run (owner deploy); every path they use was Test-Path checked after the builds: all present

Not verified

  • The elevated install/uninstall smoke in installer_check.ps1 and the CI release run (runner is admin)
  • A live dev run of build\Wind.exe / build\WindConfig.exe (ini/logs landing in build\, settings page loading from build\ui\dist) and the signed deploy via uiaccess_setup.ps1

🤖 Generated with Claude Code

https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH

build.bat now puts every binary and linker PDB in build\ (laid out like an
install: Wind.exe, WindTray.exe, WindConfig.exe, wind_tests.exe and a mirrored
ui\dist) and every object, compiler PDB and .res file in build\obj\<target>\
(wind, wind_uiaccess, tray, config, test, check\*). Nothing lands in the repo
root or src\ any more. The working directory stays the repo root, so the test
binary still finds tests\fixtures and a self-test writes wind_selftest.png
where it is started.

Consumers updated: installer\wind.nsi (File sources and the WindUA probe),
tools\release.ps1 (WindUA rename, output checks, signing), tools\uiaccess_setup.ps1
(deploy sources), tools\installer_check.ps1 (WindUA probe), CI step comments,
.gitignore, README, CLAUDE.md, installer\README.md, docs\VERIFICATION.md and
docs/architecture 04, 08, 11, 12. A dev build keeps its ini, profiles and logs
next to build\Wind.exe (ResolveIniPath/ResolveLogDir unchanged).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
@Maxaubert
Maxaubert merged commit 02256b7 into main Oct 14, 2026
1 check passed
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.

Move all build output out of the repo root into build/

1 participant