Updated the build consatiners based on changes from godot's.

This commit is contained in:
Relintai 2022-10-11 16:29:00 +02:00
parent 59e980923d
commit 6801642fce
7 changed files with 65 additions and 67 deletions

View File

@ -1,10 +1,9 @@
FROM fedora:34
FROM fedora:36
WORKDIR /root
RUN dnf -y upgrade --setopt=install_weak_deps=False && \
dnf -y install --setopt=install_weak_deps=False \
RUN dnf -y install --setopt=install_weak_deps=False \
bash bzip2 curl file findutils git make nano patch pkgconfig python3-pip unzip which xz yasm && \
pip install scons==4.1.0
pip install scons==4.4.0
CMD /bin/bash

View File

@ -1,13 +1,13 @@
ARG img_version
FROM pandemonium-osx:${img_version}
ENV IOS_SDK=14.5
ENV IOS_SDK=15.4
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 && \
automake autoconf gcc gcc-c++ gcc-objc gcc-objc++ cmake libicu-devel libtool libxml2-devel openssl-devel perl python yasm && \
git clone --progress https://github.com/tpoechtrager/cctools-port.git && \
cd /root/cctools-port && \
git checkout 236a426c1205a3bfcf0dbb2e2faf2296f0a100e5 && \
git checkout 04663295d0425abfac90a42440a7ec02d7155fea && \
# arm64 device
usage_examples/ios_toolchain/build.sh /root/files/iPhoneOS${IOS_SDK}.sdk.tar.xz arm64 && \
mkdir -p /root/ioscross/arm64 && \
@ -29,8 +29,9 @@ RUN dnf -y install --setopt=install_weak_deps=False \
mkdir -p /root/ioscross/x86_64_sim && \
mv usage_examples/ios_toolchain/target/* /root/ioscross/x86_64_sim && \
mkdir /root/ioscross/x86_64_sim/usr && \
ln -s /root/ioscross/x86_64_sim/bin /root/ioscross/x86_64_sim/usr/bin
ln -s /root/ioscross/x86_64_sim/bin /root/ioscross/x86_64_sim/usr/bin && \
cd /root && \
rm -rf /root/cctools-port
ENV OSXCROSS_IOS=not_nothing
ENV IOSCROSS_ROOT=/root/ioscross

View File

@ -1,13 +1,12 @@
ARG img_version
FROM pandemonium-fedora:${img_version}
ENV EMSCRIPTEN_CLASSICAL=3.1.14
ENV EMSCRIPTEN_VERSION=3.1.18
RUN dnf -y install --setopt=install_weak_deps=False \
java-openjdk && \
git clone --branch ${EMSCRIPTEN_CLASSICAL} --progress https://github.com/emscripten-core/emsdk emsdk_${EMSCRIPTEN_CLASSICAL} && \
emsdk_${EMSCRIPTEN_CLASSICAL}/emsdk install ${EMSCRIPTEN_CLASSICAL} && \
emsdk_${EMSCRIPTEN_CLASSICAL}/emsdk activate ${EMSCRIPTEN_CLASSICAL}
# echo "source /root/emsdk_${EMSCRIPTEN_CLASSICAL}/emsdk_env.sh" >> /root/.bashrc
git clone --branch ${EMSCRIPTEN_CLASSICAL} --progress https://github.com/emscripten-core/emsdk emsdk && \
emsdk/emsdk install ${EMSCRIPTEN_CLASSICAL} && \
emsdk/emsdk activate ${EMSCRIPTEN_CLASSICAL}
CMD /bin/bash

View File

@ -1,7 +1,34 @@
ARG img_version
FROM pandemonium-fedora:${img_version}
# Todo host the buildroot files somewhere
ENV GODOT_SDK_LINUX_X86_64=/root/x86_64-godot-linux-gnu_sdk-buildroot
ENV GODOT_SDK_LINUX_X86=/root/i686-godot-linux-gnu_sdk-buildroot
ENV GODOT_SDK_LINUX_ARMHF=/root/arm-godot-linux-gnueabihf_sdk-buildroot
ENV BASE_PATH=${PATH}
RUN dnf -y install --setopt=install_weak_deps=False \
gcc-c++ libxcrypt-compat 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 yasm libstdc++ libstdc++-static
libxcrypt-compat yasm && \
curl -LO https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 && \
tar xf x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 && \
rm -f x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 && \
cd x86_64-godot-linux-gnu_sdk-buildroot && \
./relocate-sdk.sh && \
rm -f bin/{aclocal*,auto*,libtool*,m4} && \
cd /root && \
curl -LO https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/arm-godot-linux-gnueabihf_sdk-buildroot.tar.bz2 && \
tar xf arm-godot-linux-gnueabihf_sdk-buildroot.tar.bz2 && \
rm -f arm-godot-linux-gnueabihf_sdk-buildroot.tar.bz2 && \
cd arm-godot-linux-gnueabihf_sdk-buildroot && \
./relocate-sdk.sh && \
rm -f bin/{aclocal*,auto*,libtool*,m4} && \
cd /root && \
curl -LO https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/i686-godot-linux-gnu_sdk-buildroot.tar.bz2 && \
tar xf i686-godot-linux-gnu_sdk-buildroot.tar.bz2 && \
rm -f i686-godot-linux-gnu_sdk-buildroot.tar.bz2 && \
cd i686-godot-linux-gnu_sdk-buildroot && \
./relocate-sdk.sh && \
rm -f bin/{aclocal*,auto*,libtool*,m4}
CMD /bin/bash

View File

@ -8,9 +8,13 @@ RUN dnf -y install --setopt=install_weak_deps=False \
git clone --progress https://github.com/tpoechtrager/osxcross.git && \
cd /root/osxcross && \
git checkout 17bb5e2d0a46533c1dd525cf4e9a80d88bd9f00e && \
ln -s /root/files/MacOSX11.3.sdk.tar.xz /root/osxcross/tarballs && \
ln -s /root/files/MacOSX12.3.sdk.tar.xz /root/osxcross/tarballs && \
UNATTENDED=1 ./build.sh && \
./build_compiler_rt.sh
# Custom build to ensure we have Clang version matching Xcode SDK.
CLANG_VERSION=13.0.1 ENABLE_CLANG_INSTALL=1 INSTALLPREFIX=/usr ./build_clang.sh && \
./build.sh && \
./build_compiler_rt.sh && \
rm -rf /root/osxcross/build
ENV OSXCROSS_ROOT=/root/osxcross
ENV PATH="/root/osxcross/target/bin:${PATH}"

View File

@ -9,46 +9,15 @@ RUN dnf -y install --setopt=install_weak_deps=False \
clang -O3 -llzma -lxar -I /usr/local/include pbzx.c -o pbzx
ENV XCODE_SDKV=
ENV OSX_SDKV=
ENV IOS_SDKV=
CMD mkdir -p /root/xcode && \
cd /root/xcode && \
xar -xf /root/files/Xcode_12.4.xip && \
xar -xf /root/files/Xcode_${XCODE_SDKV}.xip && \
/root/pbzx/pbzx -n Content | cpio -i && \
export OSX_SDK=MacOSX11.1.sdk && \
cp -r Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /tmp/${OSX_SDK} && \
mkdir -p mkdir -p /tmp/${OSX_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/${OSX_SDK}/usr/share/man/ && \
cd /tmp && \
tar -cJf /root/files/${OSX_SDK}.tar.xz ${OSX_SDK} && \
rm -rf ${OSX_SDK} && \
cd /root/xcode && \
export IOS_SDK=iPhoneOS14.4.sdk && \
export IOS_SIMULATOR_SDK=iPhoneSimulator14.4.sdk && \
cp -r Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk /tmp/${IOS_SDK} && \
mkdir -p /tmp/${IOS_SDK}/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/${IOS_SDK}/usr/include/c++/ && \
cd /tmp && \
tar -cJf /root/files/${IOS_SDK}.tar.xz ${IOS_SDK} && \
rm -rf ${IOS_SDK} && \
cd /root/xcode && \
cp -r Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk /tmp/${IOS_SDK} && \
mkdir -p /tmp/${IOS_SDK}/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/${IOS_SDK}/usr/include/c++/ && \
cd /tmp && \
tar -cJf /root/files/${IOS_SIMULATOR_SDK}.tar.xz ${IOS_SDK} && \
rm -rf ${IOS_SDK}
#XCODE_SDK=12.5.1
#OSX_SDK=11.3
#IOS_SDK=14.5
CMD mkdir -p /root/xcode && \
cd /root/xcode && \
xar -xf /root/files/Xcode_12.5.1.xip && \
/root/pbzx/pbzx -n Content | cpio -i && \
export OSX_SDK=MacOSX11.3.sdk && \
export OSX_SDK=MacOSX${OSX_SDKV}.sdk && \
cp -r Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /tmp/${OSX_SDK} && \
mkdir -p /tmp/${OSX_SDK}/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/${OSX_SDK}/usr/include/c++/ && \
@ -60,8 +29,8 @@ CMD mkdir -p /root/xcode && \
tar -cJf /root/files/${OSX_SDK}.tar.xz ${OSX_SDK} && \
rm -rf ${OSX_SDK} && \
cd /root/xcode && \
export IOS_SDK=iPhoneOS14.5.sdk && \
export IOS_SIMULATOR_SDK=iPhoneSimulator14.5.sdk && \
export IOS_SDK=iPhoneOS${IOS_SDKV}.sdk && \
export IOS_SIMULATOR_SDK=iPhoneSimulator${IOS_SDKV}.sdk && \
cp -r Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk /tmp/${IOS_SDK} && \
mkdir -p /tmp/${IOS_SDK}/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/${IOS_SDK}/usr/include/c++/ && \

View File

@ -13,19 +13,18 @@ img_version=pe
mkdir -p logs
export podman_build="$podman build --build-arg img_version=${img_version}"
# You can add --no-cache as an option to podman_build below to rebuild all containers from scratch
export podman_build="$podman build --build-arg img_version=${img_version} -v ${files_root}:/root/files"
$podman build -v ${files_root}:/root/files -t pandemonium-fedora:${img_version} -f Dockerfile.base . 2>&1 | tee logs/base.log
$podman build -t pandemonium-fedora:${img_version} -f Dockerfile.base . 2>&1 | tee logs/base.log
$podman_build -t pandemonium-linux:${img_version} -f Dockerfile.linux . 2>&1 | tee logs/linux.log
#Todo, fedora has some issues installing libstdc++;.i686 right now
#$podman_build -t pandemonium-linux32:${img_version} -f Dockerfile.linux32 . 2>&1 | tee logs/linux32.log
$podman_build -t pandemonium-windows:${img_version} -f Dockerfile.windows --ulimit nofile=65536 . 2>&1 | tee logs/windows.log
$podman_build -t pandemonium-windows:${img_version} -f Dockerfile.windows . 2>&1 | tee logs/windows.log
$podman_build -t pandemonium-javascript:${img_version} -f Dockerfile.javascript . 2>&1 | tee logs/javascript.log
$podman_build -t pandemonium-android:${img_version} -f Dockerfile.android . 2>&1 | tee logs/android.log
XCODE_SDK=12.5.1
OSX_SDK=11.3
IOS_SDK=14.5
XCODE_SDK=13.3.1
OSX_SDK=12.3
IOS_SDK=15.4
if [ ! -e files/MacOSX${OSX_SDK}.sdk.tar.xz ] || [ ! -e files/iPhoneOS${IOS_SDK}.sdk.tar.xz ] || [ ! -e files/iPhoneSimulator${IOS_SDK}.sdk.tar.xz ]; then
if [ ! -e files/Xcode_${XCODE_SDK}.xip ]; then
echo "files/Xcode_${XCODE_SDK}.xip is required. It can be downloaded from https://developer.apple.com/download/more/ with a valid apple ID."
@ -33,10 +32,10 @@ if [ ! -e files/MacOSX${OSX_SDK}.sdk.tar.xz ] || [ ! -e files/iPhoneOS${IOS_SDK}
fi
echo "Building OSX and iOS SDK packages. This will take a while"
$podman_build -t pandemonium-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 pandemonium-xcode-packer:${img_version} 2>&1 | tee logs/xcode_packer.log
$podman_build -t pandemonium-xcode-packer:${img_version} -f Dockerfile.xcode . 2>&1 | tee logs/xcode.log
$podman run -it --rm -v ${files_root}:/root/files -e XCODE_SDKV="${XCODE_SDK}" -e OSX_SDKV="${OSX_SDK}" -e IOS_SDKV="${IOS_SDK}" godot-xcode-packer:${img_version} 2>&1 | tee logs/xcode_packer.log
fi
$podman_build -t pandemonium-osx:${img_version} -v ${files_root}:/root/files -f Dockerfile.osx . 2>&1 | tee logs/osx.log
$podman_build -t pandemonium-ios:${img_version} -v ${files_root}:/root/files -f Dockerfile.ios . 2>&1 | tee logs/ios.log
$podman_build -t pandemonium-osx:${img_version} -f Dockerfile.osx . 2>&1 | tee logs/osx.log
$podman_build -t pandemonium-ios:${img_version} -f Dockerfile.ios . 2>&1 | tee logs/ios.log