From 3a032ac3705b94eda49bc94afb3a6c0c55437e0b Mon Sep 17 00:00:00 2001 From: Jonathan Feinberg Date: Mon, 14 Apr 2014 15:52:05 -0400 Subject: [PATCH 1/5] Allow user to suppress JVM warning if they know what they're doing. --- .../app/platform/LinuxPlatform.java | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/app/src/processing/app/platform/LinuxPlatform.java b/app/src/processing/app/platform/LinuxPlatform.java index 8e9ee7c71..d1dc0451f 100644 --- a/app/src/processing/app/platform/LinuxPlatform.java +++ b/app/src/processing/app/platform/LinuxPlatform.java @@ -31,21 +31,26 @@ import processing.app.Preferences; public class LinuxPlatform extends Platform { + private static final boolean SUPPRESS_JVM_WARNING = + Boolean.parseBoolean(System.getProperty("SUPPRESS_JVM_WARNING", "false")); + public void init(Base base) { super.init(base); - String javaVendor = System.getProperty("java.vendor"); - String javaVM = System.getProperty("java.vm.name"); - if (javaVendor == null || - (!javaVendor.contains("Sun") && !javaVendor.contains("Oracle")) || - javaVM == null || !javaVM.contains("Java")) { - Base.showWarning("Not fond of this Java VM", - "Processing requires Java 6 from Sun (i.e. the sun-java-jdk\n" + - "package on Ubuntu). Other versions such as OpenJDK, IcedTea,\n" + - "and GCJ are strongly discouraged. Among other things, you're\n" + - "likely to run into problems with sketch window size and\n" + - "placement. For more background, please read the wiki:\n" + - "http://wiki.processing.org/w/Supported_Platforms#Linux", null); + if (!SUPPRESS_JVM_WARNING) { + final String javaVendor = System.getProperty("java.vendor"); + final String javaVM = System.getProperty("java.vm.name"); + if (javaVendor == null || + (!javaVendor.contains("Sun") && !javaVendor.contains("Oracle")) || + javaVM == null || !javaVM.contains("Java")) { + Base.showWarning("Not fond of this Java VM", + "Processing requires Java 6 from Sun (i.e. the sun-java-jdk\n" + + "package on Ubuntu). Other versions such as OpenJDK, IcedTea,\n" + + "and GCJ are strongly discouraged. Among other things, you're\n" + + "likely to run into problems with sketch window size and\n" + + "placement. For more background, please read the wiki:\n" + + "http://wiki.processing.org/w/Supported_Platforms#Linux", null); + } } } From 563a5f3c6bbe383480d512e3a9b2c57e69e7bbb1 Mon Sep 17 00:00:00 2001 From: Jonathan Feinberg Date: Mon, 14 Apr 2014 15:53:19 -0400 Subject: [PATCH 2/5] Permit Modes to specify different default file extension for auxilliary (not main pde) files created in new tabs. --- app/src/processing/app/Mode.java | 12 ++++++++++++ app/src/processing/app/Sketch.java | 5 +---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/src/processing/app/Mode.java b/app/src/processing/app/Mode.java index dc609ae81..741474606 100644 --- a/app/src/processing/app/Mode.java +++ b/app/src/processing/app/Mode.java @@ -1046,6 +1046,18 @@ public abstract class Mode { abstract public String getDefaultExtension(); + /** + * Returns the appropriate file extension to use for auxilliary source files in a sketch. + * For example, in a Java-mode sketch, auxilliary files should be name "Foo.java"; in + * Python mode, they should be named "foo.py". + * + *

Modes that do not override this function will get the default behavior of returning the + * default extension. + */ + public String getModuleExtension() { + return getDefaultExtension(); + } + /** * Returns a String[] array of proper extensions. diff --git a/app/src/processing/app/Sketch.java b/app/src/processing/app/Sketch.java index 198eadeec..20e96b56e 100644 --- a/app/src/processing/app/Sketch.java +++ b/app/src/processing/app/Sketch.java @@ -333,9 +333,6 @@ public class Sketch { /** * This is called upon return from entering a new file name. * (that is, from either newCode or renameCode after the prompt) - * This code is almost identical for both the newCode and renameCode - * cases, so they're kept merged except for right in the middle - * where they diverge. */ protected void nameCode(String newName) { newName = newName.trim(); @@ -348,7 +345,7 @@ public class Sketch { // Add the extension here, this simplifies some of the logic below. if (newName.indexOf('.') == -1) { - newName += "." + mode.getDefaultExtension(); + newName += "." + (renamingCode ? mode.getDefaultExtension() : mode.getModuleExtension()); } // if renaming to the same thing as before, just ignore. From 9b14288d48bb4c56ea647826d1c4f5f1233f1ad7 Mon Sep 17 00:00:00 2001 From: Jonathan Feinberg Date: Mon, 14 Apr 2014 17:56:44 -0400 Subject: [PATCH 3/5] Roll back ability to silence JVM warning. --- .../app/platform/LinuxPlatform.java | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/app/src/processing/app/platform/LinuxPlatform.java b/app/src/processing/app/platform/LinuxPlatform.java index d1dc0451f..8e9ee7c71 100644 --- a/app/src/processing/app/platform/LinuxPlatform.java +++ b/app/src/processing/app/platform/LinuxPlatform.java @@ -31,26 +31,21 @@ import processing.app.Preferences; public class LinuxPlatform extends Platform { - private static final boolean SUPPRESS_JVM_WARNING = - Boolean.parseBoolean(System.getProperty("SUPPRESS_JVM_WARNING", "false")); - public void init(Base base) { super.init(base); - if (!SUPPRESS_JVM_WARNING) { - final String javaVendor = System.getProperty("java.vendor"); - final String javaVM = System.getProperty("java.vm.name"); - if (javaVendor == null || - (!javaVendor.contains("Sun") && !javaVendor.contains("Oracle")) || - javaVM == null || !javaVM.contains("Java")) { - Base.showWarning("Not fond of this Java VM", - "Processing requires Java 6 from Sun (i.e. the sun-java-jdk\n" + - "package on Ubuntu). Other versions such as OpenJDK, IcedTea,\n" + - "and GCJ are strongly discouraged. Among other things, you're\n" + - "likely to run into problems with sketch window size and\n" + - "placement. For more background, please read the wiki:\n" + - "http://wiki.processing.org/w/Supported_Platforms#Linux", null); - } + String javaVendor = System.getProperty("java.vendor"); + String javaVM = System.getProperty("java.vm.name"); + if (javaVendor == null || + (!javaVendor.contains("Sun") && !javaVendor.contains("Oracle")) || + javaVM == null || !javaVM.contains("Java")) { + Base.showWarning("Not fond of this Java VM", + "Processing requires Java 6 from Sun (i.e. the sun-java-jdk\n" + + "package on Ubuntu). Other versions such as OpenJDK, IcedTea,\n" + + "and GCJ are strongly discouraged. Among other things, you're\n" + + "likely to run into problems with sketch window size and\n" + + "placement. For more background, please read the wiki:\n" + + "http://wiki.processing.org/w/Supported_Platforms#Linux", null); } } From 34b1eef4f8871122c6668908198745be1e51a3c9 Mon Sep 17 00:00:00 2001 From: Jonathan Feinberg Date: Mon, 14 Apr 2014 15:53:19 -0400 Subject: [PATCH 4/5] Permit Modes to specify different default file extension for auxilliary (not main pde) files created in new tabs. --- app/src/processing/app/Mode.java | 12 ++++++++++++ app/src/processing/app/Sketch.java | 5 +---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/src/processing/app/Mode.java b/app/src/processing/app/Mode.java index dc609ae81..741474606 100644 --- a/app/src/processing/app/Mode.java +++ b/app/src/processing/app/Mode.java @@ -1046,6 +1046,18 @@ public abstract class Mode { abstract public String getDefaultExtension(); + /** + * Returns the appropriate file extension to use for auxilliary source files in a sketch. + * For example, in a Java-mode sketch, auxilliary files should be name "Foo.java"; in + * Python mode, they should be named "foo.py". + * + *

Modes that do not override this function will get the default behavior of returning the + * default extension. + */ + public String getModuleExtension() { + return getDefaultExtension(); + } + /** * Returns a String[] array of proper extensions. diff --git a/app/src/processing/app/Sketch.java b/app/src/processing/app/Sketch.java index 198eadeec..20e96b56e 100644 --- a/app/src/processing/app/Sketch.java +++ b/app/src/processing/app/Sketch.java @@ -333,9 +333,6 @@ public class Sketch { /** * This is called upon return from entering a new file name. * (that is, from either newCode or renameCode after the prompt) - * This code is almost identical for both the newCode and renameCode - * cases, so they're kept merged except for right in the middle - * where they diverge. */ protected void nameCode(String newName) { newName = newName.trim(); @@ -348,7 +345,7 @@ public class Sketch { // Add the extension here, this simplifies some of the logic below. if (newName.indexOf('.') == -1) { - newName += "." + mode.getDefaultExtension(); + newName += "." + (renamingCode ? mode.getDefaultExtension() : mode.getModuleExtension()); } // if renaming to the same thing as before, just ignore. From 75e238462c53cb6d74d7bef04c7c2ec0428c4d90 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Tue, 15 Apr 2014 12:55:40 -0400 Subject: [PATCH 5/5] release notes and merges --- build/shared/revisions.txt | 10 +++++++++- todo.txt | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index 304242672..d0d06dd06 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -1,4 +1,4 @@ -PROCESSING 2.1.2 (REV 0225) - 11 April 2014 +PROCESSING 2.1.2 (REV 0225) - 15 April 2014 Lots of small bug fixes plus some additional changes to support the new Python Mode, coming soon: https://github.com/jdf/processing.py @@ -6,6 +6,11 @@ the new Python Mode, coming soon: https://github.com/jdf/processing.py [ the pde ] ++ The PDE was using 15% of CPU while just sitting idle. Thanks to + David Fokkema for the fix (and pull request). + https://github.com/processing/processing/issues/1561 + https://github.com/processing/processing/pull/2451 + + Fix exception caused by Runner when it can't find location https://github.com/processing/processing/issues/2346 https://github.com/processing/processing/pull/2359 @@ -22,6 +27,9 @@ the new Python Mode, coming soon: https://github.com/jdf/processing.py + Remove some hardcoding for .pde as extension https://github.com/processing/processing/issues/2420 ++ Update code signing for Processing.app for Mavericks changes + https://github.com/processing/processing/issues/2453 + [ the core ] diff --git a/todo.txt b/todo.txt index d8d7f630b..f4cf7a868 100644 --- a/todo.txt +++ b/todo.txt @@ -18,6 +18,8 @@ X https://github.com/processing/processing/issues/2453 o use --deep for codesign to work? (nope) o http://furbo.org/2013/10/17/code-signing-and-mavericks/ o http://brockerhoff.net/RB/AppCheckerLite/ +J permit modes to specify alternate extension (.py for .pyde stuff) +J https://github.com/processing/processing/pull/2452 high