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

Hide splash screen asap if not using gui #9295

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

Conversation

andrewdotn
Copy link

Fixes #1970

On macOS, when running,

Arduino.app/Contents/MacOS/Arduino --upload sketch.ino

a splash screen is visible the entire time the upload is running.

This PR hides that splash screen as soon as it’s known for sure that the
GUI should not be displayed. This makes for a slightly better user
experience: there’s still a splash screen, but it only appears briefly at
launch time.

The SplashScreen docs explain:

The splash screen can be displayed at application startup, before the
Java Virtual Machine (JVM) starts. ... is closed automatically as soon as
the first window is displayed by Swing/AWT (may be also closed manually
using the Java API, see below)

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you lint your code locally prior to submission?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes

Sorry, something went wrong.

Fixes arduino#1970

On macOS, when running,

    Arduino.app/Contents/MacOS/Arduino --upload sketch.ino

a splash screen is visible the entire time the upload is running.

This PR hides that splash screen as soon as it’s known for sure that the
GUI should not be displayed. This makes for a slightly better user
experience: there’s still a splash screen, but it only appears briefly at
launch time.

The [SplashScreen docs][] explain:

> The splash screen can be displayed at application startup, before the
> Java Virtual Machine (JVM) starts. ... is closed automatically as soon as
> the first window is displayed by Swing/AWT (may be also closed manually
> using the Java API, see below)

[SplashScreen docs]: https://docs.oracle.com/javase/7/docs/api/java/awt/SplashScreen.html
@andrewdotn
Copy link
Author

A more involved fix would require further customizing the https://github.com/arduino/appbundler launcher to do some command-line parsing of its own. Then it could skip passing the -splash argument at JVM launch if one of the action arguments was specified.

The likely isn’t worth that effort, but if someone wanted to go down that route, @cmaglie and @facchinm seem to have been the last to work in that area, so could probalby weigh in

@gvarisco
Copy link
Contributor

gvarisco commented Oct 19, 2019

@andrewdotn FYI - you may want to use the arduino-cli, it provides builder, boards/library manager, uploader, discovery and other tools.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

Unexpected appearance of Arduino IDE using CLI
3 participants