ValveSoftware / Proton

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

Some more docs/running proton via command line #1520

Closed tatsujb closed 4 years ago

tatsujb commented 5 years ago

Feature Request

more docs

I confirm:

Description

probably in the README.md at the root of the github repo add tips for a list that for now I can only fill with one thing off the top of my head :

  1. how to use command-line to run a steam game via proton

https://askubuntu.com/questions/1073691/error-on-executing-steam-proton-app-via-command-line

in my case it's useful because the game I'm running under steam-proton "Supreme Commander - Forged Alliance" (AppID : 9420) has next to no community nor mods or otherwise activity in general on steam whereas it's third party multiplayer matchmaking, mod managing, ladder matchmaking, ranking, acheivement and chat application : "Forged Alliance Forever" (http://faforever.com/) is bustling with activity.

the app does not alter steam's folder in any way but does point to it's executable, to which it passes the arguments allowing the online match to start.

Supreme Commander - Forged Alliance's net-code is peer-to-peer so it exists in a online gaming parallel universe where servers don't enter the picture (when run via steam, Forged doesn't even ever use steam servers. Ingame pseudonyms are the one you're forced to create when you initially run the game and matchmaking works via basic lan setup : someone hosts a game, and when he does he is emitting and everyone looking at the available game list worldwide will see his game and be able to join)

I mention all this just so you understand how it is that what FAF does is entirely legitimate and affects steam and/or it's sales only in a positive way.

so all of this works fine under windows AND works fine under wine (if you're in previous versions of linux).

now if I can run Supreme Commander - Forged Alliance from the command line then theoretically I can pass the correct arguments for FAF to work under proton as well.

Justification [optional]

"Why integration in Proton instead of Wine?"

two part answer :

one :

this is gaming so it brings bigger crowds then... most anything else and now Linux is arguably very accessible (I'm thinking of Ubuntu, which is really no-config, all libs available, software center all that jazz) and obviously it has become much more so, thanks to steam-proton, which before it, had left the argument of : "but there's only a third of my steam library on Linux!" still having some credibility, I mean I didn't feel comfortable countering with "but wine...". Even PlayOnLinux or CrossOver are just not something that's user-friendly. Software Center on the other hand... Steam on the other hand...

they're both arguably much more user friendly than anything else.

the combined easiness of installing Ubuntu then steam and a third party client from it's software center makes going from a barebones PC to a full-on linux game-station ...childsplay (huh, pun intended?)

So now if someone says to me "I want to switch to linux for my desktop because nothing's hindering me any longer", I will wholeheartedly agree.

two :

On Ubuntu (if I'm not mistaken back in spot n°1 in the most used linux distros on desktop) and on it's current version (and LTS) : version 18.4.1...

...the libraries stack is ill configured for wine. I don't exactly know how steam managed it but any of wine's versions don't work very well under Ubuntu 18.4.1.

Wine itself runs but many games do not and Forged Alliance is one of them.

I hadn't been able to play Forged Alliance up until the point steam-proton came out.

References [optional]

I referenced my quandry here : but I didn't get replies : https://github.com/ValveSoftware/Proton/issues/688#issuecomment-421791298

kisak-valve commented 5 years ago

Hello @tatsujb, this reads like a duplicate of https://github.com/ValveSoftware/steam-for-linux/issues/5766.

tatsujb commented 5 years ago

I've since then found out that running a game with the launch option of :

image

PROTON_DUMP_DEBUG_COMMANDS=1 %command%

will generate a file called "run" at \tmp\user_proton (with your username added into the proton folder name) and you can move that file to somewhere else and running that file with the windows game executable path as an argument will act as a correctly configured wine.

douglasg14b commented 5 years ago

@tatsujb Do note that the file it generates is without the launch options, or at least without some of them.

These can be added into the run file manually like:

#!/bin/bash
#Run game or given command in environment

cd "/home/douglas/.steam/steam/steamapps/common/Supreme Commander Forged Alliance"
DEF_CMD=("/home/douglas/.steam/steam/steamapps/common/Supreme Commander Forged Alliance/bin/SupremeCommander.exe")
PATH="/home/douglas/.steam/steam/steamapps/common/Proton 3.16 Beta/dist/bin/:/home/douglas/.steam/ubuntu12_32/steam-runtime/amd64/bin:/home/douglas/.steam/ubuntu12_32/steam-runtime/amd64/usr/bin:/home/douglas/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" \
    TERM="xterm" \
    WINEDEBUG="-all" \
    WINEDLLPATH="/home/douglas/.steam/steam/steamapps/common/Proton 3.16 Beta/dist/lib64/wine:/home/douglas/.steam/steam/steamapps/common/Proton 3.16 Beta/dist/lib/wine" \
    LD_LIBRARY_PATH="/home/douglas/.steam/steam/steamapps/common/Proton 3.16 Beta/dist/lib64:/home/douglas/.steam/steam/steamapps/common/Proton 3.16 Beta/dist/lib:/home/douglas/.steam/ubuntu12_32/steam-runtime/pinned_libs_32:/home/douglas/.steam/ubuntu12_32/steam-runtime/pinned_libs_64:/usr/lib/x86_64-linux-gnu/libfakeroot:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/local/lib:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib32:/usr/lib32:/lib:/usr/lib:/home/douglas/.steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu:/home/douglas/.steam/ubuntu12_32/steam-runtime/i386/lib:/home/douglas/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu:/home/douglas/.steam/ubuntu12_32/steam-runtime/i386/usr/lib:/home/douglas/.steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu:/home/douglas/.steam/ubuntu12_32/steam-runtime/amd64/lib:/home/douglas/.steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu:/home/douglas/.steam/ubuntu12_32/steam-runtime/amd64/usr/lib:" \
    WINEPREFIX="/home/douglas/.steam/steam/steamapps/compatdata/9420/pfx/" \
    SteamGameId="9420" \
    SteamAppId="9420" \
    WINEDLLOVERRIDES="d3d11=n;d3d10=n;d3d10core=n;d3d10_1=n;dxgi=n" \
    PROTON_NO_ESYNC=1 \
    PROTON_USE_GALLIUM_NINE=1 \
    PROTON_GALLIUM_NINE_MODULEPATH="/usr/lib/i386-linux-gnu/d3d/d3dadapter9.so.1:/usr/lib/x86_64-linux-gnu/d3d/d3dadapter9.so.1" \
    GALLIUM_HUD=simple,fps \
    PROTON_LOG=1 \
    STEAM_COMPAT_CLIENT_INSTALL_PATH="/home/douglas/.steam" \
    "/home/douglas/.steam/steam/steamapps/common/Proton 3.16 Beta/dist/bin//wine" "${@:-${DEF_CMD[@]}}"

As an example to use gallium.

I don't know if gallium actually works for me, but to get the FPS counter I have to add in the launch option here or it doens't work for FAF (works from steam).