From c5db8dbb165ea9f2a8d17c47bc216a8e57d78741 Mon Sep 17 00:00:00 2001 From: benfry Date: Sat, 4 Aug 2012 19:30:44 +0000 Subject: [PATCH] add 64-bit version of OS X serial, also add warning about lock files --- core/todo.txt | 6 ++ .../serial/src/processing/serial/Serial.java | 23 +++++++- todo.txt | 59 +++++++++++-------- 3 files changed, 59 insertions(+), 29 deletions(-) diff --git a/core/todo.txt b/core/todo.txt index ef87a81fe..6219fad00 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -2,6 +2,10 @@ X switch link() and others to just use java.awt.Desktop classes X also deprecate param, link() with a target, and others +_ smooth() should be the default in 2.0 +_ broken in the recent releases +_ http://code.google.com/p/processing/issues/detail?id=1157 + _ add notes about the new shader setup fixed in 2.0a7 or earlier @@ -419,6 +423,8 @@ _ http://www.adobe.com/svg/eol.html CORE / OpenGL (Andres) +_ hint(DISABLE_PERSPECTIVE_CORRECTED_STROKE) +_ textureWrap(CLAMP / REPEAT) _ first few frames of OpenGL sketches on Windows run slowly _ http://dev.processing.org/bugs/show_bug.cgi?id=874 _ implement setImpl() instead of set() inside PGraphicsOpenGL diff --git a/java/libraries/serial/src/processing/serial/Serial.java b/java/libraries/serial/src/processing/serial/Serial.java index a6197592a..6dd0bf884 100644 --- a/java/libraries/serial/src/processing/serial/Serial.java +++ b/java/libraries/serial/src/processing/serial/Serial.java @@ -99,7 +99,7 @@ public class Serial implements SerialPortEventListener { public Serial(PApplet parent) { this(parent, dname, drate, dparity, ddatabits, dstopbits); } - + /** * @param irate 9600 is the default */ @@ -129,6 +129,23 @@ public class Serial implements SerialPortEventListener { this.parent = parent; //parent.attach(this); + // On OS X, make sure the lock folder needed by RXTX is present + if (PApplet.platform == PConstants.MACOSX) { + File lockFolder = new File("/var/lock"); + if (!lockFolder.exists() || + !lockFolder.canRead() || + !lockFolder.canWrite() || + !lockFolder.canExecute()) { + final String MESSAGE = + "To use the serial library, first open\n" + + "Applications -> Utilities -> Terminal.app\n" + + "and enter the following:\n" + + "sudo mkdir -p /var/lock\n" + + "sudo chmod 777 /var/lock"; + System.err.println(MESSAGE); + } + } + this.rate = irate; parity = SerialPort.PARITY_NONE; @@ -376,7 +393,7 @@ public class Serial implements SerialPortEventListener { /** - * @generate Serial_readBytes.xml + * @generate Serial_readBytes.xml * @webref serial:serial * @usage web_application */ @@ -587,7 +604,7 @@ public class Serial implements SerialPortEventListener { * If this just hangs and never completes on Windows, * it may be because the DLL doesn't have its exec bit set. * Why the hell that'd be the case, who knows. - * + * * @webref serial * @usage web_application */ diff --git a/todo.txt b/todo.txt index 000662447..5575f4928 100644 --- a/todo.txt +++ b/todo.txt @@ -9,15 +9,35 @@ X with java.awt.Desktop.browse() and java.awt.Desktop.open() X causes a deprecation warning whenever building on osx o instead of "show sketch folder" method, use: The com.apple.eio.FileManager now has two new desktop interaction methods, revealInFinder(File) and moveToTrash(File). You can use revealInFinder() to open a Finder window in the parent directory of of a file and select it. You can use moveToTrash() to move a file to the most appropriate Trash directory for the volume that contains that file. +X added 64-bit RXTX for Mac OS X +X http://blog.iharder.net/2009/08/18/rxtx-java-6-and-librxtxserial-jnilib-on-intel-mac-os-x/ +X add warning message about using serial on OS X +_ check on other serial issues, this may fix them -_ First doubleclick immediately closes example folder -_ http://code.google.com/p/processing/issues/detail?id=1150 +cleaning +o switching into present mode in info.plist +o LSUIPresentationMode +o 4 +o errors with serial and libraries +Exception in thread "Thread-2" java.lang.NoClassDefFoundError: +processing/core/PApplet + at processing.serial.Serial.(Serial.java:156) +generally, that error means that something is missing from the +CLASSPATH. the NoClassDefError gives erroneous feedback about *what* +class is actually missing, as of java 1.3+ (yay!) +so perhaps conflicting versions of a library in the sketchbook (solve +this by setting to an empty sketchbook temporarily) or files might be +installed in the CLASSPATH variable or something conflicting in +/System/Library/Extensions. earlier X the word from Apple on Info.plist setup X DO NOT USE "JVMArchs". It is deprecated, and manually overrides the natural architecture launching and ordering that LaunchServices does, including accommodating the 32-bit checkbox in the Get Info window. -http://code.google.com/p/processing/issues/list?can=2&q=owner%3Afry%40processing.org+Type%3ADefect&colspec=Stars+ID+Type+Status+Priority+Owner+Summary&cells=tiles +_ figure out why modes are not loading classes properly + +_ First doubleclick immediately closes example folder +_ http://code.google.com/p/processing/issues/detail?id=1150 with casey _ does editor.bgcolor live in the theme.txt file for the mode? @@ -139,8 +159,6 @@ _ throws you onto the end of the last tab... exactly the worst location _ jer: omitting a semicolon shows the error on the line after it... _ find across all tabs (jer request) _ http://code.google.com/p/processing/issues/detail?id=25 -_ serial still causing problems on OS X -_ http://code.google.com/p/processing/issues/detail?id=52 reference/examples _ import p5 reference into the javadoc @@ -459,6 +477,7 @@ X nice idea but too error-prone DOC / Write Me _ stop() to shut down a sketch (but not quit/close window) +_ actually pause/resume _ MIN_FLOAT, MAX_FLOAT, also the difference from the Java functions _ also MIN_INT and MAX_INT, even though those are more similar _ update the reference to cover parseXxxx() stuff @@ -489,31 +508,14 @@ An unexpected error has been detected by HotSpot Virtual Machine: # EXCEPTION_ACCESS_VIOLATION all i can do is find things that might trigger them, but it's more likely than not to be a java problem, and not something that can be fixed -_ explanation of we see libraries on desktop +_ explanation of how we see libraries in the PDE _ We're making an assumption that the idea of a "library" refers to a block of Java-based code. The reasoning is that from within the PDE, we anticipate that it will be Java-compatible versions of other languages (such as Jython, JRuby, or Scala) as opposed to more generic languages. In the future we could open this up, but we'd rather not complicate things for the moment. - _ add to troubleshooting -_ problem with big floats: -_ http://processing.org/discourse/yabb/YaBB.cgi?board=Syntax;action=display;num=1061302380 -_ problem with small floats: -_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Programs;action=display;num=1115500448 -_ consoleXxxx and untitledXxxx folders in /tmp +_ problem with big floats: http://processing.org/discourse/yabb/YaBB.cgi?board=Syntax;action=display;num=1061302380 +_ problem with small floats: http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Programs;action=display;num=1115500448 +_ console stored in prefs location _ console may be useful for debugging _ untitled folders are stored in temp folder -_ switching into present mode in info.plist - LSUIPresentationMode - 4 -_ errors with serial and libraries -Exception in thread "Thread-2" java.lang.NoClassDefFoundError: -processing/core/PApplet - at processing.serial.Serial.(Serial.java:156) -generally, that error means that something is missing from the -CLASSPATH. the NoClassDefError gives erroneous feedback about *what* -class is actually missing, as of java 1.3+ (yay!) -so perhaps conflicting versions of a library in the sketchbook (solve -this by setting to an empty sketchbook temporarily) or files might be -installed in the CLASSPATH variable or something conflicting in -/System/Library/Extensions. DOC / Text @@ -1053,6 +1055,9 @@ _ http://dev.processing.org/bugs/show_bug.cgi?id=1345 LIBRARIES / Serial +_ check on 64-bit RXTX libraries in the Arduino downloads +_ serial still causing problems on OS X +_ http://code.google.com/p/processing/issues/detail?id=52 _ serial ports missing from list _ http://code.google.com/p/processing/issues/detail?id=52 _ Serial.write problem with Bluetooth SPP virtual serial port @@ -1123,6 +1128,8 @@ _ http://dev.processing.org/bugs/show_bug.cgi?id=1567 DIST / Mac OS X +_ look into LCD rendering problems w/ Java (see if Lion still a problem) +_ fonts were showing up with very different fatness _ check on new JDK and how it works on OS X _ http://jdk7.java.net/macportpreview/ _ very slow startup on OS X (library manager et al?)