command line now working

This commit is contained in:
benfry
2008-09-20 20:37:57 +00:00
parent 165cd5a60f
commit 5d86b4151b
4 changed files with 19 additions and 22 deletions
+11 -1
View File
@@ -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)
+4 -20
View File
@@ -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();
}
+3 -1
View File
@@ -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"
+1
View File
@@ -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