Skip to content

Commit

Permalink
add information for adding the rxtx library to OS X Snow Leopard
Browse files Browse the repository at this point in the history
  • Loading branch information
samaaron committed Feb 23, 2010
1 parent dc75f72 commit 8c031fe
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
40 changes: 40 additions & 0 deletions GETTING-STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,45 @@ Polynome has a number of dependencies that need to be on your system for it to w
lein deps


Install dxtx Libraries
----------------------

Due to the ridiculous fact that the JVM doesn't ship with a serial library, you'll need to install the dxtx library for your system.

**OS X 10.6 (Snow Leopard)**

First up, you need the latest Developer tools installed (http://developer.apple.com/tools/). If you're unsure whether you have this installed, open a terminal and type:

gcc --version

You should see something this if you already have the Developer tools:

i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) (dot 1)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

Next, unzip and compile the library:

cd extras/rxtx/osx/
unzip rxtx-2-1.1-7r2.zip
cd rxtx-2.1-7r2
./configure
make

Copy the libraries to the system Java extension dir:

cp RXTXcomm.jar /Library/Java/Extensions
cp i686-apple-darwin10.2.0/librxtxSerial.jnilib /Library/Java/Extensions

Finally run the fix permission shell script and add yourself to the uucp group:

cd ../ #you should now be in extras/rxtx/osx/
sudo sh fix_permissions.sh
sudo dscl . -append /Groups/uucp GroupMembership <your usename>






24 changes: 24 additions & 0 deletions extras/rxtx/osx/fix_permissions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

# A script to fix permissions for lock files on Mac OS X
# Contributed by Dmitry Markman <dimitry.markman@verizon.net>
# Fri Aug 23 15:46:46 MDT 2002
# Adapted for RXTX 2.1-7 by LA3HM 30 Jul 2006
# Replaced 'niutil' with 'dscl' for (Snow) Leopard

# You may need to run the following after:
# sudo dscl . -append /Groups/uucp GroupMembership <your usename>

curruser=`sudo id -p | grep 'login' | sed 's/login.//'`

if [ ! -d /var/lock ]
then
sudo mkdir /var/lock
fi

sudo chgrp uucp /var/lock
sudo chmod 775 /var/lock
if [ ! `sudo dscl . -read / /groups/_uucp users | grep $curruser > /dev/null` ]
then
sudo dscl . -append /groups/_uucp GroupMembership $curruser
fi
Binary file added extras/rxtx/osx/rxtx-2-1.1-7r2.zip
Binary file not shown.

0 comments on commit 8c031fe

Please sign in to comment.