ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
24.13k stars 1.05k forks source link

Expose Linux Steam's process & API from within Proton for stuff like ModOrganizer #2709

Open gwemmie opened 5 years ago

gwemmie commented 5 years ago

Feature Request

I confirm:

Description

Running Skyrim with ModOrganizer in Proton is almost possible, by putting ModOrganizer (its EXE and associated files) in Skyrim's root folder, and symlinking SkyrimLauncher.exe -> ModOrganizer.exe. There's just one last obstacle: ModOrganizer, while running under Proton, cannot see or interact with the Linux client of Steam.

I would assume it's checking for a Steam.exe process, and then possibly using Steam API URLs, such as steam://rungameid, to run binaries. Is it possible to make WINE applications see a Steam.exe process that's actually just pointing to the Linux client process? If so, is it also possible for WINE to open those URLs natively in Linux, so that the Linux client would interpret them?

kisak-valve commented 5 years ago

Hello @Jimi-James, if ModOrganizer is asking Steam to start the game and you've made the game's usual start method point to ModOrganizer, it's going to end up launching itself through the same path you've used. There's a feature request for running arbitrary binaries with proton at https://github.com/ValveSoftware/steam-for-linux/issues/5766.

There's no need to assume anything with the steam.exe implementation that's part of Proton. The code is at https://github.com/ValveSoftware/Proton/blob/proton_4.2/steam_helper/steam.cpp.

aeikum commented 5 years ago

I think adding a steam: protocol handler to our steam.exe that forwards to the Linux steam executable would be a reasonable thing to do.

gwemmie commented 5 years ago

Looking at that code, I'm actually no longer sure why ModOrganizer is failing to detect Linux Steam. I decided to look at MO, which turns out to also be open-source, because like you said, there's no need to assume.

It looks like MO does indeed just look for either a process named "steam.exe", or "steamservice.exe" (it's fine with either): https://github.com/TanninOne/modorganizer/blob/master/src/organizercore.cpp#L310

If Proton is running that stub steam.exe in its WINE processes, why does MO not find it? I'm not sure whether I should ask that here or make a bug report over there, as MO doesn't officially support WINE or Linux.

aeikum commented 5 years ago

Maybe you're running on an older Proton? The Steam.exe stub was added in 4.2. Otherwise I don't know. You could try debugging this with WINEDEBUG.

nsivov commented 5 years ago

I'm not entirely sure, but maybe GetModuleBaseName() does not return exactly "steam.exe", because we have it as steam.exe.so.

gwemmie commented 5 years ago

I upgraded to 4.2 and MO is no longer complaining about Steam not running. So that's solved. Now, I've got issues beyond the purpose of this bug report: everything it launches immediately closes (or the process gets stuck and has to be terminated, in the case of TES5Edit.exe), despite those same programs running fine if I launch them through WINE with the same prefix.

jarrard commented 5 years ago

does TES5Edit.exe require winxp setting? I remember reading it needed a specific winecfg setting to launch correctly. I haven't tried MO yet as I'm waiting for the 64bit script extender patch to arrive in proton (patch has existed for a long time and is only 2 minor line edits)

There is a script here on github somewhere (I think its github) that will mount ModOrganizer mod folders into the game path using symlinks btw.

gwemmie commented 5 years ago

Setting TES5Edit to use XP in winecfg doesn't seem to change its behavior when I run it through Steam. When I ran it through normal WINE in the same prefix, it already worked without XP mode anyway.

My current copy of Skyrim and SKSE are x32--no special edition--and yet I might be having a similar issue to what those patches are supposed to fix. Thanks for the heads-up. I might have to try compiling WINE with those patches and putting the result in proton to confirm, but the fact that MO refuses to launch any binary at all makes me skeptical.

There is a script here on github somewhere (I think its github) that will mount ModOrganizer mod folders into the game path using symlinks btw.

That script would get my setup finally fully running (well, almost--I'd still have to figure out how to include the ENB injector)! I can't find it anywhere searching myself, though. Is there any way you could dig it up?

jarrard commented 5 years ago

Try disabling esync,

PROTON_NO_ESYNC=1

gwemmie commented 5 years ago

Whoops, I should've thought of trying that! Sadly it didn't change anything, though.

ThisNekoGuy commented 2 years ago

@jarrard @Jimi-James

does TES5Edit.exe require winxp setting? I remember reading it needed a specific winecfg setting to launch correctly. I haven't tried MO yet as I'm waiting for the 64bit script extender patch to arrive in proton (patch has existed for a long time and is only 2 minor line edits)

xEdit hasn't needed WinXP to launch for a very long time with plain WINE; it does, however, need it for some core functionality (namely dragging and dropping)