Build helper
Build, test and launch CHUDCS2 through build.sh.
build.sh configures CMake, builds into build/, and optionally runs tests or launches the application. Run it from the repository root. It changes to its own directory before configuring.
The default is a Release build with the C++ test target enabled. Tests run only when --test is requested. Install the dependencies in Installation first.
Options
| Option | Effect |
|---|---|
-h, --help | Print usage and exit. |
-s, --start | Launch after a successful build, using sudo unless already root. |
-t, --test | Run CTest after building. A failure stops the script before launch. |
-c, --clean | Delete build/ before configuring. |
-d, --debug | Select a Debug build instead of Release. |
--no-tests | Configure without the C++ test target. Cannot be combined with --test. |
-- | End helper options and pass remaining arguments to the executable when launching. |
--clean removes everything under build/, including profiles and locally authored grenade data stored beside the executable. Back up those files first. See Manage profiles and Grenade authoring.
Examples
Build and run the C++ tests:
Build and launch with X11/XWayland:
Build Debug, run tests, then launch:
Build without the test target:
Builds run as your current user. The helper requests sudo only for launch. It does not start CS2 for you.
Manual CMake builds
Use the manual commands in Development when you need another build directory or a custom CHUDCS2_MARCH CPU target. The helper fixes its build directory to build and exposes only the options above.
Was this page helpful?