Mac OS X Client

From Mugshot Developer Wiki

Jump to: navigation, search
Mac OS X Client

Design Process
Current Phase: Prototype
People
Engineers: Dan Williams
Ethnographers: Nobody
Designers: Nobody
Multi-Disciplinary: Nobody

Blog:
Bugzilla: search new
SVN: /dumbhippo/trunk/client/macosx web


Contents

About

The Mac OS X Client provides integration between Mugshot and the OS X desktop. It's part of such user experiences as Friends And Groups, Web Swarm, and Music Radar. See also the Windows Client and Linux Client implementation activity.

Currently the initial bits of an OS X client have been commited to subversion

Getting Started

The Client Code Overview describes how the common client code is organized and integrated with Linux-specific code. See Linux Client Development Setup for information about how to get set up to work on the Linux client.

Activity Ideas

For more general ideas, see Activity Ideas; what is listed here is just a few projects that are specifically about improving the Linux desktop experience. If you are interested in one of these activities, you should create a new activity page for it and link to that here.

Build It

This client is in the early, early stages. Grab it from subversion and build it to see what you can do to help out. Thank Dan Williams for getting this started so quickly!!

Preparing for Mugshot

You'll first need to build and install glib from gnome CVS. See the instructions Imendio Gtk Build Instructions here for some more details, but you get to:

  • Build and install autoconf 2.59
  • Build and install automake 1.7.9
  • Build and install libtool 1.5.20 (WARNING: make _sure_ you back up /usr/bin/libtool _before_ doing the make install here, you'll need Apple's oldskool libtool later. Also copy the new libtool to /usr/bin/libtool-GOOD or something too.)
  • Build and install gettext 0.14.5
  • Build and install pkg-config 0.19

For all of these, use configure options of "--prefix=/usr". Normal Mac OS X users don't use Fink, nor do they use DarwinPorts. Therefore, eventually, their stuff won't be in /sw or /opt. Eventually this all needs to get installed into /usr/lib, or bundled into a glib framework, which nobody happens to provide yet for OS X in binary-installable form.

Next, you get to build gtk-doc. See the instructions on the Imendio site. Their Gtk-doc-hack-new.diff patch seems to be messed up, so apply the patch manually. Build it with --prefix=/usr and install.

Next, build glib. This gets somewhat complicated. See the bits on libtool below for more info.

Libtool Suckage

Apple ships, by default a /usr/bin/libtool that has NeXT heritage, and is even pre-GNU. Apple puts the GNU libtool in /usr/bin/glibtool and /usr/bin/glibtoolize. Unfortunately, most Unix/Linux software expects /usr/bin/libtool to be the GNU variety. That's fine. What you get to do is trick each step of the process into thinking it's got the libtool it wants.

Something like:

  • sudo ln -sf /usr/bin/libtool-GOOD /usr/bin/libtool
  • ./autogen.sh --prefix=/usr
  • sudo ln -sf /usr/bin/libtool-APPLE /usr/bin/libtool
  • make

If the build errors out with problems about version info, just switch libtools by symlinking. If the build errors out with something like "unknown option 'arch_only'", or saying that ranlib takes no '-g' option, you need to switch to Apple's libtool.

hippo.framework

In client/common/macosx, you'll find an Xcode project that builds loudmouth and the HippoCommon code into a single framework, called "hippo.framework". This gets normally installed in your ~/Library/Frameworks directory, and the main Mugshot client links against this framework. Note that we call it "hippo.framework" and not "HippoCommon" because both Windows and Linux include headers with "#includ e <hippo/hippo-common.h>". If we changed the sources to work with OS X here, to "#include <HippoCommon/hippo-common.h>" in normal OS X framework header include style, we'd screw the Windows and Linux code. So "hippo.framework" it is.

Mugshot Client code

What's in SVN in client/macosx now a background app that displays an NSStatusIcon. Being an actual MenuExtra doesn't work, because people have to "uncrack" the menu extras stuff that Apple locked down using extensions from Unsanity or elsewhere. Plus, we don't really care about the stuff that makes a MenuExtra unique.

The code doesn't do much yet, it just displays the icon.

Further work items are:

  • Grab cookies from Safari (from ~/Library/Preferences/Cookies.plist) and possibly from Firefox too
  • Figure out how to talk to iTunes to get the currently playing song
  • Do the linkswarm bubbles and talk to the Mugshot server (possibly use Growl for the bubbles?)
Personal tools