From 84b63b824119929a41d1e4068802e1e393780e6c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 1 Feb 2022 11:51:36 +0800 Subject: [PATCH] Better to use a volume for the Hunter cache --- tool/quick_start/docker/README.md | 8 ++--- .../docker/hunter_dependencies/CMakeLists.txt | 33 ------------------- .../ryzombuild_bionic_x86_64/Dockerfile | 12 ------- .../docker/ryzombuild_focal_x86_64/Dockerfile | 12 ------- 4 files changed, 4 insertions(+), 61 deletions(-) delete mode 100644 tool/quick_start/docker/hunter_dependencies/CMakeLists.txt diff --git a/tool/quick_start/docker/README.md b/tool/quick_start/docker/README.md index 73e0654ab..25f912080 100644 --- a/tool/quick_start/docker/README.md +++ b/tool/quick_start/docker/README.md @@ -4,7 +4,7 @@ These Docker images are part of the quick start build environment. Documentation for developer reference only. -To add another distribution; simply add a folder with a Dockerfile, and re-run the quick start configure script. +To add another distribution; simply add a folder with a Dockerfile here or under `.nel/docker`, and re-run the quick start configure script. ## Prepare Ubuntu @@ -49,6 +49,6 @@ docker run --rm steamrt_scout_amd64 cmake --version ## Build Client ``` -docker run --rm --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_focal" ryzombuild_focal_x86_64 cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DHUNTER_ENABLED=ON -DHUNTER_STATUS_DEBUG=ON -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_RYZOM=ON -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL_TOOLS=OFF -DWITH_NELNS=OFF -DWITH_QT5=OFF -DWITH_LIBGSF=OFF -DFINAL_VERSION=ON -DWITH_DRIVER_OPENGL=ON -DWITH_DRIVER_OPENAL=ON ../code -docker run --rm --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_focal" ryzombuild_focal_x86_64 ninja -``` \ No newline at end of file +docker run --rm -v ryzombuild_focal_x86_64_hunter:/root/.hunter/_Base/Cache --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_focal" ryzombuild_focal_x86_64 cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DHUNTER_ENABLED=ON -DHUNTER_STATUS_DEBUG=ON -DHUNTER_JOBS_NUMBER=9 -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_RYZOM=ON -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL_TOOLS=OFF -DWITH_NELNS=OFF -DWITH_QT5=OFF -DWITH_LIBGSF=OFF -DFINAL_VERSION=ON -DWITH_DRIVER_OPENGL=ON -DWITH_DRIVER_OPENAL=ON ../code +docker run --rm -v ryzombuild_focal_x86_64_hunter:/root/.hunter/_Base/Cache --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_focal" ryzombuild_focal_x86_64 ninja -j9 +``` diff --git a/tool/quick_start/docker/hunter_dependencies/CMakeLists.txt b/tool/quick_start/docker/hunter_dependencies/CMakeLists.txt deleted file mode 100644 index 865e1ac91..000000000 --- a/tool/quick_start/docker/hunter_dependencies/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -# Dummy project to pre-build dependencies - -cmake_minimum_required(VERSION 3.0) - -SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}") - -INCLUDE("cmake/HunterGate.cmake") - -HunterGate( - URL "https://github.com/cpp-pm/hunter/archive/v0.23.321.tar.gz" - SHA1 "5e53cbb0429037ea8e2592bfd92704b8ff3ab492" - FILEPATH "${CMAKE_CURRENT_LIST_DIR}/cmake/HunterConfig.cmake" -) - -PROJECT(HunterDependencies) - -SET(ON 1) - -HUNTER_ADD_PACKAGE(ZLIB) -HUNTER_ADD_PACKAGE(libxml2) -HUNTER_ADD_PACKAGE(OpenSSL) -HUNTER_ADD_PACKAGE(luabind) -HUNTER_ADD_PACKAGE(CURL) -HUNTER_ADD_PACKAGE(freetype) -HUNTER_ADD_PACKAGE(Jpeg) -HUNTER_ADD_PACKAGE(giflib) -HUNTER_ADD_PACKAGE(PNG) -HUNTER_ADD_PACKAGE(libogg) -HUNTER_ADD_PACKAGE(vorbis) -HUNTER_ADD_PACKAGE(ffmpeg) -HUNTER_ADD_PACKAGE(OpenAL) - -# end of file diff --git a/tool/quick_start/docker/ryzombuild_bionic_x86_64/Dockerfile b/tool/quick_start/docker/ryzombuild_bionic_x86_64/Dockerfile index 7e538db47..7b4b4ab62 100644 --- a/tool/quick_start/docker/ryzombuild_bionic_x86_64/Dockerfile +++ b/tool/quick_start/docker/ryzombuild_bionic_x86_64/Dockerfile @@ -26,18 +26,6 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ && apt-get install -y cmake \ && rm -rf /var/lib/apt/lists/* -RUN mkdir -p hunter_dependencies/cmake - -COPY tool/quick_start/docker/hunter_dependencies/CMakeLists.txt hunter_dependencies/CMakeLists.txt -COPY CMakeModules/HunterGate.cmake hunter_dependencies/cmake/HunterGate.cmake -COPY CMakeModules/HunterConfig.cmake hunter_dependencies/cmake/HunterConfig.cmake - -RUN mkdir -p hunter_dependencies/build \ - && cd hunter_dependencies/build \ - && cmake -G "Ninja" -DHUNTER_JOBS_NUMBER=$((`nproc` * 3 / 4)) .. \ - && cd ../.. \ - && rm -rf hunter_dependencies - RUN mkdir -p /mnt/nel WORKDIR /mnt/nel diff --git a/tool/quick_start/docker/ryzombuild_focal_x86_64/Dockerfile b/tool/quick_start/docker/ryzombuild_focal_x86_64/Dockerfile index 80422a3c8..429a4b5ce 100644 --- a/tool/quick_start/docker/ryzombuild_focal_x86_64/Dockerfile +++ b/tool/quick_start/docker/ryzombuild_focal_x86_64/Dockerfile @@ -21,18 +21,6 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ qtbase5-dev qttools5-dev qttools5-dev-tools \ && rm -rf /var/lib/apt/lists/* -RUN mkdir -p hunter_dependencies/cmake - -COPY tool/quick_start/docker/hunter_dependencies/CMakeLists.txt hunter_dependencies/CMakeLists.txt -COPY CMakeModules/HunterGate.cmake hunter_dependencies/cmake/HunterGate.cmake -COPY CMakeModules/HunterConfig.cmake hunter_dependencies/cmake/HunterConfig.cmake - -RUN mkdir -p hunter_dependencies/build \ - && cd hunter_dependencies/build \ - && cmake -G "Ninja" -DHUNTER_JOBS_NUMBER=$((`nproc` * 3 / 4)) .. \ - && cd ../.. \ - && rm -rf hunter_dependencies - RUN mkdir -p /mnt/nel WORKDIR /mnt/nel