protonscr

Partial prefix

protonclosed
ValveSoftware/Proton#7733 · opened 2024-05-15 by Plavozont · updated 2024-05-16 · 1 comments · github
PPlavozont 2024-05-15 github

Feature Request

Good day! I have an idea on how to make wine/proton more optimal and clear. I want to know what do you think about it.
The idea is to add WINEDIFFPREFIX option. When you create prefix with this option empty drive_c and reg files are created. And after installation of game/app only differences from a full prefix are saved in the partial prefix.

I confirm:

  • [+] that I haven't found another request for this feature.
  • [+] that I have checked whether there are updates for my system available that
    contain this feature already.

Description

If you run the command:

WINEARCH=win32 WINEDIFFPREFIX="$PWD" wine "c:\windows\explorer.exe"

Then explorer will start as if it exists on drive_c and from explorer's view drive c: will contain all the normal files and folders. The trick is that commands for reading from drive_c are redirected to full prefix (which is located somewhere on the system, e.g. /home/user_name/proton/prefixes).

If we put some setup.exe file into empty drive_c folder, we will also see it in c:\ folder in explorer.
If we change something in registry using regedit - delete, edit and add some records, only patch will appear in reg files.
If we double click setup.exe file inside our partial prefix from linux file manager or use "wine setup.exe" command in terminal, proton will detect that setup.exe is placed inside of partial prefix and apply WINEARCH and WINEDIFFPREFIX parameters automatically and run exe giving us a feeling that we launched it natively like it is done windows.
After installation only files created by setup program will appear in the prefix and only changes to registry will appear in reg-files.
All writing operations are directed to partial prefix, all reading commands are directed to full prefix with partial prefix together.

Maybe it is possible to automatically create .desktop files inside partial prefix folder that are correspond to .lnk files that were created by setup program in the desktop folder. And if you want to have shortcuts on your Linux desktop then you can just copy these .desktop files to your desktop.
Also something like explorer.sh, winecfg.sh, protoncfg.sh, winetricks.sh files can be created automatically while initializing partial prefix to give a comfortable way to manage prefix.

This approach will save space on disks, because there will be no need to create a full prefix for each game/application. It will also allow to study files and registry records that are related to the application. Also having each game/application in separate folder will give a feel of control on your system. It will be a more native, easy and user-friendy way of managing "bottles" and running exe files inside them thanks to prefix auto-detection. And no need to recreate prefix when running apps in prefix using different wine versions.

Another idea is to support creating a folder in dosdevices, like "f:" putting there .iso/.mdf files and automounting them prior to game start...

Justification [optional]

Maybe it will be also useful to save disk space on SteamDeck? Maybe Wine team will appreciate this feature and include it to their distribution later. Maybe they wouldn't want to implement it now, but you might want to :)

Risks [optional]

Don't seem to exist

References [optional]

None I guess

Kkisak-valve maintainer 2024-05-15 github

Hello @Plavozont, this request is already being tracked at #4093. Closing as a duplicate.

Launch options