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

Improve launcher command line interface. #1682

Merged
merged 8 commits into from
Oct 19, 2024

Conversation

ThatRedox
Copy link
Member

  • Rewrite the launcher CLI using Apache Commons CLI.
  • Improve launcher interactive setup.
  • Setup unit tests for the launcher.

This does slightly change the usage of the CLI. The new parser parses all command line arguments until -- for the launcher. Any arguments after -- will be passed to Chunky. Any unknown commands will return with Unrecognized option: -<command>.

Running java -jar ChunkyLauncher.jar --help:

usage: java -jar ChunkyLauncher.jar
Chunky Launcher 1.14.1, Copyright (c) 2010-2024 Jesper �qvist and Chunky Contributors

Chunky comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute
it under certain conditions. See the GNU General Public License v3 for more details.

    --console                               Forces debug console to be opened
    --dangerouslyDisableLibraryValidation   Disable library validation. This can be dangerous!
 -h,--help                                  Show this help message
    --javaOptions <options>                 Add a Java option when launching Chunky
    --launcher                              Forces the launcher GUI to be shown
    --setup                                 Runs the interactive command-line launcher setup
    --update <release channel>              Update Chunky to the latest release
    --verbose                               Enables verbose logging
    --version                               Show the launcher version and exit

Command line options after -- are passed to Chunky.
For Chunky's command line help, run:
  java -jar ChunkyLauncher.jar -- --help

Running java -jar ChunkyLauncher.jar --setup

Memory limit (MiB) [8192]: 
Java options [--module-path "C:\Users\user\.chunky\javafx-sdk-17.0.2\lib" --add-modules javafx.controls,javafx.fxml]: 
Update site [https://chunky-pr.lemaik.de/]: 
Reload launcher metadata [Y/n]: 
...Launcher is up to date!
33 release channels found.

@ThatRedox
Copy link
Member Author

Launcher jar: launcher-2.5.0-DEV.319.g6d82b1b.jar.zip

@leMaik leMaik self-assigned this Oct 3, 2024
@leMaik
Copy link
Member

leMaik commented Oct 3, 2024

Looks great, I'll rebase and merge for the next Launcher version.

@leMaik leMaik merged commit eb88139 into chunky-dev:master Oct 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants