From 6e5e1739c8936d7a58c22f2d3de73188ef7ea5f9 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Wed, 13 May 2026 15:49:15 -0700 Subject: [PATCH 1/3] build-base: strip binaries after removing include directory The strip command ran on all files before the include directory was deleted, producing hundreds of harmless 'file format not recognized' warnings from header and IDL files. Swap the order so includes are removed first. --- build-base/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-base/Dockerfile b/build-base/Dockerfile index 6d43a9d..47f4967 100644 --- a/build-base/Dockerfile +++ b/build-base/Dockerfile @@ -19,5 +19,5 @@ RUN git clone --filter=tree:0 https://gitlab.winehq.org/jhol/wine.git /tmp/wines env DESTDIR=/wine make -j $(nproc) install && \ rm -rf /tmp/winesrc && \ # Clean things up - find /wine -type f -exec strip --strip-all {} \; && \ - rm -Rf /wine/usr/local/include + rm -Rf /wine/usr/local/include && \ + find /wine -type f -exec strip --strip-all {} \; From bb34cb73ec454b7c36055d1f2bc49c39fb0128e1 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Wed, 13 May 2026 15:49:20 -0700 Subject: [PATCH 2/3] Suppress Gecko/Mono install prompts via WINEDLLOVERRIDES Wine can attempt to download and install Gecko (for mshtml/IE) and Mono (for .NET) at startup or when loading certain DLLs. These are unnecessary in container environments and can cause unexpected prompts or delays. Set WINEDLLOVERRIDES=mshtml=d;mscoree=d in both the Dockerfiles (as an ENV that applies to all build and runtime Wine invocations) and in the wrapper scripts (with a fallback default so they work correctly outside the container too). --- cygwin/Dockerfile | 2 ++ cygwin/cygwin | 2 +- msys2/Dockerfile | 2 ++ msys2/msys2 | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cygwin/Dockerfile b/cygwin/Dockerfile index 67ff350..661d858 100644 --- a/cygwin/Dockerfile +++ b/cygwin/Dockerfile @@ -18,7 +18,9 @@ COPY --from=build /wine / RUN ldconfig # Avoid "tzset" startup warning + wineboot crashing +# Suppress Gecko/Mono install prompts (not needed in container) ENV TZ=UTC +ENV WINEDLLOVERRIDES="mshtml=d;mscoree=d" # Initialize Wine RUN WINEDEBUG=-all wineboot --init && wineserver --wait diff --git a/cygwin/cygwin b/cygwin/cygwin index 868b744..ce80b1a 100755 --- a/cygwin/cygwin +++ b/cygwin/cygwin @@ -1,3 +1,3 @@ #!/bin/bash -WINEDEBUG="-all" WINEPATH="C:\\cygwin64\\bin" xvfb-run -a wine bash.exe -o igncr -l "$@" +WINEDEBUG="-all" WINEDLLOVERRIDES="${WINEDLLOVERRIDES:-mshtml=d;mscoree=d}" WINEPATH="C:\\cygwin64\\bin" xvfb-run -a wine bash.exe -o igncr -l "$@" diff --git a/msys2/Dockerfile b/msys2/Dockerfile index 3afbc9e..65ff145 100644 --- a/msys2/Dockerfile +++ b/msys2/Dockerfile @@ -16,7 +16,9 @@ COPY --from=build /wine / RUN ldconfig # Avoid "tzset" startup warning + and wineboot crashing +# Suppress Gecko/Mono install prompts (not needed in container) ENV TZ=UTC +ENV WINEDLLOVERRIDES="mshtml=d;mscoree=d" # XXX: otherwise things hang RUN WINEDEBUG=-all wineboot --init && wineserver --wait diff --git a/msys2/msys2 b/msys2/msys2 index f668d86..a2718c6 100755 --- a/msys2/msys2 +++ b/msys2/msys2 @@ -1,3 +1,3 @@ #!/bin/bash -WINEDEBUG="-all" WINEPATH="C:\\msys64\\usr\\bin" MSYSTEM="${MSYSTEM:-UCRT64}" xvfb-run -a wine bash.exe -l "$@" +WINEDEBUG="-all" WINEDLLOVERRIDES="${WINEDLLOVERRIDES:-mshtml=d;mscoree=d}" WINEPATH="C:\\msys64\\usr\\bin" MSYSTEM="${MSYSTEM:-UCRT64}" xvfb-run -a wine bash.exe -l "$@" From b615ff3bed665e5f642f55c214196e1bc71b34a0 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Wed, 13 May 2026 15:49:24 -0700 Subject: [PATCH 3/3] Update to msys2-hacks-23 Update the Wine fork from msys2-hacks-22 to msys2-hacks-23. --- build-base/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-base/Dockerfile b/build-base/Dockerfile index 47f4967..9d267b6 100644 --- a/build-base/Dockerfile +++ b/build-base/Dockerfile @@ -12,8 +12,8 @@ RUN apt update && \ # Build and install patched WINE (see https://github.com/msys2/MSYS2-packages/issues/682) RUN git clone --filter=tree:0 https://gitlab.winehq.org/jhol/wine.git /tmp/winesrc && \ cd /tmp/winesrc && \ - # https://gitlab.winehq.org/jhol/wine/-/commits/msys2-hacks-22 - git checkout 2aa524aec434517843ffa1d52ad1982f86fdd074 && \ + # https://gitlab.winehq.org/jhol/wine/-/commits/msys2-hacks-23 + git checkout 5c414526d58855b42478ed7ad7faf6654f646b04 && \ ./configure --disable-tests --enable-win64 --with-mingw --enable-archs=x86_64,i386 && \ make -j $(nproc) && \ env DESTDIR=/wine make -j $(nproc) install && \