2022-03-23 22:07:11 +01:00
|
|
|
ARG img_version
|
|
|
|
FROM pandemonium-osx:${img_version}
|
|
|
|
|
2024-04-20 20:29:56 +02:00
|
|
|
COPY files/* /root/files/
|
|
|
|
|
2024-04-20 17:44:49 +02:00
|
|
|
ENV IOS_SDK=17.2
|
2022-03-23 22:07:11 +01:00
|
|
|
|
|
|
|
RUN dnf -y install --setopt=install_weak_deps=False \
|
2022-10-11 16:29:00 +02:00
|
|
|
automake autoconf gcc gcc-c++ gcc-objc gcc-objc++ cmake libicu-devel libtool libxml2-devel openssl-devel perl python yasm && \
|
2022-03-23 22:07:11 +01:00
|
|
|
git clone --progress https://github.com/tpoechtrager/cctools-port.git && \
|
|
|
|
cd /root/cctools-port && \
|
2024-04-20 17:44:49 +02:00
|
|
|
git checkout a98286d858210b209395624477533c0bde05556a && \
|
2022-03-23 22:07:11 +01:00
|
|
|
# arm64 device
|
|
|
|
usage_examples/ios_toolchain/build.sh /root/files/iPhoneOS${IOS_SDK}.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 && \
|
2024-04-20 17:44:49 +02:00
|
|
|
# Prepare for simulator builds
|
|
|
|
sed -i '/WRAPPER_SDKDIR/s/iPhoneOS/iPhoneSimulator/' usage_examples/ios_toolchain/build.sh && \
|
2022-03-23 22:07:11 +01:00
|
|
|
# arm64 simulator
|
2024-04-20 17:44:49 +02:00
|
|
|
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 && \
|
2022-03-23 22:07:11 +01:00
|
|
|
# x86_64 simulator
|
|
|
|
sed -i 's#^TRIPLE=.*#TRIPLE="x86_64-apple-darwin11"#' usage_examples/ios_toolchain/build.sh && \
|
|
|
|
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 && \
|
2022-10-11 16:29:00 +02:00
|
|
|
ln -s /root/ioscross/x86_64_sim/bin /root/ioscross/x86_64_sim/usr/bin && \
|
|
|
|
cd /root && \
|
2024-04-20 20:29:56 +02:00
|
|
|
rm -rf /root/cctools-port && rm -rf /root/files
|
2022-03-23 22:07:11 +01:00
|
|
|
|
|
|
|
ENV OSXCROSS_IOS=not_nothing
|
|
|
|
ENV IOSCROSS_ROOT=/root/ioscross
|
|
|
|
ENV PATH="/root/ioscross/arm64/bin:/root/ioscross/arm64_sim/bin:/root/ioscross/x86_64_sim/bin:${PATH}"
|
|
|
|
|
|
|
|
CMD /bin/bash
|