diff --git a/tool/quick_start/docker/README.md b/tool/quick_start/docker/README.md index 491913d42..d87639d65 100644 --- a/tool/quick_start/docker/README.md +++ b/tool/quick_start/docker/README.md @@ -17,6 +17,7 @@ docker build -t "ryzombuild_focal_x86_64" -f "Y:\ryzomcore4\code\tool\quick_star docker build -t "ryzombuild_scout_x86_64" -f "Y:\ryzomcore4\code\tool\quick_start\docker\ryzombuild_scout_x86_64\Dockerfile" Y:\ryzomcore4\code docker build -t "ryzombuild_scout_gcc5_x86_64" -f "Y:\ryzomcore4\code\tool\quick_start\docker\ryzombuild_scout_gcc5_x86_64\Dockerfile" Y:\ryzomcore4\code docker build -t "ryzombuild_scout_gcc9_x86_64" -f "Y:\ryzomcore4\code\tool\quick_start\docker\ryzombuild_scout_gcc9_x86_64\Dockerfile" Y:\ryzomcore4\code +docker build -t "ryzombuild_scout_gcc9_x86" -f "Y:\ryzomcore4\code\tool\quick_start\docker\ryzombuild_scout_gcc9_x86\Dockerfile" Y:\ryzomcore4\code ``` ## Prepare Steam Runtime @@ -25,7 +26,7 @@ docker build -t "ryzombuild_scout_gcc9_x86_64" -f "Y:\ryzomcore4\code\tool\quick cd /d Y:\ryzomcore4\.nel\temp ..\..\distribution\utils\aria2c https://repo.steampowered.com/steamrt-images-scout/snapshots/latest-steam-client-general-availability/com.valvesoftware.SteamRuntime.Sdk-amd64,i386-scout-sysroot.Dockerfile ..\..\distribution\utils\aria2c https://repo.steampowered.com/steamrt-images-scout/snapshots/latest-steam-client-general-availability/com.valvesoftware.SteamRuntime.Sdk-amd64,i386-scout-sysroot.tar.gz -docker build -f com.valvesoftware.SteamRuntime.Sdk-amd64,i386-scout-sysroot.Dockerfile -t steamrt_scout_amd64:latest . +docker build --platform linux/amd64 -f com.valvesoftware.SteamRuntime.Sdk-amd64,i386-scout-sysroot.Dockerfile -t steamrt_scout_amd64:latest . del "com.valvesoftware.SteamRuntime.Sdk-amd64,i386-scout-sysroot.Dockerfile" del "com.valvesoftware.SteamRuntime.Sdk-amd64,i386-scout-sysroot.tar.gz" ``` @@ -34,9 +35,9 @@ del "com.valvesoftware.SteamRuntime.Sdk-amd64,i386-scout-sysroot.tar.gz" cd /d Y:\ryzomcore4\.nel\temp ..\..\distribution\utils\aria2c https://repo.steampowered.com/steamrt-images-scout/snapshots/latest-steam-client-general-availability/com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.Dockerfile ..\..\distribution\utils\aria2c https://repo.steampowered.com/steamrt-images-scout/snapshots/latest-steam-client-general-availability/com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.tar.gz -docker build -f com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.Dockerfile -t steamrt_scout_i386:latest . -rm com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.Dockerfile -rm com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.sysroot.tar.gz +docker build --platform linux/386 -f com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.Dockerfile -t steamrt_scout_i386:latest . +del "com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.Dockerfile" +del "com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.tar.gz" ``` ## Check CMake Version @@ -58,6 +59,7 @@ docker run --rm ryzombuild_scout_gcc5_x86_64 gcc -v docker run --rm ryzombuild_scout_gcc9_x86_64 gcc -v docker run --rm ryzombuild_scout_gcc9_x86_64 cc -v docker run --rm ryzombuild_scout_gcc9_x86_64 c++ -v +docker run --rm ryzombuild_scout_gcc9_x86 c++ -v ``` ## Build Client @@ -92,3 +94,10 @@ docker run --rm -v ryzombuild_scout_gcc5_x86_64_hunter:/root/.hunter --mount "ty docker run --rm -v ryzombuild_scout_gcc9_x86_64_hunter:/root/.hunter --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_scout_gcc9" ryzombuild_scout_gcc9_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_PATCH=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 -DWITH_SSE3=OFF ../code docker run --rm -v ryzombuild_scout_gcc9_x86_64_hunter:/root/.hunter --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_scout_gcc9" ryzombuild_scout_gcc9_x86_64 ninja -j9 ``` + +## Test Steam Runtime with GCC 9 x86 + +``` +docker run --rm -v ryzombuild_scout_gcc9_x86_hunter:/root/.hunter --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_scout_gcc9_32" ryzombuild_scout_gcc9_x86 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_PATCH=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 -DWITH_SSE3=OFF ../code +docker run --rm -v ryzombuild_scout_gcc9_x86_hunter:/root/.hunter --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_scout_gcc9_32" ryzombuild_scout_gcc9_x86 ninja -j9 +``` diff --git a/tool/quick_start/docker/ninja-lfs.diff b/tool/quick_start/docker/ninja-lfs.diff new file mode 100644 index 000000000..ba2501279 --- /dev/null +++ b/tool/quick_start/docker/ninja-lfs.diff @@ -0,0 +1,24 @@ +From 382ea5d9d218ecbde1d46bfc8880d4057c13a169 Mon Sep 17 00:00:00 2001 +From: Jan Boon +Date: Tue, 22 Feb 2022 10:43:36 +0800 +Subject: [PATCH] Largefile patch + +--- + configure.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.py b/configure.py +index cded265..dda5589 100755 +--- a/configure.py ++++ b/configure.py +@@ -340,6 +340,7 @@ else: + '-fno-rtti', + '-fno-exceptions', + '-fvisibility=hidden', '-pipe', ++ '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', + '-DNINJA_PYTHON="%s"' % options.with_python] + if options.debug: + cflags += ['-D_GLIBCXX_DEBUG', '-D_GLIBCXX_DEBUG_PEDANTIC'] +-- +2.34.1.windows.1 + diff --git a/tool/quick_start/docker/ryzombuild_scout_gcc9_x86/Dockerfile b/tool/quick_start/docker/ryzombuild_scout_gcc9_x86/Dockerfile new file mode 100644 index 000000000..4e1b810dd --- /dev/null +++ b/tool/quick_start/docker/ryzombuild_scout_gcc9_x86/Dockerfile @@ -0,0 +1,48 @@ +FROM --platform=linux/386 steamrt_scout_i386:latest +MAINTAINER Ryzom Core + +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90 \ + && update-alternatives --set gcc "/usr/bin/gcc-9" \ + && update-alternatives --set g++ "/usr/bin/g++-9" + +RUN rm /usr/bin/cc \ + && ln -s /usr/lib/gcc-9/bin/gcc-9 /usr/bin/cc + +RUN update-alternatives --install /usr/bin/ld ld /usr/bin/ld.gold-2.30 90 \ + && update-alternatives --set ld "/usr/bin/ld.gold-2.30" + +RUN rm /usr/bin/addr2line && ln -s /usr/bin/addr2line-2.30 /usr/bin/addr2line \ + && rm /usr/bin/ar && ln -s /usr/bin/ar-2.30 /usr/bin/ar \ + && rm /usr/bin/as && ln -s /usr/bin/as-2.30 /usr/bin/as \ + && rm /usr/bin/c++filt && ln -s /usr/bin/c++filt-2.30 /usr/bin/c++filt \ + && ln -s /usr/bin/dwp-2.30 /usr/bin/dwp \ + && rm /usr/bin/elfedit && ln -s /usr/bin/elfedit-2.30 /usr/bin/elfedit \ + && rm /usr/bin/gold && ln -s /usr/bin/gold-2.30 /usr/bin/gold \ + && rm /usr/bin/gprof && ln -s /usr/bin/gprof-2.30 /usr/bin/gprof \ + && rm /usr/bin/nm && ln -s /usr/bin/nm-2.30 /usr/bin/nm \ + && rm /usr/bin/objcopy && ln -s /usr/bin/objcopy-2.30 /usr/bin/objcopy \ + && rm /usr/bin/objdump && ln -s /usr/bin/objdump-2.30 /usr/bin/objdump \ + && rm /usr/bin/ranlib && ln -s /usr/bin/ranlib-2.30 /usr/bin/ranlib \ + && rm /usr/bin/readelf && ln -s /usr/bin/readelf-2.30 /usr/bin/readelf \ + && rm /usr/bin/size && ln -s /usr/bin/size-2.30 /usr/bin/size \ + && rm /usr/bin/strings && ln -s /usr/bin/strings-2.30 /usr/bin/strings \ + && rm /usr/bin/strip && ln -s /usr/bin/strip-2.30 /usr/bin/strip + +COPY tool/quick_start/docker/ninja-lfs.diff ninja-lfs.diff +RUN git clone git://github.com/ninja-build/ninja.git && cd ninja && git checkout release \ + && git apply ../ninja-lfs.diff \ + && ./configure.py --bootstrap && ./ninja \ + && cp ./ninja `which ninja` \ + && cd .. && rm -rf ninja && rm ninja-lfs.diff \ + && ninja --version + +#RUN git clone https://github.com/Kitware/CMake.git && cd CMake && git checkout release \ +# && cmake -G "Ninja" . && ninja \ +# && ninja install \ +# && cd .. && rm -rf CMake \ +# && cmake --version + +RUN mkdir -p /mnt/nel + +WORKDIR /mnt/nel