Go to file
2024-04-22 21:34:43 +02:00
CCEngineServer [add] Documentation\n[chore] Remove some debug trace logs 2021-12-21 16:38:55 +01:00
docs/CCEngineServer [add] Documentation\n[chore] Remove some debug trace logs 2021-12-21 16:38:55 +01:00
.gitignore [chore] Add .vs folder to gitignore 2024-04-22 21:34:43 +02:00
CMakeLists.txt [impl] Support for online activation 2021-11-15 00:10:53 +01:00
CMakePresets.json [impl] Logging 2021-08-31 05:28:39 +02:00
CMakeSettings.json Initial import 2021-08-20 17:58:25 +02:00
Dockerfile [add] Add build instructions using a conan container 2021-12-21 19:56:10 +01:00
README.md [add] Add build instructions using a conan container 2021-12-21 19:56:10 +01:00

Building

Prepare build container

Build an image according to Dockerfile description:

podman build -t ccengineserver-builder .

Create the image, but do not start it yet:

podman create --security-opt label=disable -v /tmp/CCEngineServer:/home/conan/project --name=ccengineserver_builder -it localhost/ccengineserver-builder

Clone or copy the necessary source files into /tmp/CCEngineServer. As you can check this folder will be mapped into the container as /home/conan/project

Example:

cd /tmp/CCEngineServer
git clone git@git.sykora.xyz:/srv/git/CCEngineServer.git .

Attach the container:

podman start --attach -i ccengineserver_builder

Run build in the container:

cd ~
source .profile
cd project
sudo mkdir out
sudo chown conan:1001 out
cmake --preset="linux-gcc-release"
cmake --build --preset="linux-gcc-release"
strip --strip-all out/build/linux-gcc-release/CCEngineServer/bin/CCEngineServer

Note

If there is comilation issue about non existing std::aligned_alloc with the gcc version you are using, you can fix that with the below example:

sed -i 's/std::aligned_alloc/::aligned_alloc/' /home/conan/.conan/data/boost/1.77.0/_/_/package/cfef62e446e1bb07894de4523f2649afdfa94524/include/boost/asio/detail/memory.hpp

Copy the build results into below directory

mkdir ~/CCEngineServer-BuildResult
mkdir ~/CCEngineServer-BuildResult/data
mkdir ~/CCEngineServer-BuildResult/log
cp -r /tmp/CCEngineServer/out/build/linux-gcc-release/CCEngineServer/bin ~/CCEngineServer-BuildResult/