Skip to content

Commit c2cb2d3

Browse files
committed
add 64-bit version of OS X serial, also add warning about lock files
1 parent 2c925cf commit c2cb2d3

File tree

5 files changed

+60
-30
lines changed

5 files changed

+60
-30
lines changed

core/todo.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
X switch link() and others to just use java.awt.Desktop classes
33
X also deprecate param, link() with a target, and others
44

5+
_ smooth() should be the default in 2.0
6+
_ broken in the recent releases
7+
_ http://code.google.com/p/processing/issues/detail?id=1157
8+
59
_ add notes about the new shader setup
610

711
fixed in 2.0a7 or earlier
@@ -419,6 +423,8 @@ _ http://www.adobe.com/svg/eol.html
419423

420424
CORE / OpenGL (Andres)
421425

426+
_ hint(DISABLE_PERSPECTIVE_CORRECTED_STROKE)
427+
_ textureWrap(CLAMP / REPEAT)
422428
_ first few frames of OpenGL sketches on Windows run slowly
423429
_ http://dev.processing.org/bugs/show_bug.cgi?id=874
424430
_ implement setImpl() instead of set() inside PGraphicsOpenGL
229 KB
Binary file not shown.
-265 KB
Binary file not shown.

java/libraries/serial/src/processing/serial/Serial.java

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public void setProperties(Properties props) {
9999
public Serial(PApplet parent) {
100100
this(parent, dname, drate, dparity, ddatabits, dstopbits);
101101
}
102-
102+
103103
/**
104104
* @param irate 9600 is the default
105105
*/
@@ -129,6 +129,23 @@ public Serial(PApplet parent, String iname, int irate,
129129
this.parent = parent;
130130
//parent.attach(this);
131131

132+
// On OS X, make sure the lock folder needed by RXTX is present
133+
if (PApplet.platform == PConstants.MACOSX) {
134+
File lockFolder = new File("/var/lock");
135+
if (!lockFolder.exists() ||
136+
!lockFolder.canRead() ||
137+
!lockFolder.canWrite() ||
138+
!lockFolder.canExecute()) {
139+
final String MESSAGE =
140+
"To use the serial library, first open\n" +
141+
"Applications -> Utilities -> Terminal.app\n" +
142+
"and enter the following:\n" +
143+
"sudo mkdir -p /var/lock\n" +
144+
"sudo chmod 777 /var/lock";
145+
System.err.println(MESSAGE);
146+
}
147+
}
148+
132149
this.rate = irate;
133150

134151
parity = SerialPort.PARITY_NONE;
@@ -376,7 +393,7 @@ public char lastChar() {
376393

377394

378395
/**
379-
* @generate Serial_readBytes.xml
396+
* @generate Serial_readBytes.xml
380397
* @webref serial:serial
381398
* @usage web_application
382399
*/
@@ -587,7 +604,7 @@ public void write(String what) {
587604
* If this just hangs and never completes on Windows,
588605
* it may be because the DLL doesn't have its exec bit set.
589606
* Why the hell that'd be the case, who knows.
590-
*
607+
*
591608
* @webref serial
592609
* @usage web_application
593610
*/

todo.txt

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,35 @@ X with java.awt.Desktop.browse() and java.awt.Desktop.open()
99
X causes a deprecation warning whenever building on osx
1010
o instead of "show sketch folder" method, use:
1111
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.
12-
13-
_ First doubleclick immediately closes example folder
14-
_ http://code.google.com/p/processing/issues/detail?id=1150
12+
X added 64-bit RXTX for Mac OS X
13+
X http://blog.iharder.net/2009/08/18/rxtx-java-6-and-librxtxserial-jnilib-on-intel-mac-os-x/
14+
X add warning message about using serial on OS X
15+
_ check on other serial issues, this may fix them
16+
17+
cleaning
18+
o switching into present mode in info.plist
19+
o <key>LSUIPresentationMode</key>
20+
o <integer>4</integer>
21+
o errors with serial and libraries
22+
Exception in thread "Thread-2" java.lang.NoClassDefFoundError:
23+
processing/core/PApplet
24+
at processing.serial.Serial.<init>(Serial.java:156)
25+
generally, that error means that something is missing from the
26+
CLASSPATH. the NoClassDefError gives erroneous feedback about *what*
27+
class is actually missing, as of java 1.3+ (yay!)
28+
so perhaps conflicting versions of a library in the sketchbook (solve
29+
this by setting to an empty sketchbook temporarily) or files might be
30+
installed in the CLASSPATH variable or something conflicting in
31+
/System/Library/Extensions.
1532

1633
earlier
1734
X the word from Apple on Info.plist setup
1835
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.
1936

20-
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
37+
_ figure out why modes are not loading classes properly
38+
39+
_ First doubleclick immediately closes example folder
40+
_ http://code.google.com/p/processing/issues/detail?id=1150
2141

2242
with casey
2343
_ 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
139159
_ jer: omitting a semicolon shows the error on the line after it...
140160
_ find across all tabs (jer request)
141161
_ http://code.google.com/p/processing/issues/detail?id=25
142-
_ serial still causing problems on OS X
143-
_ http://code.google.com/p/processing/issues/detail?id=52
144162

145163
reference/examples
146164
_ import p5 reference into the javadoc
@@ -459,6 +477,7 @@ X nice idea but too error-prone
459477
DOC / Write Me
460478

461479
_ stop() to shut down a sketch (but not quit/close window)
480+
_ actually pause/resume
462481
_ MIN_FLOAT, MAX_FLOAT, also the difference from the Java functions
463482
_ also MIN_INT and MAX_INT, even though those are more similar
464483
_ update the reference to cover parseXxxx() stuff
@@ -489,31 +508,14 @@ An unexpected error has been detected by HotSpot Virtual Machine:
489508
# EXCEPTION_ACCESS_VIOLATION
490509
all i can do is find things that might trigger them, but it's more likely
491510
than not to be a java problem, and not something that can be fixed
492-
_ explanation of we see libraries on desktop
511+
_ explanation of how we see libraries in the PDE
493512
_ 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.
494-
495513
_ add to troubleshooting
496-
_ problem with big floats:
497-
_ http://processing.org/discourse/yabb/YaBB.cgi?board=Syntax;action=display;num=1061302380
498-
_ problem with small floats:
499-
_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Programs;action=display;num=1115500448
500-
_ consoleXxxx and untitledXxxx folders in /tmp
514+
_ problem with big floats: http://processing.org/discourse/yabb/YaBB.cgi?board=Syntax;action=display;num=1061302380
515+
_ problem with small floats: http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Programs;action=display;num=1115500448
516+
_ console stored in prefs location
501517
_ console may be useful for debugging
502518
_ untitled folders are stored in temp folder
503-
_ switching into present mode in info.plist
504-
<key>LSUIPresentationMode</key>
505-
<integer>4</integer>
506-
_ errors with serial and libraries
507-
Exception in thread "Thread-2" java.lang.NoClassDefFoundError:
508-
processing/core/PApplet
509-
at processing.serial.Serial.<init>(Serial.java:156)
510-
generally, that error means that something is missing from the
511-
CLASSPATH. the NoClassDefError gives erroneous feedback about *what*
512-
class is actually missing, as of java 1.3+ (yay!)
513-
so perhaps conflicting versions of a library in the sketchbook (solve
514-
this by setting to an empty sketchbook temporarily) or files might be
515-
installed in the CLASSPATH variable or something conflicting in
516-
/System/Library/Extensions.
517519

518520

519521
DOC / Text
@@ -1053,6 +1055,9 @@ _ http://dev.processing.org/bugs/show_bug.cgi?id=1345
10531055

10541056
LIBRARIES / Serial
10551057

1058+
_ check on 64-bit RXTX libraries in the Arduino downloads
1059+
_ serial still causing problems on OS X
1060+
_ http://code.google.com/p/processing/issues/detail?id=52
10561061
_ serial ports missing from list
10571062
_ http://code.google.com/p/processing/issues/detail?id=52
10581063
_ Serial.write problem with Bluetooth SPP virtual serial port
@@ -1123,6 +1128,8 @@ _ http://dev.processing.org/bugs/show_bug.cgi?id=1567
11231128

11241129
DIST / Mac OS X
11251130

1131+
_ look into LCD rendering problems w/ Java (see if Lion still a problem)
1132+
_ fonts were showing up with very different fatness
11261133
_ check on new JDK and how it works on OS X
11271134
_ http://jdk7.java.net/macportpreview/
11281135
_ very slow startup on OS X (library manager et al?)

0 commit comments

Comments
 (0)