Skip to content

Commit

Permalink
Windows: Use godot-mono-builds scripts, remove Wine dependency
Browse files Browse the repository at this point in the history
Streamlines the build process as done for Linux and macOS in previous commits,
and as was done for mobile and web platforms from the start. We're now fully
in sync with `godot-mono-builds`.

This also removes the need to hack around cross-compilation issues using Wine,
which also seemed no longer to work on Fedora 34 anyway.
  • Loading branch information
akien-mga committed Jul 12, 2021
1 parent c55dffe commit 428340a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 101 deletions.
31 changes: 9 additions & 22 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,16 @@ 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 \
mingw32-gcc mingw32-gcc-c++ mingw32-winpthreads-static mingw64-gcc mingw64-gcc-c++ mingw64-winpthreads-static wine && \
mingw32-gcc mingw32-gcc-c++ mingw32-winpthreads-static mingw64-gcc mingw64-gcc-c++ mingw64-winpthreads-static && \
cp -a /root/files/${mono_version} /root && \
cd /root/${mono_version} && \
patch -p1 < /root/files/patches/wine-mono.patch && \
export WINE_BITS=64 && \
bash /root/files/mono-build-win32.sh --prefix=/root/dependencies/mono-64 --host=x86_64-w64-mingw32 \
--with-profile4_x=yes --with-runtime-preset=net_4_x && \
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 && \
cp -rvp /etc/mono /root/dependencies/mono-64/etc && \
export WINE_BITS=32 && \
bash /root/files/mono-build-win32.sh --prefix=/root/dependencies/mono-32 --host=i686-w64-mingw32 \
--with-profile4_x=yes --with-runtime-preset=net_4_x && \
export MONO_SOURCE_ROOT=/root/${mono_version} && \
cd /root/${mono_version}/godot-mono-builds && \
python3 windows.py configure -j --target=x86_64 --target=x86 --mxe-prefix=/usr && \
python3 windows.py make -j --target=x86_64 --target=x86 --mxe-prefix=/usr && \
python3 bcl.py make -j --product=desktop && \
python3 bcl.py make -j --product=desktop-win32 && \
python3 windows.py copy-bcl --target=x86_64 --target=x86 && \
cd /root && \
rm -rf /root/${mono_version} && \
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 && \
cp -rvp /etc/mono /root/dependencies/mono-32/etc && \
dnf -y remove wine
rm -rf /root/${mono_version}

CMD /bin/bash
29 changes: 0 additions & 29 deletions files/mono-build-win32.sh

This file was deleted.

50 changes: 0 additions & 50 deletions files/patches/wine-mono.patch

This file was deleted.

0 comments on commit 428340a

Please sign in to comment.