xomachine / SteamForwarder

steam_api.dll implementation for wine. Your windows games now can interact with your linux steam! (This repo mirrors https://gitlab.com/xomachine/SteamForwarder)
MIT License
198 stars 8 forks source link

Games fail to start recently #8

Closed FiraWolf closed 6 years ago

FiraWolf commented 7 years ago

lastrun.txt Hey,

until recently the script worked perfectly but now games simply fail to start. "recently" is a broad term because I can't pin point the date.. Shouldn't be more than 3 months, though.

I'm on Arch 4.12.4-1 with all the latest updates installed. SteamForwarder is the latest precompiled release.

The thing is.. On the very same prefix with the very same version of Wine (2.13 staging) the very same games will start when run through the official windows steam client.

I suspect a change in the api that your dll doesn't cover. The line from the attached log that makes me think that is this one: wine: Call from 0x7bc77fb9 to unimplemented function steam_api.dll.SteamInternal_ContextInit, aborting but in the end I'm clueless..

Does anyone else experience this behavior? Any clue where I could look for a fix?

P.S.: Thanks for providing this great script.

FiraWolf commented 7 years ago

Unfortunately the program doesn't compile on my machine with any steam_api.dll or headers from the SDK but that's probably an unrelated issue.

xomachine commented 7 years ago

I've just tested dll with wine stagging 2.14 and PoE and everything worked as expected. Seems like it's game specific issue. The problem may lay in steam_api.dll version difference. Ideal result can be obtained when libsteam_api.so, headers and ingame steam_api.dll versions the same. For now I just have no idea how to make the steam_api.dll.so version independent (to implement this I need to know which arguments are passed to function, but windows-side code expects callee to know that and linux-side code expects caller. Thats why headers with version matching steam_api.dll is required. libsteam_api.so version may slightly differ but there is no way to eliminate dependency from it.)

Looks like manual compilation is the only way. I'd like to see the compilation log to investigate what problem you encountered.

FiraWolf commented 7 years ago

Thanks for reporting back so promptly and for the technical explanation.

I run tests on a few other games and they work as intended.. Kind of a silly situation since it seems exactly the games I tested before have updated their steam_api.dll (they worked fine before).

TL;DR: This Issue seems to be not fixable. Sorry for the hassle.

Long version: For the compilation errors, I think I used the wrong libsteam_api.so before. Seems like make needs the 32bit version.

The steps I took are:

  1. git clone and cd into the directory
  2. Put the steam_api.dll from Minion Masters into the build root directory
  3. make generate-code (compiles fine if you don't attempt a simple make before)
  4. copy the sdk/public/steam folder with header files etc into the buildroot/steam folder
  5. copy the sdk/redistributable_bin/linux32/libsteam_api.so into the buildroot folder. I took it from the SDK since the game itself does not provide the file (Should it?).
  6. make
  7. Change the previously generated launch script in the game folder to use the new LD_LIBRARY_PATH and WINEDLLPATH (both point to the build root)
  8. start the game via the launch script. Exactly the same error as before.

Compilation log for 32bit: 32hardModeCompile.txt Log for 64bit: 64hardModeCompile.txt

Since the error is the same, even with the specially compiled library, it seems the game has just become incompatible. Bummer.

Thanks for taking the time. If there's nothing more to add, you can close the issue.

xomachine commented 7 years ago

First of all, 64-bit steam_api.dll is not supported. There are different call conventions in opposite to 32-bit code. I've not implemented it.

You actually done it in wrong order. p.4 should be before p.3 (code generator needs headers to create class wrappers).

libsteam_api.so might be taken from whereever you want. The only criteria is version matching.

FiraWolf commented 7 years ago

If I switch the steps I get the following error: `Error: unhandled exception: 0 <= find(raw, typere, matches, shift) Cannot find type in SNetSocket_t hSocsteam/isteamnetworking.h:270:2: error: #error isteamclient.h must be included

error isteamclient.h must be included

^~~~~ [AssertionError] make: *** [Makefile:94: generate-code] Error 1`

makeGen.txt

xomachine commented 7 years ago

Now compilation should be fixed. Pull the latest changes and try again.

FiraWolf commented 7 years ago

That fixed the compilation, thank you.

Did all the steps again in the right order and tested the game. The error from the game itself is now missing or different. The following catches my eye but in the end it shouldn't be anything you can fix, should it? trace:steam_api:SteamInternal_CreateInterface_ ((char *)"SteamClient017")

new_lastrun.txt

xomachine commented 6 years ago

Could you test this solution? I have strong feeling that it may help with this problem

xomachine commented 6 years ago

Closed since new version released. Please reopen it if the problem persists.