Commit Graph

12 Commits

Author SHA1 Message Date
Cristian Maglie ec1310e1bd Removed --no-op from CLI. Preferences now not-saved by default.
See https://github.com/arduino/Arduino/pull/2000 for details.

Close #2000
2014-08-22 15:39:33 +02:00
Matthijs Kooijman cc773fb1e0 Take into account --curdir for all relative paths
In a lot of places, (potentially) relative paths were passed to File
without any processing, making them be resolved without taking into
account --curdir. By passing them through Base.absoluteFile instead,
these paths are resolved relative to the working directory before
starting arduino (at least on Linux, which is currently the only
platform supporting --curdir).

This applies --curdir to the --preferences-file option and the
build.path, settings.path, sketchbook.path preferences.

For example, this now works as expected:

  arduino --pref build.path=build_dir --verify Blink.ino
2014-08-19 09:16:49 +02:00
Matthijs Kooijman e494f39255 Add --get-pref option
This allows reading specific preferences from the commandline.
2014-08-19 09:16:47 +02:00
Matthijs Kooijman f745fff50b Add --noop option
This option causes the IDE to process its commandline arguments and then
quit. This allows setting preferences uses --pref, without having to
also load the GUI or compile a sketch.
2014-08-19 09:16:47 +02:00
Matthijs Kooijman 4452eb3850 Add --no-save-prefs option
This allows setting preferences for the current run only, without
remembering them for the next run. This is especially useful when
combined with --verify or --upload.
2014-08-19 09:16:47 +02:00
Matthijs Kooijman e0c599d733 Error when passing --verbose without --verify or --upload
Since the handling of these options defaults to non-verbose (instead of
the current preference), they make no sense when starting the IDE
normally. Previously, these options would just be ignored in this case,
now an error is shown.
2014-08-19 09:16:47 +02:00
Matthijs Kooijman d3e2208c01 Process some commandline arguments earlier
Previously, the --board and --port arguments were stored in a variable
first and only processed later. Now, the arguments are processed right
away.

This does mean that the arguments are processed when the GUI is not yet
initialized, which caused problems with calling onBoardOrPortChange and
friends from selectBoard. However, since the GUI is not initialized,
there is no real reason to call them either - if we just set the
preferences to the right values, the GUI will be initialized correctly
later. For this reason, selectBoard no longer calls the GUI update
methods. Instead, those are called from the GUI code when the board is
changed through the menu instead (e.g., after calling selectBoard).

This commit slightly changes behaviour. Previously, --board and --port
only worked in combination with --verify and --upload, but were ignored
when just starting the IDE. Now, these are processed regardless of the
other options present.

Additionally, this commit causes all changed preferences to be saved.
Previously, only changes with --pref were saved, --board and --port
options were only active for the current run. This was caused because
the saving of the preferences happened as a side effect of loading the
file in the Editor, but only the --pref option was processed at that
time.

Note that the --verbose options are still only active for the current
run and are only valid combined with --verify or --upload (since they
default to non-verbose instead of the current preference).
2014-08-19 09:16:47 +02:00
Matthijs Kooijman 7301b37c7e Added history section to the manpage
This describes the versions where various options were introduced or
changed.
2014-08-19 09:16:46 +02:00
Matthijs Kooijman 26ac897598 Fix indentation in the manpage 2014-08-19 09:16:46 +02:00
Cristian Maglie d60f1df996 Added command line option --verbose-build and --verbose-upload 2014-02-10 12:55:16 +01:00
Cristian Maglie f876733491 Updated manpage 2014-01-25 23:29:35 +01:00
Matthijs Kooijman fe2bec59b7 Add manual page
This adds a description of commandline options, files used and some
preferences in proper Unix manpage format. It is written in asciidoc,
which can easily be converted to both a native troff manpage, or HTML
(the latter can be done by github on-demand).
2013-12-09 10:56:39 +01:00