Building Sparrow for Mac, the “open-sourced” email client

September 1, 2012 | Jason Kozemczak

Sparrow was a rather awesome mail client for Mac and iOS that was fairly recently bought out by Google. The acqui-hire caused a big stir in the tech startup scene, and you can find plenty of “fors” and “againsts” throughout the interwebs.

In a rather nice move, Google quickly released “free” versions of Sparrow for iOS and Mac, the caveat being that you have to build it yourself. Today we’re going to walk through the steps to make that happen. You’ll need to be on a Mac, as building requires having access to Apple’s frameworks and build tools.

Installing XCode

Screen_shot_2012-09-01_at_12

Sparrow uses Clang to compile, so we’ll need to have XCode installed. XCode’s available on the Mac App Store, so just use this XCode App Store link to install it.

When you follow the link, the App Store will open to the XCode product page. Click the “Free” button near the top, and click it again when the text changes to “Install.” XCode should begin downloading onto your computer; it will automatically install once the download finishes.

Getting Sparrow for Mac

Next, you need to actually download Sparrow for Mac. As an aside, Sparrow also gave customers the ability to build Sparrow for iOS, but you’ll need to be an registered in the iOS Developer Program to put it on your iOS device. Links to both of the apps can be found in the blog post announcing the availability of the two apps.

After the download finishes, unzip the archive if it isn’t already unzipped.

Fixing the build script

If you navigate to the now unzipped Sparrow directory, you’ll see an ‘app’ directory, and a ‘lib’ directory with a number of static libraries in it. Sparrow essentially gives us an un-linked copy of Sparrow, and we need to use XCode to actually link the libraries.

Fortunately, the guys at Sparrow have included a build script (‘build-mac.sh’) that should make linking a one-line step.

Unfortunately, the path the script uses for XCode will most likely be wrong. Fortunately this is an easy fix. To fix it, open up the ‘build-mac.sh’ file located at the root of the unzipped Sparrow directory in a text editor. On the third line, you’ll see the following:

xcodepath=/Applications/Xcode45-DP2.app

Change the portion after ‘xcodepath=’ to match where XCode is installed on your system. For most people, the line should read:

xcodepath=/Applications/Xcode.app

Screen_shot_2012-09-01_at_12Screen_shot_2012-09-01_at_12

Save and close the editor.

Building Sparrow

After XCode has finished installing and the above edits are in place, we should now be able to build Sparrow. open up terminal and change directories to the Sparrow directory where you just modified the build script; for most people, this can probably be accomplished by the following command:

$ cd ~/Downloads/mac/

And run the the build script:

$ sh build-mac.sh

Running Sparrow

Once the build script returns, all of Sparrow’s dependencies should be linked against, and we should be off to the races! Open ‘app/Sparrow.app’ under the Sparrow directory and Sparrow should launch. It’ll ask you if you’d like it to be moved to the Applications directory; you can do whatever works for you.

Screen_shot_2012-09-01_at_12

After filling in your email details, Sparrow should be up and running.

Screen_shot_2012-09-01_at_12

Enjoyed the post? Let me know by following me on Twitter or DMing me: jaykz52

Leave a Reply

Your email address will not be published.