Showing posts with label osx. Show all posts
Showing posts with label osx. Show all posts

Monday, March 22, 2010

Install Thrift on OSX Snow Leopard

These are my notes for installing Thrift on OSX Snow Leopard. The two pre-requisites are XCode with the 10.4 SDK, which is not installed by default and MacPorts. This is a mashup of three similar guides, none of which contained all of the necessary information to get up and running.

export LOG4J_PATH='/opt/local/share/java/jakarta-log4j.jar'
export THRIFT_URL='http://gitweb.thrift-rpc.org/'
export THRIFT_PARAMS='?p=thrift.git;a=snapshot;h=HEAD;sf=tgz'
sudo port install boost
sudo port install jakarta-log4j
sudo port install pkgconfig
sudo port install libtool
echo "thrift.extra.cpath = ${LOG4J_PATH}" > ~/.thrift-build.properties
curl "${THRIFT_URL}${THRIFT_PARAMS}" > thrift.tgz
tar xzf thrift.tgz
cd thrift
export CFLAGS="-arch i386 -m32"
export CXXFLAGS="$CFLAGS"
cp /opt/local/share/aclocal/pkg.m4 aclocal/
./bootstrap.sh 
./configure --prefix=/opt/local
make
sudo make install

Monday, June 9, 2008

ISight Screen Saver

A while ago I wrote a screen saver for OSX as a learning exercise. I wanted to learn how to access the camera built into my Macbook Pro and get my feet wet with OSX. I was going to integrate face recognition using the OpenCV or MPT libraries but never got around to it. I'm posting it now because some of the guys at work saw it and wanted a copy. I added the source to my SVN repository and made a binary available via the download site. The screen saver is really as minimalistic as it gets. It uses the new QTKit API for accessing the camera and sets the capture view to the frame size of the inherited ScreenSaverVeiw class. The QTKit API came out around the time of Leopard's release and is much simpler and has better performance then the old streamgrabber API which had been around since the OS 9 days. To install the binary just download the zip file, unzip and double click. It will automatically install itself and become available as a screen saver in the system preferences.