Hack 55 Introducing and Installing the Mac OS X Developer Tools

The Mac OS X Developer Tools are a treasure
trove of developer applications, utilities, tools, and scripts vital
to both developing for OS X and building open source applications
from source.

Mac development has taken a quantum leap forward, thanks to the
Mac OS X Developer Tools
(http://developer.apple.com/tools/).
Originally written for the NeXT operating system,
they've been ported across to OS X. The major
bundled components are: Project Builder for managing
application development,
writing code, and building apps and Interface Builder, a marvelous
application for designing user interfaces and binding their
components to application code.

So why, you may ask, should you care? After all,
you're not a developer (maybe you are) and are just
after a few hacks for your Mac. Alongside the main tools for building
applications on Macintosh are a host of Unix commands and utilities
vital for configuring, compiling, and deploying a plethora of
applications and services ? most open source and free for the
taking. You'll need the Developer Tools installed to
follow along with some of the hacks in this book, especially in the
Unix, Terminal, Mail, and web sections.

55.1 Getting the Developer Tools

You may already
have the Developer Tools installed (check for the
/Developer folder on your hard drive), not yet
installed but on your hard drive as a package (check
Applications/Installers/Developer Tools), or on
CD in the box your Mac arrived in, assuming your
system's fairly recent. If you
don't have them handy, don't worry;
you can download them for free from the Apple Developer Connection
web site (http://www.apple.com/developer/), either as
one large distribution (around 200 megabytes) or as 21 separate files
(about 10 megabytes each). (All sizes and numbers are correct at of
the time of this writing but will almost certainly be different by
the time you read this.) You'll need a free ADC
account; if you don't already have one, sign up
online (https://connect.apple.com/).
You'll also gain access to lots of documentation,
samples, and a range of development tools and utilities.

You'll need the right version for your operating
system. If you're running 10.2 (Jaguar), use the
latest and greatest. If you're running an earlier
version of OS X, download an appropriate version of the Developer
Tools.

55.2 Installing the Developer Tools

The
Developer Tools, no matter which way you get them, come as a Mac OS X
package. Double-click on the Developer.mpkg icon
to start the standard Mac OS X Package Installer, which will lead you
gently through the process.

Once you've agreed to the license conditions, the
installer asks you for the destination volume and defaults to the
startup hard drive. You probably want to leave that as it is because
other third-party tools expect to find the
Developer directory there.

Please be sure to install the BSD Software Development Kit (SDK), as
this contains the commands and utilities for building many of the
open source applications you'll find in this book
and elsewhere. To be sure, on the Installation Type screen, click the
Customize button and be sure the checkbox associated with the BSD SDK
package is checked, as shown in Figure 5-22.

Figure 5-22. The Custom Install screen

When you're ready to continue, click the Easy
Install (or Upgrade, in my case) button and the Developer Tools will
be installed. It'll take a while, so
now's probably a good time to go grab that coffee.

55.3 Removing the Developer Tools

To remove the
Developer Tools, run the Perl script,
/Developer/Tools/uninstall-devtools.pl, from the
command line [Hack #48].