Factor out cloning and patching for godot-mono-builds

This will also be used for iOS so it makes sense to do it all
together with the split out mono clone.

This also allows to pin the commit used more easily.
This commit is contained in:
Rémi Verschelde
2020-04-06 08:44:57 +02:00
parent 4812a83c56
commit a26fc11c30
4 changed files with 19 additions and 16 deletions

1
.gitignore vendored
View File

@@ -8,4 +8,5 @@
*.zip
*.xip
files/mono-*/
logs/

View File

@@ -19,16 +19,13 @@ ENV ANDROID_NDK_ROOT=/root/sdk/ndk-bundle/
RUN cp -a /root/files/${mono_version} /root && \
export MONO_SOURCE_ROOT=/root/${mono_version} && \
export make="make -j" && \
git clone --progress https://github.com/godotengine/godot-mono-builds /root/godot-mono-builds && \
cd /root/godot-mono-builds && \
git checkout 710b275fbf29ddb03fd5285c51782951a110cdab && \
python3 patch_mono.py && \
cd /root/${mono_version}/godot-mono-builds && \
python3 android.py configure --target=all-runtime && \
python3 android.py make --target=all-runtime && \
cd /root/${mono_version} && git clean -fdx && NOCONFIGURE=1 ./autogen.sh && \
cd /root/godot-mono-builds && \
cd /root/${mono_version}/godot-mono-builds && \
python3 bcl.py make --product=android && \
cd /root && \
rm -rf /root/${mono_version} /root/godot-mono-builds
rm -rf /root/${mono_version}
CMD /bin/bash

View File

@@ -19,16 +19,14 @@ RUN cp -a /root/files/${mono_version} /root && \
patch -p1 < /root/files/patches/mono-pr17094-bump-emscripten-1.38.46.patch && \
export MONO_SOURCE_ROOT=/root/${mono_version} && \
export make="make -j" && \
git clone --progress https://github.com/godotengine/godot-mono-builds /root/godot-mono-builds && \
cd /root/godot-mono-builds && \
git checkout 710b275fbf29ddb03fd5285c51782951a110cdab && \
cd /root/${mono_version}/godot-mono-builds && \
python3 patch_emscripten.py && \
python3 wasm.py configure --target=runtime && \
python3 wasm.py make --target=runtime && \
cd /root/${mono_version} && git clean -fdx && NOCONFIGURE=1 ./autogen.sh && \
cd /root/godot-mono-builds && \
cd /root/${mono_version}/godot-mono-builds && \
python3 bcl.py make --product wasm && \
cd /root && \
rm -rf /root/${mono_version} /root/godot-mono-builds
rm -rf /root/${mono_version}
CMD /bin/bash

View File

@@ -89,6 +89,13 @@ if [ ! -e ${mono_root} ]; then
# Download all submodules, up to 6 at a time
git submodule update --init --recursive --recommend-shallow -j 6 --progress
patch -p1 < ${files_root}/patches/mono-unity-Clear-TLS-instead-of-aborting.patch
# Set up godot-mono-builds in tree
git clone --progress https://github.com/godotengine/godot-mono-builds
pushd godot-mono-builds
git checkout 710b275fbf29ddb03fd5285c51782951a110cdab
export MONO_SOURCE_ROOT=${mono_root}
python3 patch_mono.py
popd
popd
fi