diff --git a/README.md b/README.md index b7efbce..5a0c7db 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # ArrowVortex (Nix flake) -This flake packages [ArrowVortex](https://github.com/uvcat7/ArrowVortex) from the upstream Windows release zip and runs it with Wine. The default Wine prefix is `$XDG_DATA_HOME/arrowvortex/wine` (or `~/.local/share/arrowvortex/wine` when `XDG_DATA_HOME` is unset). Override with `WINEPREFIX` if you want a different prefix. +This flake packages [ArrowVortex](https://github.com/uvcat7/ArrowVortex) from the upstream Windows release zip and runs it with Wine. The default Wine prefix is `$XDG_DATA_HOME/arrowvortex/wine-` (or `~/.local/share/arrowvortex/wine-` when `XDG_DATA_HOME` is unset). Override with `WINEPREFIX` if you want a different prefix. + +The versioned prefix deliberately leaves the old unversioned `arrowvortex/wine` prefix alone. It was created by an earlier Wine build and does not reliably show ArrowVortex's native file dialog. The new default starts with a clean compatible prefix; your Windows `Z:` drive still exposes your normal Linux files. ## Run from a local checkout @@ -23,15 +25,11 @@ nix run git+https://git.plebsaber.stream/arrowvortex-wine - Nix with flakes enabled (`experimental-features = nix-command flakes`). -Wine and GUI dependencies come from nixpkgs; you need a working display (X11 or Wayland) for the editor window. +Wine and GUI dependencies come from nixpkgs; you need a working display (X11 or Wayland) for the editor window. The packaged Wine 11.0 launcher has been verified on KDE Plasma Wayland: **File → Open** opens Wine's `Open file` dialog. ## Debugging -Replace `-all` with focused Wine channels around dialogs, shell integration, and file APIs: - -```nix ---set WINEDEBUG "+timestamp,+pid,+tid,+seh,+dialog,+commdlg,+shell,+ole,+file,+loaddll" -``` +The launcher defaults to quiet Wine logging, but respects `WINEDEBUG` when you set it. Use focused channels around dialogs, shell integration, and file APIs: Most useful pieces: @@ -54,4 +52,4 @@ If that is too noisy, start with: ```bash WINEDEBUG=+x11drv,+wayland,+commdlg -``` \ No newline at end of file +``` diff --git a/default.nix b/default.nix index 8d4479d..a6cb328 100644 --- a/default.nix +++ b/default.nix @@ -36,9 +36,9 @@ stdenvNoCC.mkDerivation (finalAttrs: { $out/share/icons/hicolor/128x128/apps/arrowvortex.png makeWrapper ${lib.getExe winePkg} $out/bin/arrowvortex \ - --set WINEDEBUG "-all" \ + --set-default WINEDEBUG "-all" \ --set WINEARCH "win64" \ - --run 'export WINEPREFIX="''${WINEPREFIX:-''${XDG_DATA_HOME:-''$HOME/.local/share}/arrowvortex/wine}"' \ + --run 'export WINEPREFIX="''${WINEPREFIX:-''${XDG_DATA_HOME:-''$HOME/.local/share}/arrowvortex/wine-${winePkg.version}}"' \ --run 'mkdir -p "''$WINEPREFIX"' \ --chdir "$out/share/arrowvortex" \ --add-flags "ArrowVortex.exe" diff --git a/docs/wayland.md b/docs/wayland.md index 8b46518..2b04115 100644 --- a/docs/wayland.md +++ b/docs/wayland.md @@ -1,19 +1,15 @@ # Wine on KDE Plasma Wayland -ArrowVortex’s **File → Open** dialog does not appear when the Windows build is run under Wine on KDE Plasma with a Wayland session. `WINEDEBUG` traces on `commdlg` showed `GetOpenFileNameW` being entered with plausible flags and `COMDLG32_SetCommDlgExtendedError(0)` cleared, but no usable dialog followed—consistent with Wine’s graphics stack (notably **winewayland**) failing to host the legacy common-file-dialog UI on this compositor. We tried **unsetting `WAYLAND_DISPLAY`** in the launcher so Wine would prefer Xwayland; that did not fix it for us. We searched **nixpkgs** for similar Wine workarounds and found no comparable pattern (only unrelated apps, e.g. Qt wrappers forcing X11). In the package we then added a **one-shot `wine reg add`** to set `HKCU\Software\Wine\Drivers` → `Graphics` = `x11` (pin **winex11.drv**), plus `WINEDLLOVERRIDES` to skip Mono/Gecko prompts, and stepped the Wine build through **`wineWow64Packages.stagingFull`** and **`unstableFull`**. None of that produced a reliable File → Open on Plasma Wayland here, so this path is abandoned for now; anyone retrying later should use a **fresh `WINEPREFIX`** after changing Wine version or registry forcing, and may want to log with `WINEDEBUG=+x11drv,+wayland,+commdlg` to see which driver actually loads. +With the flake's current `wineWow64Packages.stableFull` (Wine 11.0), ArrowVortex's **File → Open** dialog works on KDE Plasma Wayland with a fresh prefix. `Ctrl+O` was tested directly; Wine created a visible `Open file` window and its standard file-list, filename, filter, Open, and Cancel controls. +An existing prefix created by an earlier Wine build reproduced the failure even after the old graphics-driver registry override was removed. The launcher therefore defaults to a Wine-versioned prefix. It does not modify an existing prefix; explicitly setting `WINEPREFIX` continues to opt into one. + +The app currently uses Wine's X11 driver in this session, even with `WAYLAND_DISPLAY` present. Do not force a graphics driver or unset `WAYLAND_DISPLAY`: both are unnecessary and make troubleshooting harder. + +For a regression check, use a fresh prefix and retain the common-dialog trace: + +```bash +WINEPREFIX="$(mktemp -d)" WINEDEBUG=+commdlg,+dialog,+x11drv arrowvortex ``` -0024:trace:ole:CoRegisterInitializeSpy 00007FFFFE276FD0, 00007FFFFE276FE0 -0024:trace:ole:CoInitializeEx 0000000000000000, 0x2 -0024:trace:ole:CoInitializeEx Initializing the COM libraries -0024:trace:ole:apartment_construct creating new apartment, model 2 -0024:trace:ole:apartment_construct Created apartment on OXID 2000000024 -0024:trace:ole:apartment_get_or_create Created main-threaded apartment with OXID 2000000024 -0024:trace:commdlg:GetOpenFileNameW flags 0x00001000 -0024:trace:commdlg:COMDLG32_SetCommDlgExtendedError (00000000) -0024:trace:shell:SHFree 0000000000000000 -0024:trace:shell:SHFree 0000000000000000 -0024:trace:shell:SHFree 0000000000000000 -0024:trace:shell:SHFree 0000000000000000 -0024:trace:shell:SHFree 0000000000000000 -``` + +Then choose **File → Open**. The log should contain `GetOpenFileNameW` and `DIALOG_ParseTemplate32 ... CAPTION L"Open"`.