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

lang: Don't create global config in loadLanguage #1178

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sonic2kk
Copy link
Owner

Fix #1177.

Don't attempt to save and load the global config in loadLanguage unless it exists.

Prevents loadLanguage, which is called very early, from creating the global config before setSteamPaths has a chance to define some paths that are needed to create the global config.

Most notably, this fixes Luxtorpeda and Roberta variables from being incorrect when created too early by loadLanguage, as this function creates the global config before setSteamPaths has a chance to define STEAMCOMPATOOLS which is needed in order to build a valid path for LUXTORPEDACMD and ROBERTACMD. SteamTinkerLaunch tries to auto-detect Luxtorpeda installations and this has not worked for probably the last 2 years or so, since loadLanguage created the global config too soon. However, Luxtorpeda could always be and still can be manually selected by the user, so the only breakage was for the auto-detection.

This may possibly fix other similar cases as well, where Steam paths are needed in the global config but it is created before paths exist.

This fix will not retroactively apply to global configs, as we don't know whether the variables are incorrectly generated by us or the user. Bad global configs will need re-generated.


This PR needs some testing to ensure the -f "$STLDEFGLOBALCFG" check is safe. I think it is, but this will need a bit of further testing.

Don't attempt to save and load the global config in `loadLanguage` unless it exists.
Prevents `loadLanguage`, which is called very early, from creating the global config
before `setSteamPaths` has a chance to define some paths that are needed to create
the global config.

Most notably, this fixes Luxtorpeda and Roberta variables from being incorrect when
created too early by `loadLanguage`, as this function creates the global config
before `setSteamPaths` has a chance to define `STEAMCOMPATOOLS` which is needed
in order to build a valid path for `LUXTORPEDACMD` and `ROBERTACMD`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

USELUXTORPEDA does not function
1 participant