Skip to content

Unify Init.sh and Init.bat into one CMake setup script - #217

Merged
BenjaFriend merged 2 commits into
mainfrom
unify-init-scripts
Oct 24, 2026
Merged

BenjaFriend merged 2 commits into
mainfrom
unify-init-scripts

Conversation

@BenjaFriend

Copy link
Copy Markdown
Member

Summary

Init.sh and Init.bat had drifted apart: Init.bat never installed Catch2, so a fresh Windows clone failed to configure the tests (Could not find a package configuration file provided by "Catch2").

Both are now thin wrappers around one platform-agnostic script, scripts/init.cmake (run with cmake -P, so it needs nothing beyond CMake). It:

  1. Pulls git submodules.
  2. Builds and installs Catch2 (Debug and Release) to external/Catch2/install, where the root CMakeLists.txt already looks.
  3. Configures build/.

It stops at the first failure. The old Init.bat printed "Done!" even after a failed configure.

Args to the wrappers are forwarded to the build/ configure (./Init.sh -G Ninja). -DFLING_INIT_* args control the script's steps (CONFIGS, SKIP_SUBMODULES, SKIP_TESTS, SKIP_CONFIGURE), documented in Skills/building.md.

CI

  • The build job's Catch2 steps now call the same script, installing to the default location instead of .deps.
  • New fresh-clone job checks out without submodules and runs the real setup path:
    • Linux: Init.sh, a full build and CTest inside a clean Ubuntu 24.04 container (scripts/fresh-clone-test/, also runnable locally with Docker or Podman).
    • Windows: Init.bat, a Debug build and CTest.

Other changes

  • Removed the interactive Claude marketplace prompt from Init.sh; the committed .claude/settings.json already registers it.
  • Dropped -A x64 from Init.bat (VS 2019+ defaults to x64 on 64-bit hosts).
  • Updated README.md, Skills/building.md, AGENTS.md.

Testing

Locally on Windows 11 / VS 2022:

  • Init.bat from a clean state (no build/, no Catch2 install), run from another directory: succeeds, installs both Catch2 configs.
  • CoreTests passes in Debug and Release.
  • Init.sh via Git Bash, run from another directory; re-running takes about 10s (incremental).
  • Arg forwarding and FLING_INIT_* parsing work, and a failing step exits 1.
  • The CI Catch2 invocation runs as written.

Not yet run: native Linux and the container test (no container runtime available locally). The fresh-clone job covers both on this PR.

🤖 Generated with Claude Code

BenjaFriend and others added 2 commits October 24, 2026 17:13
Both scripts are now thin wrappers around scripts/init.cmake (run with
cmake -P), which pulls submodules, installs Catch2 (Debug and Release) to
external/Catch2/install, and configures build/. This also fixes Init.bat,
which never installed Catch2, so configuring the tests failed on Windows.

CI installs Catch2 through the same script, so it can't drift from local
setup. Wrapper args are forwarded to the build/ configure, and
-DFLING_INIT_* args control the script's steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build job configures by hand, so nothing checked the setup wrappers.
The new job checks out without submodules and runs Init.bat on Windows,
and Init.sh in a clean Ubuntu container on Linux, then builds and tests.
The container (scripts/fresh-clone-test) can also run locally with Docker
or Podman.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BenjaFriend
BenjaFriend merged commit 0479056 into main Oct 24, 2026
9 checks passed
@BenjaFriend
BenjaFriend deleted the unify-init-scripts branch October 24, 2026 21:39
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