Repository navigation
Unify Init.sh and Init.bat into one CMake setup script - #217
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Init.shandInit.bathad drifted apart:Init.batnever 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 withcmake -P, so it needs nothing beyond CMake). It:external/Catch2/install, where the rootCMakeLists.txtalready looks.build/.It stops at the first failure. The old
Init.batprinted "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 inSkills/building.md.CI
.deps.fresh-clonejob checks out without submodules and runs the real setup path: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).Init.bat, a Debug build and CTest.Other changes
Init.sh; the committed.claude/settings.jsonalready registers it.-A x64fromInit.bat(VS 2019+ defaults to x64 on 64-bit hosts).README.md,Skills/building.md,AGENTS.md.Testing
Locally on Windows 11 / VS 2022:
Init.batfrom a clean state (nobuild/, no Catch2 install), run from another directory: succeeds, installs both Catch2 configs.CoreTestspasses in Debug and Release.Init.shvia Git Bash, run from another directory; re-running takes about 10s (incremental).FLING_INIT_*parsing work, and a failing step exits 1.Not yet run: native Linux and the container test (no container runtime available locally). The
fresh-clonejob covers both on this PR.🤖 Generated with Claude Code