]> git.lizzy.rs Git - dragonblocks_alpha.git/blob - BUILDING.md
Fix memory bug at shutdown
[dragonblocks_alpha.git] / BUILDING.md
1 # Building instructions
2
3 ## Dependencies
4 You need Git, CMake, Lua, Bash and GCC. Make sure these dependencies are installed on your system. (on Debian based systems: `apt install git cmake build-essential lua5.4`)
5
6 All other dependencies are included as submodules, compiled automatically and statically linked.
7 Make sure to clone the repository recursively:
8
9 ```bash
10 git clone --recurse-submodules https://github.com/dragonblocks/dragonblocks_alpha.git
11 ```
12
13 ## Client dependencies
14
15 If you want to build the client, it is required to install the build dependencies for GLEW and GLFW (on X11/Debian based systems: `apt install xorg-dev libgl1-mesa-dev`).
16
17 Refer to:
18 - https://www.glfw.org/docs/3.3/compile.html
19 - http://glew.sourceforge.net/build.html
20
21 ## Building a debug build
22 By default CMake will make a debug build if nothing else is specified. Simply use
23
24 ```bash
25 cmake -B build -S src
26 cd build
27 make -j$(nproc)
28 ```
29
30 to build the dragonblocks client and server.
31 If you use a debug build, the singleplayer script should be invoked from the build/ directory, because that's where the binaries are located.
32
33 ## Building a release snapshot
34
35 ```bash
36 # Native snapshot
37 ./snapshot.sh
38
39 # Crosscompiling for windows
40
41 # win32 (requires i686-w64-mingw32-gcc-posix)
42 ./snapshot.sh win32
43
44 # win64 (requires x86_64-w64-mingw32-gcc-posix)
45 ./snapshot.sh win64
46 ```
47
48 Creates snapshot zipfiles.