Home

Awesome

<!-- Copyright (C) 2005 - 2021 Settlers Freaks <sf-team at siedler25.org> SPDX-License-Identifier: GPL-2.0-or-later -->

Return To The Roots

"Return To The Roots" is a fan-project, which aims to renew the original The Settlers 2.

We aim to extend new features such as a multiplayer mode via internet as well as the support for modern hardware and several operating systems like Windows Vista/Seven/10, Linux and MacOS X. Likewise we want to invent some smaller upgrades. Unfortunately it is necessary to rewrite the whole game, but we will stick to the original graphics and sounds, because they are still common and nice to be heard or seen. So you will still need an original "The Settlers 2 Gold Edition" version to play Return To The Roots.

See more information on http://www.rttr.info

Current Build Info

Build & Tests: GHA Unit tests Static analysis

Coverage: Coverage Status Coveralls / Coverage Status Codecov

How to install

How to build

On Linux or Darwin/MacOSX

Prerequisite Linux

All of them can be installed with the package manager.

Prerequisite MacOSX

All of them can be installed via homebrew

Prerequisites with Nix

Nix users can open a nix-shell to get a development environment with all packages ready.

Checkout and build

git clone --recursive https://github.com/Return-To-The-Roots/s25client s25client
cd s25client
nix-shell # Optional, for Nix users only
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

Note: by using the -G option of cmake you can specify a generator, e.g. cmake -G Xcode -DCMAKE_BUILD_TYPE=Release .. will generate an Xcode project. Please check cmake --help for more options.

Optimizations

There are various CMake options to control the build and optimization including ARM (Raspberry PI etc.) related ones. Examples:

Note that due to the use of submodules you always need to git pull && git submodule update --init --recursive to get the latest version. (The --init and --recursive arguments are only required should we add new submodules to the existing set.)

Tests

Especially for developing you should build in Debug mode (-DCMAKE_BUILD_TYPE=Debug) and run the tests after executing make via make test or ctest --output-on-failure. There is also an option to enable checks for undefined behavior (UBSAN) and memory errors (ASAN) like use-after-free or leaks. Just pass -DRTTR_ENABLE_SANITIZERS=ON to CMake and use a recent GCC or Clang compiler to build. Then just run (tests or application) as usual.

Note: Boost.Endian < 1.67 is known to have UB so use at least 1.67 when running the sanitizers.

On Windows

Prerequisites

Steps

--

For advanced info or help see FAQ in the wiki or http://www.rttr.info