CMake build system updates, the docker image automatically compiles quests at build

This commit is contained in:
2023-12-10 10:00:55 +02:00
parent adabeb39a7
commit fc3f2f232c
44 changed files with 271 additions and 15517 deletions

View File

@ -13,6 +13,7 @@ RUN ./vcpkg/vcpkg install boost-system cryptopp effolkronium-random libmysql lib
COPY . .
# Build the binaries
RUN mkdir build/
RUN cd build && cmake -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake ..
RUN cd build && make -j $(nproc)
@ -20,16 +21,19 @@ RUN cd build && make -j $(nproc)
FROM ubuntu:latest as app
WORKDIR /app
RUN apt-get update && apt-get install -y libdevil-dev libbsd-dev && apt-get clean
RUN apt-get update && apt-get install -y python2 libdevil-dev libbsd-dev && apt-get clean
# Copy the binaries from the build stage
COPY --from=build /app/build/src/db/db /bin/db
COPY --from=build /app/build/src/game/game /bin/game
COPY --from=build /app/build/src/quest/quest /bin/quest
COPY --from=build /app/build/src/quest/qc /bin/qc
# Copy the game files
COPY ./gamefiles/ .
# Compile the quests
RUN cd /app/locale/english/quest && python2 make.py
# Symlink the configuration files
RUN ln -s "./conf/CMD" "CMD"
RUN ln -s ./conf/item_names_en.txt item_names.txt