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

Support for launching from command line in offline mode #2331

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

michaeltyson
Copy link

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.

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>
Copy link
Member

@Trial97 Trial97 left a 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

launcher/LaunchController.cpp Outdated Show resolved Hide resolved
Signed-off-by: Michael Tyson <michael@atastypixel.com>
@Trial97 Trial97 linked an issue Apr 23, 2024 that may be closed by this pull request
1 task
@Trial97
Copy link
Member

Trial97 commented Apr 23, 2024

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>
@michaeltyson
Copy link
Author

Also a non-blocking suggestion: I would have used only one flag similar to how it is mentioned in the linked issue.

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>
@TheKodeToad
Copy link
Member

TheKodeToad commented Apr 23, 2024

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!

@michaeltyson
Copy link
Author

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.

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.

Launch Instances Offline From Command Line -o <name>
3 participants