Matoking / protontricks

A wrapper that does winetricks things for Proton enabled games, requires Winetricks.
GNU General Public License v3.0
1.61k stars 34 forks source link

Cannot select "0" as appid for prefix selection #174

Closed burritosoftware closed 1 year ago

burritosoftware commented 1 year ago

Describe the bug I'd like to be able to select the prefix folder for compatdata 0 (non-Steam games ran on Proton use this folder for its prefix), however it cannot be selected via CLI. To Reproduce Steps to reproduce the behavior:

  1. Run protontricks 0 <whatever to pass>

Expected behavior Protontricks will select ../compatdata/0/pfx/ and pass to Winetricks.

System (please complete the following information):

Additional context N/A

Matoking commented 1 year ago

Non-Steam apps that are added manually into the Steam library each receive their own app IDs that are derived from the game's directory and executable name. I've tested it and it's still true as of Sep 29 2022 build of Steam. Are the non-Steam Proton games not appearing when you run protontricks -s non-steam or when opening the Protontricks GUI?

From what I can gather, the 0 compatdata is used for running d3ddriverquery64.exe in the background for shader pre-caching.

burritosoftware commented 1 year ago

I'm running apps through Proton manually through a shell script and not through Steam; I checked the compatdata folder to see if the prefix chosen was any other one besides 0 and it doesn't seem to be the case. I'm not sure how to find out what prefix launching manually on Proton uses however.

Matoking commented 1 year ago

Protontricks assumes the apps are launched through Steam, as it allows the application to determine the location of the Wine prefix and what version of Proton is used, among some other things.

You can determine what Wine prefix is being used by checking the process environment variables for WINEPREFIX (eg. using strings /proc/<pid>/environ). If it doesn't exist, Wine defaults to $HOME/.wine. Proton, when launched using the proton script, always takes care of setting this WINEPREFIX variable explicitly to a directory inside compatdata, but seems to use the same Wine default if you skip the script and use wine directly instead.