GithubHelp home page GithubHelp logo

sonic2kk / steamtinkerlaunch Goto Github PK

View Code? Open in Web Editor NEW
1.9K 19.0 66.0 5.87 MB

Linux wrapper tool for use with the Steam client for custom launch options and 3rd party programs

License: GNU General Public License v3.0

Shell 99.92% Makefile 0.08%
stl steam linux wrapper tinker proton steamplay bash linux-gaming game-launch

steamtinkerlaunch's Introduction

Software Engineer & Linux Gaming Enthusiast.

  • ๐Ÿฉน Maintainer of SteamTinkerLaunch.
  • ๐Ÿ Python enjoyer.
  • ๐ŸŽฎ Linux gamer.
  • ๐Ÿง Windows-free since 2018.
  • ๐Ÿ“บ Re:Zero is the Best Anime.

steamtinkerlaunch's People

Contributors

antiquete avatar arcitec avatar badly-drawn-wizards avatar charlesgamedev avatar chrislane avatar damian-anlauf avatar diegoortizmatajira avatar faalagorn avatar frostworx avatar gu1ll0me avatar hanprower avatar ideathbyte avatar jake770321 avatar juijote avatar koppchen avatar kron4ek avatar ling0412 avatar lucki avatar mattsturgeon avatar mte90 avatar podiki avatar pyr0x1 avatar r-vd-woude avatar sonic2kk avatar stiliajohny avatar termdisc avatar tl-pierre avatar trentondyck avatar zany130 avatar zerodogg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

steamtinkerlaunch's Issues

general vr-video-player

  • exclusive fullscreen games can't be opened in vr-video-player, make sure to set them to some window or non-exclusive fullscreen
    forcing the game into window mode often doesn't work and therefore is no reliable option which should be implemented in stl

add vkBasalt

just tried vkBasalt again:
looks like it works pretty good with the reshade side-by-side shader.
will implement it some day next week.

reimplement extRun function

merging
LC_ALL="" PATH="/usr/local/bin:/usr/bin" LD_LIBRARY_PATH="" LD_PRELOAD=""
into a
extRun function
looked initially like a good idea, but it broke several things, so just reverted it.
maybe worth to recheck later, because it simply looks ugly.

Also if/when
LC_ALL=""
or
LC_ALL="C"
should be used.

(LC_ALL="" seems to be generally the better choice, but at least Vortex requires "LC_ALL=C", to make sure a "My Documents"
exists in the WINEPREFIX, else the symlink funtions won't find their paths.)

test some games depending on wmp10

testing if support for some wmp10 games could be implemented:
search proton issues and found those I own:

ValveSoftware/Proton#1649 : looks like wmp10 and quartz are not enough: #39

ValveSoftware/Proton#829 : nope, neither wmp10+quartz, nor wmp11+quartz(+ disabled winegstreamer) fixed this glitch

ValveSoftware/Proton#770 : the game start and seems to be very playable with HACKWMP10=1 and
WINETRICKSPAKS=d3dx9_43 but videos are black (cinepak,directshow,quartz didn't help)

ValveSoftware/Proton#576 : damn, both titles already do work with wmp11, adding both as tweaks

Would be nice if you test other titles you own.
With some luck a tweakfile ($SteamAppId.conf) with
HACKWMP10=1
is already enough

remove 32bit pfx function

doesn't look like it works completely correctly so I'll probably remove the function
edit: complete 32bit pfx function to work as expected! solved when Giana Sisters works ootb.

Does it make sense to continue public work on stl?

Doesn't looks like there's much interest in stl.
I will continue working on it anyway, because it is really a very nice tool for me,
but I might no longer push the commits, as apparently nobody cares or actually uses it
(thank you for the 12 stars and the AUR build though).
It would be nice if people had some use for stl,
but I'm fine with working on it only for myself without the extra release work as well.

I really have no idea why it is ignored, maybe:

Q: is it too complicated?
A: Tell me!

Q: Is the documentation to weird?
A: You guessed it - english is not my mother tounge. Feel free to improve the documentation and send a pull request! Would be great!

Q: Maybe because still nobody knows it?
A: Yes possible, but when release announcements are mostly ignored on reddit,
rant:
while f.e. tons of other random "hey I switched from windows to linux yesterday and ask thousands of random questions instead of reading a documentation before" get hundreds of upvotes every time I wonder if this really could be the reason. And yes, this really su**s imho! Once the linux community encouraged themself to read documentation to learn something, today more and more people are too lazy for everything - and that is not only linux or gaming related but simply in every situation.

vortex wine user

depending on the wine version used, the vortex wine user is either "$USER" or "steamuser".
For "steamuser" the symlink creation of the gamedirs has to be fixed, as they are created for "$USER".
Vortex might have a problem with "steamuser" though.

Vortex launches as a black color window

Both the Vortex splash and larger window later are fully black.
I have also had a message poping up saying i should not run it as administrator.
Then selection is Quit or Ignore.
Tried this with Final Fantasy 12 and Skyrim SE.

Import Protonfixes game configuration

Splitting #40 into separate issues.
I'm working on an automated game configuration/import of Protonfixes gamefixes.
The implementation is already at an advanced stage.
When enabled protonfixes will be automatically downloaded and almost all functions will be converted into stl "autotweak" configfiles.

  • winetricks packages
  • alternative executables
  • env variables
  • dll overrides
  • game command line arguments

loading config files slow

Just fyi:
Loading of the config files is very slow (~3 seconds) currently.
I already have a fix which will be committed with the next push.

vortex installation hangup through stl

Not sure if this is a you problem or a me problem. I am but a novice with linux, just enough knowledge to make it dangerous, not enough to completely understand what does what.

Copied from what my protondb shows up. Steam came loaded on the version of manjaro i used (plasma kde)
OS: Manjaro Linux
KERNEL: 5.7.9-1-MANJARO
CPU: AMD FX-8350 Eight-Core
GPU: NVIDIA GeForce GTX 780 Ti
GPU DRIVER: NVIDIA 440.100
RAM: 32 GB

I initially started with trying to launch a game to install vortex as instructed after installing from the aur provided for archlinux. It hung up hard, couldn't quit the game from steam. so I attempted the command line installation of vortex. It hung up in the same place as I experience now after doing a complete computer wipe, fresh install of everything as I had thought perhaps my novice level modifications of games using proton, protontricks, winetricks and various other stuff might have had something to do with it.

additionally i updated to your current fixes that were not implemented in the aur for archlinux to see if that would fix it (it hadn't). rolled back my computer to the backup I had made after a fresh install and tried again. so I'm getting hung up in the exact same location with no idea what to do about it. Currently it's been sitting at the same spot for 2.5 hours. The following are the last lines posted to the terminal.


Setting Windows version to default
Executing /usr/bin/wine regedit /S C:\windows\Temp\set-winver.reg
Executing /usr/bin/wine64 regedit /S C:\windows\Temp\set-winver.reg
------------------------------------------------------
Running /usr/bin/wineserver -w. This will hang until all wine processes in prefix=/home/$USER/.config/stl/vortex/wineprefix terminate
------------------------------------------------------

automatic game configuration import from multiple other platforms

Would be nice to have an optional search for required tweaks from various different platforms.
Most interesting ones would be probably

Lutris has an open api which could be used - I asked here if using it from stl would be ok: lutris/lutris#3117

  • protondb doesn't seem to have any usable api, but if the data could be reached, some basic functions searching for required tweaks could be done. I only found this (half-official?)half-maintained project https://github.com/bdefore/protondb-data
    which only offers huge static tarballs of monthly reports. opened an issue here 6 weeks ago asking for improvements : bdefore/protondb-data#28

  • the proton issue tracker is probably full of useful informations, but haven't found(/searched) for a way yet to automatically search in there.

edit:

any other sources I forgot/don't know?

get steam appid

the games appid is in the parent directory of the given exepath in one of th appmanifest_*.acf files.
should be ok to just grep those files for "installdir" to get it.

add auto applying of registry files

while re-testing this issue
ValveSoftware/Proton#3962
I found out that setting
WINEDLLOVERRIDES="winegestreamer=d"
doesn't seem to work
(maybe because the origin launcher starts the game process detached from the launcher process and looses the var in between?),

so I'll add a REGEDIT function to stl like this:

auto-applying registry files:

if REGEDIT is

  • set to 0 it will be skipped completely
  • set to 1 a registry file $SteamAppId.reg will be searched and used in GLOBALREGDIR and STLREGDIR
  • set to anything else the file $REGEDIT will be searched and used in GLOBALREGDIR and STLREGDIR

when a registry file from above was applied REGEDIT will be set to "0" in the game config, to skip regedit on the following game starts

Unravel Two 1225570 will get a tweak config which will be autoapplied on game launch, and installs quartz and disables winegstreamer per regedit automatically and makes the game autostart ootb.

winetricks using proton wine much slower than with system wine

title says it all
when using winetricks with proton wine it is much slower than with system wine.
f.e.
LC_ALL="C" PATH="/usr/local/bin:/usr/bin" LD_LIBRARY_PATH="" LD_PRELOAD="" WINE="/usr/bin/wine" WINEARCH=win64 WINEDEBUG="-all" WINEPREFIX="/media/B4-1/SteamLibrary/steamapps/compatdata/8080/pfx" winetricks --unattended d3dx9_31 d3dx9_34
takes about 6 seconds
and
LC_ALL="" PATH="/usr/local/bin:/usr/bin" LD_LIBRARY_PATH="" WINE="/media/ssdeam/SteamLibrary/steamapps/common/Proton 5.0/dist/bin/wine" WINEARCH=win64 WINEDEBUG="-all" WINEPREFIX="/media/B4-1/SteamLibrary/steamapps/compatdata/8080/pfx" winetricks --unattended d3dx9_31 d3dx9_34
takes 40 seconds - both creating a fresh WINEPREFIX.

edit: system wine is wine-5.15
proton wine is wine-5.0-667-ge9264df

Proton 4.2 wine (wine-4.2) needs 23 seconds for the same command
Proton-5.9-GE-3-ST (wine-5.9 (Staging)) needs 10 seconds

better configuration handling

Currenlty config files from older stl versions do not get any updates automatically, so you either have to delete them so they will be re-created with all current default settings or you have to add new configurations manually.

The implementation will work like this:
On every stl call all main config files (currently, global.conf, default_template.conf and the game config of the started game) will be compared against all of their up2date available config entries - every entry missing will be added automatically to the config with the default value (usually disabled). Already existing entries will remain untouched, so 3rd party variables survive this.
The update function will be generic and therefore be used for all config files, the list of available entries will be cut direcly out of the code, so it will be always up2date in the future.

There's also no option currently to change a specific config entry for all game config files at once.

The implenentation will have a commandline option with following arguments:
stl set ENTRY (SteamAppID or "all") "VALUE"
"ENTRY" will be compared with all valid entries, if the string is not an option it will quit
if the config file for SteamAppID does not exist it will quit
there's no validity check on "VALUE"

Examples:
stl set PROTON_DEBUG_DIR_FILE 1232570 /random/path/

will set PROTON_DEBUG_DIR for the game 1232570 to "/random/path/" if the game has a config file in $STLGAMEDIR

stl set RUN_REPLAY all 1

will enable RUN_REPLAY in all game config files found in $STLGAMEDIR

edit: ping #16 (comment)

script to set stl as default start tool for all steam games

not really sure if this should be inside the stl project, so leaving it here for now.
A little script which modifies every start command of all steam games
in a copy of "$HOME/.steam/steam/userdata/$STEAMID/config/localconfig.vdf" (the original file stays untouched)
to
"stl %command%"
I didn't have any problems with it, but use it on your own risk:
/usr/local/bin/STLsetDefault

#!/bin/bash

YOURID=0
SUD="$HOME/.steam/steam/userdata/"
LCVDFO="$SUD/$YOURID/config/localconfig.vdf"
LCVDF="/tmp/localconfig.vdf"

LOPT="\\\t\t\t\t\t\t\"LaunchOptions\"		\"stl %command%\""

if [ -n "$1" ]; then
	if [ -f "$SUD/$1/config/localconfig.vdf" ]; then
		echo "argument1 $1 seems to be your steamID"
		YOURID="$1"
		LCVDFO="$SUD/$YOURID/config/localconfig.vdf"
	else
		echo "argument1 $1 doesn't seem to be your steamID - $SUD/$1/config/localconfig.vdf does not exist!"
	fi
fi

if [ "$YOURID" -eq 0 ]; then
	echo "you have to edit YOURID first, to match the directory name of your steamID or provide it as commandline argument 1- exit"
	echo "maybe:"
	find "$SUD" -maxdepth 1 -type d -name "[1-9]*"
	exit 1
fi

if [ ! -f "$LCVDF" ]; then
	echo "$LCVDF doesn't exist - copying the original"
	if [ ! -f "$LCVDFO" ]; then
		echo "$LCVDFO doesn't exist as well - giving up"
		exit 1
	else
	cp "$LCVDFO" "$LCVDF"
	fi
fi

sed -i '/LaunchOptions/d' "$LCVDF"
sed -i '/"Playtime"/i '"$LOPT"'' "$LCVDF"

echo "done - you might want to check if the file $LCVDF looks valid before using it!"
echo "make sure to close steam before copying the file!"
echo "create a backup of your unmodified $LCVDFO f.e. with this command:"
echo "cp $LCVDFO $LCVDFO.bak"
echo "if you dare update to the modified stl version with this command (you at your own risk!):"
echo "cp $LCVDF $LCVDFO"

add some hotkeys for the zenity gui

maybe makes sense to add some hotkeys to the zenity gui,
so things can be applied on the fly without touching the editor
f.e. "r" for removing the WINEPREFIX of the game.

Import Proton Issues game configuration

Splitting #40 into separate issues.
I'm working on an automated game configuration/import of Proton Issues game fixes.
The implementation is currently in an early stage.
A downloader for all opening reports of all issues is finished (including basic rate_limit check, as it uses the github api)
The goal is to use this as source to search for SteamAppID
issues with useful tweaks (at least winetricks or, env variables, dll overrides should be at least basically parsable) using jq.
Alternatively including search in the comments.

parsing game category possible?

would nice to know if parsing the games own category is possible while launching the game.
you could auto apply settings depending on the category it is part of.
f.e. I have a "SBS-VR" category, mostly for games with built in side-by-side, but also some using Depth3D and ReShade.
Would be nice to simply drop a game into that category and all VR related settings are applied automatically without even touching the config file - and vice versa when it is no longer in that category...

better, easier to understand README

the README is very complicated, while stl itself is pretty easy to use.
English is obviously not my mother tongue, and it is getting worse and worse the older I get (I am literally a linux white beard :)).
If you want to help please feel free to submit some improvements.
@alanjjenkins already offered his help when he finds the time: #16 (comment)
but the README is pretty huge, so another helping hand is very welcome! :)

Import Lutris game configuration

Splitting #40 into separate issues.
I'm working on an automated game configuration/import of lutris installers.
The implementation is already at an advanced stage. A today's state of the working functions can be found
on this lutris issue I opened here

Optionally download own repo

Might be a nice idea to have the option to clone this repo into ~/.config/stl/downloads/stl
and use categories, regs and tweaks (for now) from there.
As almost no distro provides a stl package, the idea is that the user only has to copy stl to $PATH
manually and still can make use of the bundled config files without having to install them.
As this might look dangerous (for a reason)
I'd prefer to only use config files from there and no executables.

IMHO it would be the best if configs found here are loaded only if no global configs are found at all
and therefore would replace their status.

script extenders functional

F4se and skse64 are both functional with minor tweaking. Apparently skse64 with skyrim se is manual download of previous to latest version (I have yet to try this but friend has it working with her insane list of mods). However I have gotten fallout4 to work with f4se np. Since I kept failing to get stl vortex to run i have been making use of lutris' vortex install for mods but a manual download of latest f4se dropped into fo4 and follow this here and works fine. Possibly lose ability to use creation club in the process. Only posting because of Readme implying towards nonfunctional script extenders

Import ProtonDB game configuration

Splitting #40 into separate issues.
I'm considering an automated game configuration/import of ProtonDB gamefixes.
This could be at least winetricks or, env variables, dll overrides.
Unfortunately protondb doesn't have an open api, so I'm undecided.
If you want to contribute a bash script which curls an $SteamAppID url I'd be glad to implement it.

Update broke vortex probably

Now that i got vortex installed correctly, there was a big old update just the other day it seems so launching of vortex pops up some fun errors with vortex.exe

attached several backtrace logs from this, however they're nearly identical, of course with the exception of the memory addresses, and shouldn't really need to be looked after the first one but as a novice, I'll just put them all in as a just in case bit.

backtrace.txt
backtrace2.txt
backtrace3.txt
backtrace4.txt
backtrace5.txt
backtrace6.txt
backtrace7.txt

I'm willing to accept that perhaps my installation technique borked it as well, but I'm keen to helping as much as possible and am set up to timeshift back to clean installs to make quick of the testing of stuff. I'll admit this vortex stuff is exactly what drew me to stl in the first place because I was having issues with lutris' version of it. On a last remark, I was able to update my aur install of stl with the two updated files not included in the currently available aur, if that makes any difference. If there's anything I can do to help

leaving the game process to steam fails when protondb launched a new browser instance

when opening protondb with the editor the game process isn't fully released, means it is still running from steam view.
this only happens if xdg-open opens a new browser instance but not if the browser was already open before.
all other processes (stl, game, proton exit correctly).
in the test case I have seen a running
/usr/lib/firefox/firefox https://www.protondb.com/app/489830
process, after I have closed the browser, the game exited as well.
no idea how to properly fix this atm...

maybe convert incompatible videos on launch (ffmpeg)

Might not work every time, but at least with some games it should be possible to convert incompatible videos
to compatible ones before launching.
Even if it helps in just a few games it might be worth to implement a ffmpeg function doing this.
I'm not the first one with that idea for sure
but I haven't found a working example yet to use for testing.

[WIP] optionally start games with side-by-side mode in VR (almost) automatically

currently I'm implementing full side-by-side VR mode for games supporting it (at first those with native stereoscopic support, later also via Reshade side-by-side shader). this text will be more or less the description in the README when done :)
you just have to enable "RUNSBSVR=1" in the game specific config, everything else is done (almost) automatically:

  • start SteamVR
  • start the game (of course game settings required to enable sbs are not automatically enabled)
  • start vr-video-player
  • when exiting the game, vr-video-player wil be closed as well.
    some games start own launchers before the actual game and therefore autodetecting the correct window is not easy.
    that's why you can configure the exact window name to look for.
    there are also specific sbs game config overrides, which have optimal settings for vr (f.e. predefined game window, or launcher skips) - here's an example config for trine 2 ( ~/.stl/sbs/35720.conf ):
#########
#GAMENAME=Trine 2
#GAMEEXE=trine2_launcher
#GAMEID=35720
RUN_CUSTOMCMD=1
CUSTOMCMD=trine2_32bit.exe
ONLY_CUSTOMCMD=1
VRGAMEWINDOW=Trine 2

sbs configs are automatically loaded when found and override settings in the mainconfig (here: ~/.stl/35720.conf ),
so you just have to enable RUNSBSVR=1 in ~/.stl/35720.conf and everything else is configured automatically.

requirements for RUNSBSVR are:

  • xdotool
  • xwininfo
  • vr-video-player

add a gui

whenever the basic functions are more ore less implemented it should get a (zenity) gui.
on game-launch a function will optionally wait for a key press for a second and will open the gui before the actual game launch.

add obs

add obs support
with waiting for game window (similar soultion already implemented in sbs-vr).
I personally don't stream/record anything so no idea which features make sense here.
--startstreaming
--startrecording
--startreplaybuffer
each with an own shortcut (steam category) should do it, right?

full transparent Vortex Mod Manager support

I'm working on implementing full transparent Vortex Mod Manager support "for steam on linux"
Nexus-Mods/Vortex#2862
The ultimate goal is that the user only has to add any (Vortex supported) game into a steam "Vortex" category and everything else is setup completely automatically:
initial global installation of Vortex and dependencies, create registry entries, paths, symlinks, preconfigure global and gamespecific settings in Vortex, add nxm mime-types and so on. So the prelaunched Vortex will be (hopefully) ready to use for the currently started game. It won't be possible to start the game itself via Vortex (different WINEPREFIX), but the regular game start will start after exiting Vortex anyway, so this shouldn't be an issue.
It still has many rough edges, and therefore is not in repo yet, but basically it works pretty good already.
The only show-stopper problem is that enabled mods are not created in the games mod dir, which makes the whole construct pretty pointless atm.
There are several nexus deployment methods https://wiki.nexusmods.com/index.php/Deployment_Methods
and looks like softlinks would be the best choice in theory for linux.
This is very likely only an issue with games on a different partition, but there must be some way to workaround this problem.

Haven't tested if bind mounting would workaround this, but it can't be a soluton to depend on root priviledges.
Also parsing the Vortex created "vortex.deployment.json" to create the symlinks after exiting Vortex and before launching the game can't be the best/a valid solution.

If someone has an idea feel free to reply here

implement custom/additional program start

thought a bit about this pull request
ValveSoftware/Proton#2605
and and would solve it like this (all game specific configuration options):

# set to 1 to enable the custom command STL_CMD:
#RUN_STL_CMD=0

# start this custom command:
#STL_CMD=winecfg

# start STL_CMD command with following args:
#STL_CMD_ARGS=--help

# set to 1 to only start above STL_CMD and not the game command itself:
#ONLY_STL_CMD=0

# set to 1 to fork the custom STL_CMD into the background and continue with starting %command%
#FORK_STL_CMD=0

the extra launch function would automatically check if the command itself is a windows exe and start it with the provided proton options coming from %command%
ONLY_STL_CMD could be used to replace broken launchers

option to start SteamVR after launching a game via SBS

at least with BioShock Remastered SteamVR is running mad in an endless loop when starting the game.
You can open it without any problems after the game is running though.
Having an option to delay starting SteamVR (and therefore also vr-video-player) would fix that.
using atd daemon would be overkill, right?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.