| Github actions | RTFD docs |
|---|---|
Head onto our Discord for extended support on building and usage.
TEC requires cmake 3.9 and a few libraries GLFW3, GLM, ASIO, Protobuf, GLEW, Lua, Bullet, Dear ImGui, sol3, Spdlog and OpenAL which can be installed most easily via vcpkg
Documentation is done via Doxygen for C++ code and supplementary docs must be maintained for the Lua API in the docs/ folder.
Whenever there is a Lua API change please update the corresponding docs/.
To preview the Lua API docs locally visit MkDocs and follow their setup guide. Then from the root directory run mkdocs serve.
git clone https://github.com/Microsoft/vcpkg.git(If you already have VCPKG, move onto Part 2))- Navigate to the
vcpkg/directory.
./bootstrap-vcpkg.bat
[OPTIONAL] ./vcpkg integrate install
./vcpkg install asio bullet3 glew glfw3 glm lua openal-soft protobuf zlib spdlog imgui sol2
Prior to 11.0.1, run (NOT TESTED): sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / if bootstrap-vcpkg fails see here for more help
./bootstrap-vcpkg.sh
[OPTIONAL] ./vcpkg integrate install
./vcpkg install asio bullet3 glew glfw3 glm lua openal-soft protobuf zlib spdlog imgui sol2
apt-get install libgl1-mesa-dev xorg-dev libglu1-mesa-dev libxinerama-dev libxcursor-dev
./bootstrap-vcpkg.sh
[OPTIONAL] ./vcpkg integrate install
./vcpkg install asio bullet3 glew glfw3 glm lua openal-soft protobuf zlib spdlog imgui sol2
git submodule update --initin the root directory.mkdir build/in to root directorycd build/
- Run cmake-gui setting the source line to the root directory and the build line to the build directory.
- Hit configure and select
Specify toolchain file for cross-compilingusing**VCPKG_DIR**/scripts/buildsystems/vcpkg.cmake. - Click generate; then open and build the solution in Visual Studio.
- In the project properties for
trillek-clientchange theDebugging->Working Directoryto$(SolutionDir)..\. - Potentially Download and install oalinst.zip OpenAL installer and install it.
cmake -DCMAKE_TOOLCHAIN_FILE=**VCPKG_DIR**/scripts/buildsystems/vcpkg.cmake ..in the build directorymakein the build directory
- INSTALL REQUIRED LIBS bullet, glew, glfw3, glm, asio, lua, openal-soft, spdlog, Dear ImGui, sol3(also known as sol2), and protobuf. Some of these will need versions not in your distribution (just ask for help in the IRC or Discord.)
- If you are on Ubuntu/Debian/etc. (something with
apt):- Run
apt-get install libglew-dev libglfw3 libglm-dev libasio-dev - Run
apt-get install liblua5.2-dev libopenal-dev libbullet-dev - Run
apt-get install libprotobuf-dev protobuf-compiler libspdlog-dev
- Run
- If you are on Arch/etc. (something with
pacman):- Run
pacman -S glew glfw-x11 glm asio lua52 openal bullet protobuf spdlog
- Run
- If you are on Ubuntu/Debian/etc. (something with
cmake ..in the build directorymake tecin the build directory
cmake -DCMAKE_TOOLCHAIN_FILE=**VCPKG_DIR**/scripts/buildsystems/vcpkg.cmake ..in the build directorymakein the build directory
To generate the unit tests, follow the same instructions from before, but set to true the flag BUILD_TESTS_TEC
The follow docker script will setup a docker container that will run clang format.
docker build -t clang-format-lint github.com/DoozyX/clang-format-lint-action
Run the following on windows to format all source files in the src dir
docker run -it --rm --workdir /src -v ${pwd}:/src clang-format-lint --clang-format-executable /clang-format/clang-format11 -r -i true .
Run the following on windows to format all source files in the src dir
docker run -it --rm --workdir /src -v $(pwd):/src clang-format-lint --clang-format-executable /clang-format/clang-format11 -r -i true .