From 668b92ec2ed3fb14df8a544f140a1f2d7c0c68b0 Mon Sep 17 00:00:00 2001 From: Lucas Azevedo Date: Sat, 11 Apr 2026 18:55:03 +0100 Subject: [PATCH 1/2] Add PKHeX installer (Silver) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PKHeX is a Pokémon core series save editor running on .NET Desktop Runtime 10. Includes a DPI awareness workaround for Wine compatibility and a review documenting current test results. --- .../bottles-libadwaita-1.9-proceed-button.md | 64 ++++++++++++++++++ Reviews/pkhex.md | 39 +++++++++++ Software/pkhex.yml | 39 +++++++++++ data/pkhex/pkhex.ico | Bin 0 -> 5464 bytes index.yml | 8 +++ 5 files changed, 150 insertions(+) create mode 100644 Reviews/bottles-libadwaita-1.9-proceed-button.md create mode 100644 Reviews/pkhex.md create mode 100644 Software/pkhex.yml create mode 100644 data/pkhex/pkhex.ico diff --git a/Reviews/bottles-libadwaita-1.9-proceed-button.md b/Reviews/bottles-libadwaita-1.9-proceed-button.md new file mode 100644 index 0000000..b22dbf5 --- /dev/null +++ b/Reviews/bottles-libadwaita-1.9-proceed-button.md @@ -0,0 +1,64 @@ +# Bottles: Invisible Proceed Button on libadwaita 1.9+ + +## Issue + +When installing a program that requires local resources (e.g. `url: local` in the installer YAML), the "Proceed" button in the installer dialog is invisible. Users can select the local file, but cannot continue with the installation because the button never appears. + +This affects Bottles 63.2 (native/AUR build) running on systems with libadwaita 1.9.0 or later. The Flatpak version is unaffected because it bundles an older libadwaita. + +## Root Cause + +In `bottles/frontend/ui/dialog-installer.blp`, the `btn_proceed` widget is a bare `GtkButton` placed as a direct child of `Adw.PreferencesPage`: + +``` +Adw.PreferencesPage { + Adw.PreferencesGroup group_resources { ... } + + Button btn_proceed { ... } // <-- not rendered by libadwaita 1.9+ +} +``` + +`AdwPreferencesPage` expects all children to be `AdwPreferencesGroup` widgets. In libadwaita < 1.9, bare widgets were still rendered. In 1.9+, non-group children are silently dropped. + +## Fix + +Wrap `btn_proceed` in an `Adw.PreferencesGroup`: + +```diff +- Button btn_proceed { +- label: _("Proceed"); +- sensitive: false; +- visible: false; +- halign: center; +- valign: center; +- +- styles [ +- "pill", +- "suggested-action", +- ] +- } ++ Adw.PreferencesGroup { ++ Button btn_proceed { ++ label: _("Proceed"); ++ sensitive: false; ++ visible: false; ++ halign: center; ++ valign: center; ++ ++ styles [ ++ "pill", ++ "suggested-action", ++ ] ++ } ++ } +``` + +## Affected Versions + +- **Bottles**: 63.2 +- **libadwaita**: 1.9.0+ (confirmed on CachyOS with `libadwaita 1:1.9.0-1.1`) +- **Not affected**: Flatpak builds (bundle older libadwaita) + +## Status + +Patched locally. Should be reported upstream at [bottlesdevs/Bottles](https://github.com/bottlesdevs/Bottles). diff --git a/Reviews/pkhex.md b/Reviews/pkhex.md new file mode 100644 index 0000000..edb7ef9 --- /dev/null +++ b/Reviews/pkhex.md @@ -0,0 +1,39 @@ +# PKHeX +Review for the PKHeX installer. + +Maintainer: @Azevedo + +**Is the program properly opened?** +Grade: Gold +Additional notes: Opens successfully with .NET Desktop Runtime 10 installed. + +**Is it showing alerts or other warnings?** +Grade: Gold +Additional notes: No alerts or warnings after applying the DPI workaround. + +**Does it show graphical glitches?** +Grade: Silver +Additional notes: The window is not resizable and renders small (though usable). Pokemon tooltip popups are inconsistent — sometimes showing, sometimes not, sometimes disappearing too quickly. + +**Does it require some tweaking in order to work properly? (Out of normal software configuration)** +Grade: Silver +Additional notes: Requires a Windows AppCompatFlags registry key (`DPIUNAWARE`) to prevent a .NET WinForms DPI awareness crash when opening file dialogs. This is applied automatically by the installer. A Wine runner with .NET DPI fixes (e.g. Wine 11+) is recommended over older runners like soda-9.0. + +**Did it crash during tests execution?** +Grade: Gold +Additional notes: No crashes after the DPI workaround is applied. Without it, the app crashes on any file dialog (open/save) with `Failed to get thread's DpiAwareness context`. + +**Is it usable?** +Grade: Silver +Additional notes: Core functionality works — opening, editing, and saving Pokemon save files all function correctly. The UI quirks (non-resizable window, inconsistent tooltips) are cosmetic and do not block usage. + +**Final grade? (the lower evaluation from previous questions)** +Grade: Silver +Additional notes: Fully functional for its primary purpose. The DPI workaround is automated in the installer. Remaining issues are cosmetic (window size, tooltip rendering). + +**Additional notes** +- PKHeX binaries are available from https://projectpokemon.org/home/files/file/1-pkhex/ +- The installer uses `url: local` since there is no stable direct download link. +- PKHeX requires .NET Desktop Runtime 10. The installer downloads it from Microsoft's CDN. +- Wine 11+ is recommended as the runner. Older runners (e.g. soda-9.0) may have additional issues. +- **DPI workaround**: Wine does not implement `SetThreadDpiAwarenessContext`, which .NET 10 WinForms calls when opening file dialogs. The installer sets the `DPIUNAWARE` AppCompatFlags registry key to prevent this crash. diff --git a/Software/pkhex.yml b/Software/pkhex.yml new file mode 100644 index 0000000..e592356 --- /dev/null +++ b/Software/pkhex.yml @@ -0,0 +1,39 @@ +Name: pkhex +Description: A Pokémon core series save editor. +Grade: Silver +Arch: win64 + +Dependencies: +- courie32 +- arial32 + +Executable: + name: PKHeX + icon: pkhex.ico + file: PKHeX.exe + path: Program Files/PKHeX/PKHeX.exe + arguments: "" + +Steps: +- action: install_exe + file_name: windowsdesktop-runtime-10.0.5-win-x64.exe + url: https://builds.dotnet.microsoft.com/dotnet/WindowsDesktop/10.0.5/windowsdesktop-runtime-10.0.5-win-x64.exe + file_checksum: false + arguments: /install /quiet /norestart +- action: run_script + script: | + mkdir -p drive_c/Program\ Files/PKHeX +- action: install_exe + file_name: PKHeX.exe + url: local + file_checksum: false + arguments: "" +- action: run_script + script: | + PKHEX_SRC=$(find ~ -maxdepth 5 -name "PKHeX.exe" -not -path "*/bottles/*" -not -path "*/.net/*" -type f 2>/dev/null | head -1) + if [ -n "$PKHEX_SRC" ]; then + cp "$PKHEX_SRC" drive_c/Program\ Files/PKHeX/ + fi +- action: run_script + script: | + wine reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\Program Files\PKHeX\PKHeX.exe" /t REG_SZ /d "~ DPIUNAWARE" /f diff --git a/data/pkhex/pkhex.ico b/data/pkhex/pkhex.ico new file mode 100644 index 0000000000000000000000000000000000000000..fb416b1ce8929bf9e30944d66680f7e796cbf723 GIT binary patch literal 5464 zcmd5=3rtkm8NM?k!)so=21e9c@BxUl%4TV!P#WVSTDnBLt^25nX~%#9>Y1x22s-~)Bj2+ryEotZn1tj29(lfB8ux%Zs^ z`@a92bMKsUP!x@#RV)?--_!w%@Za}m^f+Dq=_*xF%zSsqut;$!8Tq-lhI5L;w3jdJ$?3p0|%NaD=Y6+R8;f< z{jWeDV;H-1>C!pWh>DI1t*ESMZEtTEZEbDOZr!>i2tIp)b#1rWWDM(}(;6Ea8@hV+ z>gmnbnxBFzZr;4<|M31LDb(C*twr#}cfUZ5?CLnc6D`$&aO_$A9yq% zN=iz^%$YMqQc{x0-<2;OK71&;x}7nM1!rjE#*NAA)~!qG>h2zVIPgf^zyH7?a1|97 z3$0cw7A;yNGBYxTmzS5=v}qHYWDH}$8QQ#gb8=iQ9p~^GS+g7*rIKP!zL6rwc@>fRpRy zmzN)xb!ZnFjoIOhH4JIBrsNSL<|q02J+ zwL9&;!Bs#FP%A=0>V?(XfU-_L2M1Tn7{*#Ghrs`MhRwDj zDm1j>Nl?%^#t(&rG(59f8=r-SUhn{)8&Tizj4_NQ$7cIDn%_WVWbvor;pc?SR`0Oc z8pOzvD$e7ca6Yq*F^mOgExC$vPJV;&@dYzuV~et4Vu~_=%;@N%OqRp$GZ@2ICl?cq znW@q#${MKruOOGdGh=~dfWJrb;t$Uc{K9XU@95E^Bdu0zLReVX&))<>LqikBj2Sa7 zE-udZRo$O6XO0G*lcr6Zmb-Q9*5>{D_unZjEbMy|pw_l++pZ-hCgvfR*woZi`EGdT z5*Qd5w|4E?^VhFmcU-x0Mc}tjT)lerrD$$$7O%p~IMkvhwb!p--xw4W^b=3->C>kh zmMvRWq-x?fkg;yGw6q9Mw6?a2m%%fJ_nsQmRP{46GfQU7m|;|Nh=_=o^3COMzQuYW zeWdn{R&nFT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;JC7V1feRkE2rW;1jpyNTwp*u>`pZoXV;6HkMdaL)N zMt!22JbC4ugoM03Q>N@c6C1m?{!M^dZ@- Date: Sun, 12 Apr 2026 01:44:16 +0100 Subject: [PATCH 2/2] pkhex: Fix install path and add NLS workaround note Move install directory from Program Files/PKHeX to PKHeX to avoid path quoting issues with Bottles. Document the required env var workaround (DOTNET_SYSTEM_GLOBALIZATION_USENLS=true) for .NET ICU culture enumeration bug when running under Wine. --- Software/pkhex.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Software/pkhex.yml b/Software/pkhex.yml index e592356..7287c63 100644 --- a/Software/pkhex.yml +++ b/Software/pkhex.yml @@ -1,5 +1,5 @@ Name: pkhex -Description: A Pokémon core series save editor. +Description: A Pokémon core series save editor. After installation, add environment variable DOTNET_SYSTEM_GLOBALIZATION_USENLS=true in bottle settings to fix search functionality. Grade: Silver Arch: win64 @@ -11,7 +11,7 @@ Executable: name: PKHeX icon: pkhex.ico file: PKHeX.exe - path: Program Files/PKHeX/PKHeX.exe + path: PKHeX/PKHeX.exe arguments: "" Steps: @@ -22,7 +22,7 @@ Steps: arguments: /install /quiet /norestart - action: run_script script: | - mkdir -p drive_c/Program\ Files/PKHeX + mkdir -p drive_c/PKHeX - action: install_exe file_name: PKHeX.exe url: local @@ -32,8 +32,8 @@ Steps: script: | PKHEX_SRC=$(find ~ -maxdepth 5 -name "PKHeX.exe" -not -path "*/bottles/*" -not -path "*/.net/*" -type f 2>/dev/null | head -1) if [ -n "$PKHEX_SRC" ]; then - cp "$PKHEX_SRC" drive_c/Program\ Files/PKHeX/ + cp "$PKHEX_SRC" drive_c/PKHeX/ fi - action: run_script script: | - wine reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\Program Files\PKHeX\PKHeX.exe" /t REG_SZ /d "~ DPIUNAWARE" /f + wine reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\PKHeX\PKHeX.exe" /t REG_SZ /d "~ DPIUNAWARE" /f