Skip to content
Widelands is a free, open source real-time strategy game with singleplayer campaigns and a multiplayer mode. The game was inspired by Settlers II™ (© Bluebyte) but has significantly more variety and depth to it.
C++ Lua Python CMake C Shell Other
Branch: master
Clone or download
Latest commit bcca1c2 Oct 9, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE
.tx
cmake
data Fetched translations and updated catalogs. Oct 9, 2019
debian Delete dead translations (#3521) Sep 26, 2019
doc
po Fetched translations and updated catalogs. Oct 9, 2019
src
test
utils
.clang-format Prevent clang-format from formatting RST comments. Aug 7, 2016
.gitignore
.travis.sh Travis improvements (#3514) Sep 25, 2019
.travis.yml Add the latest CLANG and GCC versions to Travis (#3539) Oct 9, 2019
CMakeLists.txt Travis tweaks. (#3512) Sep 23, 2019
COPYING update GPL 2 COPYING file Jul 24, 2013
CREDITS Removed remaining traces of SDL_net. May 14, 2017
ChangeLog
README.md
appveyor.yml Only test compiler-independent processes once on Travis and AppVeyor (#… Sep 27, 2019
compile.sh Update compile.sh (#3541) Oct 9, 2019
install-dependencies.sh Add script for installing dependencies (#3523) Sep 27, 2019
install-githooks.sh Add pre-commit hook for clang-format (#3509) Sep 21, 2019
regression_test.py
valgrind.supp

README.md

Widelands Build Status Travis-CI Build Status AppVeyor

Widelands is a free, open source real-time strategy game with singleplayer campaigns and a multiplayer mode. The game was inspired by Settlers II™ (© Bluebyte) but has significantly more variety and depth to it.

Widelands Screenshot

License License

GPL v2+. Some assets are released under various Creative Commons licenses – see the respective folders.

Download

On how to download Widelands, see https://www.widelands.org/wiki/Download/

Compiling

We support compiling Widelands for Linux, Windows under MSys2, and MacOs with GCC >= 4.8 or Clang/LLVM >= 3.4, though it might work with other compilers too. We have more detailed documentation available at: https://www.widelands.org/wiki/BuildingWidelands/

Dependencies

You will need to install the following dependencies:

Compiling with our convenience script

You can then compile by running our convenience script.

Command Purpose
./compile.sh Full debug build
./compile.sh -r -w Release build
./compile.sh -h List available options

When compiling has finished, you can call Widelands with

./widelands

Compiling with CMake

You can also call CMake manually:

mkdir build
cd build
cmake ..
make

When compiling has finished, you can call Widelands with

cd ..
mv build/src/widelands .
./widelands

We have various CMake options available. For example, to create a release build, call

cmake -DCMAKE_BUILD_TYPE=Release ..

For using the Ninja build system, call

mkdir build
cd build
cmake -G Ninja ..
ninja

Depending on the Ninja installation, the last line can also be ninja-build.

CMake options

Note that CMake options are prefixed with -D. These are the available options:

Name Values Default Function
CMAKE_BUILD_TYPE Debug/Release Debug Create a release or debug build
OPTION_ASAN ON/OFF ON for Debug builds /OFF for Release builds Use AddressSanitizer. Switching this off only works once. You will have to clear the build directory if you want to switch this off again in a later build.
OPTION_BUILD_TRANSLATIONS ON/OFF ON Build translations
OPTION_BUILD_CODECHECK ON/OFF ON Build codecheck. Only available in Debug builds.
OPTION_BUILD_WEBSITE_TOOLS ON/OFF ON Build website-related tools
OPTION_BUILD_TESTS ON/OFF ON Build Boost tests
CMAKE_INSTALL_PREFIX A directory See CMake documentation Define the target directory for the "install" target, e.g. -DCMAKE_INSTALL_PREFIX=~/widelands-install.
WL_VERSION A version string Autodetected from git/bzr, or set by adding a VERSION file Define the Widelands version
USE_XDG ON/OFF ON Follow XDG-Basedir specification. Only available on Linux.
OPTION_USE_GLBINDING ON/OFF OFF Use glbinding instead of GLEW
OPTION_GLEW_STATIC ON/OFF OFF Use static GLEW Library

make/ninja targets

You can add targets to the make or ninja command, e.g. make lang to build only the translations. These are the available targets:

Name Function
ALL or no target Compile everything, up to executable with the settings from the cmake call
codecheck Run the codechecks (currently broken)
doc Generate Doxygen documentation. Currently only with Build Type Debug, but this is easily changed if necessary.
install Install into the target dir, this is /usr/local per default (you need root privileges!) unless you change it (see CMake options above)
lang Generate the translations

Contributing

We have some instructions on how to use Git to help you if you're new to GitHub: https://www.widelands.org/wiki/GitPrimer/

Code

Before you make any changes to C++ code, we recommend that you install our githook that will automatically format any changed files when you commit.

  1. Install clang-format
  2. Run ./install-githooks.sh

We follow the Google Styleguide.

Scenarios

For scripting scenarios, see https://www.widelands.org/documentation/lua_index/

Art

For contributing art, see https://www.widelands.org/wiki/GraphicsDevelopment/

Translations

For contributing translations, see https://www.widelands.org/wiki/TranslatingWidelands/

Testing

For helping with testing, see https://www.widelands.org/wiki/TestingBranches/

Triaging Issues

For helping with issue management, see https://www.widelands.org/wiki/TriagingBugs/

Directory Structure

Directory Contents
cmake Build system and codecheck rules
data The game's data files. Images, sounds, music, scripting, maps, campaigns, tribes, ...
debian Packaging for Debian-based Linux distributions
doc Sphinx documentation
po Translation files
src C++ source code
test Scripted maps for our regression test suite
utils Diverse utilities: Building translations, code formatting, packaging Mac & Windows, ...

Obtaining Travis and AppVeyor builds

Travis and AppVeyor builds are triggered for all pull requests and for new pushes to the master branch. If you want to get a build without making a pull request, temporarily add the name of your branch to the branches section in .travis.yml/appveyor.yml. This will not work if the branch is in a fork though.

You can’t perform that action at this time.