Skip to content

Installation

Pierre Marguerie edited this page Jan 16, 2026 · 13 revisions

Cloning

git clone --recurse-submodules git@github.com:lypitech/rtype.git
cd rtype

Config your git

This makes your git trigger our pre-commit hook

git config core.hooksPath .githooks

Build


Preamble

This project uses CMake as its build system. Make sure to have it installed.

This project uses conan as its packet manager make sure to have it installed.

You can read how to setup conan in docs/setup_conan.md.

Note

On certain Linux environment (e.g. Red Hat), you may need additional dependencies for building. If conan returns an error, try running this command:

sudo dnf install -y \
    libxcb-devel libfontenc-devel libXaw-devel libXcomposite-devel \
    libXdmcp-devel libXtst-devel libxkbfile-devel libXres-devel \
    libXScrnSaver-devel xcb-util-wm-devel xcb-util-image-devel \
    xcb-util-keysyms-devel xcb-util-renderutil-devel libXdamage-devel \
    libXxf86vm-devel libXv-devel xcb-util-devel libuuid-devel \
    xcb-util-cursor-devel

Build & Run

Setup the conan environment:

conan install . --output-folder=build/ --build=missing -s compiler.cppstd=23 -s build_type=Release

Build both the server and client binaries.

# Configure and generate build files
# To compile unit tests for a specific library, add `-D<LIB_NAME>_BUILD_TESTS=ON`
#   Libraries names are RTNT (Network), RTECS (ECS) and RTENG (Game Engine)
#   For example: `cmake -B build -DRTNT_BUILD_TESTS=ON -DRTECS_BUILD_TESTS=ON` will generate build files for both Network and ECS library.
cmake -B build -DCMAKE_BUILD_TYPE=Release           # For Makefile
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release  # For Ninja

# Compile the project
# The `--parallel` flag is for faster build but not mandatory
cmake --build build --config Release --parallel

# Move the resulting binary to the project root
mv build/Client/r-type_client .
mv build/Server/r-type_server .

Run the server binary.

./r-type_server -p 4242 --config waveConfig # this file is at the root of the repository

Other target

You can use the following custom build targets.

Target Description
re Rebuilds the project from scratch.
clean Cleans the project of compilation files
debug Builds the project with debugging symbols and logging enabled.

Usage example:

cmake --build build --target clean
cmake --build build --target debug

Clone this wiki locally