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

Feature Request: command-line usage purely on CLI #3054

Closed
jipp opened this issue Apr 29, 2015 · 9 comments
Closed

Feature Request: command-line usage purely on CLI #3054

jipp opened this issue Apr 29, 2015 · 9 comments
Assignees
Labels
Component: CLI The Arduino IDE's command line interface Type: Wontfix Arduino has decided that it will not resolve the reported issue or implement the requested feature
Milestone

Comments

@jipp
Copy link
Contributor

jipp commented Apr 29, 2015

Hi

when using the command-line I would expect a pure command-line. - So no Window handling at all.

I tried it on OSX and Windows using 1.6.1 and nightly build.

After starting the command-line I see the Arduino logo popping up.
Also in case of an error (unknown option) the message this is given in a window not on the CLI.

To make the Arduino IDE more useful it would be better to handle everything purely on CLI.
This would allow the integration of the CLI into other projects, scripts, batch-jobs.

Maybe it would also be helpful to have some cli commands integrated like:
--version
--help (showing a list of available commands) - specially the documentation update is always behind and the help would might be solving this to some level

thanks for the good work you do.

Jipp

@matthijskooijman
Copy link
Collaborator

The part about the splash screen and error popups is already reported at #1981, so let's focus this issue about adding --version and --help (which seem like a good idea to me). Btw, you say the documentation is always behind, but I actually think the commandline manpage is the single piece of documentation that is properly up-to-date always (since it is contained inside the git repository, so changes to the manpage can be merged alongside with the corresponding code changes).

@jipp
Copy link
Contributor Author

jipp commented Apr 29, 2015

Hi

agreed.
The comment about documentation is just a general one. Its always hard to keep documentation and development aligned on the same level.

thx
Jipp

@matthijskooijman
Copy link
Collaborator

Yup, totally :-)

@mschlenker
Copy link
Contributor

It gets worse, trying on a headless machine via SSH:

arduino16 --verify /home/mattias/Projekte/git/ManekiNeko2015/ManekiNeko/ManekiNeko.ino

results in:

Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.awt.HeadlessException: 
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
    at java.awt.SplashScreen.getSplashScreen(SplashScreen.java:117)
    at processing.app.Base.<clinit>(Base.java:73)

Having experienced similar issues with running OpenOffice in batch mode for converting documents, I remembered to install the Xvfb X server and wrapping the whole arduino command in a shell script. If it's not possible to get rid of AWT in headless mode, at least the documentation should contain a hint.

Should I add a section "ENVIRONMENT" with a hint to DISPLAY and how to work around the issue to the man page and then pull request? https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc - I would basically include this snippet as example work around:

#!/bin/bash
Xvfb :1 -retro -nolisten tcp -screen :1 1280x800x24 &
xvfb="$!"
DISPLAY=:1 arduino $@
kill -9 $xvfb

https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc

@ffissore
Copy link
Contributor

@mschlenker yes indeed that's the way we execute the tests on our linux box. We are developing a pure cli tool and I hope we'll release it in the coming months

@mschlenker
Copy link
Contributor

OK, I'll update the man page accordingly.

@ffissore
Copy link
Contributor

👍

@mschlenker
Copy link
Contributor

See #3062 - BTW thank you very much for #2904.

@ffissore ffissore added the Component: CLI The Arduino IDE's command line interface label Apr 30, 2015
@ffissore
Copy link
Contributor

As for #1981, closing as wontfix. Fixing would require dismantling the IDE. We make small steps everyday, but can't really set a schedule

@ffissore ffissore added the Type: Wontfix Arduino has decided that it will not resolve the reported issue or implement the requested feature label May 29, 2015
@ffissore ffissore added this to the Release 1.6.5 milestone May 29, 2015
@ffissore ffissore self-assigned this May 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: CLI The Arduino IDE's command line interface Type: Wontfix Arduino has decided that it will not resolve the reported issue or implement the requested feature
Projects
None yet
Development

No branches or pull requests

4 participants