mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
command line now working
This commit is contained in:
@@ -88,7 +88,7 @@ public class Commander {
|
||||
} else if (arg.equals(exportApplicationArg)) {
|
||||
mode = EXPORT_APPLICATION;
|
||||
|
||||
} else if (arg.equals(platformArg)) {
|
||||
} else if (arg.startsWith(platformArg)) {
|
||||
String platformStr = arg.substring(platformArg.length());
|
||||
platformIndex = Base.getPlatformIndex(platformStr);
|
||||
if (platformIndex == -1) {
|
||||
@@ -103,6 +103,9 @@ public class Commander {
|
||||
|
||||
} else if (arg.startsWith(outputArg)) {
|
||||
outputPath = arg.substring(outputArg.length());
|
||||
|
||||
} else {
|
||||
complainAndQuit("I don't know anything about " + arg + ".");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,6 +114,13 @@ public class Commander {
|
||||
complainAndQuit("Output path must be specified when using " +
|
||||
preprocArg + ", " + buildArg + ", or " + runArg + ".");
|
||||
}
|
||||
|
||||
File outputFolder = new File(outputPath);
|
||||
if (!outputFolder.exists()) {
|
||||
if (!outputFolder.mkdirs()) {
|
||||
complainAndQuit("Could not create the output folder.");
|
||||
}
|
||||
}
|
||||
|
||||
// run static initialization that grabs all the prefs
|
||||
// (also pass in a prefs path if that was specified)
|
||||
|
||||
@@ -197,7 +197,9 @@ public class Sketch {
|
||||
sortCode();
|
||||
|
||||
// set the main file to be the current tab
|
||||
setCurrentCode(0);
|
||||
if (editor != null) {
|
||||
setCurrentCode(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1043,26 +1045,8 @@ public class Sketch {
|
||||
|
||||
current = code[which];
|
||||
currentIndex = which;
|
||||
|
||||
editor.setCode(current);
|
||||
//editor.setDocument(current.document,
|
||||
// current.selectionStart, current.selectionStop,
|
||||
// current.scrollPosition, current.undo);
|
||||
|
||||
// set to the text for this file
|
||||
// 'true' means to wipe out the undo buffer
|
||||
// (so they don't undo back to the other file.. whups!)
|
||||
/*
|
||||
editor.setText(current.program,
|
||||
current.selectionStart, current.selectionStop,
|
||||
current.undo);
|
||||
*/
|
||||
|
||||
// set stored caret and scroll positions
|
||||
//editor.textarea.setScrollPosition(current.scrollPosition);
|
||||
//editor.textarea.select(current.selectionStart, current.selectionStop);
|
||||
//editor.textarea.setSelectionStart(current.selectionStart);
|
||||
//editor.textarea.setSelectionEnd(current.selectionStop);
|
||||
|
||||
editor.header.rebuild();
|
||||
}
|
||||
|
||||
|
||||
Vendored
+3
-1
@@ -15,4 +15,6 @@ export CLASSPATH
|
||||
|
||||
export PATH="${APPDIR}/java/bin:${PATH}"
|
||||
|
||||
java processing.app.Commander $*
|
||||
#java processing.app.Commander $*
|
||||
# if you know a better way to do this, submit it to dev.processing.org/bugs
|
||||
java processing.app.Commander "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
|
||||
|
||||
@@ -51,6 +51,7 @@ o you wait for the images to download (size is zero until they're ready)
|
||||
o MediaTracker blocking is prolly making jar download really slow
|
||||
o http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1089914280
|
||||
|
||||
_ javadoc comment in a static mode app doesn't get moved to the top
|
||||
|
||||
reference
|
||||
_ do some edits on the "getting started" text
|
||||
|
||||
Reference in New Issue
Block a user