Installing Playdar on OS X 10.4

Congrutulations, you’re on an outdated verison of OS X, but you still want to play with cool things like Playdar. Here’s a hassle filled guide to compiling it from source.

To do this you’ll need XCode (2.4 for Tiger), Macports and Git to start.

Once you’ve got those tools installed you can focus on Playdar itself. First, we need to load Playdar specific dependecies via mac ports. This is easy, but takes a little while.

$ sudo port install cmake boost ossp-uuid uriparser taglib git-core sqlite3

Next grab playdar from Git;

$ git clone git://github.com/RJ/playdar.git
$ cd playdar

Now to build it from source.

$ cd build
$ cmake ..

I’m not 100% sure this is a 10.4 specific issue, but i’ve had the same thing happen on two machines. CMake will find an old version of sqlite that won’t compile with Playdar. The quickest hack is to move/backup the “incorrect”, sym-link the correct version in it’s place and then make as normal.

$ sudo mv /usr/lib/libsqlite3.dylib{,.bk}
$ sudo ln -s /opt/local/lib/libsqlite3.dylib /usr/lib/libsqlite3.dylib

Finally we can compile the playdar bin itself. $ make

Undo our sqlite path hack (if you had to do it)

$ sudo mv -f /usr/lib/libsqlite3.dylib{.bk,}

Make it!

$ make

You should now have a playdar file in bin/. Hurrah, the hard bit is over now to do our DB setup and config.

$ cd playdar

I had this on one machine but not the other, use the normal instructions in INSTALL.txt unless you get an SQLite error about “NOT, in which case use this.

$ sed 's/IF NOT EXISTS //' etc/schema.sql | sqlite3 ../collection.db

Load your music collection. Depending on the size this can take a while.

$ ./bin/scanner ./collection.db ~/Music/MP3/

Run it.

$ ./bin/playdar -c ./etc/playdar.conf