XIVLauncher.Core icon indicating copy to clipboard operation
XIVLauncher.Core copied to clipboard

Auto clean wineprefix on wine version change

Open Blooym opened this issue 7 months ago • 5 comments

I can foresee users not reading and complaining about startup problems, so I think this makes sense to do. Wineprefixes should never contain sensitive data anyway

Blooym avatar May 01 '25 18:05 Blooym

Wineprefixes should never contain sensitive data anyway

they may contain some configuration, though. e.g. windows version setting, native/builtin DLL overrides, and in some cases things to run on startup (previously I used this to set up wine-discord-rpc-bridge, though now that's handled automatically by the relevant plugin)

does reshade depend on anything being put in the wineprefix? I don't remember whether it does or if it's just a bunch of files dropped in the game directory

keysmashes avatar May 01 '25 18:05 keysmashes

Good point, Reshade does depend on moving the dxgi file into system32. The problem is downgrading wine version seems to always break the prefix anyway and it's not exactly clear to the user apart from getting some kind of startup failure

Blooym avatar May 01 '25 19:05 Blooym

We don't put dxgi.dll into the prefix system32 afaik, but we do currently need a bandaid of copying d3dcompiler_47.dll into it because of an imgui conflict.

Users messing with optiscaler or dlss force enablers also have some stuff that messes with their prefix.

And there is also my favorite: the ACT user, who needs to install dotnet48 and more into their prefix.


Rather than auto-wipe, we could pop a warning stating that the prefix could be broken when moving between different types of wine builds, or going from a higher version to a lower version. (Typically, they should be OK on the same branches, ex: wine-xiv will work, but when you switch to wine-fe-xiv or something based on proton, it's gonna fall apart)

reiichi001 avatar May 01 '25 19:05 reiichi001

I had it fall apart when testing between wine-xiv 10 and wine-xiv 8 which is what prompted this, but yeah I can just display a popup or something maybe asking if they want to clear it

Blooym avatar May 01 '25 19:05 Blooym

The prefix usually falls apart when going backward more than a few point releases. Moving from 10.6 to 10.4 is probably safe, but moving from 10.6 to 9.x or 8.x is almost certainly going to break. Moving from 10.6 to valve-wine (even old releases such as wine-ge-xiv 8-26) usually works, but moving from valve wine to regular wine sometimes doesn't.

rankynbass avatar May 01 '25 22:05 rankynbass