diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 48a98e3a2..4de136b0b 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -361,14 +361,14 @@ public class Base { i++; if (i >= args.length) showError(null, _("Argument required for --board"), 3); - selectBoard = args[i]; + processBoardArgument(args[i]); continue; } if (args[i].equals("--port")) { i++; if (i >= args.length) showError(null, _("Argument required for --port"), 3); - selectPort = args[i]; + Base.selectSerialPort(args[i]); continue; } if (args[i].equals("--curdir")) { @@ -439,13 +439,8 @@ public class Base { Editor editor = editors.get(0); - // Do board selection if requested - processBoardArgument(selectBoard); - if (action == ACTION.UPLOAD) { // Build and upload - if (selectPort != null) - editor.selectSerialPort(selectPort); editor.exportHandler.run(); } else { // Build only @@ -1456,6 +1451,11 @@ public class Base { Action action = new AbstractAction(board.getName()) { public void actionPerformed(ActionEvent actionevent) { selectBoard((TargetBoard)getValue("b")); + filterVisibilityOfSubsequentBoardMenus((TargetBoard)getValue("b"), 1); + + onBoardOrPortChange(); + rebuildImportMenu(Editor.importMenu); + rebuildExamplesMenu(Editor.examplesMenu); } }; action.putValue("b", board); @@ -1592,12 +1592,6 @@ public class Base { File platformFolder = targetPlatform.getFolder(); Preferences.set("runtime.platform.path", platformFolder.getAbsolutePath()); Preferences.set("runtime.hardware.path", platformFolder.getParentFile().getAbsolutePath()); - - filterVisibilityOfSubsequentBoardMenus(targetBoard, 1); - - onBoardOrPortChange(); - rebuildImportMenu(Editor.importMenu); - rebuildExamplesMenu(Editor.examplesMenu); } public static void selectSerialPort(String port) { diff --git a/build/shared/manpage.adoc b/build/shared/manpage.adoc index 0ee60f654..f35e34ce2 100644 --- a/build/shared/manpage.adoc +++ b/build/shared/manpage.adoc @@ -75,6 +75,8 @@ OPTIONS {empty}:: If this option is not passed, the value from the current preferences is used (e.g., the last board selected in the IDE). + If this option is given, the value passed is written to the + preferences file and rememberd for subsequent runs. *--port* __portname__:: Select the serial port to perform upload of the sketch. @@ -85,6 +87,8 @@ OPTIONS {empty}:: If this option is not passed, the value from the current preferences is used (e.g., the last port selected in the IDE). + If this option is given, the value passed is written to the + preferences file and rememberd for subsequent runs. *--verbose-build*:: Enable verbose mode during build. If this option is not given, @@ -108,16 +112,15 @@ OPTIONS *--pref* __name__=__value__:: Sets the preference __name__ to the given __value__. -{empty}:: - Currently the preferences set are saved to 'preferences.txt', but - this might change in the future (making them only active during - the current invocation). - {empty}:: Note that the preferences you set with this option are not validated: Invalid names will be set but never used, invalid values might lead to an error later on. +{empty}:: + If this option is given, the value passed is written to the + preferences file and rememberd for subsequent runs. + *--upload*:: Build and upload the sketch. @@ -237,6 +240,11 @@ HISTORY longer shown. Error messages still use a graphical popup and on Windows, the splash screen is still shown. +1.5.7:: + *--board* and *--port* options are now saved to the preferences + file, just like *--pref*. The *--verbose* options still only + apply to the current run. + RESOURCES --------- Web site: