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
Support for launching from command line in offline mode #2331
base: develop
Are you sure you want to change the base?
Conversation
This allows launching an offline instance with --offline --name=OfflineName. This is useful for playing split screen by creating two side-by-side instances, which is impossible online, unless one is using two separate paid accounts. With this PR, it makes it possible to launch from a script - otherwise, one has to launch manually, which is a pain, or create offline profiles for each instance, which interferes with some functionality like skins (my autistic son takes great issue with his skin not being visible, when using offline profiles!). Implementation is based on MultiMC, which supports this feature. See also PrismLauncher#1059 for discussion. Signed-off-by: Michael Tyson <michael@atastypixel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but do not forget to format the code.
I use the following command when I want to format the code find ./launcher -iname "*.h" -o -iname "*.cpp" | xargs clang-format -i
Signed-off-by: Michael Tyson <michael@atastypixel.com>
Also a non-blocking suggestion: I would have used only one flag similar to how it is mentioned in the linked issue. |
…cker Co-authored-by: Alexandru Ionut Tripon <alexandru.tripon97@gmail.com> Signed-off-by: Michael Tyson <michael@atastypixel.com>
That's a good point - it does seem a tad redundant. I basically followed the MultiMC way of doing it minimise changes for those coming from MultiMC like I have. I feel like there are reasonable arguments on both sides. I honestly can't decide! Maybe I should do it the more succinct way, it's not like it's hard to just read the usage text if you're coming from MultiMC.. |
… “--offline” flag Signed-off-by: Michael Tyson <michael@atastypixel.com>
Please be careful - the reason we do not merge MultiMC changes is not just because of the amount of conflicts there would be, but also incompatible licenses! |
That’s fair! However, I only used MultiMC as inspiration, and a guide for where to make the changes; the code changes are my own and no copy and pasting was done. I don’t believe there’d be any licensing issues here. |
This allows launching an offline instance with --offline --name=OfflineName. This is useful for playing split screen by creating two side-by-side instances, which is impossible online, unless one is using two separate paid accounts.
With this PR, it makes it possible to launch from a script - otherwise, one has to launch manually, which is a pain, or create offline profiles for each instance, which interferes with some functionality like skins (my autistic son takes great issue with his skin not being visible, when using offline profiles!).
Implementation is based on MultiMC, which supports this feature.
See also #1059 for discussion.