add command line args to exported sketch on Linux (issue #1359)

This commit is contained in:
benfry
2012-11-24 18:28:48 +00:00
parent c88cf2c1be
commit bfef0d6bc8
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -1458,8 +1458,8 @@ public class JavaBuild {
File shellScript = new File(destFolder, sketch.getName());
PrintWriter pw = PApplet.createWriter(shellScript);
// do the newlines explicitly so that windows CRLF
// isn't used when exporting for unix
// Do the newlines explicitly so that Windows CRLF
// isn't used when exporting for Unix.
pw.print("#!/bin/sh\n\n");
//ps.print("APPDIR=`dirname $0`\n");
pw.print("APPDIR=$(dirname \"$0\")\n"); // more posix compliant
@@ -1468,7 +1468,7 @@ public class JavaBuild {
pw.print("java " + Preferences.get("run.options") +
" -Djava.library.path=\"$APPDIR:$APPDIR/lib\"" +
" -cp \"" + exportClassPath + "\"" +
" " + sketch.getName() + "\n");
" " + sketch.getName() + " \"$@\"\n");
pw.flush();
pw.close();
+4 -4
View File
@@ -19,8 +19,12 @@ import java.io.PrintWriter;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
X error lines from Commander should be 1-indexed not 0-indexed
X http://code.google.com/p/processing/issues/detail?id=1392
_ fix the debug stuff before shipping this out
_ DebugMode throwing exception about breakpoints when trying to save
X Sketch that exported to Linux doesn't get the command line arguments
X http://code.google.com/p/processing/issues/detail?id=1359
earlier
X The sketch name can't begin with '_' (underscore)
@@ -30,10 +34,6 @@ _ clientEvent() called even w/o data from server (with fix)
_ http://code.google.com/p/processing/issues/detail?id=189
_ check on adding ip() method
_ Sketch that exported to Linux doesn't get the command line arguments
_ http://code.google.com/p/processing/issues/detail?id=1359
_ if RuntimeException thrown, needs to check if it's a wrapped exception
_ for instance, if there's a crash inside makeGraphics()