mirror of
https://github.com/godotengine/build-containers.git
synced 2025-12-31 21:48:41 +03:00
To get WebAssembly templates to actually work, we need to use Mono 6.6 (currently in preview), which doesn't have tags yet but is in the `2019-08` branch. So I dehardcoded the `mono-` prefix for the git tree-ish to allow using `./build.sh 2019-08`. 6.6 doesn't build with msbuild 16.0, so I'm upgrading to its matching version 16.3. There are no DEB files for 16.3 on the EOL'ed Ubuntu 14.04, but it seems that the 16.04 packages install cleanly. We also backport a patch from mono's master branch to fix wasm support further, and enable parallel build jobs for make.
36 lines
1.5 KiB
Docker
36 lines
1.5 KiB
Docker
ARG mono_version
|
|
FROM godot-mono:${mono_version}
|
|
ARG mono_version
|
|
|
|
RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
|
|
dnf -y install --setopt=install_weak_deps=False \
|
|
gcc gcc-c++ java-1.8.0-openjdk-devel ncurses-compat-libs && \
|
|
dnf clean all && \
|
|
mkdir sdk && cd sdk && \
|
|
curl -LO https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip && \
|
|
unzip sdk-tools-linux-4333796.zip && \
|
|
rm sdk-tools-linux-4333796.zip && \
|
|
yes | tools/bin/sdkmanager --licenses && \
|
|
tools/bin/sdkmanager ndk-bundle 'build-tools;28.0.3' 'platforms;android-28' 'cmake;3.10.2.4988404'
|
|
|
|
ENV ANDROID_HOME=/root/sdk/
|
|
ENV ANDROID_NDK_ROOT=/root/sdk/ndk-bundle/
|
|
|
|
RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
|
|
cd mono && git submodule update --init && cd .. && \
|
|
export MONO_SOURCE_ROOT=/root/mono && \
|
|
export make="make -j" && \
|
|
git clone https://github.com/godotengine/godot-mono-builds && \
|
|
cd godot-mono-builds && \
|
|
git checkout bd129da22b8b9c96f3e8b07af348cc5fb61504bf && \
|
|
python3 patch_mono.py && \
|
|
python3 android.py configure --target=all-runtime && \
|
|
python3 android.py make --target=all-runtime && \
|
|
cd /root/mono && git clean -fdx && NOCONFIGURE=1 ./autogen.sh && \
|
|
cd /root/godot-mono-builds && \
|
|
python3 bcl.py make --product=android && \
|
|
cd .. && \
|
|
rm -rf /root/mono /root/godot-mono-builds
|
|
|
|
CMD /bin/bash
|