fix dll overrides & add disable UMU

This commit is contained in:
olcxja 2026-10-04 15:40:09 +02:00
commit 8c6db38fab
12 changed files with 295 additions and 45 deletions

View file

@ -122,6 +122,34 @@ handlers in src/ipc/. Keep new APIs in that pattern.
relative target) and after a unit lands (healUnitRoots). dosdevices drive
mappings and targets that leave files/ (a mount, a system path, the user's
home) stay absolute - they are machine-specific by design.
- A prefix that has NO `pfx` yet gets ONE C: drive: `pfx` is a relative
symlink to the prefix itself, so Proton's `<compatdata>/pfx`
(runner.linkPrefix) resolves to `<prefix>` and shares `drive_c`, the
registry and `dosdevices` with plain wine. `prefixes.ensureUnifiedPrefix`
only ever CREATES that link; an existing layout (a real `pfx/` folder from
an older PLWL, a both-drives prefix) is left exactly as it is. Hoisting a
prefix's files one level up was tried and removed: it breaks every relative
link written against the old depth (the `umu.exe` link into the build is the
one that kills a Proton launch), and moving a live Windows install is not
the launcher's call. `healPrefix`/`rewireSymlinks` repairs such a prefix by
re-anchoring broken relative links through files/. Never assume a single
drive_c path: use `prefixDriveRoots()` (deduplicated) and compare realpaths
when deciding whether a folder is inside a prefix's C: drive.
- App launch env is built in runner.buildEnv only. WINEDLLOVERRIDES is an
ordered semicolon list: inherited value first, the app's overrides last,
because Wine lets a later entry replace an earlier one for the same module.
An empty setting (`dll=`) is Wine's "disabled" and must survive the filter.
Proton appends its own dxvk/nvapi/steam.exe defaults AFTER everything, so an
app override only wins where Proton has no default. `disableUmu` (per app)
drops UMU_ID and switches Proton to its `runinprefix` verb, so no
umu.exe/steam.exe launcher and no Proton prefix setup take part - the
build's own wine runs as close to plain wine as it gets.
STEAM_COMPAT_CLIENT_INSTALL_PATH must be set in BOTH modes: Proton's session
init reads it on every verb (sync_appcache runs even for runinprefix, and
with SteamGameId set a missing variable aborts the launch with a KeyError
before wine starts). On the default path it prefers a real Steam client
found on the machine; a disableUmu run always gets the empty
files/data/fake-steam, whose contents are never read.
- Wine and Proton create prefix links with ABSOLUTE local targets whenever they
update a prefix (font/dll stubs, Steam appcache), so on-disk links are not
always relative after a run: the sync payload relativizes them anyway, and