simons-public / protonfixes

A module for applying fixes at runtime to unsupported games with Steam Proton without changing game installation files
https://simons-public.github.io/protonfixes/
Other
233 stars 114 forks source link

winetricks does not install dotnet40 (Proton 3.16 only) #34

Closed Lucki closed 6 years ago

Lucki commented 6 years ago

Describe the bug Winetricks refuses to install dotnet40. I'm testing this with One Finger Death Punch. Should be easy, install dotnet40 and it will run but instead nothing happens and protonfixes is trying to install dotnet40 on every launch.

I'm able to install dotnet40 manually with

but it does not work with

However, there's also this line in the log: /mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/dist/bin//wine cmd.exe /c echo '%ProgramFiles%' returned empty string Running the command manually WINEPREFIX=/path/to/pfx /mnt/Games/Steam_Windows/steamapps/common/Proton\ 3.16/dist/bin/wine cmd.exe /c echo '%ProgramFiles%' returns the correct answer: C:\Program Files (x86)

To Reproduce Create a minimal example and use it.

""" Game fix for One Finger Death Punch
"""

# pylint: disable=C0103

from protonfixes import debug
from protonfixes import util
from protonfixes.logger import log

def main():
    """ Uses winetricks to install dotnet40
    """

    log('Applying fixes for One Finger Death Punch')

    # If not already installed, install dotnet40
    util.protontricks('dotnet40')

Expected behavior Winetricks installs dotnet40 and the game starts like it does when I manually install dotnet40 with winetricks.

Logs

ProtonFixes[24377] INFO: Checking if winetricks dotnet40 is installed
ProtonFixes[24377] INFO: Installing winetricks dotnet40
ProtonFixes[24377] DEBUG: Using winetricks command: ['/usr/bin/winetricks', '--unattended', '--force', 'dotnet40']
ProtonFixes[24377] DEBUG: Deleting syswow64
ProtonFixes[24377] DEBUG: ['/mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/proton', 'waitforexitandrun', '/mnt/Games/Steam_Windows/steamapps/common/One Finger Death Punch/One Finger Death Punch.exe']
ProtonFixes[24377] DEBUG: ['/mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/proton', 'waitforexitandrun', '/mnt/Games/Steam_Windows/steamapps/common/One Finger Death Punch/One Finger Death Punch.exe']
ProtonFixes[24377] INFO: Using winetricks verb dotnet40
saving roaming config store to 'sharedconfig.vdf'
roaming config store 2 saved successfully
[following 3 lines many times:]
pid 24401 != 24379, skipping destruction (fork without exec?)
ERROR: ld.so: object '/home/lucki/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
>>> Adding process 24397 for game ID 264200
[…]
------------------------------------------------------
/mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/dist/bin//wine cmd.exe /c echo '%ProgramFiles%' returned empty string, error message "ERROR: ld.so: object '/home/lucki/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/lucki/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored." 
------------------------------------------------------
ERROR: ld.so: object '/home/lucki/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/lucki/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ProtonFixes[24377] DEBUG: Killing hanging wine processes
ProtonFixes[24377] INFO: Winetricks complete

Operating System:

Game (if applicable):

Additional Information Non-default Steam Library folder on ntfs in /mnt/Games/Steam_Windows. German system locale.

simons-public commented 6 years ago

There's a message in the readme about this, it's an issue with the version of wine 3.16 that Proton 3.16 ships with. I've pushed a commit that keeps the gameoverlayrender.so from being loaded, but the library mscoree.dll that dotnet40 installs still doesn't get installed properly. You can see in the Proton version of wine here where the issue that was fixed in upstream wine is.

A couple of workarounds you can use:

EDIT: I'm going to submit a pull request to the ValveSoftware Proton repository to see if they'll get this fixed.

Lucki commented 6 years ago

I'm sorry, even after you've said it's mentioned in the readme I had to read it five times to actually see it. I think I'll wait until Valve pushes an updated version and will then test and contribute again.

simons-public commented 6 years ago

No problem, took me forever to figure this out. I almost couldn't believe it was an issue with wine instead of winetricks or protonfixes. I've submitted a pull request to the ValveSoftware wine repo and an issue in the Proton repo, maybe they'll merge it.

I'll leave the issue open for now for tracking purposes

simons-public commented 6 years ago

Closing since this was fixed in Proton wine

Lucki commented 6 years ago

I still get this error on the first game startup:

ProtonFixes[21071] INFO: Checking if winetricks dotnet40 is installed
ProtonFixes[21071] INFO: Installing winetricks dotnet40
ProtonFixes[21071] DEBUG: Using winetricks command: ['/usr/bin/winetricks', '--unattended', 'dotnet40']
ProtonFixes[21071] DEBUG: Deleting syswow64
ProtonFixes[21071] DEBUG: ['/mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/proton', 'waitforexitandrun', '/mnt/Games/Steam_Windows/steamapps/common/One Finger Death Punch/One Finger Death Punch.exe']
ProtonFixes[21071] DEBUG: ['/mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/proton', 'waitforexitandrun', '/mnt/Games/Steam_Windows/steamapps/common/One Finger Death Punch/One Finger Death Punch.exe']
ProtonFixes[21071] INFO: Using winetricks verb dotnet40
>>> Adding process 21072 for game ID 264200
>>> Adding process 21073 for game ID 264200
------------------------------------------------------
/mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/dist/bin//wine cmd.exe /c echo '%ProgramFiles%' returned empty string, error message "" 
------------------------------------------------------
ProtonFixes[21071] DEBUG: Killing hanging wine processes
ProtonFixes[21071] INFO: Winetricks complete

It says it's successfully installing at the second startup, but the game still doesn't show up:

ProtonFixes[2465] INFO: Checking if winetricks dotnet40 is installed
ProtonFixes[2465] INFO: Installing winetricks dotnet40
ProtonFixes[2465] DEBUG: Using winetricks command: ['/usr/bin/winetricks', '--unattended', 'dotnet40']
ProtonFixes[2465] DEBUG: Deleting syswow64
ProtonFixes[2465] DEBUG: ['/mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/proton', 'waitforexitandrun', '/mnt/Games/Steam_Windows/steamapps/common/One Finger Death Punch/One Finger Death Punch.exe']
ProtonFixes[2465] DEBUG: ['/mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/proton', 'waitforexitandrun', '/mnt/Games/Steam_Windows/steamapps/common/One Finger Death Punch/One Finger Death Punch.exe']
ProtonFixes[2465] INFO: Using winetricks verb dotnet40
>>> Adding process 2466 for game ID 264200
>>> Adding process 2467 for game ID 264200
saving roaming config store to 'sharedconfig.vdf'
roaming config store 2 saved successfully
ERROR: ld.so: object '/home/lucki/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
>>> Adding process 2592 for game ID 264200
------------------------------------------------------
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 20180815 - sha256sum: 9343f9174146c0fa4d34e18e05269ae772a45ba78e3d8786829fa21895f6f7f4 with wine-3.16 and WINEARCH=win64
------------------------------------------------------
winetricks latest version check update disabled
------------------------------------------------------
Executing w_do_call dotnet40
Executing load_dotnet40 
------------------------------------------------------
This package (dotnet40) may not fully work on a 64-bit installation. 32-bit prefixes may work better.
------------------------------------------------------
------------------------------------------------------
dotnet40 does not yet fully work or install on wine.  Caveat emptor.
------------------------------------------------------
------------------------------------------------------
Wine-Fehler 42701 wird umgegangen 
------------------------------------------------------
------------------------------------------------------
On 64-bit, you'll run into https://bugs.winehq.org/show_bug.cgi?id=42701 (missing api-ms-win-core-winrt-roparameterizediid-l1-1-0.dll.RoGetParameterizedTypeInstanceIID
------------------------------------------------------
Executing w_do_call remove_mono
Executing load_remove_mono 
------------------------------------------------------
Mono does not appear to be installed.
------------------------------------------------------
------------------------------------------------------
Wine-Fehler 34803 wird umgegangen 
------------------------------------------------------
reg: The system was unable to find the specified registry key or value
reg: The system was unable to find the specified registry key or value
The operation completed successfully
Executing rm -f /mnt/Games/Steam_Windows/steamapps/compatdata/264200/pfx//dosdevices/c:/windows/system32/mscoree.dll
Executing rm -f /mnt/Games/Steam_Windows/steamapps/compatdata/264200/pfx//dosdevices/c:/windows/syswow64/mscoree.dll
Executing w_do_call winxp
Executing load_winxp 
The operation completed successfully
Setting Windows version to winxp
Executing /mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/dist/bin//wine regedit /S C:\windows\Temp\_winxp\set-winver.reg
Executing /mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/dist/bin//wine64 regedit /S C:\windows\Temp\_winxp\set-winver.reg
------------------------------------------------------
Running /mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/dist/bin/wineserver -w. This will hang until all wine processes in prefix=/mnt/Games/Steam_Windows/steamapps/compatdata/264200/pfx/ terminate
------------------------------------------------------
Executing cd /home/lucki/.cache/winetricks/dotnet40
Preparing: Y:\8488efd6a598eb158f4fb1cc39\netfx_Core_x64.msi...
[…]
Preparing: Y:\8488efd6a598eb158f4fb1cc39\netfx_Extended.mzz...
Using native override for following DLLs: mscoree
Executing /mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/dist/bin//wine regedit /S C:\windows\Temp\_dotnet40\override-dll.reg
Executing /mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/dist/bin//wine64 regedit /S C:\windows\Temp\_dotnet40\override-dll.reg
The operation completed successfully
The operation completed successfully
The operation completed successfully
Setting Windows version to winxp
Executing /mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/dist/bin//wine regedit /S C:\windows\Temp\_dotnet40\set-winver.reg
Executing /mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/dist/bin//wine64 regedit /S C:\windows\Temp\_dotnet40\set-winver.reg
------------------------------------------------------
Running /mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/dist/bin/wineserver -w. This will hang until all wine processes in prefix=/mnt/Games/Steam_Windows/steamapps/compatdata/264200/pfx/ terminate
------------------------------------------------------
ProtonFixes[2465] DEBUG: Killing hanging wine processes
ProtonFixes[2465] INFO: Winetricks complete

The third time it doesn't even try to install because it thinks it already is installed.

Edit: This actually could be #19

Lucki commented 6 years ago

Searching the internet for wine cmd.exe /c echo '%ProgramFiles%' returned empty string, error message "" gives three possible fixes in general:

I'm sure winetricks isn't run as root so I can exclude that. And I'm deleting the prefix folders for testing anyway so the other two also aren't helpful for me. The folder is owned by my user and adding WINEARCH=win64 as environment doesn't help either.

Same error when switching to Proton 3.7

Using winetricks from git gives some additional info but it's not really helping

ProtonFixes[16764] INFO: Using winetricks verb dotnet40
>>> Adding process 16767 for game ID 264200
>>> Adding process 16768 for game ID 264200
------------------------------------------------------
WINEPREFIX INFO:
Drive C: total 32
drwxr-xr-x  8 lucki users 4096 Nov  5 16:14 .
drwxr-xr-x  4 lucki users 4096 Nov  5 16:14 ..
drwxr-xr-x  6 lucki users 4096 Nov  5 16:13 Program Files
drwxr-xr-x  9 lucki users 4096 Nov  5 16:14 Program Files (x86)
drwxr-xr-x  3 lucki users 4096 Nov  5 16:13 ProgramData
drwxr-xr-x  4 lucki users 4096 Nov  5 16:13 users
drwxr-xr-x  3 lucki users 4096 Nov  5 16:13 vrclient
drwxr-xr-x 17 lucki users 4096 Nov  5 16:14 windows

Registry info:
/home/lucki/.local/share/Steam/SteamApps/compatdata/264200/pfx//system.reg:#arch=win64
/home/lucki/.local/share/Steam/SteamApps/compatdata/264200/pfx//user.reg:#arch=win64
/home/lucki/.local/share/Steam/SteamApps/compatdata/264200/pfx//userdef.reg:#arch=win64
------------------------------------------------------
------------------------------------------------------
/mnt/Games/Steam_Windows/steamapps/common/Proton 3.16/dist/bin//wine cmd.exe /c echo '%ProgramFiles%' returned empty string, error message "" 
------------------------------------------------------
ProtonFixes[16764] DEBUG: Killing hanging wine processes
ProtonFixes[16764] INFO: Winetricks complete
Lucki commented 5 years ago

This is maybe fixed by #50 Couldn't test anything successfully but at least winetricks is doing something now.