2020-08-05 00:54:26 +02:00
|
|
|
ARG img_version
|
|
|
|
FROM godot-osx:${img_version}
|
|
|
|
|
2021-08-08 18:31:09 +02:00
|
|
|
ENV IOS_SDK=14.4
|
|
|
|
|
2020-08-05 00:54:26 +02:00
|
|
|
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 && \
|
2021-08-08 18:31:09 +02:00
|
|
|
git checkout 236a426c1205a3bfcf0dbb2e2faf2296f0a100e5 && \
|
|
|
|
# arm64 device
|
|
|
|
usage_examples/ios_toolchain/build.sh /root/files/iPhoneOS${IOS_SDK}.sdk.tar.xz arm64 && \
|
2020-08-05 00:54:26 +02:00
|
|
|
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 && \
|
2021-08-08 18:31:09 +02:00
|
|
|
# arm64 simulator
|
|
|
|
# Disabled for now as it doesn't work with cctools-port and current LLVM:
|
|
|
|
# Cf. https://github.com/tpoechtrager/cctools-port/issues/102
|
|
|
|
#sed -i 's/miphoneos-version-min/mios-simulator-version-min/g' usage_examples/ios_toolchain/wrapper.c && \
|
|
|
|
#usage_examples/ios_toolchain/build.sh /root/files/iPhoneSimulator${IOS_SDK}.sdk.tar.xz arm64 && \
|
|
|
|
#mkdir -p /root/ioscross/arm64_sim && \
|
|
|
|
#mv usage_examples/ios_toolchain/target/* /root/ioscross/arm64_sim && \
|
|
|
|
#mkdir /root/ioscross/arm64_sim/usr && \
|
|
|
|
#ln -s /root/ioscross/arm64_sim/bin /root/ioscross/arm64_sim/usr/bin && \
|
|
|
|
# x86_64 simulator
|
2020-08-05 00:54:26 +02:00
|
|
|
sed -i 's#^TRIPLE=.*#TRIPLE="x86_64-apple-darwin11"#' usage_examples/ios_toolchain/build.sh && \
|
2021-08-08 18:31:09 +02:00
|
|
|
usage_examples/ios_toolchain/build.sh /root/files/iPhoneSimulator${IOS_SDK}.sdk.tar.xz x86_64 && \
|
|
|
|
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
|
2020-08-05 00:54:26 +02:00
|
|
|
|
|
|
|
ENV OSXCROSS_IOS=not_nothing
|
|
|
|
ENV IOSCROSS_ROOT=/root/ioscross
|
2021-08-08 18:31:09 +02:00
|
|
|
ENV PATH="/root/ioscross/arm64/bin:/root/ioscross/arm64_sim/bin:/root/ioscross/x86_64_sim/bin:${PATH}"
|
|
|
|
|
2020-08-05 00:54:26 +02:00
|
|
|
|
|
|
|
# Until we can build the cross-compiler, we include a pre-made build in the container.
|
|
|
|
RUN mkdir -p /root/aot-compilers/iphone-arm64 && \
|
2021-08-08 18:31:09 +02:00
|
|
|
curl -LO https://github.com/godotengine/godot-mono-builds/releases/download/release-c3a9d31/ios-cross-arm64.zip && \
|
|
|
|
dnf -y install --setopt=install_weak_deps=False p7zip && \
|
|
|
|
7za e ios-cross-arm64.zip ios-cross-arm64-release/bin/aarch64-apple-darwin-mono-sgen -o/root/aot-compilers/iphone-arm64 && \
|
|
|
|
rm ios-cross-arm64.zip
|
|
|
|
|
2020-08-05 00:54:26 +02:00
|
|
|
|
|
|
|
CMD /bin/bash
|