mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-15 12:29:26 +01:00
Parse --curdir in Base.main()
This shouldn't change any behaviour, but prepares for upcoming changes.
This commit is contained in:
parent
cf4fb7d0e3
commit
87bdaa88cd
@ -117,6 +117,10 @@ public class Base {
|
|||||||
// Location for untitled items
|
// Location for untitled items
|
||||||
static File untitledFolder;
|
static File untitledFolder;
|
||||||
|
|
||||||
|
// Current directory to use for relative paths specified on the
|
||||||
|
// commandline
|
||||||
|
static String currentDirectory = System.getProperty("user.dir");
|
||||||
|
|
||||||
// p5 icon for the window
|
// p5 icon for the window
|
||||||
// static Image icon;
|
// static Image icon;
|
||||||
|
|
||||||
@ -150,6 +154,12 @@ public class Base {
|
|||||||
if (args[i].equals("--preferences-file")) {
|
if (args[i].equals("--preferences-file")) {
|
||||||
++i;
|
++i;
|
||||||
preferencesFile = new File(args[i]);
|
preferencesFile = new File(args[i]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (args[i].equals("--curdir")) {
|
||||||
|
i++;
|
||||||
|
currentDirectory = args[i];
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -339,7 +349,6 @@ public class Base {
|
|||||||
String getPref = null;
|
String getPref = null;
|
||||||
String selectBoard = null;
|
String selectBoard = null;
|
||||||
String selectPort = null;
|
String selectPort = null;
|
||||||
String currentDirectory = System.getProperty("user.dir");
|
|
||||||
List<String> filenames = new LinkedList<String>();
|
List<String> filenames = new LinkedList<String>();
|
||||||
|
|
||||||
// Map of possible actions and corresponding options
|
// Map of possible actions and corresponding options
|
||||||
@ -398,7 +407,7 @@ public class Base {
|
|||||||
i++;
|
i++;
|
||||||
if (i >= args.length)
|
if (i >= args.length)
|
||||||
showError(null, _("Argument required for --curdir"), 3);
|
showError(null, _("Argument required for --curdir"), 3);
|
||||||
currentDirectory = args[i];
|
// Argument should be already processed by Base.main(...)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (args[i].equals("--pref")) {
|
if (args[i].equals("--pref")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user