Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing with ProtonUp-Qt! #565

Closed
sonic2kk opened this issue Aug 31, 2022 · 14 comments
Closed

Testing with ProtonUp-Qt! #565

sonic2kk opened this issue Aug 31, 2022 · 14 comments
Labels
documentation Improvements or additions to documentation

Comments

@sonic2kk
Copy link
Owner

(Hope it's ok to file this as an issue)

ProtonUp-Qt should have SteamTinkerLaunch support soon! I spent the last 5 days or so tinkering around and with immense help of the maintainer I now have a PR up to add a SteamTinkerLaunch source (including latest git master downloads and Flatpak support): DavidoTek/ProtonUp-Qt#119.

It'll download and set up SteamTinkerLaunch without root, adding it as a compatibility tool automatically, and it'll add STL to the shell path so you can use it for native Linux games, and it all works on Steam Deck too. You can switch between versions and also uninstall - it'll automatically remove it from your path too! Though uninstalling will remove ~/.config/steamtinkerlaunch.

My hope is that this will help make SteamTinkerLaunch more accessible for users on distros where SteamTinkerLaunch packages may be unavailable/out of date. It'll also help users who for any reason don't want to install STL system-wide. Another big hope is that this will make SteamTinkerLaunch more accessible to Steam Deck users who might struggle to understand how to install SteamTinkerLaunch without a user interface.

Part of why I'm writing this is to document that we should put this on the wiki if/when it gets merged, another reason is that it would be great if anyone available could help test if they have a machine they're willing to help test on! "It Works On My Machine" isn't going to fly when a user can't install via ProtonUp-Qt on their Steam Deck. I'll admit too that I was a little excited to show off what I've been working on because I'm pretty happy I got the opportunity to contribute this.

So yeah, if anyone is willing and able to test this I'd really appreciate it ❤️

@frostworx
Copy link
Collaborator

WOW! Thank you very much again for all your contributions! Impressive dedication! ❤
I'm sure many new and old users will appreciate your contribution as well.
Let's hope many people test and report that everything works excellent 🤓

@sonic2kk
Copy link
Owner Author

sonic2kk commented Aug 31, 2022

I hope so too 😄

Something I'm very interested in getting some feedback on is with Native Linux titles. Earlier today when I was testing, I was having some trouble with simply adding the launch option $(which steamtinkerlaunch) %command% (even after restarting Steam and my Steam Deck/laptop). But I came back to it about later on and it seems to work on my laptop. The ProtonUp-Qt source adds STL to the shell path (any and all shells it can find out Bash, Zsh, Ksh and Fish), so running which steamtinkerlaunch from terminal works. Steam didn't seem to like that earlier.

It's slightly disappointing that a user will have to wrap it in the shell syntax but imo it's better than having them get the path to the script and pasting it into the launch options - Especially on Deck!

EDIT: Didn't take long after posting this to figure it out haha, it seems on my laptop Steam only works with $(which steamtinkerlaunch) %command% when I run it from a terminal. I guess that would explain why it doesn't work on Deck. I ran it from a terminal on my laptop to see if I could figure out why the launch option wasn't working and just remembered when I had the same idea again...

Not sure what the solution to this is just yet. It's entirely possible to use STL as a launch option on Deck, you just have to enter the absolute path to the script into the launch options. Being able to use which steamtinkerlaunch would make it much easier though.

@frostworx
Copy link
Collaborator

sorry, just a short reply, RL is calling :)

You didn't mention it explicitely, so: /home/deck/stl/prefix/, the default install path steamtinkerlaunch uses to install itself is not added to $PATH automatically (see wiki)
the function emptyVars also cuts down several incoming variables temporarily, because steam would lad massively if leaving them untouched (this was a pretty early implementation though, so no idea if it is still required)

@sonic2kk
Copy link
Owner Author

sonic2kk commented Sep 1, 2022

My installer for ProtonUp-Qt adds STL to the path by adding it to some shell RC files, and it can be run from terminal sessions no problem. But when trying to add it to the Steam launch options, Steam doesn't see the command and won't launch STL. It only works if I type out the full path, which is fine but ideally (especially on Deck) a user should be able to either just type steamtinkerlaunch %command% or use something like $(which steamtinkerlaunch) %command% to get the path to the script and run it.

Just to be clear I'm not asking for anything to be done on the STL side, just generally wondering if there's an easy way to do this from the Steam launch options 😄

@frostworx
Copy link
Collaborator

ok ic, thanks for elaboration (sorry, haven't looked into your commits in detail)
I assume the path you add is fix, so you could still simply expand the PATH variable to also include your path (for example in ~/.bash_profile)
Or do I still misunderstand your problem? :)

@sonic2kk
Copy link
Owner Author

sonic2kk commented Sep 1, 2022

The path in for example .bashrc is if [ -d "/path/to/stl ]; then export PATH=$PATH:/path/to/stl fi;. STL is actually in the path, from terminal I can run steamtinkerlaunch version and other commands, it is only Steam that doesn't see it in the path. Basically so a user can just type steamtinkerlaunch %command% in their launch options, as if they installed STL to /usr/bin/steamtinkerlaunch. Steam could very well just not read from the shell profile. Running Steam from the command line will get Steam to see variables added to the path which makes me suspect Steam simply doesn't check the path?

To simplify I suppose, what I'm asking is, is there a way to run STL as a launch option in Steam without a) installing to /usr/bin/steamtinkerlaunch and b) entering the full path like /path/to/steamtinkerlaunch %command%. Adding to path doesn't seem to make Steam see the steamtinkerlaunch command like Bash/Zsh/etc.

This could just be something Steam doesn't support, which is fine, I'm not trying to ask for anything on STL's side but just some general advice on if there's a way to do this 😄

@frostworx
Copy link
Collaborator

I already understood you didn't ask for any STL changes, I'm just trying to help 😀
I would have suggested to start with
env > /tmp/env.txt
as steam launch option, to see if PATH is even listed, but this does not seem to work.
Instead of the expected env output the log contains stdout of the used compatibility tool.
Pretty sure this once worked as expected, so this might be a new $feature reducing user customization options a bit.

@sonic2kk sonic2kk added the documentation Improvements or additions to documentation label Sep 5, 2022
@sonic2kk
Copy link
Owner Author

The pull request is basically done and ready thanks to enormous help from the project maintainer in my absence.

There was an issue we encountered where the language may not be correctly set for locales other than English. Currently this is worked around by simply writing the relevant language file into the global conf file, but perhaps this is either a bug with STL or an issue where we are not correctly setting the language in the installer.

In my tests with installing STL via the ProtonUp-Qt installer, it seems as though the English locale is set correctly, but not other locales. I wanted to raise this in case either an improvement needs to be made to the ProtonUp-Qt installer or on STL's side. To set STL's language for another locale, it should be as straightforward as copying the relevant language file to ~/.config/steamtinkerlaunch/lang/langfile.txt and then running the STL script, right? Or are we missing something?

The relevant lines of the PR are here, it is commented but I am happy to go over anything for further clarity 😃

https://github.com/DavidoTek/ProtonUp-Qt/pull/119/files#diff-2fe0fb48c924f6bfc74a25af596a1c315061ffe1cea55f418ca803dab56595c8R243-R267

I have only used STL in English so I haven't tested other locales.

@frostworx
Copy link
Collaborator

Wow, great work!👍
The language functions are pretty old. I don't think that they have a bug generally, but might be too overcomplicated for unusual constellations which I didn't think of while implementing 😀.
I'll look into this when I find the time and try to improve/simplify the implementation, likely not before mid next week.

frostworx pushed a commit that referenced this issue Sep 15, 2022
@frostworx
Copy link
Collaborator

The above commit should improve the initial language initializing:
Without anything configured, it is possible to provide a valid language via command line via
steamtinkerlaunch lang=$LANG (for example: steamtinkerlaunch lang=polish)

This function was already implemented, but broke (probably a long time ago already)
Now that language is automatically stored/updated into the initially auto-created ~/.config/steamtinkerlaunch/global.conf

I tested all bundled language files and it seems to work fine for me.
The ~/.config/steamtinkerlaunch/lang/ was meant as a helper for possible translation contributors:
The idea was to copy the default english language file under a newlanguage.txt file into the directory.
steamtinkerlaunch should accept that file as additional language file:
I haven't touched this since implementation and no idea if anybody, including the translation contributors ever used it, but in theory it should still work. It should not be required for your task though. If you need it and it is broken, please let me know.
If you need anything else please let me know as well (likely won't replay before mid next week 😀)

DavidoTek added a commit to sonic2kk/ProtonUp-Qt that referenced this issue Sep 15, 2022
@sonic2kk
Copy link
Owner Author

That seems to have done the trick, thank you again! 😄

STL support for ProtonUp-Qt should be rolled in soon, once it is I think we can close this issue and open another to track bugs, like how we have for Flatpak and Steam Deck. Unless you think it would be better tracked upstream? I'm just thinking if users encounter issues they might open them here. Though I don't foresee there being any major issues with STL being installed via ProtonUp-Qt. And the reason I'm thinking of opening a new issue is that this issue was more for development feedback, and the opening post of this issue might not line up with what a user might expect for a ticket tracking problems specific to installing STL with ProtonUp-Qt.

@frostworx
Copy link
Collaborator

(going offline now for a few days, so sorry for the short reply)

Yeah, thank you for confirming the commit helped, and thanks alot for the implementation, @sonic2kk and @DavidoTek! 😀❤

Good idea to create a generic issue here for ProtonUp-Qt! 👍

@sonic2kk
Copy link
Owner Author

The PR was merged upstream!! 🥳 I don't believe at the time of writing that there is a full release yet, but I will preemptively close this issue and open a new generic one.

Have a good one 😄 No worries about the short reply, as usual thanks for all your hard work on STL!

@DavidoTek
Copy link

I released version 2.7.3 with STL support, currently available as AppImage here. A Flatpak release will follow once it's all tested.

I will leave DavidoTek/ProtonUp-Qt#86 open so any futher bugs can be reported over there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants