From 5987e5e68410e4a3dd6e5dec500da6de53eca09c Mon Sep 17 00:00:00 2001 From: Emma Hare Date: Sun, 19 Jul 2026 04:58:46 -0700 Subject: [PATCH 1/2] installer: drop no-op webview2 winetricks component winetricks has no 'webview2' verb; when the component list reaches it, winetricks prints its usage text and installs nothing, so every install has silently skipped it (the prefix winetricks.log never lists it). Leaving WebView2 out is also the desired behaviour: installing the Edge WebView2 runtime under Wine makes Affinity's onboarding and help dialogs hang (see noahc3/AffinityPluginLoader#46 discussion). Co-Authored-By: Claude Fable 5 --- Guides/Wine/Script Installer/affinity_installer_unified.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Guides/Wine/Script Installer/affinity_installer_unified.py b/Guides/Wine/Script Installer/affinity_installer_unified.py index a74cbf2..17a9166 100644 --- a/Guides/Wine/Script Installer/affinity_installer_unified.py +++ b/Guides/Wine/Script Installer/affinity_installer_unified.py @@ -283,7 +283,11 @@ log "Installing all dependencies with winetricks" # Base components (always installed) - COMPONENTS="remove_mono vcrun2022 dotnet48 corefonts win11 webview2" + # Note: "webview2" is intentionally absent: winetricks has no such verb + # (passing it makes winetricks print its usage text and install nothing), + # and installing the WebView2 runtime by other means is known to make + # Affinity's onboarding/help dialogs hang under Wine. + COMPONENTS="remove_mono vcrun2022 dotnet48 corefonts win11" # Append optional components if enabled if [ "$ENABLE_DXVK" = true ]; then From a376f5f8a26adaa330b732298b7eb902e5024e79 Mon Sep 17 00:00:00 2001 From: Emma Hare Date: Sun, 19 Jul 2026 04:59:40 -0700 Subject: [PATCH 2/2] installer: write dxvk.conf to fix black context menus (#72) When DXVK is enabled, Affinity's right-click/context menus and flyout popups render as black boxes. This is doitsujin/dxvk#2749: DXVK leaves D3D9 popup surfaces uninitialised until presented, which hits WPF apps like Affinity. Multiple users in #72 confirmed the fix: d3d9.deferSurfaceCreation = True d3d9.shaderModel = 1 Write this to dxvk.conf next to Affinity.exe and register the path in HKCU\Environment as DXVK_CONFIG_FILE (native Linux path; DXVK opens it directly on the host) so it applies regardless of which launcher or working directory is used. Verified on Wine 11.13 + DXVK 3.0.2, NVIDIA RTX 3090, KDE Plasma Wayland, Affinity 3.2.3. Co-Authored-By: Claude Fable 5 --- .../affinity_installer_unified.py | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/Guides/Wine/Script Installer/affinity_installer_unified.py b/Guides/Wine/Script Installer/affinity_installer_unified.py index 17a9166..7ff469d 100644 --- a/Guides/Wine/Script Installer/affinity_installer_unified.py +++ b/Guides/Wine/Script Installer/affinity_installer_unified.py @@ -434,6 +434,48 @@ return 0 } +# ========================================== +# DXVK Workarounds +# ========================================== + +configure_dxvk_workarounds() { + # Fix black right-click/context menus and flyout popups (issue #72). + # DXVK leaves Affinity's D3D9 popup surfaces uninitialised until they are + # presented (doitsujin/dxvk#2749); deferring surface creation and pinning + # shader model 1 works around it. + log "Configuring DXVK workarounds (black context menu fix)" + + local affinity_exe=$(find "$WINEPREFIX/drive_c" -name "Affinity.exe" 2>/dev/null | head -1) + + if [ -z "$affinity_exe" ] || [ ! -f "$affinity_exe" ]; then + log "Affinity.exe not found, skipping dxvk.conf setup" + return 0 + fi + + local affinity_dir=$(dirname "$affinity_exe") + + cat > "$affinity_dir/dxvk.conf" <&1 | tee -a "$LOG_FILE" + + log "Registered DXVK_CONFIG_FILE in HKCU\\Environment" + + return 0 +} + # ========================================== # Create Desktop Shortcuts # ========================================== @@ -567,6 +609,9 @@ # Install Affinity if installer provided if [ -n "$INSTALLER_PATH" ]; then install_affinity_app + if [ "$ENABLE_DXVK" = true ]; then + configure_dxvk_workarounds + fi create_desktop_shortcuts fi