Matoking / protontricks

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

Fails when bwrap is in use #138

Closed YizhePKU closed 2 years ago

YizhePKU commented 2 years ago

Describe the bug Any protontricks command fails without --no-bwrap.

To Reproduce Running command protontricks --verbose 324160 shell gives the following output, then exits:

protontricks (INFO): Found Steam directory at /home/sun/.steam/steam. You can also define Steam directory manually using $STEAM_DIR
protontricks (INFO): WINETRICKS environment variable is not available. Searching from $PATH.
protontricks (INFO): Found 1 Steam library folders
protontricks (INFO): Currently logged-in Steam user: sun294712564
protontricks (INFO): Couldn't find custom shortcuts. Maybe none have been created yet?
protontricks (INFO): Found active compatibility tool: Proton 7.0
protontricks (INFO): Active compatibility tool is a Proton installation
protontricks (INFO): WINE environment variable is not available. Setting WINE environment variable to Proton bundled version
protontricks (INFO): WINESERVER environment variable is not available. Setting WINESERVER environment variable to Proton bundled version
protontricks (INFO): Using separately installed Steam Runtime: Steam Linux Runtime - Soldier
protontricks (INFO): Running Steam Runtime using bwrap containerization.
If any problems arise, please try running the command again using the `--no-bwrap` flag and make an issue report if the problem only occurs when bwrap is in use.
protontricks (INFO): Created Steam Runtime Wine binary directory at /home/sun/.cache/protontricks/proton/Proton 7.0/bin
protontricks (INFO): Attempting to run command ['/nix/store/shb6sqr5p9myjm9kfp12chc1gr4d87b9-winetricks-20210825/bin/winetricks', 'shell']
------------------------------------------------------
warning: Your version of wine  is no longer supported upstream. You should upgrade to 5.x
------------------------------------------------------
Executing mkdir -p /home/sun/.local/share/Steam/steamapps/compatdata/324160
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
------------------------------------------------------
WINEPREFIX INFO:
Drive C: total 4
drwxr-xr-x  9 sun users  131 Feb 23 10:29 .
drwxr-xr-x  4 sun users  117 Feb 23 10:30 ..
drwxr-xr-x  2 sun users   31 Feb 23 10:29 openxr
drwxr-xr-x  3 sun users   23 Feb 23 10:29 ProgramData
drwxr-xr-x  6 sun users   97 Feb 23 10:29 Program Files
drwxr-xr-x  7 sun users  110 Feb 23 10:29 Program Files (x86)
drwxr-xr-x  4 sun users   37 Feb 23 10:29 users
drwxr-xr-x  3 sun users   17 Feb 23 10:29 vrclient
drwxr-xr-x 21 sun users 4096 Feb 23 10:29 windows

Registry info:
/home/sun/.local/share/Steam/steamapps/compatdata/324160/pfx/system.reg:#arch=win64
/home/sun/.local/share/Steam/steamapps/compatdata/324160/pfx/userdef.reg:#arch=win64
/home/sun/.local/share/Steam/steamapps/compatdata/324160/pfx/user.reg:#arch=win64
------------------------------------------------------
------------------------------------------------------
warning: /home/sun/.cache/protontricks/proton/Proton 7.0/bin/wine cmd.exe /c echo '%AppData%' returned empty string, error message "pressure-vessel-wrap[16254]: E: This program should not be run in the Steam Runtime. Use pressure-vessel-unruntime instead." 
------------------------------------------------------

Running protontricks --verbose --no-bwrap 324160 shell gives the following output, then enters the shell normally:

protontricks (INFO): Found Steam directory at /home/sun/.steam/steam. You can also define Steam directory manually using $STEAM_DIR
protontricks (INFO): WINETRICKS environment variable is not available. Searching from $PATH.
protontricks (INFO): Found 1 Steam library folders
protontricks (INFO): Currently logged-in Steam user: sun294712564
protontricks (INFO): Couldn't find custom shortcuts. Maybe none have been created yet?
protontricks (INFO): Found active compatibility tool: Proton 7.0
protontricks (INFO): Active compatibility tool is a Proton installation
protontricks (INFO): WINE environment variable is not available. Setting WINE environment variable to Proton bundled version
protontricks (INFO): WINESERVER environment variable is not available. Setting WINESERVER environment variable to Proton bundled version
protontricks (INFO): Using separately installed Steam Runtime: Steam Linux Runtime - Soldier
protontricks (INFO): Created Steam Runtime Wine binary directory at /home/sun/.cache/protontricks/proton/Proton 7.0/bin
protontricks (INFO): Attempting to run command ['/nix/store/shb6sqr5p9myjm9kfp12chc1gr4d87b9-winetricks-20210825/bin/winetricks', 'shell']
Executing mkdir -p /home/sun/.local/share/Steam/steamapps/compatdata/324160
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
Using winetricks 20210206-next - sha256sum: 8ce58125862d3c936798a96d6e96f963a4b1c9b909b16b1b65cde38265e282cf with wine-7.0 and WINEARCH=win64
Executing cd /home/sun/.local/share/Steam/steamapps/compatdata/324160/pfx/dosdevices/c:

System (please complete the following information):

I also have Wine 7.0 installed system-wide.

Matoking commented 2 years ago

Protontricks on NixOS/nixpkgs has been patched by the upstream to use a bespoke steam-run script to launch the Wine processes instead of using Valve's Steam Runtime binaries, among other changes required to get it working under Nix's functional model. As such, I can't really solve this issue since I don't maintain the package on nixpkgs, nor am I familiar with the changes made to get Steam Runtime and Protontricks running under NixOS.

This should be reported in the nixpkgs issue tracker or other NixOS support channel instead.