mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
feat(docker): allow script-less build (#2337)
This commit is contained in:
committed by
Stoabrogga
parent
ec57cdfbcb
commit
0651e77123
9
bin/acore-docker-build-no-scripts
Executable file
9
bin/acore-docker-build-no-scripts
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
docker build --build-arg ENABLE_SCRIPTS=0 -t acbuild -f docker/build/Dockerfile .
|
||||||
|
|
||||||
|
docker run \
|
||||||
|
-v /$(pwd)/docker/build/cache:/azerothcore/build \
|
||||||
|
-v /$(pwd)/docker/worldserver/bin:/binworldserver \
|
||||||
|
-v /$(pwd)/docker/authserver/bin:/binauthserver \
|
||||||
|
acbuild
|
||||||
@@ -11,9 +11,12 @@ ADD src /azerothcore/src
|
|||||||
ADD modules /azerothcore/modules
|
ADD modules /azerothcore/modules
|
||||||
ADD CMakeLists.txt /azerothcore/CMakeLists.txt
|
ADD CMakeLists.txt /azerothcore/CMakeLists.txt
|
||||||
|
|
||||||
|
ARG ENABLE_SCRIPTS=1
|
||||||
|
ENV ENABLE_SCRIPTS=$ENABLE_SCRIPTS
|
||||||
|
|
||||||
ENTRYPOINT cd azerothcore/build && \
|
ENTRYPOINT cd azerothcore/build && \
|
||||||
# run cmake
|
# run cmake
|
||||||
cmake ../ -DCMAKE_INSTALL_PREFIX=/azeroth-server -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DTOOLS=0 -DSCRIPTS=1 && \
|
cmake ../ -DCMAKE_INSTALL_PREFIX=/azeroth-server -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DTOOLS=0 -DSCRIPTS=$ENABLE_SCRIPTS && \
|
||||||
# calculate the optimal number of threads
|
# calculate the optimal number of threads
|
||||||
MTHREADS=`grep -c ^processor /proc/cpuinfo`; MTHREADS=$(($MTHREADS + 2)) && \
|
MTHREADS=`grep -c ^processor /proc/cpuinfo`; MTHREADS=$(($MTHREADS + 2)) && \
|
||||||
# run compilation
|
# run compilation
|
||||||
|
|||||||
Reference in New Issue
Block a user