mirror of
https://github.com/godotengine/build-containers.git
synced 2025-12-31 21:48:41 +03:00
Use git tag to checkout stable mono releases
The main reason is that upstream Mono tends to miss some important files in its tarballs, so Git tags appears to be a more reliable medium. Also group RUN commands to reduce the number of intermediate dependencies.
This commit is contained in:
@@ -2,47 +2,41 @@ 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
|
||||
|
||||
RUN dnf -y install --setopt=install_weak_deps=False \
|
||||
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 \
|
||||
mingw32-gcc mingw32-gcc-c++ mingw32-winpthreads-static mingw64-gcc mingw64-gcc-c++ mingw64-winpthreads-static yasm && \
|
||||
dnf clean all && \
|
||||
rpm -Uvh --force /root/files/mingw-binutils-generic-2.30-5.fc29.godot.x86_64.rpm \
|
||||
/root/files/mingw64-binutils-2.30-5.fc29.godot.x86_64.rpm \
|
||||
/root/files/mingw32-binutils-2.30-5.fc29.godot.x86_64.rpm && \
|
||||
if [ ${mono_version%%.*} -ge 6 ]; then \
|
||||
curl https://download.mono-project.com/sources/mono/mono-${mono_version}.tar.xz | tar xJ; \
|
||||
else \
|
||||
curl https://download.mono-project.com/sources/mono/mono-${mono_version}.tar.bz2 | tar xj; \
|
||||
fi && \
|
||||
cp -r mono-${mono_version} mono-${mono_version}-32 && \
|
||||
cd mono-${mono_version} && \
|
||||
/root/files/mingw32-binutils-2.30-5.fc29.godot.x86_64.rpm
|
||||
|
||||
RUN git clone https://github.com/mono/mono --branch mono-${mono_version} --single-branch && \
|
||||
cd mono && git submodule update --init && \
|
||||
NOCONFIGURE=1 ./autogen.sh && \
|
||||
./configure --prefix=/root/dependencies/mono-64 --host=x86_64-w64-mingw32 --disable-boehm --disable-mcs-build --disable-executables && \
|
||||
echo '#define HAVE_STRUCT_SOCKADDR_IN6 1' >> config.h && \
|
||||
make -j && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
rm -rf mono-${mono_version} && \
|
||||
git clean -fdx && \
|
||||
cp /root/dependencies/mono-64/bin/libMonoPosixHelper.dll /root/dependencies/mono-64/bin/MonoPosixHelper.dll && \
|
||||
rm -f /root/dependencies/mono-64/bin/mono /root/dependencies/mono-64/bin/mono-sgen && \
|
||||
ln -s /usr/bin/mono /root/dependencies/mono-64/bin/mono && \
|
||||
ln -s /usr/bin/mono-sgen /root/dependencies/mono-64/bin/mono-sgen && \
|
||||
ln -sf /usr/lib/mono/* /root/dependencies/mono-64/lib/mono || /bin/true && \
|
||||
cp -rvp /etc/mono /root/dependencies/mono-64/etc
|
||||
|
||||
RUN cd mono-${mono_version}-32 && \
|
||||
cp -rvp /etc/mono /root/dependencies/mono-64/etc && \
|
||||
NOCONFIGURE=1 ./autogen.sh && \
|
||||
./configure --prefix=/root/dependencies/mono-32 --host=i686-w64-mingw32 --disable-boehm --disable-mcs-build --disable-executables && \
|
||||
echo '#define HAVE_STRUCT_SOCKADDR_IN6 1' >> config.h && \
|
||||
make -j && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
rm -rf mono-${mono_version}-32 && \
|
||||
cp /root/dependencies/mono-32/bin/libMonoPosixHelper.dll /root/dependencies/mono-32/bin/MonoPosixHelper.dll && \
|
||||
rm -f /root/dependencies/mono-32/bin/mono /root/dependencies/mono-32/bin/mono-sgen && \
|
||||
ln -s /usr/bin/mono /root/dependencies/mono-32/bin/mono && \
|
||||
ln -s /usr/bin/mono-sgen /root/dependencies/mono-32/bin/mono-sgen && \
|
||||
ln -sf /usr/lib/mono/* /root/dependencies/mono-32/lib/mono || /bin/true && \
|
||||
cp -rvp /etc/mono /root/dependencies/mono-32/etc
|
||||
cp -rvp /etc/mono /root/dependencies/mono-32/etc && \
|
||||
rm -rf /root/mono
|
||||
|
||||
ENV MONO32_PREFIX=/root/dependencies/mono-32
|
||||
ENV MONO64_PREFIX=/root/dependencies/mono-64
|
||||
|
||||
Reference in New Issue
Block a user