After Jan's colleague hit "wine: failed to open" on the single-file
Metin2Launcher.exe (downloaded as Metin2Launcher(3).exe by Brave) and
then a separate case where the self-contained single-file host crashes
under Wine before Program.Main() even runs, we pivoted to a bundle
layout that actually works under Wine: a non-single-file .NET publish
placed in launcher/ alongside a sibling client/ directory.
Changes:
- InstallDir.Resolve() adds a special case for the Wine bundle layout.
If the running exe lives in a directory literally named "launcher"
(see LauncherConfig.WineLauncherDirName) AND a sibling "client" dir
exists (WineClientDirName), the install dir resolves to that sibling.
This keeps launcher runtime files (Avalonia DLLs, Skia, etc.) out of
the install dir so the orchestrator's apply/prune never clobbers the
launcher's own files.
- LauncherConfig: WineLauncherDirName / WineClientDirName constants.
- UpdateOrchestrator: report InstallRoot, StagingRoot, DownloadedBytes,
TotalBytes on every progress event so the GUI can display them.
- MainWindowViewModel: cache install/staging paths and transferred
bytes, expose TransferText and InstallPathText with shortened-home
(~/...) and middle-elided path strings so long Wine Z: paths remain
readable.
- MainWindow.axaml: render the new transfer / path lines under the
progress bar.
- cs.json / en.json: new localized status strings.
- README.md: document the Wine bundle layout.
- scripts/build-wine-bundle.sh: reproducible builder that runs
`dotnet publish -r win-x64 --self-contained -p:PublishSingleFile=false`
into launcher/, creates sibling client/, writes start-launcher.sh
that sets METIN2_INSTALL_DIR=./client and execs wine, then tars the
whole tree into Metin2Launcher-wine.tar.gz.
Verified:
- dotnet build -c Release — clean
- dotnet test -c Release — 93/93 pass
- build-wine-bundle.sh produces a 45 MB tar.gz; tree contents check
out, launcher/Metin2Launcher.exe is the non-single-file variant
- bundle uploaded to https://updates.jakubkadlec.dev/launcher/Metin2Launcher-wine.tar.gz
The single-file exe path remains broken under Wine (debugging track
tracked outside this commit — candidate root cause is the
self-extraction + unmanaged host startup path under Wine's PE
loader). For Windows users the single-file build still works; for
Linux+Wine users the bundle is the canonical distribution format.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>