From 26245aabc6d5ca4a48cce321ed708914f97d7c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Paulev=C3=A9?= Date: Mon, 2 Oct 2023 11:57:22 +0200 Subject: [PATCH 1/6] use fixed winetricks --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7013f6a..52237ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,8 +12,7 @@ COPY extra/host-webbrowser /usr/local/bin/xdg-open COPY extra/live-mtgo /usr/local/bin/live-mtgo # Winetricks -ARG WINETRICKS_VERSION=master -ADD https://raw.githubusercontent.com/Winetricks/winetricks/$WINETRICKS_VERSION/src/winetricks /usr/local/bin/winetricks +ADD https://raw.githubusercontent.com/calheb/winetricks/e3d25a174d27ef5109803e597af2d65085755334/src/winetricks /usr/local/bin/winetricks RUN chmod 755 /usr/local/bin/winetricks ENV DEBIAN_FRONTEND noninteractive From dfb78fe0d1b731dcee3acb0187b837103b4f8a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Paulev=C3=A9?= Date: Mon, 2 Oct 2023 11:57:59 +0200 Subject: [PATCH 2/6] update setup link --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 52237ac..faab7a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ ENV WINEDEBUG -all,err+all,warn+chain,warn+cryptnet COPY extra/mtgo.sh /usr/local/bin/mtgo -ADD --chown=wine:wine https://mtgo.patch.daybreakgames.com/patch/mtg/live/client/setup.exe?v=7 /opt/mtgo/mtgo.exe +ADD --chown=wine:wine https://mtgo.patch.daybreakgames.com/patch/mtg/live/client/setup.exe?v=8 /opt/mtgo/mtgo.exe USER wine From 9b35f8482072266509ae12839bd3c6d6cb743f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Paulev=C3=A9?= Date: Thu, 8 Jun 2023 22:38:47 +0200 Subject: [PATCH 3/6] switch to archlinux for wow64 package --- Dockerfile | 72 +++++-- Makefile | 3 +- docker-wine/.gitignore | 1 - docker-wine/Dockerfile | 44 ---- docker-wine/Makefile | 7 - docker-wine/debian/changelog | 11 - docker-wine/debian/compat | 1 - docker-wine/debian/control | 202 ------------------ docker-wine/debian/copyright | 21 -- docker-wine/debian/recommendations.sh | 67 ------ docker-wine/debian/rules | 104 --------- docker-wine/debian/source/format | 1 - docker-wine/debian/wine-devel-amd64.config | 10 - docker-wine/debian/wine-devel-amd64.install | 4 - .../debian/wine-devel-amd64.lintian-overrides | 3 - docker-wine/debian/wine-devel-amd64.postinst | 37 ---- docker-wine/debian/wine-devel-amd64.templates | 9 - docker-wine/debian/wine-devel-dev.install | 1 - docker-wine/debian/wine-devel-i386.config | 10 - docker-wine/debian/wine-devel-i386.install | 8 - .../debian/wine-devel-i386.lintian-overrides | 3 - docker-wine/debian/wine-devel-i386.postinst | 37 ---- docker-wine/debian/wine-devel-i386.templates | 9 - docker-wine/debian/wine-devel.config | 10 - docker-wine/debian/wine-devel.docs | 4 - docker-wine/debian/wine-devel.install | 28 --- docker-wine/debian/wine-devel.postinst | 37 ---- docker-wine/debian/wine-devel.templates | 9 - docker-wine/wine-WINE_X11_NO_MITSHM.patch | 33 --- run-mtgo | 5 +- 30 files changed, 53 insertions(+), 738 deletions(-) delete mode 100644 docker-wine/.gitignore delete mode 100644 docker-wine/Dockerfile delete mode 100644 docker-wine/Makefile delete mode 100644 docker-wine/debian/changelog delete mode 100644 docker-wine/debian/compat delete mode 100644 docker-wine/debian/control delete mode 100644 docker-wine/debian/copyright delete mode 100644 docker-wine/debian/recommendations.sh delete mode 100755 docker-wine/debian/rules delete mode 100644 docker-wine/debian/source/format delete mode 100644 docker-wine/debian/wine-devel-amd64.config delete mode 100644 docker-wine/debian/wine-devel-amd64.install delete mode 100644 docker-wine/debian/wine-devel-amd64.lintian-overrides delete mode 100644 docker-wine/debian/wine-devel-amd64.postinst delete mode 100644 docker-wine/debian/wine-devel-amd64.templates delete mode 100644 docker-wine/debian/wine-devel-dev.install delete mode 100644 docker-wine/debian/wine-devel-i386.config delete mode 100644 docker-wine/debian/wine-devel-i386.install delete mode 100644 docker-wine/debian/wine-devel-i386.lintian-overrides delete mode 100644 docker-wine/debian/wine-devel-i386.postinst delete mode 100644 docker-wine/debian/wine-devel-i386.templates delete mode 100644 docker-wine/debian/wine-devel.config delete mode 100644 docker-wine/debian/wine-devel.docs delete mode 100644 docker-wine/debian/wine-devel.install delete mode 100644 docker-wine/debian/wine-devel.postinst delete mode 100644 docker-wine/debian/wine-devel.templates delete mode 100644 docker-wine/wine-WINE_X11_NO_MITSHM.patch diff --git a/Dockerfile b/Dockerfile index faab7a5..fd97ccf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,46 @@ -FROM panard/wine:custom -MAINTAINER Panard -CMD mtgo +### build wine-wow64 +FROM archlinux:latest as builder + +RUN pacman -Syy +RUN pacman -S --noconfirm git base-devel + +RUN useradd -d /home/user -m user +RUN echo 'user ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/user +RUN echo 'MAKEFLAGS="-j4"' >> /etc/makepkg.conf + +USER user +WORKDIR /home/user +RUN git clone https://aur.archlinux.org/wine-wow64.git +WORKDIR /home/user/wine-wow64 + +RUN makepkg --syncdeps --noconfirm -o +RUN makepkg + + +### +### main image +### + +FROM archlinux:latest +COPY --from=builder /home/user/wine-wow64/*.zst /tmp +CMD mtgo ENV WINE_USER wine ENV WINE_UID 1000 ENV WINEPREFIX /home/wine/.wine + +RUN pacman -Syy && \ + pacman -S --noconfirm \ + cabextract \ + libunwind \ + libwbclient \ + libxinerama \ + libxcomposite \ + /tmp/*.zst \ + && pacman -Scc + RUN useradd -u $WINE_UID -d /home/wine -m -s /bin/bash $WINE_USER + WORKDIR /home/wine COPY extra/host-webbrowser /usr/local/bin/xdg-open @@ -15,31 +50,24 @@ COPY extra/live-mtgo /usr/local/bin/live-mtgo ADD https://raw.githubusercontent.com/calheb/winetricks/e3d25a174d27ef5109803e597af2d65085755334/src/winetricks /usr/local/bin/winetricks RUN chmod 755 /usr/local/bin/winetricks -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - cabextract \ - winbind \ - && apt autoremove -y --purge \ - && apt clean -y && rm -rf /var/lib/apt/lists/* - -RUN su - $WINE_USER -c 'wineboot -i' \ - && su - $WINE_USER -c 'winetricks -q corefonts calibri tahoma' \ - && su - $WINE_USER -c 'taskset -c 0 winetricks -f -q dotnet48' \ - && su - $WINE_USER -c 'winetricks win7 sound=alsa ddr=gdi'\ - && su - $WINE_USER -c 'winetricks renderer=gdi'\ - && su - $WINE_USER -c 'wineboot -s' \ +ENV WINEDEBUG -all,err+all,warn+chain,warn+cryptnet + +USER wine +WORKDIR /home/wine +RUN wineboot -i \ + && winetricks -q corefonts calibri tahoma \ + && taskset -c 0 winetricks -q dotnet48 \ + && wineboot -s \ && rm -rf /home/wine/.cache -ENV WINEDEBUG -all,err+all,warn+chain,warn+cryptnet +RUN winetricks -q sound=alsa ddr=gdi renderer=gdi -COPY extra/mtgo.sh /usr/local/bin/mtgo +USER root +COPY extra/mtgo.sh /usr/local/bin/mtgo ADD --chown=wine:wine https://mtgo.patch.daybreakgames.com/patch/mtg/live/client/setup.exe?v=8 /opt/mtgo/mtgo.exe -USER wine +USER user # hack to allow mounting of user.reg and system.reg from host # see https://github.com/pauleve/docker-mtgo/issues/6 diff --git a/Makefile b/Makefile index bcadfdf..1616836 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,11 @@ -TIMESTAMP=$(shell date +%F) +TIMESTAMP=wow64 BASE=panard/mtgo:$(TIMESTAMP) DOCKER=docker image: - make -C docker-wine $(shell grep FROM Dockerfile|cut -d: -f2) $(DOCKER) build -t $(BASE) . test: diff --git a/docker-wine/.gitignore b/docker-wine/.gitignore deleted file mode 100644 index 2fa992c..0000000 --- a/docker-wine/.gitignore +++ /dev/null @@ -1 +0,0 @@ -keep diff --git a/docker-wine/Dockerfile b/docker-wine/Dockerfile deleted file mode 100644 index c439523..0000000 --- a/docker-wine/Dockerfile +++ /dev/null @@ -1,44 +0,0 @@ -FROM i386/debian:stable as builder - -ENV DEBIAN_FRONTEND noninteractive - -WORKDIR /usr/src/wine - -RUN apt-get update && \ - apt-get install -y devscripts build-essential wget curl - -COPY debian/control /tmp/control -RUN mk-build-deps -i -r -t "apt-get -y --no-install-recommends" /tmp/control - -ARG WINE_GIT=wine-mirror/wine -ARG WINE_TAG=wine-8.15 -ARG WINE_DIST=devel - -RUN curl -L https://github.com/$WINE_GIT/archive/$WINE_TAG.tar.gz \ - | tar xz --strip-components 1 - -COPY *.patch /usr/src/wine/ -RUN for p in *.patch; do patch -p1 < $p; done - -COPY debian /usr/src/wine/debian -RUN debuild --no-lintian -us -uc -b -j7 -RUN rm -v /usr/src/wine-$WINE_DIST-d* - -FROM i386/debian:stable-slim -ENV DEBIAN_FRONTEND noninteractive -ENV WINEARCH win32 - -COPY --from=builder /usr/src/*.deb /usr/src/ - -ENV WINE_DIST devel -RUN apt-get update && \ - apt install -y --no-install-recommends \ - libxcomposite1 \ - libxinerama1 \ - libxrandr2 \ - /usr/src/wine-${WINE_DIST}-i386_*_i386.deb \ - /usr/src/wine-${WINE_DIST}_*_i386.deb \ - /usr/src/winehq-${WINE_DIST}_*_i386.deb && \ - apt clean -y && \ - rm -rf /var/lib/apt/lists/* - diff --git a/docker-wine/Makefile b/docker-wine/Makefile deleted file mode 100644 index ed3fadd..0000000 --- a/docker-wine/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -DOCKER=docker - -custom: - $(DOCKER) pull i386/debian:stable-slim - #$(DOCKER) pull i386/debian:stable - $(DOCKER) build -t panard/wine:$@ -f Dockerfile . diff --git a/docker-wine/debian/changelog b/docker-wine/debian/changelog deleted file mode 100644 index dc65139..0000000 --- a/docker-wine/debian/changelog +++ /dev/null @@ -1,11 +0,0 @@ -wine (7.21~bullseye-1) UNRELEASED; urgency=low - - * version number update by debtransform - - -- debtransform Sun, 13 Nov 2022 13:07:45 +0000 - -wine (7.21) UNRELEASED; urgency=low - - * Update to 7.21 development release. - - -- Rosanne DiMesio Sun, 13 Nov 2022 06:15:58 -0600 diff --git a/docker-wine/debian/compat b/docker-wine/debian/compat deleted file mode 100644 index b4de394..0000000 --- a/docker-wine/debian/compat +++ /dev/null @@ -1 +0,0 @@ -11 diff --git a/docker-wine/debian/control b/docker-wine/debian/control deleted file mode 100644 index 6cf15f3..0000000 --- a/docker-wine/debian/control +++ /dev/null @@ -1,202 +0,0 @@ -Source: wine -Section: otherosfs -Priority: optional -Maintainer: Rosanne DiMesio , Marcus Meissner -XSBC-Original-Maintainer: WineHQ Builds -Build-Depends: autotools-dev, - autoconf, - bison, - bsdmainutils, - docbook-to-man, - docbook-utils, - docbook-xsl, - flex, - fontforge, - gawk, - gcc, - gcc-mingw-w64-i686, - gettext, - libacl1-dev, - libasound2-dev, - libfontconfig1-dev | libfontconfig-dev, - libfreetype6-dev, - libgl1-mesa-dev, - libglu1-mesa-dev, - libgnutls30-dev | libgnutls28-dev | libgnutls-dev, - libgphoto2-dev | libgphoto2-6-dev | libgphoto2-2-dev (>= 2.4.6), - libgtk-3-dev, - libice-dev, - libkrb5-dev, - libldap2-dev, libldap-dev, - libncurses6-dev | libncurses5-dev | libncurses-dev, - libopenal-dev (>= 1:1.12), - libosmesa6-dev, - libpcap-dev, - libpulse-dev, - libsane-dev, - libsdl2-dev, - libssl-dev, - libstdc++6-4.5-dev | libstdc++-dev, - libudev-dev, - libv4l-dev, - libx11-dev, - libxcomposite-dev, - libxcursor-dev, - libxext-dev, - libxi-dev, - libxinerama-dev, - libxrandr-dev, - libxrender-dev, - libxt-dev, - libxxf86vm-dev, - linux-libc-dev, - ocl-icd-opencl-dev, - patch, - perl, - sharutils, - unixodbc-dev, - x11proto-xinerama-dev -Standards-Version: 3.9.5 - -Package: wine-devel-i386 -Architecture: i386 -Multi-Arch: foreign -Pre-Depends: dpkg (>= 1.14.12ubuntu3), ${misc:Pre-Depends} -Depends: ${shlibs:Depends}, - libasound2-plugins, - libncurses6 | libncurses5 | libncurses -Recommends: libcap2-bin, - libfontconfig1, - libfreetype6, - libglu1-mesa | libglu1, - libgnutls30 | libgnutls28 | libgnutls26, - libgssapi-krb5-2, - libkrb5-3, - libodbc1, - libosmesa6, - libsane | libsane1, - libsdl2-2.0-0, - libv4l-0, - libxcomposite1, - libxcursor1, - libxfixes3, - libxi6, - libxinerama1, - libxrandr2, - libxrender1, - libxxf86vm1 -Section: otherosfs -Priority: optional -Description: WINE Is Not An Emulator - runs MS Windows programs - Wine is a program which allows running Microsoft Windows programs - (including DOS, Windows 3.x and Win32 executables) on Unix. - . - This package contains the files needed to support 32-bit Windows - programs. - -Package: wine-devel-amd64 -Architecture: amd64 -Multi-Arch: foreign -Pre-Depends: dpkg (>= 1.14.12ubuntu3), ${misc:Pre-Depends} -Depends: ${shlibs:Depends}, - libasound2-plugins, - libncurses6 | libncurses5 | libncurses -Recommends: libcap2-bin, - libfontconfig1, - libfreetype6, - libglu1-mesa | libglu1, - libgnutls30 | libgnutls28 | libgnutls26, - libgssapi-krb5-2, - libjpeg62-turbo | libjpeg8, - libkrb5-3, - libodbc1, - libosmesa6, - libsane | libsane1, - libsdl2-2.0-0, - libv4l-0, - libxcomposite1, - libxcursor1, - libxfixes3, - libxi6, - libxinerama1, - libxrandr2, - libxrender1, - libxxf86vm1 -Section: otherosfs -Priority: optional -Description: WINE Is Not An Emulator - runs MS Windows programs - Wine is a program which allows running Microsoft Windows programs - (including DOS, Windows 3.x and Win32 executables) on Unix. - . - This package contains the files needed to support 64-bit Windows - programs. - -Package: wine-devel -Architecture: i386 amd64 -Multi-Arch: foreign -Pre-Depends: dpkg (>= 1.14.12ubuntu3), ${misc:Pre-Depends} -Depends: ${misc:Depends}, ${shlibs:Depends}, - wine-devel-i386 (= ${binary:Version}) [i386 amd64], - wine-devel-amd64 (= ${binary:Version}) [amd64], -Recommends: libcap2-bin, -Section: otherosfs -Priority: optional -Description: WINE Is Not An Emulator - runs MS Windows programs - Wine is a program which allows running Microsoft Windows programs - (including DOS, Windows 3.x and Win32 executables) on Unix. It - consists of a program loader which loads and executes a Microsoft - Windows binary, and a library (called Winelib) that implements Windows - API calls using their Unix or X11 equivalents. The library may also - be used for porting Win32 code into native Unix executables. - -Package: wine-devel-dev -Architecture: i386 amd64 armhf -Pre-Depends: dpkg (>= 1.14.12ubuntu3), ${misc:Pre-Depends} -Depends: libc6-dev, - ${shlibs:Depends}, - wine-devel-i386 (= ${binary:Version}) [i386 amd64], - wine-devel-amd64 (= ${binary:Version}) [amd64], -Section: libdevel -Priority: optional -Description: WINE Is Not An Emulator - runs MS Windows programs - Wine is a program which allows running Microsoft Windows programs - (including DOS, Windows 3.x and Win32 executables) on Unix. - . - This package contains the libraries and header files needed to - develop programs which make use of Wine. - -Package: wine-devel-dbg -Architecture: i386 amd64 -Multi-Arch: same -Pre-Depends: dpkg (>= 1.14.12ubuntu3), ${misc:Pre-Depends} -Depends: ${shlibs:Depends}, - wine-devel-i386 (= ${binary:Version}) [i386 amd64], - wine-devel-amd64 (= ${binary:Version}) [amd64], -Section: debug -Priority: optional -Description: WINE Is Not An Emulator - runs MS Windows programs - Wine is a program which allows running Microsoft Windows programs - (including DOS, Windows 3.x and Win32 executables) on Unix. - . - This package includes debugging symbols useful for reporting crashes - and other failures. - -Package: winehq-devel -Architecture: i386 amd64 -Depends: wine-devel (= ${binary:Version}), ${misc:Depends} -Section: otherosfs -Priority: optional -Replaces: wine, wine1.4, wine1.5, wine1.6, wine1.7, wine-i386, wine1.4-i386, - wine1.5-i386, wine1.6-i386, wine1.7-i386, wine-amd64, wine1.4-amd64, - wine1.5-amd64, wine1.6-amd64, wine1.7-amd64, wine32, wine64 -Conflicts: wine, wine-i386, wine-amd64 -Provides: wine, wine1.4, wine1.5, wine1.6, wine1.7, wine-i386, wine1.4-i386, - wine1.5-i386, wine1.6-i386, wine1.7-i386, wine-amd64 [amd64], - wine1.4-amd64 [amd64], wine1.5-amd64 [amd64], wine1.6-amd64 [amd64], - wine1.7-amd64 [amd64], wine32, wine64 [amd64] -Description: WINE Is Not An Emulator - runs MS Windows programs - Wine is a program which allows running Microsoft Windows programs - (including DOS, Windows 3.x and Win32 executables) on Unix. - . - This compatibility package allows to use wine-devel system-wide as - the default Wine version. diff --git a/docker-wine/debian/copyright b/docker-wine/debian/copyright deleted file mode 100644 index 0cfa8e3..0000000 --- a/docker-wine/debian/copyright +++ /dev/null @@ -1,21 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: Wine Devel -Source: https://www.winehq.org - -Files: * -Copyright: 1993-2022, the Wine project authors -License: LGPL-2.1 - -License: LGPL-2.1 - This software is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - . - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - . - On Debian systems, the complete text of the GNU Library General Public - License can be found in /usr/share/common-licenses/LGPL-2.1 file. diff --git a/docker-wine/debian/recommendations.sh b/docker-wine/debian/recommendations.sh deleted file mode 100644 index b55f675..0000000 --- a/docker-wine/debian/recommendations.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -# -# Script to generate recommendations for Wine. -# -# Copyright (C) 2016 Michael Müller -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA -# - -set -eu - -cc_flags="$1" -config="$2" -varfile="$3" - - -ignore_list=("libodbc.so" "libnetapi.so" "libGL.so.1") -lib_list=() - -contains_element() -{ - local e - for e in "${@:2}"; do - [[ "$e" == "$1" ]] && return 0 - done - return 1 -} - -# Find library names -for lib in $(grep "^#define SONAME_" "$config" | cut -d '"' -f2); do - if ! contains_element "$lib" "${ignore_list[@]}"; then - lib_list+=("$lib") - fi -done - -# Generate dummy executable -tmp_file=$(mktemp) -echo "int main(){return 0;}" | "$CC" "$cc_flags" -x c -o "$tmp_file" - \ - -Wl,--no-as-needed -Wl,--no-copy-dt-needed-entries "${lib_list[@]/#/-l:}" - -# Verify that the linking was really successful -list_imports=$(ldd "$tmp_file") - -for lib in "${lib_list[@]}"; do - if ! [[ "$list_imports" == *"$lib"* ]]; then - echo "ERROR: Something went wrong, dummy program was not linked against $lib" >&2 - exit 1 - fi -done - -# Let dpkg-shlibdeps generate a dependency list -dpkg-shlibdeps -T"$varfile" -pwine -dRecommends --warnings=0 -e "$tmp_file" - -rm "$tmp_file" -exit 0 diff --git a/docker-wine/debian/rules b/docker-wine/debian/rules deleted file mode 100755 index 3ce3e57..0000000 --- a/docker-wine/debian/rules +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/make -f - -export DEB_CFLAGS_MAINT_STRIP = -fstack-protector-strong -fcf-protection=full -export DEB_BUILD_MAINT_OPTIONS = optimize=-lto -export DEB_BUILD_MAINT_OPTIONS = hardening=-relro - -# Prefer gcc-4.5, then 4.7, then 4.9 - otherwise fallback to gcc. -export CC = $(shell for _cc in gcc-4.5 gcc-4.7 gcc-4.9 gcc false; do \ - if which "$$_cc" >/dev/null 2>&1; then echo "$$_cc"; break; fi; done) - -# export CC = gcc -fcf-protection=none -fno-stack-protector - -export CONFFLAGS = --without-dbus --without-cups --without-vulkan - -%: - dh $@ --parallel -# dh $@ --max-parallel=1 - -override_dh_auto_configure: - # Run configure -ifeq ($(DEB_BUILD_ARCH), amd64) - ./configure --prefix=/opt/wine-devel \ - --libdir=\$${prefix}/lib64 \ - --mandir=\$${prefix}/share/man \ - --infodir=\$${prefix}/share/info \ - --enable-win64 \ - --disable-tests \ - $(CONFFLAGS) -else - ./configure --prefix=/opt/wine-devel \ - --libdir=\$${prefix}/lib \ - --mandir=\$${prefix}/share/man \ - --infodir=\$${prefix}/share/info \ - --disable-tests \ - $(CONFFLAGS) -endif - - -override_dh_auto_test: - # Wine's test suite does not pass on build daemons, skip it for now - - -override_dh_installdocs: - dh_installdocs --link-doc=wine-devel - - -override_dh_install: - dh_install --fail-missing - - # These files will end up in multiple packages otherwise - rm -f debian/wine-devel/opt/wine-devel/bin/wine - rm -f debian/wine-devel/opt/wine-devel/bin/wine-preloader - rm -f debian/wine-devel/opt/wine-devel/bin/wine64 - rm -f debian/wine-devel/opt/wine-devel/bin/wine64-preloader - - # Compat symlinks for bindir - mkdir -p debian/winehq-devel/usr/bin - for _file in $$(ls "debian/wine-devel/opt/wine-devel/bin"); do \ - ln -s "/opt/wine-devel/bin/$$_file" "debian/winehq-devel/usr/bin/$$_file"; \ - done - for _file in wine wine-preloader; do \ - ln -s "/opt/wine-devel/bin/$$_file" "debian/winehq-devel/usr/bin/$$_file"; \ - done -ifeq ($(DEB_HOST_ARCH),amd64) - for _file in wine64 wine64-preloader; do \ - ln -s "/opt/wine-devel/bin/$$_file" "debian/winehq-devel/usr/bin/$$_file"; \ - done -endif - - # Compat symlinks for desktop file - mkdir -p "debian/winehq-devel/usr/share/applications" - for _file in $$(ls "debian/wine-devel/opt/wine-devel/share/applications"); do \ - ln -s "/opt/wine-devel/share/applications/$$_file" "debian/winehq-devel/usr/share/applications/$$_file"; \ - done - - # Compat manpages - for _dir in man1 de.UTF-8/man1 fr.UTF-8/man1 pl.UTF-8/man1; do \ - mkdir -p "debian/winehq-devel/usr/share/man/$$_dir"; \ - if [ -d "debian/wine-devel/opt/wine-devel/share/man/$$_dir" ]; then \ - for _file in $$(ls "debian/wine-devel/opt/wine-devel/share/man/$$_dir"); do \ - ln -s "/opt/wine-devel/share/man/$$_dir/$$_file" "debian/winehq-devel/usr/share/man/$$_dir/$$_file"; \ - done; \ - fi; \ - ln -s "/opt/wine-devel/share/man/$$_dir/wine.1" "debian/winehq-devel/usr/share/man/$$_dir/wine.1"; \ - done - - # Generate list of recommendations -# ifeq ($(DEB_HOST_ARCH),amd64) -# ./debian/recommendations.sh "-m64" "include/config.h" "debian/wine-devel-amd64.substvars" -# else -# ./debian/recommendations.sh "-m32" "include/config.h" "debian/wine-devel-i386.substvars" -# endif - - -override_dh_strip: - dh_strip -Xwine-pthread -Xwine-kthread --dbg-package=wine-devel-dbg - - -override_dh_shlibdeps: -ifeq ($(DEB_HOST_ARCH),amd64) - dh_shlibdeps -l $(CURDIR)/debian/tmp/opt/wine-devel/lib64/ -else - dh_shlibdeps -l $(CURDIR)/debian/tmp/opt/wine-devel/lib/ -endif diff --git a/docker-wine/debian/source/format b/docker-wine/debian/source/format deleted file mode 100644 index 163aaf8..0000000 --- a/docker-wine/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/docker-wine/debian/wine-devel-amd64.config b/docker-wine/debian/wine-devel-amd64.config deleted file mode 100644 index de6d983..0000000 --- a/docker-wine/debian/wine-devel-amd64.config +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -. /usr/share/debconf/confmodule - -db_input low wine/setcaps || true -db_go - -exit 0 diff --git a/docker-wine/debian/wine-devel-amd64.install b/docker-wine/debian/wine-devel-amd64.install deleted file mode 100644 index 980bbb3..0000000 --- a/docker-wine/debian/wine-devel-amd64.install +++ /dev/null @@ -1,4 +0,0 @@ -/opt/wine-devel/lib64/wine/x86_64-unix -/opt/wine-devel/lib64/wine/x86_64-windows -/opt/wine-devel/bin/wine64 -/opt/wine-devel/bin/wine64-preloader diff --git a/docker-wine/debian/wine-devel-amd64.lintian-overrides b/docker-wine/debian/wine-devel-amd64.lintian-overrides deleted file mode 100644 index d29b1ed..0000000 --- a/docker-wine/debian/wine-devel-amd64.lintian-overrides +++ /dev/null @@ -1,3 +0,0 @@ -# Wine preloader needs static linking to reserve memory and work properly, see -# the comments at loader/preloader.c for a fuller explanation -wine-devel-amd64 binary: statically-linked-binary /opt/wine-devel/bin/wine64-preloader diff --git a/docker-wine/debian/wine-devel-amd64.postinst b/docker-wine/debian/wine-devel-amd64.postinst deleted file mode 100644 index 6e7300a..0000000 --- a/docker-wine/debian/wine-devel-amd64.postinst +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -set -e - -# Alternatively this check can be disabled by preseeding: -# echo "wine/setcaps boolean false" | debconf-set-selections - -. /usr/share/debconf/confmodule - -case "$1" in - configure) - if command -v setcap > /dev/null; then - db_get wine/setcaps - - # Allow dpkg-reconfigure to remove caps - if test "$RET" = "true"; then - if ! setcap "cap_net_raw=epi" /opt/wine-devel/bin/wine64-preloader; then - echo "Setcap failed on /opt/wine-devel/bin/wine64-preloader, applications that need to send/receive raw IP packets will not work" >&2 - fi - else - # setcap -r fails if the xattr is not present - if getcap /opt/wine-devel/bin/wine64-preloader | grep -qs "/opt/wine-devel/bin/wine64-preloader"; then - if ! setcap "-r" /opt/wine-devel/bin/wine64-preloader; then - echo "Setcap -r failed on /opt/wine-devel/bin/wine64-preloader, could not remove capabilities" >&2 - fi - fi - fi - fi - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/docker-wine/debian/wine-devel-amd64.templates b/docker-wine/debian/wine-devel-amd64.templates deleted file mode 100644 index cfb9684..0000000 --- a/docker-wine/debian/wine-devel-amd64.templates +++ /dev/null @@ -1,9 +0,0 @@ -Template: wine/setcaps -Type: boolean -Default: false -Description: Allow ordinary users to run applications in Wine that send/receive raw IP packets? - Some applications need to send/receive raw IP packets, which on Linux requires - either a privileged user or the CAP_NET_RAW capability. - By answering yes to this question, the Wine binaries will be installed with CAP_NET_RAW - capability enabled. This will allow the applications that need it to function correctly, - but is a potential security risk. diff --git a/docker-wine/debian/wine-devel-dev.install b/docker-wine/debian/wine-devel-dev.install deleted file mode 100644 index f16145e..0000000 --- a/docker-wine/debian/wine-devel-dev.install +++ /dev/null @@ -1 +0,0 @@ -/opt/wine-devel/include diff --git a/docker-wine/debian/wine-devel-i386.config b/docker-wine/debian/wine-devel-i386.config deleted file mode 100644 index de6d983..0000000 --- a/docker-wine/debian/wine-devel-i386.config +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -. /usr/share/debconf/confmodule - -db_input low wine/setcaps || true -db_go - -exit 0 diff --git a/docker-wine/debian/wine-devel-i386.install b/docker-wine/debian/wine-devel-i386.install deleted file mode 100644 index 6f30fa4..0000000 --- a/docker-wine/debian/wine-devel-i386.install +++ /dev/null @@ -1,8 +0,0 @@ -/opt/wine-devel/lib/wine/i386-unix -/opt/wine-devel/lib/wine/i386-windows -/opt/wine-devel/bin/wine -/opt/wine-devel/bin/wine-preloader -/opt/wine-devel/share/man/man?/wine.?* -/opt/wine-devel/share/man/de.UTF-8/man?/wine.?* -/opt/wine-devel/share/man/fr.UTF-8/man?/wine.?* -/opt/wine-devel/share/man/pl.UTF-8/man?/wine.?* diff --git a/docker-wine/debian/wine-devel-i386.lintian-overrides b/docker-wine/debian/wine-devel-i386.lintian-overrides deleted file mode 100644 index e641a9d..0000000 --- a/docker-wine/debian/wine-devel-i386.lintian-overrides +++ /dev/null @@ -1,3 +0,0 @@ -# Wine preloader needs static linking to reserve memory and work properly, see -# the comments at loader/preloader.c for a fuller explanation -wine-devel-i386 binary: statically-linked-binary /opt/wine-devel/bin/wine-preloader diff --git a/docker-wine/debian/wine-devel-i386.postinst b/docker-wine/debian/wine-devel-i386.postinst deleted file mode 100644 index 599c359..0000000 --- a/docker-wine/debian/wine-devel-i386.postinst +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -set -e - -# Alternatively this check can be disabled by preseeding: -# echo "wine/setcaps boolean false" | debconf-set-selections - -. /usr/share/debconf/confmodule - -case "$1" in - configure) - if command -v setcap > /dev/null; then - db_get wine/setcaps - - # Allow dpkg-reconfigure to remove caps - if test "$RET" = "true"; then - if ! setcap "cap_net_raw=epi" /opt/wine-devel/bin/wine-preloader; then - echo "Setcap failed on /opt/wine-devel/bin/wine-preloader, applications that need to send/receive raw IP packets will not work" >&2 - fi - else - # setcap -r fails if the xattr is not present - if getcap /opt/wine-devel/bin/wine-preloader | grep -qs "/opt/wine-devel/bin/wine-preloader"; then - if ! setcap "-r" /opt/wine-devel/bin/wine-preloader; then - echo "Setcap -r failed on /opt/wine-devel/bin/wine-preloader, could not remove capabilities" >&2 - fi - fi - fi - fi - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/docker-wine/debian/wine-devel-i386.templates b/docker-wine/debian/wine-devel-i386.templates deleted file mode 100644 index b36b9d7..0000000 --- a/docker-wine/debian/wine-devel-i386.templates +++ /dev/null @@ -1,9 +0,0 @@ -Template: wine/setcaps -Type: boolean -Default: false -Description:Allow ordinary users to run applications in Wine that send/receive raw IP packets? - Some applications need to send/receive raw IP packets, which on Linux requires - either a privileged user or the CAP_NET_RAW capability. - By answering yes to this question, the Wine binaries will be installed with CAP_NET_RAW - capability enabled. This will allow the applications that need it to function correctly, - but is a potential security risk. diff --git a/docker-wine/debian/wine-devel.config b/docker-wine/debian/wine-devel.config deleted file mode 100644 index de6d983..0000000 --- a/docker-wine/debian/wine-devel.config +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -. /usr/share/debconf/confmodule - -db_input low wine/setcaps || true -db_go - -exit 0 diff --git a/docker-wine/debian/wine-devel.docs b/docker-wine/debian/wine-devel.docs deleted file mode 100644 index 515b191..0000000 --- a/docker-wine/debian/wine-devel.docs +++ /dev/null @@ -1,4 +0,0 @@ -documentation/README.* -ANNOUNCE -AUTHORS -README diff --git a/docker-wine/debian/wine-devel.install b/docker-wine/debian/wine-devel.install deleted file mode 100644 index 1ed658e..0000000 --- a/docker-wine/debian/wine-devel.install +++ /dev/null @@ -1,28 +0,0 @@ -/opt/wine-devel/bin -/opt/wine-devel/share/applications -/opt/wine-devel/share/wine -/opt/wine-devel/share/man/de.UTF-8/man?/winemaker.?* -/opt/wine-devel/share/man/de.UTF-8/man?/wineserver.?* -/opt/wine-devel/share/man/fr.UTF-8/man?/winemaker.?* -/opt/wine-devel/share/man/fr.UTF-8/man?/wineserver.?* -/opt/wine-devel/share/man/man?/msiexec.?* -/opt/wine-devel/share/man/man?/notepad.?* -/opt/wine-devel/share/man/man?/regedit.?* -/opt/wine-devel/share/man/man?/regsvr32.?* -/opt/wine-devel/share/man/man?/widl.?* -/opt/wine-devel/share/man/man?/wineboot.?* -/opt/wine-devel/share/man/man?/winebuild.?* -/opt/wine-devel/share/man/man?/winecfg.?* -/opt/wine-devel/share/man/man?/wineconsole.?* -/opt/wine-devel/share/man/man?/winecpp.?* -/opt/wine-devel/share/man/man?/winedbg.?* -/opt/wine-devel/share/man/man?/winedump.?* -/opt/wine-devel/share/man/man?/winefile.?* -/opt/wine-devel/share/man/man?/wineg++.?* -/opt/wine-devel/share/man/man?/winegcc.?* -/opt/wine-devel/share/man/man?/winemaker.?* -/opt/wine-devel/share/man/man?/winemine.?* -/opt/wine-devel/share/man/man?/winepath.?* -/opt/wine-devel/share/man/man?/wineserver.?* -/opt/wine-devel/share/man/man?/wmc.?* -/opt/wine-devel/share/man/man?/wrc.?* diff --git a/docker-wine/debian/wine-devel.postinst b/docker-wine/debian/wine-devel.postinst deleted file mode 100644 index e8a2c48..0000000 --- a/docker-wine/debian/wine-devel.postinst +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -set -e - -# Alternatively this check can be disabled by preseeding: -# echo "wine/setcaps boolean false" | debconf-set-selections - -. /usr/share/debconf/confmodule - -case "$1" in - configure) - if command -v setcap > /dev/null; then - db_get wine/setcaps - - # Allow dpkg-reconfigure to remove caps - if test "$RET" = "true"; then - if ! setcap "cap_net_raw=epi" /opt/wine-devel/bin/wineserver; then - echo "Setcap failed on /opt/wine-devel/bin/wineserver, applications that need to send/receive raw IP packets will not work" >&2 - fi - else - # setcap -r fails if the xattr is not present - if getcap /opt/wine-devel/bin/wineserver | grep -qs "/opt/wine-devel/bin/wineserver"; then - if ! setcap "-r" /opt/wine-devel/bin/wineserver; then - echo "Setcap -r failed on /opt/wine-devel/bin/wineserver, could not remove capabilities" >&2 - fi - fi - fi - fi - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/docker-wine/debian/wine-devel.templates b/docker-wine/debian/wine-devel.templates deleted file mode 100644 index cfb9684..0000000 --- a/docker-wine/debian/wine-devel.templates +++ /dev/null @@ -1,9 +0,0 @@ -Template: wine/setcaps -Type: boolean -Default: false -Description: Allow ordinary users to run applications in Wine that send/receive raw IP packets? - Some applications need to send/receive raw IP packets, which on Linux requires - either a privileged user or the CAP_NET_RAW capability. - By answering yes to this question, the Wine binaries will be installed with CAP_NET_RAW - capability enabled. This will allow the applications that need it to function correctly, - but is a potential security risk. diff --git a/docker-wine/wine-WINE_X11_NO_MITSHM.patch b/docker-wine/wine-WINE_X11_NO_MITSHM.patch deleted file mode 100644 index 22da31a..0000000 --- a/docker-wine/wine-WINE_X11_NO_MITSHM.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -ur a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c ---- a/dlls/winex11.drv/bitblt.c 2017-10-16 21:00:14.000000000 +0200 -+++ b/dlls/winex11.drv/bitblt.c 2017-10-17 12:11:03.779891579 +0200 -@@ -1767,6 +1767,19 @@ - } - - #ifdef HAVE_LIBXXSHM -+ -+ -+static inline BOOL DISABLED_XSHM( void ) -+{ -+ static int xshm_disabled = -1; -+ if (xshm_disabled == -1) -+ { -+ const char *str = getenv( "WINE_X11_NO_MITSHM" ); -+ xshm_disabled = str && (atoi(str) != 0); -+ } -+ return xshm_disabled; -+} -+ - static int xshm_error_handler( Display *display, XErrorEvent *event, void *arg ) - { - return 1; /* FIXME: should check event contents */ -@@ -1777,6 +1790,9 @@ - XImage *image; - - shminfo->shmid = -1; -+ -+ if (DISABLED_XSHM()) return NULL; -+ - image = XShmCreateImage( gdi_display, vis->visual, vis->depth, ZPixmap, NULL, shminfo, width, height ); - if (!image) return NULL; - if (image->bytes_per_line & 3) goto failed; /* we need 32-bit alignment */ diff --git a/run-mtgo b/run-mtgo index 1aef188..0a088b7 100755 --- a/run-mtgo +++ b/run-mtgo @@ -2,14 +2,14 @@ defaultcmd="mtgo" -image=docker.io/panard/mtgo:latest +image=panard/mtgo:wow64 docker_client=docker limit_cpus=4 name=mtgo_running cmd=$defaultcmd cmdargs="" opts="" -data="mtgo-data-$USER" +data="mtgo64-data-$USER" do_sound=false do_update=false @@ -138,7 +138,6 @@ case "${1:-}" in shift done image=$1 - do_update=true fi ;; esac shift From 88b16cbdd0069fd425df7f91a734a19a9bdd9f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Paulev=C3=A9?= Date: Mon, 27 Nov 2023 16:59:38 +0100 Subject: [PATCH 4/6] fix wow64 Dockerfile --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index fd97ccf..2aa739c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,6 +36,9 @@ RUN pacman -Syy && \ libwbclient \ libxinerama \ libxcomposite \ + && pacman -Scc + +RUN pacman -U --noconfirm \ /tmp/*.zst \ && pacman -Scc @@ -55,7 +58,7 @@ ENV WINEDEBUG -all,err+all,warn+chain,warn+cryptnet USER wine WORKDIR /home/wine RUN wineboot -i \ - && winetricks -q corefonts calibri tahoma \ + && winetricks -q calibri tahoma \ && taskset -c 0 winetricks -q dotnet48 \ && wineboot -s \ && rm -rf /home/wine/.cache @@ -67,7 +70,7 @@ USER root COPY extra/mtgo.sh /usr/local/bin/mtgo ADD --chown=wine:wine https://mtgo.patch.daybreakgames.com/patch/mtg/live/client/setup.exe?v=8 /opt/mtgo/mtgo.exe -USER user +USER wine # hack to allow mounting of user.reg and system.reg from host # see https://github.com/pauleve/docker-mtgo/issues/6 From eff73d10e0d4ed0f45d53ae37c9106557229c9da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Paulev=C3=A9?= Date: Wed, 13 Dec 2023 17:15:23 +0100 Subject: [PATCH 5/6] switch to 9.0-rc1; workaround corefonts --- Dockerfile | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2aa739c..31075ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,7 @@ ### build wine-wow64 FROM archlinux:latest as builder -RUN pacman -Syy -RUN pacman -S --noconfirm git base-devel +RUN pacman -Syy && pacman -S --noconfirm base-devel curl RUN useradd -d /home/user -m user RUN echo 'user ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/user @@ -11,11 +10,23 @@ RUN echo 'MAKEFLAGS="-j4"' >> /etc/makepkg.conf USER user WORKDIR /home/user -RUN git clone https://aur.archlinux.org/wine-wow64.git + +# 9.0-rc1 +# https://aur.archlinux.org/packages/wine-wow64 +# https://aur.archlinux.org/cgit/aur.git/commit/?h=wine-wow64 +ARG AUR_TAG=5373213607fdc07dcadcc0e18f8ba09b90ae984c + +RUN curl -fL https://aur.archlinux.org/cgit/aur.git/snapshot/aur-${AUR_TAG}.tar.gz | tar xzv\ + && mv aur-${AUR_TAG} wine-wow64 + WORKDIR /home/user/wine-wow64 +USER root +RUN pacman -Syy +USER user RUN makepkg --syncdeps --noconfirm -o -RUN makepkg +RUN sed -i 's,$srcdir/$_name-$pkgver,$srcdir/$_name-$_pkgver,' PKGBUILD +RUN cat PKGBUILD; makepkg ### @@ -58,7 +69,10 @@ ENV WINEDEBUG -all,err+all,warn+chain,warn+cryptnet USER wine WORKDIR /home/wine RUN wineboot -i \ - && winetricks -q calibri tahoma \ + && for f in arial32 times32 trebuc32 verdan32; do \ + curl -fL --output-dir /home/wine/.cache/winetricks/corefonts --create-dirs\ + -O https://web.archive.org/web/20180219204401/https://mirrors.kernel.org/gentoo/distfiles/$f.exe; done\ + && winetricks -q corefonts calibri tahoma \ && taskset -c 0 winetricks -q dotnet48 \ && wineboot -s \ && rm -rf /home/wine/.cache From 78ddcd2b413eafa8618a8f1561a0d804b00a122a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Paulev=C3=A9?= Date: Wed, 13 Dec 2023 17:19:46 +0100 Subject: [PATCH 6/6] follow workarounds --- extra/mtgo.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extra/mtgo.sh b/extra/mtgo.sh index ff90cc1..58e6647 100755 --- a/extra/mtgo.sh +++ b/extra/mtgo.sh @@ -36,6 +36,9 @@ run wineboot # workaround cert verification crash (wine 6.19) mkdir -pv ~/.wine/host/wine/AppData/LocalLow +# workaround Z: causing crashes +rm -vf ~/.wine/dosdevices/z\: + cd ~/.wine/drive_c/ workaround_dotnet() {