macdevcenter.com
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button

The Mac OS X Developer Tools

by Rael Dornfest
12/15/2000

Related:

OS X Brings Unix Stability to the Mac

Mac OS X Terms and Definitions

WebDAV on OS X


Previous Features

The Mac OS X Public Beta Developer Tools put the developer back in OS X.

The core of Apple's new Macintosh OS X is something called Darwin, a partially open source *nix flavor based on FreeBSD and Mach. While the current OS X Public Beta 2 release does contain many of the command-line tools people might expect, the developer tools are conspicuously absent. This doesn't pose any problem for average end users -- just about everything they need out of a basic Macintosh operating system is present, downloadable, or being ported by someone else.

However, if you're a developer or just want to compile software from source, you're more than a little stuck.

The standard set of developer tools, libraries, sources, etc. have always been available as part of the Darwin releases and may be integrated into OS X manually. Installation, though, has been a rather unfriendly proposition involving overlaying bits of Darwin on your nice clean OS X installation. While Apple made an OS X Public Beta Developer Tools CD complete with point-and-click installer, this was initially only available to full-fledged Apple Developer Connection members -- no small irony, mind you. Thankfully, the contents of this CD are now available to the rest of us online.

Getting the tools

The Mac OS X Public Beta Developer Tools are freely available for download from the Apple Developer Connection web site by ADC Online members. Membership is free, requiring only the patience to sit through a few online forms.

After signing up for membership, meander over to the appropriate section of the ADC web site by clicking through Download Software -> Mac OS X in the left-hand menu. Click the Download button associated with the "Public Beta Tools CD" and wander off for a cup of coffee or tea while the 69.6 MB file is downloaded.

Downloading the Public Beta Tools CD

Downloading the Public Beta Tools CD.


Note:: Upon completion, your browser may attempt to uncompress the downloaded file by launching Stuffit or some such program, but not without first starting up the Classic environment. Stop Classic from loading, as there is a better way to go about this!

Uncompressing and decoding

The package you just downloaded is compressed and encoded (.tar.gz), even though the filename doesn't indicate so. It's a rather simple matter to uncompress and decode it using the tar command-line tool. To get to the command-line underneath OS X's pretty GUI, we'll use the built-in Terminal application.

  1. Click the Apple face icon at the far left of the Dock at the bottom of your screen to bring up the Finder window.

  2. If the toolbar (buttons marked "Computer," "Home," etc.) does not appear in the top of your Finder window, select Show Toolbar from the View menu on the menubar at the top of your screen (that's Apple/Command-B on your keyboard if you're so inclined).

  3. Click the Apps button in the toolbar, select the Utilities folder, and double-click Terminal to open Terminal.

    Opening Terminal.

    Opening Terminal.


  4. Welcome to *nix! Let's navigate over to the command-line view of your Desktop by typing cd Library/Desktop and see what's there by typing ls. You should see a file named something not-unlike 4.7.19.DownloadSoftware.1.1, possibly amongst others. While this is actually a .tar.gz file, it's unfortunately not obvious by the name alone. Feel free to rename it to something like osx_devtools.tar.gz if you prefer, but it's not necessary.

  5. We'll uncompress and decode the file by typing:

    tar xvzf 4.7.19.DownloadSoftware.1.1

    or whatever your filename).

    Uncompress and decode the file.

    Uncompress and decode the file.


Installing the package

On your desktop you should now see a file called Developer.pkg, a point-and-click self-installing package that'll do that actual work of putting the various bits into place.

Note:: If the file doesn't appear, click your mouse on your desktop; if that doesn't have any effect, you may have to log out and log back in again -- this is a bug in the current OS X Beta 2 release.

  1. Double-click Developer.pkg to start the installer.

  2. You'll need to authenticate yourself as an administrator of this machine by clicking the little "lock" icon near the bottom-left of the "Install Developer Software" window.

  3. Type your username and password into the "User Authentication" dialog box and click the OK button.

    User Authentication dialog box.

    The User Authentication dialog box.


  4. Follow the Installer's directions, clicking the Continue button to leap from screen to screen.

    Continuing with the installation.

    Continuing with the installation.


  5. After four intermediate screens and a couple of prompts, the Installer will grind away, preparing, extracting, and installing for a while.

  6. When finished, close the Installer and return to your command-line Terminal window. Type rehash to give your shell a chance to find all the new goodies we just installed. You should now have the power of the Darwin Developer Tools at your disposal; go ahead and try typing cc -- you should see cc: No input files in response.

  7. To log out of the command-line, type exit and press Apple/Command-Q on your keyboard to close the Terminal application.

Mac OS X and Darwin resources

The following is a list of starting points from which to explore further some of the topics covered (or not) in this article. Thanks to O'Reilly's Chris Stone for contributing some wonderful reasources.

Rael Dornfest is Founder and CEO of Portland, Oregon-based Values of n. Rael leads the Values of n charge with passion, unearthly creativity, and a repertoire of puns and jokes — some of which are actually good. Prior to founding Values of n, he was O'Reilly's Chief Technical Officer, program chair for the O'Reilly Emerging Technology Conference (which he continues to chair), series editor of the bestselling Hacks book series, and instigator of O'Reilly's Rough Cuts early access program. He built Meerkat, the first web-based feed aggregator, was champion and co-author of the RSS 1.0 specification, and has written and contributed to six O'Reilly books. Rael's programmatic pride and joy is the nimble, open source blogging application Blosxom, the principles of which you'll find in the Values of n philosophy and embodied in Stikkit: Little yellow notes that think.


Related:

OS X Brings Unix Stability to the Mac

Mac OS X Terms and Definitions

WebDAV on OS X


Discuss this article in the O'Reilly Network Forum.

Return to the O'Reilly Network Hub.