-
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
Request: Help on reading the source code #822
Comments
First off, I love the dedication here and that you linked to the original issue for context :-) I'm more than happy to help, I'm currently a little busy and feeling a bit under-the-weather but later today I'll try to refresh my memory on how the language files are handled. I'm pretty sure STL removes them and re-creates them to update the langfiles to the latest each time (primarily for Steam Deck iirc where it's installed locally and not system-wide). As for how they're removed, I think I created a helper method to do it, so that may explain why searching for For how a game is started, I think it's And lastly, I'm not sure how things are handled with NixOS packages, but I'm more than happy to accept a patch/work on a patch to improve support on the STL side, to save having to potentially manage a patched STL specifically for NixOS. I don't use NixOS and I am not overly familiar with it but as long as the "GNU" flavour of the tools STL uses work then I'm happy to try improve things here to help users. There is much room for improvement with STL and I'm looking at improving how various things are handled where I can, removing various outdated parts of the code, removing duplicated code where I can, but it's a slow process :-) Even though I've been maintainer for almost 8 months now I'm still getting to grips with some of the "intricacies" 😉 Once I have some more time I'll look at the code and give a more contextual and thorough answer. Once again I appreciate the initiative here and I'm happy to help! |
Thanks for the kind comment! I'll look at the functions you mentioned more closely once I can get some free time 😄 In regards to Nix/NixOS for clarity, it wouldn't be having a separate STL just for NixOS, but instead making patches in the process of packaging STL. We'd still be using this repo! It's nuanced, but the real important part is that all packages (including STL) are stored in a read-only file system (the "Nix store"), by design. I'm unsure if I'd be able to contribute to STL directly with the little know-how I have, but I think I'll be learning regardless and maybe I will come up with an improvement as I keep looking through the source code! Thanks again for your help. I love this tool as I used it all the time when I was still using Manjaro! |
I'm a little off in my explanation of how lang files conflict with how Nix does things. Or, I could also be totally wrong 🤪 |
Ah okay! So the problem is something like this:
(And actually while testing this, I noticed that STL seems to just do this on pretty much every launch, so... 🤷♀️ Probably a bug but a low-priority one to fix) I am not sure why being unable to update the langfile is causing a problem, but maybe it's more fatal than I realised. Nevertheless:
I believe this is feasible for sure! It should be a case of running You could test this yourself to make sure this gives the desired behaviour, and if it does, I can add it to STL no problems. The langfiles are probably being copied to |
Also, as a high level overview of how STL sets the lang files:
I was originally writing this out and then I saw your reply, so I thought responding to that first would take priority. I hope that explanation made sense. There is also a configuration option (in the menus and in
That makes sense, and this read-only store is what's causing the problem when STL tries to remove the copied langfiles - they keep their permissions.
Even though it isn't explicitly files in its store being modified (which should only happen after an update), the general idea here could also work, the problem is that langfiles may become out-of-date. Though STL should just fall back to the files in
There's never any pressure to contribute :-) But I appreciate you taking the time to learn how STL handles things and gain an understanding of the problem and hopefully improve things. |
Thanks for the detailed explanation! I think I'm getting the hang of the source code. I just put out a PR to address this, which adds a couple of |
Hello, I'm trying to make a patch for
steamtinkerlaunch
for use on NixOS, and I need some help trudging through the source code.What I'm trying to figure out is where STL deletes a language file from
lang/
when a game is started in Steam. After looking through the source code forrm
statements, I have a gut feeling that this file is not deleted on its own, but alongside other files. However, I'm not able to pin down an exact line number.Any tips would be appreciated.
Here's the original issue for context and log messages: NixOS/nixpkgs#226086
The text was updated successfully, but these errors were encountered: