Linux: New container based on Fedora using Godot SDKs

We now provide pre-built toolchains for Linux with old glibc and the required
Godot dependencies, which can be used to build portable Godot binaries without
having to be on an extremely old Linux distro.

So we can retire the old Ubuntu 14.04 containers and instead do our portable
builds directly on Fedora 34, like for other platforms.

This commit also makes use of `godot-mono-builds` to build Mono and the BCL
for Linux, instead of doing it manually. The same will be done for Windows and
macOS in the next commit.
This commit is contained in:
Rémi Verschelde
2021-07-12 14:32:49 +02:00
parent c98720506a
commit 28fc5dde48
6 changed files with 45 additions and 83 deletions

41
Dockerfile.linux Normal file
View File

@@ -0,0 +1,41 @@
ARG img_version
FROM godot-mono:${img_version}
ARG mono_version
ENV GODOT_SDK_LINUX_X86_64=/root/x86_64-godot-linux-gnu_sdk-buildroot
ENV GODOT_SDK_LINUX_X86=/root/i686-godot-linux-gnu_sdk-buildroot
ENV BASE_PATH=${PATH}
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 \
libxcrypt-compat yasm && \
curl -LO https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 && \
tar xf x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 && \
rm -f x86_64-godot-linux-gnu_sdk-buildroot.tar.bz2 && \
cd x86_64-godot-linux-gnu_sdk-buildroot && \
./relocate-sdk.sh && \
rm -f bin/{aclocal*,auto*,libtool*,m4} && \
cd /root && \
curl -LO https://downloads.tuxfamily.org/godotengine/toolchains/linux/2021-02-11/i686-godot-linux-gnu_sdk-buildroot.tar.bz2 && \
tar xf i686-godot-linux-gnu_sdk-buildroot.tar.bz2 && \
rm -f i686-godot-linux-gnu_sdk-buildroot.tar.bz2 && \
cd i686-godot-linux-gnu_sdk-buildroot && \
./relocate-sdk.sh && \
rm -f bin/{aclocal*,auto*,libtool*,m4} && \
cp -a /root/files/${mono_version} /root && \
export MONO_SOURCE_ROOT=/root/${mono_version} && \
cd /root/${mono_version}/godot-mono-builds && \
export PATH=${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH} && \
python3 linux.py configure -j --target=x86_64 && \
python3 linux.py make -j --target=x86_64 && \
export PATH=${GODOT_SDK_LINUX_X86}/bin:${BASE_PATH} && \
python3 linux.py configure -j --target=x86 && \
python3 linux.py make -j --target=x86 && \
export PATH=${GODOT_SDK_LINUX_X86_64}/bin:${BASE_PATH} && \
python3 bcl.py make -j --product=desktop && \
python3 linux.py copy-bcl --target=x86_64 --target=x86 && \
cd /root && \
rm -rf /root/${mono_version}
CMD /bin/bash