mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
Add build instructions to readme.md
This includes package lists for various distributions.
This commit is contained in:
parent
aefda9e9d7
commit
9bd2a2d986
59
readme.md
59
readme.md
|
@ -21,8 +21,59 @@ text including copyright information.
|
||||||
Please visit https://www.teeworlds.com/ for up-to-date information about
|
Please visit https://www.teeworlds.com/ for up-to-date information about
|
||||||
the game, including new versions, custom maps and much more.
|
the game, including new versions, custom maps and much more.
|
||||||
|
|
||||||
Instructions to build the game can be found at
|
|
||||||
https://teeworlds.com/?page=docs&wiki=compiling_everything. In
|
|
||||||
particular, you will need SDL2 and FreeType installed.
|
|
||||||
|
|
||||||
Originally written by Magnus Auvinen.
|
Originally written by Magnus Auvinen.
|
||||||
|
|
||||||
|
|
||||||
|
Building on Linux
|
||||||
|
=================
|
||||||
|
|
||||||
|
Installing dependencies
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
# Debian/Ubuntu
|
||||||
|
sudo apt install build-essential cmake git libfreetype6-dev libsdl2-dev libpnglite-dev libwavpack-dev python3
|
||||||
|
|
||||||
|
# Fedora
|
||||||
|
sudo dnf install @development-tools cmake gcc-c++ git freetype-devel mesa-libGLU-devel pnglite-devel python3 SDL2-devel wavpack-devel
|
||||||
|
|
||||||
|
# Arch Linux (doesn't have pnglite in its repositories)
|
||||||
|
sudo pacman -S --needed base-devel cmake freetype2 git glu python sdl2 wavpack
|
||||||
|
|
||||||
|
|
||||||
|
Downloading repository
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
git clone https://github.com/teeworlds/teeworlds --recurse-submodules
|
||||||
|
cd teeworlds
|
||||||
|
|
||||||
|
# If you already cloned the repository before, use:
|
||||||
|
# git submodule update --init
|
||||||
|
|
||||||
|
|
||||||
|
Building
|
||||||
|
--------
|
||||||
|
|
||||||
|
mkdir -p build
|
||||||
|
cd build
|
||||||
|
cmake ..
|
||||||
|
make
|
||||||
|
|
||||||
|
On subsequent builds, you only have to repeat the `make` step.
|
||||||
|
|
||||||
|
|
||||||
|
Build options
|
||||||
|
-------------
|
||||||
|
|
||||||
|
The following options can be passed to the `cmake ..` command line (between the
|
||||||
|
`cmake` and `..`) in the "Building" step above.
|
||||||
|
|
||||||
|
`-GNinja`: Use the Ninja build system instead of Make. This automatically
|
||||||
|
parallizes the build and is generally **faster**. (Needs `sudo apt install
|
||||||
|
ninja-build` on Debian, `sudo dnf install ninja-build` on Fedora, and `sudo
|
||||||
|
pacman -S --needed ninja` on Arch Linux.)
|
||||||
|
|
||||||
|
`-DDEV=ON`: Enable debug mode and disable some release mechanics. This leads to
|
||||||
|
**faster** builds.
|
||||||
|
|
||||||
|
`-DCLIENT=OFF`: Disable generation of the client target. Can be useful on
|
||||||
|
headless servers which don't have graphics libraries like SDL2 installed.
|
||||||
|
|
Loading…
Reference in a new issue