Skip to content

Commit 7f67c29

Browse files
committed
move processing-java to /usr/local/bin (fixes processing#3497)
1 parent 3a8f062 commit 7f67c29

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

app/src/processing/app/tools/InstallCommander.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,11 @@ public void run() {
102102
String sourcePath = file.getAbsolutePath();
103103

104104
if (result == JOptionPane.YES_OPTION) {
105-
String targetPath = "/usr/bin/processing-java";
106-
String shellScript = "/bin/mv " + sourcePath + " " + targetPath;
105+
// Moving to /usr/local/bin instead of /usr/bin for compatibility
106+
// with OS X 10.11 and its "System Integrity Protection"
107+
// https://github.com/processing/processing/issues/3497
108+
String targetPath = "/usr/local/bin/processing-java";
109+
String shellScript = "/bin/mkdir -p /usr/local/bin && /bin/mv " + sourcePath + " " + targetPath;
107110
String appleScript =
108111
"do shell script \"" + shellScript + "\" with administrator privileges";
109112
PApplet.exec(new String[] { "osascript", "-e", appleScript });

java/src/processing/mode/java/Commander.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ static void printCommandLine(PrintStream out) {
386386
// out.println(" 32- or 64-bit specific such as the OpenGL library.");
387387
// out.println(" Otherwise specify 0 or leave it out.");
388388

389+
out.println();
389390
out.println("The --build, --run, --present, or --export will be the final parameter");
390391
out.println("passed to Processing. Arguments passed following one of those four will");
391392
out.println("be passed through to the sketch itself, and therefore available to the");

todo.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
0243 (3.0b5)
22

33

4+
earlier
5+
X modify build to insert these after antlr run:
6+
X @SuppressWarnings({"unused", "cast"})
7+
X or get the updated ANTLR, which likely would support it
8+
9+
410
known issues
511
_ launch4j doesn't work from folders with non-native charsets
612
_ anything in CP1252 on an English Windows system is fine
@@ -34,6 +40,8 @@ _ probably have to add the script/Processing.app location to user's path
3440
_ move processing-java inside the Java Mode?
3541
_ make a Tool that installs it for all platforms, not just OS X
3642
_ not really part of the 'build' anymore
43+
_ sketch modified externally with FAT32 volumes on OS X
44+
_ https://github.com/processing/processing/issues/3387
3745

3846

3947
gui
@@ -447,9 +455,6 @@ _ https://github.com/fjenett/processing-preprocessor-antlr4
447455
_ https://github.com/processing/processing/issues/3055
448456
_ update grammar for ANTLR
449457
_ https://github.com/processing/processing/issues/3054
450-
_ modify build to insert these after antlr run:
451-
_ @SuppressWarnings({"unused", "cast"})
452-
_ or get the updated ANTLR, which likely would support it
453458
_ omitting a semicolon shows the error on the line after it
454459
_ npe if library is removed before compile
455460
_ always check library folders to make sure they're still valid

0 commit comments

Comments
 (0)