CHUDCS2

Build helper

Build, test and launch CHUDCS2 through build.sh.

View as Markdown

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.

./build.sh

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

OptionEffect
-h, --helpPrint usage and exit.
-s, --startLaunch after a successful build, using sudo unless already root.
-t, --testRun CTest after building. A failure stops the script before launch.
-c, --cleanDelete build/ before configuring.
-d, --debugSelect a Debug build instead of Release.
--no-testsConfigure 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.sh --test

Build and launch with X11/XWayland:

./build.sh --start -- --x11

Build Debug, run tests, then launch:

./build.sh --debug --test --start

Build without the test target:

./build.sh --no-tests

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?

On this page