Skip to content
Martin Gerhardy edited this page Mar 4, 2021 · 7 revisions

Requirements

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.

Compile:

  • mkdir build
  • cd build
  • cmake ..
  • make

or simply

  • ./contrib/scripts/linux.sh

Cross compile from linux for windows:

  • Set up a cross compile tool chain like MXE
  • 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

Compile for windows

  • 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.

Cross compile for android

  • 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

Compile for HTML5 (emscripten)

  • install emsdk
  • mkdir build-emscripten
  • cd build-emscripten
  • cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/emscripten-toolchain.cmake
  • make

or simply:

  • ./contrib/scripts/emscripten.sh

Compile for NaCl (outdated)

  • make nacl-setup
  • ./configure --target-os=nacl
  • make nacl-installer
  • make nacl-start

Compile for iOS

  • 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

Compile for MacOSX

  • mkdir build-macosx
  • cd build-macosx
  • cmake .. -G "Xcode"
  • xcodebuild -project caveproductions.xcodeproj

or simply

  • ./contrib/scripts/osx.sh

Compile for SteamLink

  • 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