GNU/Linux (Gcc and CLang) | Windows (VStudio 2015) |
---|---|
TEC requires cmake 3.1 and a few libraries like GLEW, Lua, Bullet and OpenAL. Our CMake script can handle compiling and installing Bullet and OpenAL, but GLEW and Lua is necesary to be installed on your computer to build the engine properly.
If you do not have cmake 3.1 (try cmake -version
), to install on Linux, use the same procedure that we do on Travis CI:
(cd /tmp && wget http://www.cmake.org/files/v3.1/cmake-3.1.3.tar.gz && tar zxf cmake-3.1.3.tar.gz)
(cd /tmp/cmake-3.1.3 && cmake . && make && sudo make install)
- Close your terminal emulator and open a new instance. Now, you should get version 3.1.3 when you run
cmake -version
Building takes a few steps to get everything set up for the first build.
git submodule update --init
in the root directory.mkdir build/
in to root directorycd build/
- Follow platform specific instructions
- Linux (G++ 3.9 or CLang 3.7)
- If you have Bullet, GLEW and OpenAL dev libs installed :
cmake ..
in the build directorymake TEC
in the build directory
- If you do not have Bullet or OpenAL dev libs installed :
cmake ..
in the build directorymake
in the build directorysudo make install
in the build directory (Warning! This will install Bullet and/or OpenAL on your /usr/local/)rm CMakeCache.txt
in the build directorycmake ..
in the build directorymake TEC
in the build directory
- If you have Bullet, GLEW and OpenAL dev libs installed :
- Windows (VStudio 2015)
- Install Lua include files and library file. (For example on /lib )
- Set LUA_DIR enviroment variable to the path were you download Lua.
- Run cmake-gui setting the source line to the root directory and the build line to the build directory.
- Configure and Generate using non-x64 as the target, with native compiles selected.
- Build all dependencies in Release configuration (if it is just tec in the project list go to step 5). You must build bullet in both debug and release configurations
- Return to cmake-gui and rerun configure and generate. If you see "All dependencies found now building tec.", you can delete your cache and rerun to clean up the cmake-gui window.
- In the project properties for
TEC
change theDebugging
->Working Directory
to$(SolutionDir)..\
. - Download and install oalinst.zip (OpenAL installer) http://openal.org/downloads/ and install it.
- Run it from
tec/
- Glew : Use nuget -> nuget install rxd_glew
- Lua 5.2 : http://sourceforge.net/projects/luabinaries/files/5.2.3/Windows%20Libraries/Static/
- OR download https://www.dropbox.com/s/m7vzruxrq8f79zo/tec_win32_libs.zip?dl=0 and extract it into your root folder to get Lua 5.2 and glew.
To generate the unit tests, follow the same instructions that before, but set to true the flag BUILD_TESTS_TEC