Reviews: MindVision FileStorm
Volume Number: 19 (2003)
Issue Number: 7
Column Tag: Reviews
MindVision FileStorm
Creating Mac OS X installers with FileStorm
by Miro Jurisic
Introduction
The way users install your products often makes the difference between a happy user and a quick trip to the trash. Users know that confusion during the installation process is often a prelude to a baffling product. To make the best first impression, therefore, you need to understand the currently available software delivery tools on Mac OS X, and balance your own requirements and those of your users.
The range of possibilities is vast -- from simple disk images and archives to complex interactive installers. This article reviews FileStorm by MindVision, a Mac OS X-only software delivery tool which allows you to create Mac OS 9 and Mac OS X disk images and Mac OS X installers.
Overview of FileStorm
FileStorm comes in two flavors, FileStorm and FileStorm Pro. FileStorm Pro is more expensive and offers more features. Both are royalty-free: you can distribute FileStorm installers and disk images without having to pay MindVision.
The main difference between FileStorm and FileStorm Pro is that FileStorm can only create disk images, whereas FileStorm Pro can also create Mac OS X installers. As of this writing, the price of FileStom is $19.95, and of FileStorm Pro $79.95.
Drag-and-Drop Installs
Apple's recommendation for all Mac OS X software is to use a drag-and-drop install if at all possible. This means that your users should be given a single item which they can install by dragging it into a location of their choosing in the Finder.
This method of distribution makes sense primarily for software which doesn't need to be in a special location in order to run, such as most applications. In contrast, a preference pane needs to be in one of /Library/PreferencePanes or ~/Library/PreferencePanes in order to work correctly; consequently, authors of preference panes typically have to provide either an installer, or a document which explains to the user how to install the preference pane.
Even for software which can be installed with a simple drag, you still have to overcome the hurdle of actually getting the software on the user's computer. If the user can download your software over the internet, you typically have to encode the software in some way. If you use resource forks (without which you cannot deliver software that works on both Mac OS 9 and Mac OS X), you have to use an encoding which preserves the resource forks. If you don't use resource forks, your software almost certainly contains a Mac OS X bundle, which consists of several files and folders, and therefore needs to be archived in a single file from which it will be extracted on the user's computer.
An increasingly popular way of delivering files over the internet is Disk Copy disk images. Using a disk image allows you to encode an arbitrary hierarchy of files and folders into a single file. Their main advantage over other archive formats (such as StuffIt or gzip) is they integrate very well with the Finder: the user can view the complete hierarchy without going through a (possibly lengthy) decompression step, and you have full control over the visual layout of the hierarchy.
Creating Disk Images With FileStorm
FileStorm offers a very elegant user interface for creating disk images, and also offers access to advanced features of disk images, many of which are not available in Apple's Disk Copy .
When you first launch FileStorm, a new project is created for you. A project consists of a disk image, which initially contains nothing but a custom background:
Figure 1. A new FileStorm project
Manipulating the contents of a disk image is straightforward: drag files and folders in from the Finder, or add them using the Add Files menu command or the toolbar button. Once files and folders are in the disk image, you can rearrange them in the FileStorm window.
If you need precise control over the files' locations, bring up the Inspector window from the Project menu to set items' positions with pixel accuracy.
Unforunately, FileStorm offers no advanced aligment and positioning tools. Its Align Horizontal and Align Vertical commands are very simplistic, and will suffice only for the simplest disk images.
Once you arrange the files, select Finalize Disk Image from the Project menu, and FileStorm will create a disk image that looks precisely as it did in your FileStorm project. You can mount this disk image and inspect it; by default, it is created in your Documents folder.
If you need to alter the disk image in a way that is not directly available in FileStorm, use the Build Disk Image command. This command creates a modifiable disk image for you to alter. After you are done with your changes, return to FileStorm and use the Finalize Disk Image command to build the final disk image.
Before you send the disk image to your users, you will probably want to change some of its settings from the defaults. To edit properties of the disk image itself, make sure that no items are selected by clicking on the disk image background, and bring up the Inspector window.
In the inspector, you can set the precise position and size of the main disk image window, as well as lock it against future modifications; this allows you to drag the FileStorm window around while you are working, without affecting the final location of the main disk image window on a user's screen.
The General category of disk image properties lets you edit the name and the icon for the volume; when the disk image is mounted, it will appear on the desktop with that name and icon. You can also configure the location at which FileStorm will put the disk image when it creates it, and add a background picture to your disk image. According to MindVision, FileStorm is currently the only tool that can produce a disk image with a background picture compatible with Mac OS X 10.1 and 10.2; disk images produced by other tools (including Disk Copy) fail to show the background image on either 10.1 or 10.2.
The background image is separate from the FileStorm watermark, which shows up in the top left corner of your FileStorm project window; the purpose of the watermark is merely to let you easily distinguish between your FileStorm project window and the disk image you may have opened in the Finder. The watermark never appears in the final disk images, and it can be hidden using the View menu.
Figure 2. A finalized disk image, mounted in the Finder
The Format category of disk image properties lets you choose exactly what type of file will be created by FileStorm. FileStorm can create disk images compatible with Mac OS 9, but they require a resource fork so need to be additionally encoded if you intend to deliver them on the Internet. Encryption and compression are also available, as well as several popular encoding format: BinHex, MacBinary, gzip, and bzip -- the last two being only useful on Mac OS X.
Your disk image can be set to open automatically after mounting, or to automatically extract its contents and move itself to the trash instead of mounting. However, not all versions of Mac OS X work equally well with those two options; consult FileStorm help before you decide to use them.
You can set the size of your disk image. If you don't need to make any modifications to it when you finalize it, you should let FileStorm choose the size automatically. Otherwise, set the size to either a fixed amount, or a fixed amount beyond the amount needed by the items FileStorm puts on the disk image.
Finally, if you want to display a license agreement to your users, add your license agreement to the list in the License Agreements section of the disk image properties; the user will have to accept the agreement before the image can be mounted. You can provide several license agreements in different languages, and the one shown will be determined by the user's International preferences.
Once you are done with your disk image, FileStorm can burn it to a CD; your download and your physical media will thus have exactly the same look, pixel-for-pixel.
Anyone who has ever created a disk image knows that it involves a lot of fiddling -- moving files around in the Finder, setting their positions just so... when you need to update a disk image with FileStorm, all you need to do is open the FileStorm project and click on the Finalize button. FileStorm will automatically grab the updated items off your disk and build an updated disk image with the files in the exact positions in which your FileStorm project puts them.
Creating Installers With FileStorm
While FileStorm excels at creating high-quality disk images, its power doesn't end there. Following the lead of Apple's PackageMaker, FileStorm Pro gives you the ability to create Mac OS X installers with a simple, straightforward user interface, similar to that of Apple's own installers.
As you probably know if you've installed any of Apple's software, Apple installers guide the user through a series of steps, including showing a license agreement and introductory documentation, selecting of a destination volume, and actually installing the software.
FileStorm Pro allows all of the same steps as Apple's PackageMaker, as well as additional ones: you can choose to show the user a graphic, an HTML file, or a QuickTime or an AVI movie. Furthermore, FileStorm Pro allows you to arrange all those steps in whatever order you desire. Unlike Apple's Installers, which only allow you to present a set of three documents in a predefined order, FileStorm leaves you in control of the number and the order of the documents. For example, you can create an installer which shows one welcome document, installs some files, then presents a license agreement, and then installs more files.
To create a new installer in FileStorm Pro, you use the Add Installer command in the Project menu. The installer is added to the disk image, and you can set its properties by double-clicking it to bring up the Inspector window.
The General installer settings control some overall behavior of the installer, such as whether the installer needs the user to select a destination volume, or whether the installer needs administrative privileges to run. You can give your installer a custom icon and have it require a version of Mac OS X.
If your installer is so complex that users might need an uninstaller, you can have the installer automatically create an uninstaller, and put it in a location of your choosing.
The main part of the installer is in its Actions. An installer action can install an item on the user's system (at an absolute path, relative to user's home, or relative to the install volume) , or it may present the user with some information; installer actions can be UNIX scripts, which give you considerable power over in your installer. The main thing lacking from installer actions is the ability to affect the flow of the installer itself; FileStorm Pro does not offer any ability for one installer item to influence another. That means that the user has essentially no control over the flow of the installer; the flow is entirely determined by you at the time the installer is created. As a result, just as in Apple's installers, you cannot have any optional install items; an item is either installed or it isn't.
Setting up an installer is as simple as dragging all the installer files into the Actions list in the Inspector window (or adding them using the Add Files command). Once they are in the list, you can arrange them to taste and set the action for each file. Initially, the action of each file is Install Item, which means that it will be installed on the user's system.
For any files which you do not wish to install on the user's system, you need to set the action to an appropriate value, such as Display Graphic (which displays a graphic to the user) or Support Item (which is used for files which are needed by other parts of the installer -- for example, any images used by your Display HTML actions).
When you run a FileStorm Pro installer, its behavior is similar to that of Apple installers. The left side of the window has a buletted outline of the installer process, and the content of the current installation step is on the right; you can assign each installation step a custom title which appears in the installer outline.
Figure 3. A FileStorm installer in action
If your installer needs to do something beyond the things directly provided for by FileStorm Pro actions, you have the full power of UNIX shell scripting available to you via the Execute Script install actions. Example scripts which come with FileStorm include changing ownership of permissions on installed files, opening files and folders, and adding login items to user's preferences. Since shell scripts can compile AppleScripts on the fly and execute them, you also have direct access to AppleScript from your FileStorm Pro installers; this is, indeed, how the Login Item sample shell script works.
Finally, in addition to all the shell scripts you can execute during the installation process, you can have a script execute immediately after the installer launches, or immediately before the installer quits, using the Advanced installer settings. If your installer produces an uninstaller, you can add those two options to your uninstaller as well.
Integrating FileStorm With Your Build Environment
FileStorm is fully scriptable using AppleScript, which allows you to control it from any build system which gives you the ability to execute arbitrary AppleScripts or shell scripts. Both Project Builder and CodeWarrior have this capability.
FileStorm comes with a number of sample AppleScripts; they show you how to control every aspect of project building, from adding files and folders to a disk image, to finalizing images and manipulating installers.
The main drawback of driving FileStorm via AppleScript is that it requires you to launch the FileStorm graphical interface in order to build a disk image. As a result, you cannot build a disk image with FileStorm unless you are physically logged in at the computer; doing it remotely via SSH doesn't work.
Most paths in the installer settings are treated as project-relative if they refer to files which reside in the same folder as the installer project itself, or a subfolder of that folder. This allows a project to be moved from one computer to another. Unfortunately, the location of the output image is not treated in the same manner, and as a result you have to be careful to use an output location which exists on every system you plan to build the installer on; otherwise, when you move the project to a new computer, you may get errors if the destination path doesn't exist.
The following shell script builds a FileStorm installer from CodeWarrior:
#!/bin/sh
# Copy the application into the installer input folder
ditto -rsrcFork "${MW_OUTPUT_DIRECTORY}/SurfWriter.app" "${MW_OUTPUT_DIRECTORY}/Installer/Binaries/SurfWriter.app"
# Build the installer using AppleScript via osascript
# Note the try/quit/repeat loop -- FileStorm returns from the
# finalize event before the image is finalized
osascript -s o << EOF
with timeout of 3600 seconds
tell application "FileStorm"
activate
open (("${MW_OUTPUT_DIRECTORY}/Installer/SurfWriter.fsproj" as POSIX file) as alias)
tell first document
build image with replacing
finalize image with rebuilding
end tell
repeat while true
try
quit
exit repeat
on error
delay 5
end try
end repeat
end tell
end timeout
EOF
Summary Of FileStorm Capabilities
If you want a simple drag-and-drop installation, FileStorm gives you a great way to deliver your software with minimal hassle and a high-quality presentation. By using the option to automatically replace the disk image with its contents (only available on Mac OS X 10.2.3 and later), you get a self-extracting package; the only thing the user has to do after downloading it is double-click.
If you have a more complex software package consisting of a multitude of items, but do not require an installer, FileStorm lets you create a disk image with your software; you get a high degree of control over the layout, appearance, and behavior of the disk image, and you can burn the software to a CD with a click of the mouse.
If you need an installer for your software, FileStorm Pro offers a great deal of flexibility in customizing your installer, while retaining the simple and straightforward user interface pioneered by Apple's installers. FileStorm Pro installers are not without limitations; a big drawback for large software installations is the lack of control over installer flow.
However, if FileStorm Pro installers satisfy your needs, using a FileStorm Pro installer on a self-extracting disk image is a marvelously simple way to deliver an excellent installer with minimal hassle for both you and your users.
Conclusion
FileStorm and FileStorm Pro are both excellent products and priced very fairly. The user interface is superb, and has the polish of a well-designed Mac application -- one that makes you feel in control of your project and helps you get your work done.
No utility provides a user interface for creating disk images that is cleaner or more powerful than FileStorm's. By using FileStorm to create disk images, you can save yourself a great deal of tedious fiddling in the Finder, as well as eliminate a bunch of specialized AppleScripts and shell scripts from your workflow.
The user interface of installers produced by FileStorm Pro is elegant and familiar, and they provide flexibility significantly beyond that of Apple's PackageMaker. There are more types of install actions and their order and numbers can be varied much more so than with PackageMaker.
Two features of PackageMaker missing from FileStorm are the ability to create installers without being logged in at the computer, and the ability to create subinstallers (metapackages, in PackageMaker parlance).
Unfortunately, there is no way to dynamically control the flow of a FileStorm Pro installer at runtime. If you need the ability to conditionally install an item based on the state of user's system or input from the user, you won't get very far with FileStorm. MindVision's current recommendation is that you get a copy of Installer VISE, their flagship installer product for Mac OS 9 and Mac OS X.
However, once you've used FileStorm, using Installer VISE is a significant setback in elegance and ease of use; installers generated by Installer VISE are less straightforward less coherent than the ones generated by FileStorm. I can only hope that using Installer VISE is a temporary workaround, and that MindVision will enhance FileStorm so that it can more effectively compete with Installer VISE on Mac OS X -- both because FileStorm is much more pleasant to use, and because it makes my users' lives better.
FileStorm Pro installers require Mac OS X, so if you need a Mac OS 9 installer, you have to use a different product (possible Installer VISE); however, if you only need a disk image to deliver your software, FileStorm does allow you to create ones that work on Mac OS 9 and Mac OS X.
Miro Jurisic is a wacky European working for Avid Technology. In his copious free time, he answers questions on comp.sys.mac.programmer.*, and thinks about chemistry. Visit him at <http://meeroh.org/>.