-
Notifications
You must be signed in to change notification settings - Fork 72
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
improvements to Steam Deck install experience #629
improvements to Steam Deck install experience #629
Conversation
…eam Deck install experience
Is there any way to verify if the dependencies are actually really the files we're looking for? Say using a hash or filesize? |
I believe Offline, I'm not sure how would be best to handle this. Maybe we would only check offline if the user provided one. |
I checked it out quickly before bed and it seems like the Arch archives provide a And just to be clear since I didn't really emphasise it before, I think this is a good idea. At least giving the user a warning when the sums don't match is just good stewardship when we're downloading packages for the user. For offline, we could just check if a sum is in the same folder as the archive and assume the user provided a correct one. And if they didn't provide one we could just log saying no sum was provided so we didn't verify that the content of the file is correct, or something to that effect - Probably worded much more nicely than that 😅 So yes, a good idea for sure, and I'm open to suggestions and discussion on how to implement it! Thank you :-) |
thanks for the PR @sonic2kk and sorry, I still didn't have the time to review this in detail Not sure if it is known, but steamtinkerlaunch already has a generic download/extract/checksum will reply in detail soonish. sorry for the delay... |
No worries at all, it's a big PR and there are other things going on. Take your time :)
Oh wow, please send an email and we can get in touch and have a conversation about this, but if you're looking for a project lead I'm definitely willing! 😀
Ah, I did see this function - late on into making the PR, when I was doing the Yad stuff which came towards the end. I thought maybe it was specifically for Yad but if it's for most other downloads we could try to find a way to use that at least partially for checking the checksums. I know you haven't done a review yet, but the function I created for downloading the dependencies separately does some other checks. From my understanding of how |
sorry, still no review, but just emailed you at least 😀 |
As already mentioned via mail, I suggest we simply merge the PR for a trouble-free project transfer :) |
:) |
@AliceDTRH I realise the merging of this was a bit sudden, but I haven't disregarded your suggestion on checking the sums of the dependencies. If you would like you are more than welcome to dig deeper and report back, or even open a PR yourself for this. Otherwise I'll take a look at implementing this at some point before the next major release. There are a couple of other things on my plate right now, so it's not an immediate priority, sorry! |
A sad news follow-up on this that I forgot to add last night: I can't find a way to verify the checksums of the downloaded files. The |
Hihi! About a week ago, I started working on a PR to add the notifier to a few places during the Steam Deck installation process for SteamTinkerLaunch, and then the ideas I had kept growing and before I knew it, I ended up with a behemoth of a PR. Sorry about that, but the changes are all related to one thing: Improving the installation experience on Steam Deck!
The ideas came from my own experience installing and updating STL on Steam Deck, and the changes were written and tested on my Deck (I'm writing this with a keyboard+mouse+monitor attached in Desktop Mode, hi!)
Background
I've been using SteamTinkerLaunch on my Steam Deck since I got it, and it's worked great! But I found the installation process to be a little bit unclear at times. That gave me the idea to try and add a notifier or two to the install process, to give feedback that the install process started, that dependencies are being downloaded, and that installation finished.
When installing STL with
./steamtinkerlaunch
, the output in the terminal makes it very clear what's going on - Though it's a bit messy. But at least on KDE, which the Steam Deck uses, you can double click a script and it will ask you if you want to execute the script. In this instance, it's unclear when the installation process really ends, or what the script is doing. It's not really a "problem", but it's something I wanted to try and fix.As I was working on fixing the notifier, I had an idea for a lot of other things. They were all small ideas that at first I naively expected would be easy to implement. The things I wanted to improve essentially boil down into four main categories:
Visual Feedback
Using the notifier to show the user visually what's going on, and improving the echo output in the terminal to show more friendly messages such as "Preparing to install SteamTinkerLaunch" - or "Preparing to Update" if we already have some files in the
~stl/prefix
.Offline Installation
The big one, I wanted to add a lot of failsafes and catches to make sure STL didn't show any unnecessary warnings when trying to run offline, and to allow users to manually place dependencies in the relevant folders so STL can find them (like
~/stl/deps
). I also wanted to be as generous as possible when trying to find these files, so a lot of time was spent trying to create regex patterns to match files that even somewhat match the dependency STL is searching for - if an exact filename match was not given.I also wanted STL to be able to intelligently install/update when offline; use the current files with the install script if we don't have a
prefix
, and if we have a previous install, check to make sure an update is required.Quality of Life
This really only consisted of two ideas:
Code Cleanup
Maybe "Cleanup" is the wrong word, but there was a comment about removing a hardcoded wget version that I wanted to address. I also noticed the code duplication for installing
cabextract
andinnoextract
, and wanted to try and address all of these problems with a generic function to fetch dependencies.The code in
steamdedeckt
was getting a little "jumbled" after this refactoring, so I wanted to split some of the code out to make the function easier to follow and maintain.Additional logging was also added around these changes, which should help with any potential debugging.
Solution
My solution in the end turned out to be a big overhaul to the Steam Deck installation experience in more than just the notifier. There were quite a lot of changes in the end, which came from my own experience using SteamTinkerLaunch on Steam Deck. This is virtually an implementation of my entire wishlist for the installation process with four main areas of focus once again:
steamdedeckt
function.Changelog
As mentioned above, the changes fall into four main categories, so I'll break them down in a bullet pointed list.
Visual Feedback
Offline Installation
archlinux.org
.$PREFIX
(currently$HOME/stl/prefix
).$PROGVERS
is newer than the installed$PROGVERS
, overwrite the$PREFIX
with the downloaded files.$PROGVERS
is older than the installed$PROGVERS
, or the same, do nothing.$HOME/stl/deps
). Checking on the exact filename means we'll still download them again on a version bumpinnoextract
frominnoextract-1.9-5.pkg.tar.zst
, and then check if any files in the dependencies folder haveinnoextract
in their name (with a-maxdepth 1
).$HOME/.config/steamtinkerlaunch/downloads/yadappimage/
and the STL dependencies directory. If we cannot find an exact filenamt match, we perform a case insensitive match for any.AppImage
withyad
in the name, in the same two directories. Only fail the installation if all four of these steps fail.Quality of Life
steamdedeckt
function and some other code checks.lang=<lang>
argument, if that's not passed then we check if there are any language files matching the currently selected language (set in the STL global conf) in$HOME/.config/steamtinkerlaunch/lang
. Failing all of these, we fall back to$STLDEFLANG
(which isenglish.txt
).loadLangFile
, which loads the default language file in the final case mentioned above, will now check the current script'slang
dir for a matching language file, if it exists. This means the most up-to-date language file strings will be used as soon as possible, including during installation (which means the notifier will get the most up-to-date English strings for the notifier by default)-q
flag to run SteamTinkerLaunch with the notifier disabled. This can be beneficial for users that find the notifier spammy but don't want to force disable it in their Desktop Environment's settings. The idea was thought up with ProtonUp-Qt in mind, so that the new installation notifier could be hidden when installing that way.Code Cleanup
steamdedeckt
into a separate functionsetYadBin
and the code indlCheck
remain, though it does have extra checks for where to find Yad in Offline Mode as mentioned earlierSSL_INIT
output from the Yad download to clean up terminal outputLD_PRELOAD
as it doesn't seem to be required anymoreScreenshots
Here's a couple of screenshots of how the install process would look now, with the notifier and logging:
Notifier
Terminal
TODO
There are a few things I still have to investigate with this PR.
Considerations
I have a couple of reservations with the changes I have made:
fetchAndExtractDependencies
function currently only usestar
and was only tested against.tar.zst
files. This is because I didn't know if we could make any assumptions about what might be available to users, should we assume we have7z
for example. The other reason was that I'm not very familiar with tar and its options, and didn't think checking the archive type was important enough at least initially since this function only downloads the same file type right now from the Arch/SteamOS repos. If it's desired wwe can get a discussion going about how to best implement support for different archive types to help make this function more generic.This PR ended up getting way bigger than I intended. Since this touches the actual installation of STL on Steam Deck, we should take our time with review and feature discussion, to ensure everything is up to a good standard. I'm still quite the beginner with Bash, and while I did take time to try and make sure the code was of the best standard I could make it, there could be ways to improve it that I'm not aware of. As such, especially with the size of this PR, all feedback is welcome. I put a lot of time into this in the hopes of having this benefit as many users as possible, in the best way possible, so as such I want all the input possible to make these changes the best they can be.
I also realise there is the mo2-rewrite branch in progress, and a couple of open issues related to testing MO2 and Vortex. As such, and given the big changes here, I'm in no rush for this to be merged. As mentioned we can take our time with review. There are a couple of merge conflicts, but if it's okay I'd prefer to leave resolving those until these changes are in a state that can be merged.
Thanks "code buddies"! 😉