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.
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:
opendiff, used by developers to compare or merge code files or directories, and absolutely essential to your sanity.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.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.
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. 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.
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.
Worldwide Customer Training makes our classroom materials available to us via WebDAV as disk images or separate downloadable files.
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.
|
Related Reading Running Mac OS X Tiger |
|
You start by double-clicking on the PackageMaker application located at /Developer/Applications/Utilities/PackageMaker. You are asked to pick a new project:
Figure 3. New Project choices
I am going to ask PackageMaker Assistant to walk me through creating a distribution project, so I click the Assist Me button. Next, you can give your project a meaningful title and put in your organization's name:
Figure 4. Naming your project
Now, on to the fun. Here is where you choose the files and/or directories you want to install, and where you want them installed on the user's hard drive.
I am going to choose the Student Materials folder from my hard drive plus the Skills Assessment Guide for certification study post-class. I will also specify where I want the materials installed (/Users/Shared) per package. Please be careful about checking the Relocatable box unless you are sure the files and/or directories do not have dependencies elsewhere in the file system.
Figure 5. Choosing your package contents and installation locations
For each of the files/directories chosen, I can supply comments and post-installation actions by clicking on the large i:
Figure 6. Content options
In Tiger, a new package-naming convention is in effect, which looks very much like a variation on reverse DNS: com.appleComputer.supportEssentialsStudentMaterials.StudentMaterials. You may change it if you like. You may also change the version number.
Figure 7. Naming conventions and version numbers
|
Do you have special licensing or terms of service in your school or office? Will this new application need explanatory notes (i.e., ReadMe)? Here's an example of a ReadMe:
Figure 8. Sample ReadMe
I will include it in my project, along with a custom background picture (it's my English springer spaniel's turn to be a star).
Figure 9. Special resources for your personalized package
You can save the package to a server, your desktop, a USB dongle ... whatever makes the most sense in your environment.
The Package Creation screen will begin to build your package.
Figure 10. Package Creation
You can now view the package, test it, or edit it. Hmm ... Maxwell is taking up too much of the screen:
Figure 11. Testing your package
I could go back and take out the corny picture. (Don't worry: Apple will supply a generic background for you if no picture is supplied. It's the one with the leaning pencils.) Maybe Maxwell's "15 minutes" aren't up yet. I will set other parameters to place the picture just right. Be sure to rebuild your package after making changes.
Ah, that's better!
Figure 12. Maxwell looking good (dog)!
Now it's time to test your package. Go ahead and try installing it on your friend's machine. Isn't that cool? Are you still friends?
You are so proud of yourself. Unfortunately, your back-patting is short-lived: someone ''higher up" just tweaked the ReadMe file to include a small change on each line? Drats!
Boy, you could use FileMerge right about now! But that is a subject for another article.
Shelley Weiner is president of Business Rules, Inc., a technical training and Macintosh consultancy located in the beautiful Hudson Valley of New York State. She is an Apple Certified Trainer, an Apple Certified Systems Administrator, and a member of the Apple Consultants Network.
Return to the Mac DevCenter
Copyright © 2009 O'Reilly Media, Inc.