Prebuilt binaries are currently not supplied. The integration code is very lightweight. Integrations have two options:
- Copy the code in one/arcus directly into the game engine and build directly as part of the regular build.
- Or build the repository with the following instructions, and then copy required headers and binaries. Binaries will be output into the build folder; for example, the build/one/arcus/release/one_arcus.lib.
It's recommended to build the repository as it will also create a fake agent executable to aid testing of your game server without deploying to the remote ONE Platform.
In order to build the source, you must ensure you have the following dependencies installed on your system.
- You need a C++ compiler.
- Windows: Visual Studio 2017, or build tools (without Editor)
- Linux: GCC (7.5.0 tested)
- CMake 3.17.4. This is used to configure and build the project. See the top of CMakeLists.txt for other CMake versions tested, if you are already using a different version.
- After the initial repository clone, initialize the git submodules with the following command:
git submodule update --init --recursive
- On Linux, ensure you installed Open SSL (used by curl, for testing, as of 2022-06-01):
sudo apt-get update sudo apt-get install libssl-dev
- For documentation generation:
- For buiding Linux libraries on Windows:
Build scripts for both platforms can be found in the tools folder. The build scripts naming follows the following convention:
Windows will also have a trailing
mtdll for the code generation CRT configuration (Multi Threaded vs Multi Threaded DLL).
For example, build_release_windows_32_dll_mt.bat will configure and build on windows a release, 32 bit, multi-threaded (MT option in MSVC) dll library.
Running a build script will build the source, run tests, and output results to the build folder.
A clean is needed in most cases when building with different settings.
Run either script in the root: - clean_windows.bat - clean_linux.sh
Cleaning is not required when changing between debug and release builds with other settings being equal.
build_release_dlls.bat will build dll/so libraries for Windows and Linux, outputing them to a shared_lib_build folder in the root. Docker is required.
To load the repository in Visual Studio, first build and then open the generated solution file located at build/OneGameHostingSDK.sln.
For working on the SDK in Visual Studio Code, IDE tips are located here.
The doxygen documentation is built automatically if CMake is able to find the doxygen installed on your system.
As noted above, short tests are run at the end of the cmake build, by default.
Run the following bash scripts from within the tools folder to run longer tests: - run_tests_debug_long.sh - run_tests_debug_soak.sh
build/tests/debug/tests.exe -? option for all commands.