David Singleton
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.

XCode 2.4: https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20262

MacPorts: http://www.macports.org/install.php

Git: http://metastatic.org/source/git-osx.html

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
Upgrading to PHP5 on OS X

I’ve been meaning to upgrade PHP on my macbook for a while now, today I finally got around to it with a little help from Marc Liyanage PHP Package.

Download the installer (~50MB), un-tar and run it. You should not have PHP5 installed on your system. However, you might have to do a bit of fiddling to get it working properly.

These are just the tweaks I needed, you might need to do more or less, but this might be useful in some fashion.

In httpd.conf the PHP4 module was still being loaded, so comment that out and add an entry to load the PHP5 module instead.

#LoadModule php4_module libexec/httpd/libphp4.so
LoadModule php5_module local/php5/libphp5.so

For some reason the PHP5 module was installed at a different path to the oldPHP4 module and all other Apache modules. Rather than move it (and risk other problems) I left it where it was and just used the different path.

Further down httpd.conf there’s another reference to PHP4, just update the number.

AddModule mod_php5.c

Restart Apache so the changes take effect, with sudo apachectl graceful

That should do it.