-
Notifications
You must be signed in to change notification settings - Fork 20
Compilation
- cmake >= 2.8.7
- gcc, clang or msvc as compiler (C++11 support is needed)
- SDL2 >= 2.0.3
- SDL2_mixer >= 2.0.0
- SDL2_net >= 2.0.0
- SDL2_image >= 2.0.0
- sqlite3
- glm
- lua >= 5.2
- Box2D >= 2.4.1
- yajl (only if you compile tools)
All external dependencies are also bundled. On systems like windows, you don't have to install any of the dependencies. If not configured otherwise, the system wide installed libs takes precedence. If you want to change this behaviour for one lib, you can e.g. call cmake like this:
cmake -DUSE_BUILTIN_SQLITE=TRUE
this will skip the system wide installed sqlite detection and use the bundled one.
On debian based systems do:
sudo apt-get install libbox2d-dev libyajl-dev libglm-dev libgtest-dev \
libsdl2-dev libsdl2-net-dev libsdl2-image-dev libsdl2-mixer-dev \
libsqlite3-dev liblua5.2-dev zlib1g-dev
Additionally you could install the following packages:
sudo apt-get install binutils-dev libncurses5-dev
libncurses is only needed if you run caveexpress with -server as argument. Then you would get a headless interface for setting up a server. binutils-dev is only needed if you want to support stacktraces on crashes.
If you want to rebuild the texture atlas, then you also need TexturePacker. There is a custom exporter for the format we use in contrib/assets/png-packed/exporter.
- mkdir build
- cd build
- cmake ..
- make
or simply
- ./contrib/scripts/linux.sh
- Set up a cross compile tool chain like MXE
- git clone https://github.com/mxe/mxe.git
- cd mxe && make sdl2 sdl2_image sdl2_mixer box2d sdl2_net
- mkdir build
- cd build
- cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/mxe/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake
- make
or simply
- ./contrib/scripts/windows.sh
- Install cmake and Visual Studio (>=12)
- mkdir build
- cd build
- cmake -DTOOLS=OFF -G "Visual Studio 12" ..
- msbuild.exe caveproductions.sln
or use the cmake gui - select the source dir of your git clone and a different directory for your binary outputs. Then click "Generate" and open the project map in Visual Studio.
- install sdk and ndk
- mkdir build
- cd build
- cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/android-toolchain.cmake
- make
or simply:
- ./contrib/scripts/android.sh
If you get an aapt - no such file or directory on 64bit debian based distributions, do the following:
sudo apt-get install lib32stdc++6
sudo apt-get install lib32z1
- install emsdk
- mkdir build-emscripten
- cd build-emscripten
- cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/emscripten-toolchain.cmake
- make
or simply:
- ./contrib/scripts/emscripten.sh
- make nacl-setup
- ./configure --target-os=nacl
- make nacl-installer
- make nacl-start
- mkdir build-ios
- cd build-ios
- cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/ios-toolchain.cmake -G "Xcode"
- xcodebuild -project caveproductions.xcodeproj
or simply
- ./contrib/scripts/ios.sh
- mkdir build-macosx
- cd build-macosx
- cmake .. -G "Xcode"
- xcodebuild -project caveproductions.xcodeproj
or simply
- ./contrib/scripts/osx.sh
- install steamlink sdk (https://github.com/ValveSoftware/steamlink-sdk) and source the env vars.
- mkdir build-steamlink
- cd build-steamlink
- cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/steamlink.cmake
- make install
- copy the build-steamlink/steamlink folders onto your usb stick to \steamlink\apps and restart your steamlink device
or simply
- ./contrib/scripts/steamlink.sh