From 5659702a1e9ef694adbb93f0e39e25502b0fa066 Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 5 Aug 2020 00:54:26 +0200 Subject: [PATCH] Added the build containers from https://github.com/godotengine/build-containers under tools. Removed the mono related things from them, and cleaned up the container build script. Also added a script to build all the currently needed variants. --- podman_build_all.sh | 33 +++++++++++ tools/build-containers/.gitignore | 12 ++++ tools/build-containers/Dockerfile.android | 16 ++++++ tools/build-containers/Dockerfile.base | 9 +++ tools/build-containers/Dockerfile.export | 7 +++ tools/build-containers/Dockerfile.ios | 30 ++++++++++ tools/build-containers/Dockerfile.javascript | 15 +++++ tools/build-containers/Dockerfile.mono | 7 +++ tools/build-containers/Dockerfile.mono-glue | 7 +++ tools/build-containers/Dockerfile.msvc | 29 ++++++++++ tools/build-containers/Dockerfile.osx | 17 ++++++ tools/build-containers/Dockerfile.ubuntu-32 | 22 ++++++++ tools/build-containers/Dockerfile.ubuntu-64 | 20 +++++++ tools/build-containers/Dockerfile.windows | 7 +++ tools/build-containers/Dockerfile.xcode | 42 ++++++++++++++ tools/build-containers/README.md | 10 ++++ tools/build-containers/build_containers.sh | 55 +++++++++++++++++++ tools/build-containers/files/msvc-fixup.sh | 24 ++++++++ .../files/patches/fix-fuse-check.diff | 27 +++++++++ tools/build-containers/upload.sh | 27 +++++++++ 20 files changed, 416 insertions(+) create mode 100755 podman_build_all.sh create mode 100644 tools/build-containers/.gitignore create mode 100644 tools/build-containers/Dockerfile.android create mode 100644 tools/build-containers/Dockerfile.base create mode 100644 tools/build-containers/Dockerfile.export create mode 100644 tools/build-containers/Dockerfile.ios create mode 100644 tools/build-containers/Dockerfile.javascript create mode 100644 tools/build-containers/Dockerfile.mono create mode 100644 tools/build-containers/Dockerfile.mono-glue create mode 100644 tools/build-containers/Dockerfile.msvc create mode 100644 tools/build-containers/Dockerfile.osx create mode 100644 tools/build-containers/Dockerfile.ubuntu-32 create mode 100644 tools/build-containers/Dockerfile.ubuntu-64 create mode 100644 tools/build-containers/Dockerfile.windows create mode 100644 tools/build-containers/Dockerfile.xcode create mode 100644 tools/build-containers/README.md create mode 100755 tools/build-containers/build_containers.sh create mode 100644 tools/build-containers/files/msvc-fixup.sh create mode 100644 tools/build-containers/files/patches/fix-fuse-check.diff create mode 100644 tools/build-containers/upload.sh diff --git a/podman_build_all.sh b/podman_build_all.sh new file mode 100755 index 00000000..a46e7612 --- /dev/null +++ b/podman_build_all.sh @@ -0,0 +1,33 @@ +#!/bin/bash +set -e + +podman=`which podman || true` + +if [ -z $podman ]; then + echo "podman needs to be in PATH for this script to work." + exit 1 +fi + +project_root=$(pwd)/ +img_version=bs + +mkdir -p logs + +$podman run -v ${project_root}:/root/project -w /root/project godot-windows:${img_version} scons bew -j4 +$podman run -v ${project_root}:/root/project -w /root/project godot-windows:${img_version} scons bewd -j4 +$podman run -v ${project_root}:/root/project -w /root/project godot-windows:${img_version} scons bw -j4 +$podman run -v ${project_root}:/root/project -w /root/project godot-windows:${img_version} scons bwr -j4 + +$podman run -v ${project_root}:/root/project -w /root/project godot-ubuntu-64:${img_version} scons bel -j4 +$podman run -v ${project_root}:/root/project -w /root/project godot-ubuntu-64:${img_version} scons beld -j4 +$podman run -v ${project_root}:/root/project -w /root/project godot-ubuntu-64:${img_version} scons bl -j4 +$podman run -v ${project_root}:/root/project -w /root/project godot-ubuntu-64:${img_version} scons blr -j4 + +$podman run -v ${project_root}:/root/project -w /root/project godot-javascript:${img_version} scons bj -j4 +$podman run -v ${project_root}:/root/project -w /root/project godot-javascript:${img_version} scons bjr -j4 + +$podman run -v ${project_root}:/root/project -w /root/project godot-android:${img_version} scons ba -j4 +$podman run -v ${project_root}:/root/project -w /root/project godot-android:${img_version} scons bar -j4 + +# $podman run -v ${project_root}:/root/project -i -w /root/project -t godot-windows:${img_version} scons bew -j4 + diff --git a/tools/build-containers/.gitignore b/tools/build-containers/.gitignore new file mode 100644 index 00000000..f9d8f5a5 --- /dev/null +++ b/tools/build-containers/.gitignore @@ -0,0 +1,12 @@ +*.tar +*.tar.gz +*.tar.bz2 +*.tar.xz +*.exe +*.swp +*.dmg +*.zip +*.xip + +files/mono-*/ +logs/ diff --git a/tools/build-containers/Dockerfile.android b/tools/build-containers/Dockerfile.android new file mode 100644 index 00000000..2c3a2678 --- /dev/null +++ b/tools/build-containers/Dockerfile.android @@ -0,0 +1,16 @@ +ARG img_version +FROM godot-mono:${img_version} + +RUN dnf -y install --setopt=install_weak_deps=False \ + gcc gcc-c++ java-1.8.0-openjdk-devel ncurses-compat-libs && \ + mkdir sdk && cd sdk && \ + curl -LO https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip && \ + unzip sdk-tools-linux-4333796.zip && \ + rm sdk-tools-linux-4333796.zip && \ + yes | tools/bin/sdkmanager --licenses && \ + tools/bin/sdkmanager ndk-bundle 'build-tools;28.0.3' 'platforms;android-28' 'cmake;3.10.2.4988404' + +ENV ANDROID_HOME=/root/sdk/ +ENV ANDROID_NDK_ROOT=/root/sdk/ndk-bundle/ + +CMD /bin/bash diff --git a/tools/build-containers/Dockerfile.base b/tools/build-containers/Dockerfile.base new file mode 100644 index 00000000..d9a55255 --- /dev/null +++ b/tools/build-containers/Dockerfile.base @@ -0,0 +1,9 @@ +FROM fedora:31 + +WORKDIR /root + +RUN dnf -y upgrade --setopt=install_weak_deps=False && \ + dnf -y install --setopt=install_weak_deps=False \ + bash bzip2 curl git make patch pkgconfig python3 scons unzip which xz + +CMD /bin/bash diff --git a/tools/build-containers/Dockerfile.export b/tools/build-containers/Dockerfile.export new file mode 100644 index 00000000..6add3bb1 --- /dev/null +++ b/tools/build-containers/Dockerfile.export @@ -0,0 +1,7 @@ +ARG img_version +FROM godot-fedora:${img_version} + +RUN dnf -y install --setopt=install_weak_deps=False \ + xorg-x11-server-Xvfb mesa-dri-drivers libXcursor libXinerama libXrandr libXi alsa-lib pulseaudio-libs java-1.8.0-openjdk-devel + +CMD /bin/bash diff --git a/tools/build-containers/Dockerfile.ios b/tools/build-containers/Dockerfile.ios new file mode 100644 index 00000000..36f6ba0c --- /dev/null +++ b/tools/build-containers/Dockerfile.ios @@ -0,0 +1,30 @@ +ARG img_version +FROM godot-osx:${img_version} + +RUN dnf -y install --setopt=install_weak_deps=False \ + automake autoconf clang gcc gcc-c++ gcc-objc gcc-objc++ cmake libicu-devel libtool libxml2-devel llvm-devel openssl-devel perl python yasm && \ + git clone --progress https://github.com/tpoechtrager/cctools-port.git && \ + cd /root/cctools-port && \ + git checkout 8239a5211bcf07d6b9d359782e1a889ec1d7cce5 && \ + sed -i 's#./autogen.sh#libtoolize -c -i --force\n./autogen.sh#' usage_examples/ios_toolchain/build.sh && \ + usage_examples/ios_toolchain/build.sh /root/files/iPhoneOS12.4.sdk.tar.xz arm64 && \ + mkdir -p /root/ioscross/arm64 && \ + mv usage_examples/ios_toolchain/target/* /root/ioscross/arm64 && \ + mkdir /root/ioscross/arm64/usr && \ + ln -s /root/ioscross/arm64/bin /root/ioscross/arm64/usr/bin && \ + sed -i 's#^TRIPLE=.*#TRIPLE="x86_64-apple-darwin11"#' usage_examples/ios_toolchain/build.sh && \ + usage_examples/ios_toolchain/build.sh /root/files/iPhoneSimulator12.4.sdk.tar.xz x86_64 && \ + mkdir -p /root/ioscross/x86_64 && \ + mv usage_examples/ios_toolchain/target/* /root/ioscross/x86_64 && \ + mkdir /root/ioscross/x86_64/usr && \ + ln -s /root/ioscross/x86_64/bin /root/ioscross/x86_64/usr/bin + +ENV OSXCROSS_IOS=not_nothing +ENV IOSCROSS_ROOT=/root/ioscross +ENV PATH="/root/ioscross/arm64/bin:/root/ioscross/x86_64/bin:${PATH}" + +# Until we can build the cross-compiler, we include a pre-made build in the container. +RUN mkdir -p /root/aot-compilers/iphone-arm64 && \ + tar xvf /root/files/aarch64-apple-darwin-mono-sgen.tar.xz -C /root/aot-compilers/iphone-arm64 + +CMD /bin/bash diff --git a/tools/build-containers/Dockerfile.javascript b/tools/build-containers/Dockerfile.javascript new file mode 100644 index 00000000..5a932e11 --- /dev/null +++ b/tools/build-containers/Dockerfile.javascript @@ -0,0 +1,15 @@ +ARG img_version +FROM godot-mono:${img_version} + +ARG mono_version + +RUN dnf -y install --setopt=install_weak_deps=False \ + java-openjdk yasm && \ + git clone --progress https://github.com/emscripten-core/emsdk && \ + cd emsdk && \ + git checkout a5082b232617c762cb65832429f896c838df2483 && \ + ./emsdk install 1.38.47-upstream && \ + ./emsdk activate 1.38.47-upstream && \ + echo "source /root/emsdk/emsdk_env.sh" >> /root/.bashrc + +CMD /bin/bash diff --git a/tools/build-containers/Dockerfile.mono b/tools/build-containers/Dockerfile.mono new file mode 100644 index 00000000..dd6897fe --- /dev/null +++ b/tools/build-containers/Dockerfile.mono @@ -0,0 +1,7 @@ +ARG img_version +FROM godot-fedora:${img_version} + +RUN dnf -y install --setopt=install_weak_deps=False \ + autoconf automake cmake gcc gcc-c++ gettext libtool perl python + +CMD /bin/bash diff --git a/tools/build-containers/Dockerfile.mono-glue b/tools/build-containers/Dockerfile.mono-glue new file mode 100644 index 00000000..5ca64517 --- /dev/null +++ b/tools/build-containers/Dockerfile.mono-glue @@ -0,0 +1,7 @@ +ARG img_version +FROM godot-mono:${img_version} + +RUN dnf -y install --setopt=install_weak_deps=False \ + xorg-x11-server-Xvfb libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel libXi-devel alsa-lib-devel pulseaudio-libs-devel libudev-devel mesa-libGL-devel mesa-libGLU-devel mesa-dri-drivers + +CMD /bin/bash diff --git a/tools/build-containers/Dockerfile.msvc b/tools/build-containers/Dockerfile.msvc new file mode 100644 index 00000000..5ca6f092 --- /dev/null +++ b/tools/build-containers/Dockerfile.msvc @@ -0,0 +1,29 @@ +ARG img_version +FROM godot-fedora:${img_version} + +ENV WINEDEBUG=-all + +RUN dnf -y install --setopt=install_weak_deps=False \ + wine winetricks xorg-x11-server-Xvfb p7zip-plugins findutils && \ + curl -LO https://github.com/GodotBuilder/godot-builds/releases/download/_tools/angle.7z && \ + curl -LO https://www.python.org/ftp/python/3.7.2/python-3.7.2-amd64.exe && \ + xvfb-run sh -c "winetricks -q vcrun2017; wineserver -w" ;\ + xvfb-run sh -c "winetricks -q dotnet461; wineserver -w" ;\ + xvfb-run sh -c "wine /root/python-3.7.2-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0; wineserver -w" ;\ + rm /root/python-3.7.2-amd64.exe && \ + wine python -m pip install --upgrade pip ; wineserver -w ; \ + wine pip install -U setuptools ; wineserver -w ; \ + wine pip install -U wheel ; wineserver -w ; \ + wine pip install scons pywin32 ; wineserver -w ; \ + cd /root/.wine/drive_c && \ + 7z x /root/angle.7z && \ + rm /root/angle.7z && \ + cd "/root/.wine/drive_c/Program Files (x86)" && \ + tar xf /root/files/msvc2017.tar && \ + cd /root && \ + bash /root/files/msvc-fixup.sh && \ + find /root/.wine -name vctip.exe -delete && \ + rm -rf /root/.wine/drive_c/users/root/Temp/* && \ + rm -rf /root/.cache + +CMD /bin/bash diff --git a/tools/build-containers/Dockerfile.osx b/tools/build-containers/Dockerfile.osx new file mode 100644 index 00000000..cdcc0284 --- /dev/null +++ b/tools/build-containers/Dockerfile.osx @@ -0,0 +1,17 @@ +ARG img_version +FROM godot-mono:${img_version} + +ARG mono_version + +RUN dnf -y install --setopt=install_weak_deps=False \ + automake autoconf bzip2-devel clang libicu-devel libtool libxml2-devel llvm-devel openssl-devel yasm && \ + git clone --progress https://github.com/tpoechtrager/osxcross.git && \ + cd /root/osxcross && \ + git checkout 542acc2ef6c21aeb3f109c03748b1015a71fed63 && \ + ln -s /root/files/MacOSX10.14.sdk.tar.xz /root/osxcross/tarballs && \ + UNATTENDED=1 ./build.sh + +ENV OSXCROSS_ROOT=/root/osxcross +ENV PATH="/root/osxcross/target/bin:${PATH}" + +CMD /bin/bash diff --git a/tools/build-containers/Dockerfile.ubuntu-32 b/tools/build-containers/Dockerfile.ubuntu-32 new file mode 100644 index 00000000..9fae2e4d --- /dev/null +++ b/tools/build-containers/Dockerfile.ubuntu-32 @@ -0,0 +1,22 @@ +FROM i386/ubuntu:trusty + +ARG mono_version + +RUN apt-get update && \ + apt-get -y install wget && \ + cd /root && \ + wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F' | apt-key add - && \ + wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x8E51A6D660CD88D67D65221D90BD7EACED8E640A' | apt-key add - && \ + echo 'deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty main' >> /etc/apt/sources.list && \ + echo 'deb http://ppa.launchpad.net/mc3man/trusty-media/ubuntu trusty main' >> /etc/apt/sources.list && \ + apt-get -y update && \ + apt-get -y install --no-install-recommends \ + autoconf automake bzip2 cmake curl gettext git libtool make perl scons xz-utils \ + gcc-8 g++-8 libudev-dev libx11-dev libxcursor-dev libxrandr-dev libasound2-dev libpulse-dev \ + libgl1-mesa-dev libglu1-mesa-dev libxi-dev libxinerama-dev yasm && \ + ln -sf /usr/bin/gcc-ranlib-8 /usr/bin/gcc-ranlib && \ + ln -sf /usr/bin/gcc-ar-8 /usr/bin/gcc-ar && \ + ln -sf /usr/bin/gcc-8 /usr/bin/gcc && \ + ln -sf /usr/bin/g++-8 /usr/bin/g++ + +CMD /bin/bash diff --git a/tools/build-containers/Dockerfile.ubuntu-64 b/tools/build-containers/Dockerfile.ubuntu-64 new file mode 100644 index 00000000..18dd1a8d --- /dev/null +++ b/tools/build-containers/Dockerfile.ubuntu-64 @@ -0,0 +1,20 @@ +FROM ubuntu:trusty + +RUN apt-get update && \ + apt-get -y install wget && \ + cd /root && \ + wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F' | apt-key add - && \ + wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x8E51A6D660CD88D67D65221D90BD7EACED8E640A' | apt-key add - && \ + echo 'deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty main' >> /etc/apt/sources.list && \ + echo 'deb http://ppa.launchpad.net/mc3man/trusty-media/ubuntu trusty main' >> /etc/apt/sources.list && \ + apt-get -y update && \ + apt-get -y install --no-install-recommends \ + autoconf automake bzip2 cmake curl gettext git libtool make perl scons xz-utils \ + gcc-8 g++-8 libudev-dev libx11-dev libxcursor-dev libxrandr-dev libasound2-dev libpulse-dev \ + libgl1-mesa-dev libglu1-mesa-dev libxi-dev libxinerama-dev yasm && \ + ln -sf /usr/bin/gcc-ranlib-8 /usr/bin/gcc-ranlib && \ + ln -sf /usr/bin/gcc-ar-8 /usr/bin/gcc-ar && \ + ln -sf /usr/bin/gcc-8 /usr/bin/gcc && \ + ln -sf /usr/bin/g++-8 /usr/bin/g++ + +CMD /bin/bash diff --git a/tools/build-containers/Dockerfile.windows b/tools/build-containers/Dockerfile.windows new file mode 100644 index 00000000..e4fbc3a4 --- /dev/null +++ b/tools/build-containers/Dockerfile.windows @@ -0,0 +1,7 @@ +ARG img_version +FROM godot-mono:${img_version} + +RUN dnf -y install --setopt=install_weak_deps=False \ + mingw32-gcc mingw32-gcc-c++ mingw32-winpthreads-static mingw64-gcc mingw64-gcc-c++ mingw64-winpthreads-static + +CMD /bin/bash diff --git a/tools/build-containers/Dockerfile.xcode b/tools/build-containers/Dockerfile.xcode new file mode 100644 index 00000000..388fc6a5 --- /dev/null +++ b/tools/build-containers/Dockerfile.xcode @@ -0,0 +1,42 @@ +FROM godot-fedora:${img_version} + +RUN dnf -y install --setopt=install_weak_deps=False \ + autoconf automake libtool clang cmake fuse fuse-devel libxml2-devel libicu-devel compat-openssl10-devel bzip2-devel kmod cpio && \ + git clone --progress https://github.com/mackyle/xar.git && \ + cd xar/xar && \ + git checkout 66d451dab1ef859dd0c83995f2379335d35e53c9 && \ + ./autogen.sh --prefix=/usr && \ + make -j && make install && \ + cd /root && \ + git clone --progress https://github.com/NiklasRosenstein/pbzx && \ + cd pbzx && \ + git checkout 2a4d7c3300c826d918def713a24d25c237c8ed53 && \ + clang -O3 -llzma -lxar -I /usr/local/include pbzx.c -o pbzx + +CMD mkdir -p /root/xcode && \ + cd /root/xcode && \ + xar -xf /root/files/Xcode_10.3.xip && \ + /root/pbzx/pbzx -n Content | cpio -i && \ + cp -r Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /tmp/MacOSX10.14.sdk && \ + mkdir -p /tmp/MacOSX10.14.sdk/usr/include/c++ && \ + cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/MacOSX10.14.sdk/usr/include/c++/ && \ + mkdir -p mkdir -p /tmp/MacOSX10.14.sdk/usr/share/man && \ + cp -rf Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man1 \ + Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man3 \ + Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man5 /tmp/MacOSX10.14.sdk/usr/share/man/ && \ + cd /tmp && \ + tar -cJf /root/files/MacOSX10.14.sdk.tar.xz MacOSX10.14.sdk && \ + rm -rf MacOSX10.14 && \ + cd /root/xcode && \ + cp -r Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk /tmp/iPhoneOS12.4.sdk && \ + mkdir -p /tmp/iPhoneOS12.4.sdk/usr/include/c++ && \ + cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/iPhoneOS12.4.sdk/usr/include/c++/ && \ + cd /tmp && \ + tar -cJf /root/files/iPhoneOS12.4.sdk.tar.xz iPhoneOS12.4.sdk && \ + rm -rf iPhoneOS12.4.sdk && \ + cd /root/xcode && \ + cp -r Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk /tmp/iPhoneOS12.4.sdk && \ + mkdir -p /tmp/iPhoneOS12.4.sdk/usr/include/c++ && \ + cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/iPhoneOS12.4.sdk/usr/include/c++/ && \ + cd /tmp && \ + tar -cJf /root/files/iPhoneSimulator12.4.sdk.tar.xz iPhoneOS12.4.sdk diff --git a/tools/build-containers/README.md b/tools/build-containers/README.md new file mode 100644 index 00000000..8b98f872 --- /dev/null +++ b/tools/build-containers/README.md @@ -0,0 +1,10 @@ +# Godot engine build containers + +Based on https://github.com/godotengine/build-containers + +This repository contains the Dockerfiles for the official Godot engine builds. These containers should help you build Godot for all platforms supported on any machine that can run Docker containers. + +## Building + +There is a 'build.sh' script included to build the containers themselves. The in-container build scripts will follow shortly. + diff --git a/tools/build-containers/build_containers.sh b/tools/build-containers/build_containers.sh new file mode 100755 index 00000000..b50c1346 --- /dev/null +++ b/tools/build-containers/build_containers.sh @@ -0,0 +1,55 @@ +#!/bin/bash +set -e + +podman=`which podman || true` + +if [ -z $podman ]; then + echo "podman needs to be in PATH for this script to work." + exit 1 +fi + +files_root=$(pwd)/files +img_version=bs + +mkdir -p logs + +export podman_build="$podman build --build-arg img_version=${img_version}" + +$podman build -v ${files_root}:/root/files -t godot-fedora:${img_version} -f Dockerfile.base . 2>&1 | tee logs/base.log +$podman_build -t godot-export:${img_version} -f Dockerfile.export . 2>&1 | tee logs/export.log + +$podman_build -t godot-mono:${img_version} -f Dockerfile.mono . 2>&1 | tee logs/mono.log +$podman_build -t godot-mono-glue:${img_version} -f Dockerfile.mono-glue . 2>&1 | tee logs/mono-glue.log +$podman_build -t godot-windows:${img_version} -f Dockerfile.windows --ulimit nofile=65536 . 2>&1 | tee logs/windows.log +$podman_build -t godot-ubuntu-64:${img_version} -f Dockerfile.ubuntu-64 . 2>&1 | tee logs/ubuntu-64.log +$podman_build -t godot-ubuntu-32:${img_version} -f Dockerfile.ubuntu-32 . 2>&1 | tee logs/ubuntu-32.log +$podman_build -t godot-javascript:${img_version} -f Dockerfile.javascript . 2>&1 | tee logs/javascript.log +$podman_build -t godot-android:${img_version} -f Dockerfile.android . 2>&1 | tee logs/android.log + +if [ ! -e files/MacOSX10.14.sdk.tar.xz ] || [ ! -e files/iPhoneOS12.4.sdk.tar.xz ] || [ ! -e files/iPhoneSimulator12.4.sdk.tar.xz ]; then + if [ ! -e files/Xcode_10.3.xip ]; then + echo "files/Xcode_10.3.xip is required. It can be downloaded from https://developer.apple.com/download/more/ with a valid apple ID" + exit 1 + fi + + echo "Building OSX and iOS SDK packages. This will take a while" + $podman_build -t godot-xcode-packer:${img_version} -f Dockerfile.xcode -v ${files_root}:/root/files . 2>&1 | tee logs/xcode.log + $podman run -it --rm -v ${files_root}:/root/files godot-xcode-packer:${img_version} 2>&1 | tee logs/xcode_packer.logw +fi + +$podman_build -t godot-osx:${img_version} -f Dockerfile.osx . 2>&1 | tee logs/osx.log +$podman_build -t godot-ios:${img_version} -f Dockerfile.ios . 2>&1 | tee logs/ios.log + +if [ ! -e files/msvc2017.tar ]; then + echo + echo "files/msvc2017.tar is missing. This file can be created on a Windows 7 or 10 machine by downloading the 'Visual Studio Tools' installer." + echo "here: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017" + echo "The required components can be installed by running" + echo "vs_buildtools.exe --add Microsoft.VisualStudio.Workload.UniversalBuildTools --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop --add Microsoft.VisualStudio.Component.Windows10SDK.16299.UWP.Native --passive" + echo "after that create a zipfile of C:/Program Files (x86)/Microsoft Visual Studio" + echo "tar -cf msvc2017.tar -C \"c:/Program Files (x86)/ Microsoft Visual Studio\"" + echo + exit 1 +fi + +$podman_build -t godot-msvc:${img_version} -f Dockerfile.msvc -v ${files_root}:/root/files . 2>&1 | tee logs/msvc.log diff --git a/tools/build-containers/files/msvc-fixup.sh b/tools/build-containers/files/msvc-fixup.sh new file mode 100644 index 00000000..95dd7997 --- /dev/null +++ b/tools/build-containers/files/msvc-fixup.sh @@ -0,0 +1,24 @@ +cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/msobj140.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/arm/ +cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/msobj140.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x86/ + +cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/mspdbcore.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/arm/ +cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/mspdbcore.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x86/ + +cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/mspdb140.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/ +cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/mspdb140.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/arm/ + +cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/msobj140.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/ +cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/msobj140.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/arm/ + +cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/mspdbcore.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/ +cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/mspdbcore.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/arm/ + +cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/mspdbsrv.exe /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/ +cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/mspdbsrv.exe /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/arm/ + +cp /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/msvcdis140.dll /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/arm/ + +pushd /root/.wine/drive_c/Program\ Files\ \(x86\)/Microsoft\ SDKs/ +rm -rf ClickOnce\ Bootstrapper/ Portable/ Windows NuGetPackages/ UWPNuGetPackages/ +popd + diff --git a/tools/build-containers/files/patches/fix-fuse-check.diff b/tools/build-containers/files/patches/fix-fuse-check.diff new file mode 100644 index 00000000..7691d57b --- /dev/null +++ b/tools/build-containers/files/patches/fix-fuse-check.diff @@ -0,0 +1,27 @@ +diff -u a/tools/gen_sdk_package_darling_dmg.sh b/tools/gen_sdk_package_darling_dmg.sh +--- a/tools/gen_sdk_package_darling_dmg.sh 2018-12-20 16:06:04.744507679 +0000 ++++ b/tools/gen_sdk_package_darling_dmg.sh 2018-12-20 16:06:39.000379232 +0000 +@@ -33,22 +33,6 @@ + [ -n "$CC" ] && require $CC + [ -n "$CXX" ] && require $CXX + +-set +e +- +-command -v lsb_release 2>&1 > /dev/null +- +-if [[ $? -eq 0 ]] && [[ -n $(lsb_release -a 2>&1 | grep -i ubuntu) ]]; then +- echo "Using ubuntu, skipping fuse module check" +-else +- modinfo fuse &>/dev/null +-fi +- +-if [ $? -ne 0 ]; then +- echo "Required kernel module 'fuse' not loaded" 1>&2 +- echo "Please run 'insmod fuse' as root" 1>&2 +- exit 1 +-fi +- + set -e + + pushd $BUILD_DIR &>/dev/null + diff --git a/tools/build-containers/upload.sh b/tools/build-containers/upload.sh new file mode 100644 index 00000000..919de5b5 --- /dev/null +++ b/tools/build-containers/upload.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +set -e + +podman=podman +if ! which $podman; then + podman=docker +fi + +registry=$1 + +if [ -z "${registry}" ]; then + registry=registry.prehensile-tales.com +fi + +$podman push godot-export:latest ${registry}/godot/export +$podman push godot-mono-glue:latest ${registry}/godot/mono-glue +$podman push godot-windows:latest ${registry}/godot/windows +$podman push godot-ubuntu-32:latest ${registry}/godot/ubuntu-32 +$podman push godot-ubuntu-64:latest ${registry}/godot/ubuntu-64 +$podman push godot-javascript:latest ${registry}/godot/javascript +$podman push godot-xcode-packer:latest ${registry}/godot/xcode-packer + +$podman push godot-android:latest ${registry}/godot-private/android +$podman push godot-ios:latest ${registry}/godot-private/ios +$podman push godot-osx:latest ${registry}/godot-private/macosx +$podman push godot-msvc:latest ${registry}/godot-private/uwp