BUY THIS BOOK
Add to Cart

Print Book $24.95


Safari Books Online

What is this?

Add to UK Cart

Print Book £17.50

What is this?

Looking to Reprint this content?


Modding Mac OS X
Modding Mac OS X Extreme Makeovers for Your Mac

By Erica Sadun
Price: $24.95 USD
£17.50 GBP

Cover | Table of Contents | Colophon


Table of Contents

Chapter 1: Transforming Your Mac
Mac OS X Tools and Apple Software
  • System Preferences (/Applications)
  • Terminal (/Applications/Utilities)
  • The defaults command-line utility (/usr/bin)
  • iPhoto (/Applications)
  • QuickTime Pro (/Applications; QTPro registration required)
  • Mac OS 9, installed on your Mac for use in Classic mode
Third-Party Software
  • TransparentDock (http://www.freerangemac.com)
  • CandyBar (http://www.panic.com/CandyBar)
  • ShapeShifter (http://www.unsanity.com/haxies/shapeshifter)
Web Sites
  • MacUpdate (http://www.macupdate.com)
  • Skyrocket Software (http://www.skyrocketsoftware.com)
  • ResExcellence (http://www.resexcellence.com)
  • Max Themes' Eylo offering (http://www.maxthemes.com)
When you contemplate modifying or customizing your Mac, don't disregard the basics. Some of the simplest changes you can make are the most evident and, therefore, the most overlooked. You can make a lot of aesthetic changes to your Desktop without diving too deep. Sure, you can change the background image of your Desktop or decide which screensaver you want to use, but what if you want something more? What can you do to set your Mac apart from everyone else's?
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Desktops
Even though it stares you in the face every day, it's easy to take the Desktop for granted. It lies under the windows all of the applications you have running, pretty much just sitting there, being ignored. The Desktop performs its thankless job day-in and day-out, and it's probably just begging you for a fresh new look. Indulge your Desktop; it's been good to you. You should be good to it.
System Preferences holds the secret to power desktop management; specifically, its Appearance and Desktop & Screen Saver preferences panels. Here's where you can start to give your desktop a bit of personality. The Appearance preferences let you set basic interface features, such as changing the primary interface color (blue or graphite) and the look of your scrollbars. As its name suggests, the Desktop & Screen Saver panel controls the Desktop's art and lets you pick or set a screen saver. Follow these steps to open the Desktop & Screen Saver panel so you can select new background art:
  1. Launch System Preferences from the Apple menu ( System Preferences), or click on its icon in the Dock. The System Preferences window opens, displaying a list of available preferences panes.
  2. Click on the icon for the Desktop & Screen Saver panel.
  3. After the window updates, click the Desktop button. The Desktop pane (shown in Figure 1-1) opens. If you're running a Macintosh system with more than one screen, separate panels appear on (and control) each display.
Figure 1-1: The Desktop preferences pane.
Examine the list that appears on the left side of the Desktop pane. This list starts with Apple Background and ends with items from your iPhoto library. It contains colletions of images and hues from which you can select a background pattern for the Desktop. Click each item in the list to see its set of pictures. Standard items include:
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Screensavers
At some point in your life, you'll say to yourself, "Self, I want a new screensaver" Over time, even the ever-changing default Flurry screensaver can grow dull. That's when you'll turn to MacUpdate (http://www.macupdate.com) on your quest for a new screensaver.
At MacUpdate, search for "saver" and you'll find page after page of screensaver options. Find one that looks good, open its page, read about it, and (after appropriate investigation and thought) download it to your Macintosh.
Follow these steps to find, download, install, and set up a new screensaver:
  1. Search through the "saver" results at MacUpdate. Make sure to read through the comments section for whatever screensaver you pick. Some items are free; others are shareware. I like the variety of Skyrocket Software's offerings (http://www.skyrocketsoftware.com), many of which are listed at MacUpdate. For this example, I used their Butterflyz screensaver.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Altering the Dock
I personally dislike the default Dock. It sits at the bottom of the screen, right where I need extra screen space for my work. It's too big and it's ugly. Fortunately, the System Preferences application provides a great starting place for customizing the Dock. Choose Dock Dock Preferences to get started. The Dock Preferences pane (Figure 1-14) lets you set the size, position, and other attributes of your Dock to better integrate it into your workflow.
Adjustable features in the Dock Preferences pane include:
Figure 1-14: The Dock's preferences pane.
Dock Size
Use this slider to your Dock icons larger or smaller.
Magnification
Add a fisheye effect to your Dock by magnifying the icons closest to the cursor. I leave this option unchecked. It gives me motion sickness.
Position on screen
Choose one of these radio buttons to set the Dock's position to the left, bottom, or right. Note that if you use more than one screen, the left position may be on a different screen than the right position, depending on how you have the displays arranged.
Minimize using
Dock Preferences offers access to two animations for minimizing your windows. You can scale your windows down proportionally or use the Genie effect to suck your windows into the Dock.
Animate opening applications
When checked, this option bounces the icon of an application as it opens in the Dock. When unchecked, the small triangle beneath the icon bounces instead.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Changing the Look of Finder Windows
Next to using a different background for your Desktop or adding a new screensaver, one of the easiest changes you can make to your Mac is to update the appearance of your Finder windows. No matter what Finder view you're using (Icon, List, or Column), you can set background colors or images to be used in the Finder views and apply them to individual Finder windows, or across the board to every Finder window you open.
These steps walk you through the process of setting a custom image.
  1. Start by selecting a fairly desaturated image. A good image will have lots of white in it; this helps you see your icons and text over the picture. Pick an image that isn't too big (say, up to 640 or 800 pixels at its largest dimension).
  2. Open a Finder window and navigate to the folder whose background you want to change. Open that folder and display its contents using the icon view (View As Icons, ⌘-1).
  3. Select that Finder window and choose View Show View Options (⌘-J). A small floating window appears, as shown in Figure 1-18.
  4. Select the "This window only" radio button. For this example, you don't want to add your picture to every Finder window. However, if you find that you like the change you've made, you can always come back here and change the setting so the picture gets applied to all Finder windows.
  5. At the bottom of the floating window is the Background section. Here you'll see three radio buttons: White, Color, and Picture. Select the radio button next to Picture. A "Select…" button appears to the right of this option. When you click on the Select button, the Select a Picture dialog window opens and takes you to your Pictures folder by default.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Customizing Standard Icons
After using Mac OS X for a while, the standard icons used in Finder windows tend to pass beneath our radar. Take a second to revisit them. There's the picture of the house for the home directory; the letter A made out of a pencil, a paintbrush, and a ruler for applications; the G-clef for the music folder; and so forth. These pictures are nice—as well they should be. They've been designed by Apple, and passed by their team of human engineering gurus. Still, as with everything Mac OS X, just because it's standard doesn't mean you can't mess with it.
In this section, you'll discover how to use a great shareware program called CandyBar (http://www.panic.com/CandyBar, $12.95) to change the look of your standard icons. CandyBar is a shareware application that lets you swap custom icons for the more standard fare. You can change the look of your toolbar icons, your garbage pail, and the icons used for standard folders. To install, download a copy of CandyBar, mount the disk image, and drag the application to the Applications folder.
  1. Run CandyBar from the Applications folder. The CandyBar window (shown in Figure 1-20) opens.
    Figure 1-20: CandyBar's main window.
  2. Use the scrollbar at the right side of the window to scroll through the groups of icons that you can customize. They include toolbar icons (such as the ones used for the Finder toolbar, discussed earlier in this chapter), folder icons (such as the home folder and the library), Dock icons (Finder, the trash can), device icons, and so forth. These groups provide a comprehensive overview of the kinds of icons found on your computer.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Custom Themes
Although Mac OS X doesn't natively offer themes (or "skins") per se, you can use other solutions to skin this cat. Unsanity's ShapeShifter (http://www.unsanity.com/haxies/shapeshifter, $20) offers one skinning solution that lets you use both built-in and third-party theme offerings. With ShapeShifter, you can change your interface by choosing themes that customize the look of your menus, buttons, and other interface items. Figure 1-23 provides a screenshot of Microsoft Internet Explorer, as skinned with Max Themes' Eylo offering (http://www.maxthemes.com). As you can see, nearly every component of the interface changes its look from the Aqua standard.
Figure 1-23: ShapeShifter lets you customize the look of your entire interface.
ShapeShifter is relatively easy to use. Once downloaded and installed, it adds itself to System Preferences. Figure 1-24 shows ShapeShifter's Themes preferences pane. Here's where you can select a theme and apply it to your applications. ShapeShifter comes with two custom themes in addition to the default Aqua theme. Digital Device adds a parchment-colored cast to your windows and a graphic design–inspired look to your buttons. SimpleX uses a cool, blue look, with fewer color variations than the normal Aqua look.
Figure 1-24: ShapeShifter's Themes pane allows you to select a theme to apply to your applications.
ShapeShifter makes it easy to download and use custom themes provided by third parties on the Internet. To install a new theme, simply download it and drag it into the ShapeShifter Themes pane, as shown in Figure 1-25. A drag and drop is all it takes to expand your theme collection.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Changing the Boot Panel
Whenever you start your Mac, a light gray screen greets you. This screen has a slightly darker gray Apple logo superimposed on it. As your system moves past the firmware check, an application called BootX kicks into action. BootX changes the gray Apple startup display to a blue background with a Mac OS X startup screen, which is known as the Boot Panel (shown in Figure 1-26).
The Boot Panel is nothing more than a PDF image file, named BootPanel.pdf, that is stored in /System/Library/CoreServices/SystemStarter/QuartzDisplay.bundle/Resources on your Mac.
As your Mac starts up, a series of messages appears beneath a blue progress bar. These messages display as BootX starts up various system services that get your Mac going. And while the Boot Panel that Apple provides as part of Mac OS X Panther is both pretty and functional, you can change this file around if you'd like by either making your own, or downloading a different Boot Panel from the Internet and swapping out files. This section walks you through the process of changing your Mac's Boot Panel.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Final Thoughts
After working through this chapter, you've seen quite a few ways to personalize your computer. As you move forward through this book, here are a few thoughts to take away with you from these pages.
Your computer is yours.
It's yours to love, to cherish, and to customize. If you feel that your life is not complete unless you've accessorized your desktop in eyebending pastels with animated cherubs, then that's your right. Go for it. Be proud of it. Make it yours.
There's a lot to be said for simplicity.
A light touch and a bit of restraint can keep your Macintosh well organized and well controlled. Don't feel pressured to change a system that already works well for you. Change is supposed to be a positive thing—if it ain't broke, consider not fixing it.
Know your limits.
Before you start modding your computer, make sure you're able to walk back from the brink and restore your system. If you're not comfortable undoing your changes, don't make them in the first place. Mod your computer with confidence, not fear.
If you have the artistic talent of a dyspeptic newt, don't feel excluded from Mac customization.
Take advantage of the many excellent web sites that showcase actual artistic talent. And if you like and use that art, make sure to register your shareware items. Paying for the art you use helps make sure there's always new and interesting art around to find. Support shareware, and ante up if you're using the software regularly.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 2: Inside Application Bundles
Mac OS X Tools and Apple Software
  • Terminal (/Applications/Utilities)
  • Safari (/Applications)
  • Help Viewer (/System/Library/CoreServices)
  • Internet Explorer (/Applications)
  • iMovie (/Applications)
  • iDVD (/Applications)
  • Calculator (/Applications)
Third-Party Software
  • ResEdit (http://developer.apple.com/tools/legacy.html)
  • Power Plant Constructor (http://www.metrowerks.com)
  • Resourcer (http://www.mathemaesthetics.com)
  • ResFool (http://www.ljug.com)
  • ResKnife (http://resknife.sourceforge.net)
Appearances can be deceiving. Just take a look at your Applications folder; it's full of program icons. Double-click one and you'll launch a program. Drag one to the trash and you'll delete it. Each icon looks and acts like a single executable file. It's hard to believe that these icons are more than just programs, but they are. Hidden within each "application file" is a collection of files and subfolders that include both the application executable and all its supporting resources, including the sounds, pictures, strings, and so forth that are used within the program.
Get ready to find out how you can expose these hidden application contents. You're about to go diving into applications to see what's inside. This chapter shows you how applications are put together and how you can explore them. You'll learn exactly what's inside that application, and why. You may be surprised at what you find.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Application Bundles
Medical students dissect corpses to learn about anatomy. They study how the body is put together and the organs found within. They discover how the muscles, bones, and other structures fit together and interoperate. Applications offer similar opportunities for exploration. Like anatomy, the best way to understand how an application works is to look inside.
As you've already heard, there's more to Mac OS X applications than meets the eye. Mac OS X applications aren't files. They are actually folders that contain one or more executables and their supporting resource files. They appear to the end user as a single file because the Finder treats them as a bundle. Bundles are folders that look like files and whose contents are hidden from the user.
As you'll discover for yourself in this chapter, a bundle may contain hundreds of files and folders. As with bodies, application bundles have a well-defined hierarchical structure. You're not likely to find string files mingled with the executables or images with the plug-ins. Instead, each file or folder has a place and a purpose.
An application folder contains, at a minimum, a MacOS folder and two files: Info.plist and PkgInfo. These items appear within the top-level Contents folder. In all probability, any application you select will contain other items as well, including a Resources folder, a version.plist file, and so forth. A simple bundle might be structured in the following manner:
	MyApplication
	-Contents/
		   + MacOS/
				   MyApplication*
		   Info.plist
		   PkgInfo
		   version.plist
		   -Resources/
				Bar.jpeg
				Blort.aiff
				Common.strings
				Foo.tiff
				-English.lproj/
				main.nib
				Localizable.strings
				InfoPlist.strings
				-Italian.lproj/
				main.nib
				Localizable.strings
				InfoPlist.strings
		   + Frameworks/
		   + PlugIns/
		   + SharedSupport/
Figure 2-1 shows the folders and files found within the
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Understanding Bundle Structure
The Contents folder and its subfolders may hold any number of items, including executables, property lists, character string files, multimedia, plug-ins, and more. Each of these items is stored in a logical hierarchy. You can expect to find executables inside the MacOS folder, pictures inside the Resources folder, and so forth.
Understanding the standard items that appear can help you better approach the nonstandard items that are unique to each application. Inside the Contents folder, you may encounter the following items:
  • Info.plist
  • PkgInfo
  • MacOS folder
  • MacOSClassic folder
  • Resources folder
  • Frameworks (or SharedFrameworks) folder
  • Plugins folder
  • SharedSupport folder
Each of these items will be discussed in the sections that follow.
Info.plist is an XML file that appears inside every application bundle. It stores an information property list that contains important details about an application. From this file, the Finder can learn about supported document types and extensions, icon associations, the location of the application's help file, version info, copyrights, and so forth. Although the items in each Info.plist file vary, some keys appear in most applications. Some highlights include the following (the parenthetic examples for each key are taken from Safari Version 1.1.1):
CFBundleExecutable
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Building Bundles
In terms of display, naming is everything. The Finder is responsible for selecting the way a directory appears: as a normal folder, as a file, or as an application. A file's name, particularly its underlying file extension (.app), tells the Finder which kind of presentation to use. Here's a quick-and-dirty way to test this behavior out for yourself.
  1. In the Finder, choose File New Folder (Shift-⌘-N). Give the folder a simple name (e.g., Chuck), as shown in Figure 2-3.
    Figure 2-3: A normal Mac OS X folder.
  2. Add a file to the folder, so that there's at least one item inside.
  3. Single-click on the folder's name; the name will be highlighted in light blue. Hit the Right Arrow (or Down Arrow) key to move the cursor to the end of the folder's name, and then add a .bundle extension to the folder (e.g., Chuck.bundle). Finder accepts the update and changes to use a generic file icon, as shown in Figure 2-4.
    Figure 2-4: A folder using a .bundle extension looks like a single document.
  4. Select the folder and choose File Open (or double-click the renamed icon). An alert appears, telling you that there's no default application specified to open your "document"
Now let's change the .bundle file back into a folder:
  1. Select the folder's name.
  2. Hit the Right Arrow key to move the cursor to the end of the filename.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Exploring the Resources Folder
An application's Resources folder provides a rich and varied collection of materials. Here, you'll find such diverse offerings as audio files, icons, window layouts, and more. Practically any kind of file can appear in an application's Resources folder. It goes far beyond the traditional resource forks used by Mac OS 9 applications and earlier. Table 2-1 offers a brief (but incomplete) rundown of the kinds of resource files you might encounter.
Apple recommends that all help files be bundled with applications instead of distributed separately. Third-party developers are moving away from the global or user (~)/Library/Documentation/Help path. Instead, most help is now localized and stored within the package's Resources folder. Each application's Info.plist file tells Mac Help (i.e., the Help Viewer) where to find the help data. Two keys, CFBundleHelpBookFolder and CFBundleHelpBookName, provide the folder and help topic names. For example, if you're looking for English-language iTunes help, you'll find the following entry in iTunes' Info.plist file:
	<key>CFBundleHelpBookFolder</key>
		<string>iTunes Help</string>
		<key>CFBundleHelpBookName</key>
		<string>iTunes and Music Store Help</string>
The first key tells us that we can find iTunes' help file in the iTunes Help folder, which is located in /Applications/iTunes.app/Contents/Resources/English.lproj/iTunes Help/. This folder is shown in Figure 2-6.
Table 2-1: A field guide to resource folder file types
Item
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Understanding Localizations
Internationalization is an important buzzword at Apple. Basically, all it means is that an application must work consistently and beautifully, regardless of the country of operation. Because of this, all Mac OS X application resources are divided into localized and non-localized files. Non-localized files—those items that apply to all versions of a program (no matter what language, dialect, or cultural symbology)—appear in the top-level folder. Localized files appear in lproj subfolders and are specific to particular languages and regions. It is in these lproj subfolders that you're most likely to encounter both those Mac OS X system resource files, which use the .rsrc extension, and localized string files.
Localizable strings allow application developers to customize their applications to their audience's language. An English-speaking user might be asked "Are you sure you want to reset Safari?", while a German user would read "Sind Sie sicher, dass Sie Safari zurücksetzen wollen?"
Localizations are not limited to strings. Dates in the United States are written as "Month Day, Year," while most other countries use "Day Month Year" A string localization file lets developers adjust cultural as well as linguistic elements.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Plug-ins
When applications support plug-ins, Apple encourages developers to include their default sets within the application wrapper. This is why you'll find the basic iMovie plug-in set inside its bundle (/Applications/iMovie.app/Contents/PlugIns) rather than in ~/Library/iMovie/Plug-ins, where you might otherwise expect it to reside. Instead, that folder is earmarked strictly for third-party offerings. This allows iMovie to retain the integrity of its default plug-in set without compromising the ease of adding new items.
The reason for this is straightforward. As with help documentation, Apple wants to promote fully compartmentalized applications that can be installed by dragging. Applications that depend on external libraries and other folders are more complicated to install or delete.
You can peek at an application's factory-installed plug-ins without cracking open the application bundle. The Finder provides a handy shortcut; just follow these steps to use the Get Info window to reveal application plug-ins:
  1. Open a Finder window, go to the Applications folder (Shift-⌘-A), and select one of the many applications that support plug-ins, such as iMovie, iPhoto, iDVD, or Calculator.
  2. Choose File Get Info (⌘-I); an Info window opens, showing information about the selected item. Information about the application includes its kind, size, and where the application is located in the filesystem.
  3. The Plug-ins section appears below Name & Extension, Preview, and Languages. Click on the black disclosure triangle to the left of the word Plug-ins to open or close this section, as shown in Figure 2-12.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Property Lists
Everywhere you look, it seems that Mac OS X is making use of XML property lists (more commonly referred to as plists because of their .plist file extension). These files provide a structured, text-based approach to storing, organizing, and recovering many kinds of application data. As Apple points out, XML files have many advantages. They are text-based, so they are easily read by people, and they use a well-defined standard, so their creation and access are very reliable. Some XML experts, however, feel that Apple's use of XML is a bit messed up. Regardless, plists provide a flexible and easy-to-understand format.
The Finder uses plists to store file and directory attributes. Applications use plists to store defaults, preferences, script suites, localization specifics, and more. For example, Address Book uses property lists to store its defaults (shown in Example 2-1), label layout specs, alphabetical listing templates, and paper sizes. Each of these plists appears in addition to the standard Info.plist and version.plist files.
Example 2-1. Address Book's com.apple.AddressBook.plist file
<ww!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://
www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>ABCardPaneFrame</key>
	<string>{{260, 0}, {270, 191}}</string>
	<key>ABGroupsPaneFrame</key>
	<string>{{0, 0}, {120, 191}}</string>
	<key>ABPeopleAlternatePaneWidth</key>
	<integer>0</integer>
	<key>ABPeopleColumnsWidth</key>
	<integer>113</integer>
	<key>ABMembersPaneFrame</key>
	<string>{{125, 0}, {130, 191}}</string>
	<key>NSTypesetterBehavior</key>
	<integer>1</integer>
	<key>NSWindow Frame ABWindow</key>
	<string>338 246 542 275 0 0 1152 848 </string>
</dict>
</plist>
A Mac OS X property list consists of an XML header followed by one root object, generally a dictionary of keys and values. This root object is always surrounded by <plist> … </plist> tags. The dictionary keys use plain-text strings. The values use well-defined types including integers, floating-point numbers (known as "reals" to programmers), strings, and more. Apple provides a Core Foundation service that lets application developers easily read from and write to property list files. That's one reason that plist files are so ubiquitous in application bundles.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Shrinking Applications
Hard drives are like money. The more space you have, the more you'll fill it up. And when disk space becomes an issue, one way you can find some more room is to shrink your applications. Removing or compressing unused language resources (stuffed inside lproj folders) may substantially reduce an application's size. Take iMovie 4.0.1, for example. In its just-installed form, iMovie weighs in at a hefty 53.9 MB. After I removed language support for all non-English languages, the application shrank to a mere 26.7 MB. This simple approach cut the application size in half without affecting iMovie's performance. Of course, it means that I can't switch my Mac's keyboard layout to French or German and use iMovie without fail, but the chances of me wanting to do that are mighty slim.
The idea behind this approach is simple: why keep languages around that you know you'll never use? If you're not a Polish, Norwegian, or Korean speaker, the lproj localization folders that support those languages are taking up space that you might better use for other purposes (like storing more photos or music). In the following steps, you'll see how to compress those files or remove them entirely from your system.
  1. If possible, back up your disk before shrinking your applications. A good backup never hurts.
  2. Open a Finder window and go to the Applications folder (Shift-⌘-A).
  3. Select the application you want to try shrinking and duplicate it (File Duplicate, or ⌘-D). As with any potentially hazardous operation, it's always better to have a copy on hand, just in case you mess up.
  4. Control-click (right-click) on the application and select Show Package Contents from the contextual menu. A new Finder window appears, revealing the package's Contents folder.
  5. Open the Contents folder and the Resources folder inside it.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Final Thoughts
This chapter introduced the application bundle and let you explore many of the items that hide beneath the surface of packages. Here are a few key thoughts to keep in mind:
Peek under the hood and get some oil under your fingernails.
Even though application packages hide their contents from the casual observer, there's no reason to settle for being a casual observer. Macintoshes were built to enable the power user as well as to comfort the technophobe.
Think of application bundles as one big container.
Apple is deeply committed to the notion of a fully bundled application. In their vision, applications should be installed and removed simply by dragging. Applications that leave bits and pieces around in registries, libraries, and so forth fail to meet the ideal of a simple, powerful, yet "indivisible" tool.
Don't forget to use Get Info ( -I) on an application.
Apple's bundled application architecture lends itself beautifully to customization, even after deployment. As the Get Info window trick shows, it's amazingly simple to add or replace plug-ins and localizations on the fly.
Keep diving.
Just as there are wheels within wheels within wheels, prepare to discover packages within packages within packages. iDVD's .pox bundles are just one example of rich and exciting items hiding within application packages.
Think of Unix as the seer of all things.
When in doubt, look at things via the command line using the Terminal application. The command line reveals far more detail than you can discover in the Finder.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 3: Application Dumpster Diving
Mac OS X Software
  • Help Viewer (/System/Library/ CoreServices)
  • Mail (/Applications)
  • QuickTime Player (/Applications)
  • iTunes (/Applications)
  • Preview (/Applications)
  • iMovie (/Applications)
  • GarageBand (/Applications)
  • System Preferences (/Applications)
  • Terminal (/Applications/Utilities)
  • Calculator (/Applications)
  • TextEdit (/Applications)
  • Xcode Tools (/Developer)
  • Soundtrack (http://www.apple.com/soundtrack )
Third-Party Software
  • Carbon Copy Cloner (http://www.bombich.com/software/ccc.html)
  • Dantz Retrospect (http://www.dantz.com/)
  • SnapzPro (http://www.ambrosiasw.com)
  • Audio Hijack (http://www.rogueamoeba.com)
If you're not afraid to get messy and you're willing to dive into the complex jumble that is an application's Resources folder, you'll find yourself well rewarded. Most Mac OS X applications are brimming with cool stuff, and nearly all of it is packed into the Resources folder. It's there that you'll find sounds, pictures, movies, and other fun, reusable or, better yet, customizable items.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
The Xcode Tools
Apple's Xcode Tools include the environments, documentation, applications, and utilities that programmers need to design, program, and package Mac OS X applications. They also contain the same environments, documentation, applications, and utilities that end users can use to customize already-built applications. The standard Xcode Tools collection is bundled with Mac OS X on a separate disc, which you must install. You can also download the latest distribution directly from the Apple Developer Connection (ADC) web site (http://developer.apple.com ).
When installed, the developer distribution appears in the top-level Mac OS X hierarchy in the Developer folder. Key subfolders include:
Applications
The primary developer applications. Highlights include Interface Builder (for interface customization) and Xcode (for project development).
Applications/Utilities
The special-purpose tools that augment the main developer applications. Here's where you'll find Icon Composer (icon creation tool), icns Browser (icon inspector), and Property List Editor (tool to create and edit property lists, or plists).
Documentation
All the information you could ever need to know about development for Mac OS X. Important items include UserExperience (the Human Interface Guidelines) and DeveloperTools (how to use all the items in the developer distribution).
Tools
Helpful command-line utilities for managing and updating Mac OS X applications. Standouts include SetFile
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Finding Goodies
Any number of worthy and curious files can be found within an application bundle's innards. A healthy nosiness will help you discover some of them. Snooping through resource folders is a skill that can be honed and developed. Start with this basic approach.
  1. Navigate to the Applications folder. Pick any application that intrigues you; in this case, use the Mail application.
  2. Control-click (right-click) the application you have selected and choose Show Package Contents from the pop-up, as shown in Figure 3-3.
  3. To quickly view what's inside the Contents folder, hit the C key and then use the keyboard shortcut ⌘-3 to switch the Finder to Column View.
  4. Select the Resources folder, located within the Contents folder.
    Figure 3-3: Show Package Contents exposes application contents.
  5. When surfing through an application bundle, it's best to organize your folders by file type. This groups together similar kinds of items, and allows you to see all the audio files or all the icon files at once. Choose View Show View Options (⌘-J). Select Keep Arranged By
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Changing Sounds
Because of its simplicity, the Mail application provides a terrific guinea pig for learning how to swap AIFF files. Follow these steps to change the "No Mail" sound to an AIFF file that you select.
  1. Quit Mail if it is running. In fact, you should always quit any application before you attempt to modify its resources.
  2. Open the Mail application package and navigate to Contents/Resources. No Mail.aiff appears in the Resources folder. Select the No Mail.aiff file in the Finder, and then click on the play icon to listen to the original, metallic sound.
  3. Next, create a backup copy of the No Mail.aiff file. There's no convention on how you should rename it; just give it a name so that the original file can no longer be found by the application. In this case, I've renamed the file as No Mail.orig.aiff.
  4. Move a new, short (1 or 2 seconds, max) AIFF file into the Resources folder and rename it as No Mail.aiff. Mail is hardwired to look for a file named No Mail.aiff and to play that sound if no mail is found on the server.
  5. Launch Mail by either clicking on its icon in the Dock, or by double-clicking on its icon in the Applications folder.
  6. Choose Mail Preferences (⌘-,) from the menu bar, and then click General to open the General settings pane. Ensure that "Play sounds for other mail actions" is checked (as shown in Figure 3-5), and then close the Preferences window.