-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Do not show splash screen when options are present #5132
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
Conversation
@@ -27,7 +27,7 @@ fi | |||
# Collect options to java in an array, to properly handle whitespace in options | |||
JAVA_OPTIONS=("-DAPP_DIR=$APPDIR" "-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel") | |||
|
|||
if [[ "$@" != *"--upload"* && "$@" != *"--verify"* && "$@" != *"--get-pref"* && "$@" != *"--pref"* && "$@" != *"--install-board"* && "$@" != *"--install-library"* ]] ; then | |||
if [[ "$@" != *"--upload"* && "$@" != *"--verify"* && "$@" != *"--get-pref"* && "$@" != *"--save-prefs"* "$@" != *"--install-boards"* && "$@" != *"--install-library"* ]] ; then |
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.
The commit message mentions --board, but I don't see that here? Also, the commit removes --pref again, isn't that needed after all? The commit message doesn't mention it.
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.
Right, I adapted my commit but not the commit-message. I chose to add --save-prefs
instead of adding both --board
and --pref
since they go together when used CLI-only. In fact, if you would be starting the IDE with --board
(which I guess is possible) the splash will still be there.
Maybe this does not cover all the use-cases, but it covers my use-cases cfr. the man-page:
https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc
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.
The original issue title was also wrong. Somehow I was hoping that this would fix the X11 DISPLAY requirement (as the original error message was related to the Splash-screen), but that's rooted much deeper into the code I learned by experience :-/ So this is a minor improvement only.
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.
Maybe this does not cover all the use-cases,
I wonder if it would be better to just suppress the splash screen whenever any options are passed, since keeping this list of options up-to-date is probably going to fail (again) in the future. The most-used invocation is without options, which should show a test screen. The invocations with options that do show the GUI and should (ideally) show a splash screen too are probably very seldomly used, so it might be acceptable to not show a splash screen in those cases.
Somehow I was hoping that this would fix the X11 DISPLAY requirement (as the original error message was related to the Splash-screen), but that's rooted much deeper into the code I learned by experience :-/ So this is a minor improvement only.
Ah, I already wondered about that indeed :-)
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.
That makes a lot of sense too. The Splash screen is not an integral/functional part of Arduino, so only showing it when options (not just arguments) are present makes sense. I will make a new proposal.
@matthijskooijman I simplified this PR to a single small change as you proposed. I hope you like it ;-) |
This ensures now splash-screen is shown when preferences are changed or CLI-mode is used. More information in arduino#5131. However this does NOT fix arduino#5131, since the Arduino IDE in CLI-mode still requires X11 (according to arduino#1981).
This ensures now splash-screen is shown when preferences are changed or CLI-mode is used.
More information in #5131.
However this does NOT fix #5131, since the Arduino IDE in CLI-mode still requires X11 (according to #1981).