forked from godotengine/build-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.xcode
47 lines (45 loc) · 2.56 KB
/
Dockerfile.xcode
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
ARG img_version
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_12.4.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 /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++/ && \
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}