dragonblocks_alpha/BUILDING.md

49 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2021-03-24 03:53:17 -07:00
# Building instructions
2021-03-24 08:05:08 -07:00
## Dependencies
2022-05-16 09:48:57 -07:00
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`)
2022-04-25 06:45:50 -07:00
2022-04-25 03:43:59 -07:00
All other dependencies are included as submodules, compiled automatically and statically linked.
Make sure to clone the repository recursively:
2021-03-24 08:05:08 -07:00
```bash
2022-04-25 03:43:59 -07:00
git clone --recurse-submodules https://github.com/dragonblocks/dragonblocks_alpha.git
2021-10-29 11:10:21 -07:00
```
2022-04-25 06:45:50 -07:00
## Client dependencies
2022-04-25 06:50:13 -07:00
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`).
2022-04-25 06:45:50 -07:00
Refer to:
- https://www.glfw.org/docs/3.3/compile.html
- http://glew.sourceforge.net/build.html
2021-07-16 05:17:00 -07:00
## Building a debug build
2022-04-25 03:43:59 -07:00
By default CMake will make a debug build if nothing else is specified. Simply use
2021-07-16 05:17:00 -07:00
```bash
2022-04-25 03:43:59 -07:00
cmake -B build -S src
cd build
2021-07-16 05:17:00 -07:00
make -j$(nproc)
2021-03-24 08:05:08 -07:00
```
2021-03-24 03:57:29 -07:00
2021-07-16 05:17:00 -07:00
to build the dragonblocks client and server.
2022-04-25 03:43:59 -07:00
If you use a debug build, the singleplayer script should be invoked from the build/ directory, because that's where the binaries are located.
2021-03-24 03:53:17 -07:00
2022-04-25 03:43:59 -07:00
## Building a release snapshot
2021-03-24 03:53:17 -07:00
```bash
2022-04-25 03:43:59 -07:00
# Native snapshot
./snapshot.sh
2022-04-25 03:43:59 -07:00
2022-04-25 06:45:50 -07:00
# Crosscompiling for windows
# win32 (requires i686-w64-mingw32-gcc-posix)
./snapshot.sh win32
# win64 (requires x86_64-w64-mingw32-gcc-posix)
./snapshot.sh win64
2021-03-24 03:53:17 -07:00
```
2022-04-25 03:43:59 -07:00
Creates snapshot zipfiles.