macdevcenter.com
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button

Xcode for the Rest of Us

by Shelley Weiner
02/07/2006

Phew! You finished installing Mac OS X Tiger, your network is humming along beautifully, everything works ... time to put away that Install DVD. Hang on! You have no idea what you are missing by not installing Xcode (aka Developer Tools) from that first disk (or as a free download from developer.apple.com).

No way, you say, I am a teacher (or writer or ...), not a geek. Developer Tools are not just for the propeller-head set: there are applications and utilities within that can make you more productive, solve tough problems faster, and--dare I say?--put a measure of control into your workday.

Developer Tools Overview

First, let's define the entire suite. Xcode, according to Apple's web page, is a tool suite and integrated development environment (IDE) for creating Mac OS X universal binaries. Xcode also contains application-creation templates (a big time-saver for programmers), frameworks (class libraries--if someone wrote higher-level code, you can reuse and adapt it for your needs), Java applications and applets for web-based programming, and so on.

Here are a few pieces of the Developer Tools that can prove incredibly powerful for you, the non-programmer:

  • Interface Builder--The tool for programmers to give their code a pretty face, but also important for controlling your users' view of the Mac OS visual ingredients.
  • FileMerge--The graphical UI equivalent of the command-line tool opendiff, used by developers to compare or merge code files or directories, and absolutely essential to your sanity.
  • Property List Editor--This is the new (Tiger) way of editing those files probably known to you as "preferences" files. These plists are routinely used by programmers to set default preferences when installing applications. Once you know how to read a plist, you can manipulate it to teach that pesky application who is boss.
  • PackageMaker--This is "the Apple way" for developers to create package files with all of the important bits required to install software. Apple provides a relatively easy way for anyone to create a simple installer package without knowing a line of code.

An earlier article at Mac DevCenter talked about the more technical aspects of PackageMaker, including single packages, metapackages, and the like. I want to introduce you to PackageMaker, with a practical demonstration of how I use it in my classrooms.

Why PackageMaker?

PackageMaker was designed to simplify the creation of installation packages, and to provide a simple, repeatable installation experience for your end users. But what is a package?

figure 1

Figure 1. How a package looks in the Finder

A package has the extension .pkg and contains files and directories in a specified hierarchy. Putting all these files and directories into this hierarchy helps the installer control installation. If you look at a package through the Finder, it looks like a single file, but if you Control-click or right-click on it, you can see the package contents.

Finally, you probably know that double-clicking a package automatically launches an installation application without any other interaction.

Different Kinds of Packages

Let's get more terminology out of the way. There are different kinds of packages: the single package (an application, a script), a metapackage (really a file with a list of packages and other metapackages and the information needed to install them--hence, your "customization" option at installation), and a Tiger distribution project.

What this all boils down to is this: you can create your perfect machine image, save it as a NetRestore or disk image, and then alter the installation by combining the new application or script with the old image in a metapackage. Wouldn't that save you time and effort?

For the purposes of this article, we are going to concentrate on using the PackageMaker Assistant. A perfect example would be creating a unified experience for all the Mac OS X Support Essentials 10.4 students in my Apple classes.

Creating Packages: Contents

Worldwide Customer Training makes our classroom materials available to us via WebDAV as disk images or separate downloadable files.

figure 2

Figure 2. Student Materials as folder with sub-folders

In one of our first exercises, students download these materials from our server to the /Users/Shared folder. But what if they have trouble with their network port configurations, and cannot connect to the server? What if they are running behind other students in their initial installation?

Assuming all of the above criteria are moot, what happens if students do not understand the Mac OS X user interface (which is now more often the case)? How would they know where the /Users/Shared folder is located? Even experienced users do not know where the folder is located, let alone a Mac OS X newbie.

One solution is to push the materials out to the students via Apple Remote Desktop, which provides a fun demo (and gives ARD a great PR boost).

My time-saving option is to create a package with the student materials, and, depending on the skill set in the class, push the package out for installation, or install it remotely via ARD.

Running Mac OS X Tiger

Related Reading

Running Mac OS X Tiger
A No-Compromise Power User's Guide to the Mac
By Jason Deraleau, James Duncan Davidson

Pages: 1, 2, 3

Next Pagearrow