diff --git a/Dockerfile.windows b/Dockerfile.windows index d1966b5..c31d22e 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -20,16 +20,14 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand 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 && \ export WINE_BITS=32 && \ - (bash /root/files/mono-build-win32.sh --prefix=/root/dependencies/mono-32 --host=i686-w64-mingw32 || /bin/true) && \ + bash /root/files/mono-build-win32.sh --prefix=/root/dependencies/mono-32 --host=i686-w64-mingw32 && \ cd /root && \ 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 && \ rm -rf /root/mono && \ dnf -y remove wine diff --git a/files/mono-build-win32.sh b/files/mono-build-win32.sh index e330e6a..55c2ec5 100644 --- a/files/mono-build-win32.sh +++ b/files/mono-build-win32.sh @@ -1,6 +1,12 @@ #!/bin/bash -echo -e '#!/bin/bash\nwine${WINE_BITS} $(dirname $0)/mono-sgen.exe "$@"' > mono/mini/mono +if [ "${WINE_BITS}" == "64" ]; then + export WINEPATH="/usr/x86_64-w64-mingw32/sys-root/mingw/bin/" +else + export WINEPATH="/usr/i686-w64-mingw32/sys-root/mingw/bin/" +fi + +echo -e '#!/bin/bash\n'"wine${WINE_BITS}"' $(dirname $0)/mono-sgen.exe "$@"' > mono/mini/mono chmod +x mono/mini/mono mkdir -p .bin