WINDOWS ======= Requirements ------------ Visual Studio 2015 (VC14): https://www.visualstudio.com/downloads/ CMake: https://cmake.org/download/ Qt5: https://www.qt.io/download-open-source/ SFML: https://www.sfml-dev.org/download.php GLEW: http://glew.sourceforge.net/ Zlib: http://gnuwin32.sourceforge.net/packages/zlib.htm When given the option, all libraries should be the 32-bit version. Zlib comes either in an installer, or in zips. If you download the zips, you need to decompress both the binaries and developer files into the same location. Fixing Zlib ----------- The Zlib build for Windows has a long-standing bug here: https://sourceforge.net/p/gnuwin32/bugs/169/ To get it to compile properly, you'll need to edit include/zconf.h and change the: #if 1 /* HAVE_UNISTD_H line to: #ifdef HAVE_UNISTD_H Cmake settings -------------- Open the CMake GUI, set the source code directory to the folder containing this file, set the build directory to wherevery you like (I put a 'build' directory within the Tread Marks root folder) and press 'Configure'. Set the compiler to Siausl Studio 2015, set the toolset to v140_xp, and press 'Finish'. It will fail to locate a bunch of libraries. Setting these values to the appropriate root directories will help CMake find them: * PATH_GLEW (eg: D:\3rdParty\glew-2.0.0) * PATH_QT (eg: C:\Qt\5.7\msvc2015) (optional) * PATH_SFML (eg: D:\3rdParty\SFML-2.4.1) * PATH_ZLIB (eg: D:\3rdParty\zlib-1.2.3) * PATH_UCRT (eg: C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86) (optional) Now when you click 'Configure' again, it should succeed with the message "Configuring done". Now you can click the 'Generate' button. This will create a 'TreadMarks.sln' file in your build directory which you can open with Visual Studio. There's a couple projects in this solution: * TM: This is the actual game. * TreadMarks: This is the launcher. There's some additional targets that are useful: * FIXUP: This will copy all the necessary dependencies in order for you to run the project from Visual Studio. Just make sure you set the debugging working directory to the "Resources" directory and you're all set to debug. * INSTALL: This will attempt to install all the necessary files to play the game into the final location. By default, it will be in the "Program Files (x86)" folder, so you'll either need to run Visual Studio as an administrator for this target to work, or change the CMAKE_INSTALL_PREFIX variable in CMake. * PACKAGE: If you have NSIS installed, this will create an installer. * SIGN: If you have a digital certificate, and you set the CERT and CERT_PASS variables in CMake, this will sign your installer. OS X ==== Builds and launches, but currently there's a bug that makes all the textures magenta. To get zlib and GLEW, the easiest way is with home-brew. You can get Homebrew by running the following command on the command line: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null And then to install the libraries, run: brew install glew brew install lzlib From here you can use cmake-gui as in the Windows build. Linux ===== I've ony tried to build a headless server so far. It might work, but so far I've only tested the build with g++ 4.8, which crashes on startup because they didn't fully implement c++ regular expression until 4.9. To do that, you only need Zlib, and of course cmake and a compiler. On Ubuntu, here's how you get your packages: sudo apt-get install build-essential cmake zlib1g-dev Or on RedHat it's: sudo yum install gcc-g++ cmake zlib Once you have all the pre-requisites, you can create the build script and build it with: mkdir build cd build cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_FLAGS="-std=c++11" -DBUILD_HEADLESS=true .. make make install Once everything is built, it should be copied into the 'out' directory.