Volume Number: 16 (2000)
Issue Number: 4
Column Tag: Tools of the Trade
Using MindVision’s Installer VISE
by Steve Huntsberry
Contributing Editor, Eric Zelenka
Building Installers with MindVision's Installer VISE
Installer VISE Overview
What is Installer VISE?
Installer VISE is a tool that allows developers to build stand-alone installers for their software. Installer VISE contains almost every conceivable feature a software developer could desire in an installer. Core features include task assistants to automate the build process, a customizable builder interface for designing installer interfaces using drag and drop, and build directives used to package software components and other content in preparation for installer generation.
Installer VISE provides enhanced support for direct installation over the Internet. Apple's own QuickTime 4 installer uses Installer VISE to install and update QuickTime 4 and its components. Rather than downloading the 8 MB full installer, users can download the 400 KB "active" installer. When this active installer is run, it downloads the necessary software components for the installation to the user's hard disk from the Internet. It can also be used as an updater utility, such that if a user already has a previous version of the software installed, the active installer will only download those components that need to be updated.
Other important features are multi-target build automation for generating multiple installers from one set of data, automatic localization support for 16 languages, and support for complex installations that can involve launching additional Installer VISE instances as well as launching other utilities.
Installer VISE ships as a Mac OS application with a large number of support files, templates, and examples. The current version is Installer VISE 6.5, released to support Mac OS 9 features. For the experienced Installer VISE developer, Installer VISE 6.5 comes with a number of new features that make it a worthwhile upgrade. These features include support for Mac OS 9 application packages, multi-user accounts, special folders, and gestalt codes. Application packages are a way to install your application and all of its components together, so they appear to be one file in the Finder. This can help to simplify the user experience. Multiple user accounts allow each different user to install software separately. For example, one person might want a basic installation, while a power user might use a custom installation. This also allows system administrators to restrict application access to a select group of users. The ten new special folders supported include Keychains, Shared Documents, and System Trash. The new gestalt codes allow an installer to check for Mac OS 9 and the latest Power Macintosh G4 hardware. And, like all other releases of Installer VISE, the new version (6.5) was available for free to all currently licensed users.
The Installer VISE application is reasonably fast, although it is not PowerPC-native. Note this does mean it will run on older systems, all the way back to System 7.0 on a 68020 processor. Installer VISE does not use Navigation Services, but instead has a heavily customized Extended Add standard file dialog, used to add files to the installer. It will be interesting to see if MindVision ports Installer VISE to Carbon and/or Mac OS X.
As with the Installer VISE application, created installers are not PowerPC-native. Of course this does not limit your installed files from being PowerPC-native, but if you need to run on Carbon or environments that do not contain 68K emulation, it should be a consideration. It also limits the installer performance. There is an option to incorporate a PowerPC Decompressor into the installer to speed up the decompression stage, which helps somewhat. Hopefully, MindVision will support fully PowerPC-native installers in a future release.
The standard method for installing Installer VISE is to download the software distribution package from MindVision, then run the installer and follow the instructions. Since the Installer VISE installer uses Installer VISE itself, the process should be familiar. Note you need to download the Installer VISE User Guide (in PDF format) separately from the Installer VISE package. Both of these items can be found on the MindVision web site <http://www.mindvision.com/>. You can also register Installer VISE through the web site. Note if you are a shareware or freeware developer, Installer VISE is available free of charge, however you still need to obtain a serial number. See Licensing Issues below.
The basic Installer VISE paradigm is to use the Installer VISE application to create a document, known as an Archive, that contains the settings for the installer. Then you build the installer itself as a stand-alone application, using the settings from the Archive.
As installed, Installer VISE starts with a simple assistant interface that provides a systematic process to build a basic installer. These steps are: create new archive, add files to archive, create install packages, assign files to packages, set file attributes, set installer options, and build the installer. Future Installer VISE sessions start without any windows, but the assistants can be brought back by selecting Task Assistants on the Extras menu.
Selecting Create New Archive brings up a standard archive window. Saving the archive creates an Installer VISE document containing the settings for your installer.
From this point, the assistant windows are used to provide help for the remaining steps. There are several built-in demonstrations that show a QuickTime movie to display graphically the exact steps to be taken. For example, there is a 10-second movie showing how to drag and drop items from the Finder to be added to the installer. The assistant also provides shortcuts for several menu items that are useful at each step.
Each primary installation option in your installer is known as a Package. A basic installer might only have the Easy Install package, but you can create and add multiple Custom Install packages to selectively install only certain files. There are also Hierarchical Packages and List Packages, used to break down the installation options into smaller pieces.
Once you have created your packages, you then assign files to each package. The default behavior is for all files to be part of Easy Install, and no files for any Custom Install, until they are added. Entire folders of files can be added or removed from packages at once.
Every file has an associated Get Info dialog that is similar to the Finder Get Info dialog, but with a large amount of additional information needed for installation. This information includes compressed size, type/creator, conflicting file replacement rules, Mac OS gestalts, and special options such as Restart After Installing. There is also an option to Get Info for multiple files to change their settings in bulk.
After all the files and packages have been prepared, you can use the Installer Settings dialog to change settings for your installer as a whole. This includes a cornucopia of options, such as language, package descriptions, default settings, ReadMe and license agreement files, installer log file, splash screens, system requirements, and special settings for web installers. The default settings result in a generic installer that operates in a reasonable manner.
The final step is to build your installer. The default is for a single file, but Installer VISE also supports floppies, disk images, CD-ROM installers, and web installers. If you have not yet registered your copy of Installer VISE, it will ask you for your registration code. You can go ahead and create installers without registering, but they have a limited shelf life of 3 days, after which they will refuse to run. Such unregistered installers will also display a message that they were created using an unlicensed installer, preventing their use in shipping products by all but the most unscrupulous of developers.
Installer VISE also comes with a complete tutorial covering the above steps. I suggest going through this tutorial, if any of the above steps seem unclear or complex. Complete tutorial instructions are contained in the Installer VISE User Guide.
The MindVision web site http://www.mindvision.com/ also has a number of example installer archives that demonstrate some of the more complex features. You can download these and see how the various settings are configured, as a model to build your own installers.
The archive window is the master control center for your installer. Most of the standard options can be set directly from this menu. It has good support for drag and drop, Balloon Help, and other Mac OS technologies. There are a few implementation issues, such as the delete key does not delete files (instead you must select the delete button), and adding an alias actually adds the alias by default (rather than the original file), but these are relatively minor.
The Install To popup menu allows you to install items to many special Mac OS folders, including of course the System Folder, Control Panels, and other standard locations, but also newer folders such as ColorSync Profiles, Launcher Items, and Scripting Additions. Installer VISE 6.5 also supports the new special folders introduced in Mac OS 9, as noted above.
The Replace popup menu tells the installer what to do when it encounters a conflicting file. The Gestalt popup menu supports checking various Mac OS gestalts. You can also build your own custom gestalts. The Packages popup menu allows adding items to and removing items from individual installer packages, e.g. Easy Install or Custom Install.
All of these options are available through Get Info, however it is often easier to manage all of the files at once from the main archive window. You can use the Customize feature on the Layout menu to configure multiple layout views. This allows you to customize the display of the archive window. There are over 30 fields that can be used in a custom layout, from Compressed Size to Icon Location. The layout editor lets you use an existing layout as a starting point or you can create a new layout from scratch. You can even have multiple windows open that use different layouts to display several views of the same installer archive. This can help to reduce the need to use Get Info all of the time. Layouts are preserved across Installer VISE sessions and can be used with any archive file, so you can configure a set of standard layouts and use them for all of your installers.
Action Items are special actions that occur during installation. The results of these Action Items can cause your installer to skip files, install to different locations dynamically, stop the installation, or other meta-installation tasks. They can be thought of as tiny programs that run during installation to make decisions about how the installation should proceed.
Action items can perform functions such as delete, find, move, rename, create alias, etc. For example, a Find action can be set to look for a specific file or folder by name, type/creator, version, dates, etc. and various combinations thereof. You can also display information to the user, receive their input, and take an appropriate action based on their response. You can choose to install or not install files based on the result of an action item. Action items can call other action items or external code (see below) to support more complex operations.
Figure 6.WinVISE 1.
Figure 7.WinVISE 2.
To create an action item, select the New Action popup on the Archive window. The popup lists the various types of action items available. Choosing one opens a dialog appropriate to the type selected. Each action item has an "if" section that determines under what situations the action item will be activated. Following is a "what" section that provides the necessary parameters for the action item. For example, the Find action item requires you to set where to search and for what to search. Below is an "options" section that allows you to set options specific to the action item. Looking at the Find action item again, it allows you to return the parent folder of the found item and/or open the found item. Finally at the bottom of the dialog is an "external codes" section. This allows you to specify external code to be run at various times during the execution of the action item.
Once you have created an action item, it appears in the archive window along with the other items. It can be added to or removed from the various packages in your archive.
One action item of special note is the Sub-Launch Action, which can launch another program or even another installer. This allows you to install components required by your software, rather than quitting and requiring the user to run such an installer separately.
External Code provides the ultimate flexibility for Installer VISE developers. If you encounter a situation that cannot be handled by the many features built into Installer VISE, chances are you can write a piece of external code (aka Xcod) to deal with the situation. Even if you think your product requires something more sophisticated than Installer VISE, if you look carefully you may find that you can use Installer VISE as your user interface, and provide the code for the complex features in the form of Xcods.
External Code resources are generally created using C/C++ development tools. You need to use an entry point that looks like: void main (ExternParamBlock *eInfo), where the ExternParamBlock points to a data structure defined by MindVision. This data structure contains 27 parameters that represent the current state of the installation. Some of these parameters are additional structures, so you can see there is a large amount of data available. Your code is then responsible to manipulate this data structure as appropriate for the desired effect. Once you have written your code, you then use your development tools to generate a code resource. This code resource is traditionally of type Xcod, hence the abbreviation.
Once the Xcod has been created, go to Installer VISE and select External Codes from the Archive menu to bring up the External Code List. Use New to create a new external code reference using the resource type and ID of your Xcod. Then open the Project Window using Show Project Window on the Archive menu and select Resource Files. Select the Add button on the project window and select your code resource to add it to the archive. When the archive is used to build your installer, your code resource will be added to the resulting installer.
Using Xcods provides maximum flexibility but also maximum risk. If you are not careful, you may accidentally write code that crashes the installation or has other detrimental effects. I suggest you write your Xcod as a standalone module first, perhaps using the values from an ExternParamBlock captured in a previous session as input. The debugging environment in your development tools may provide better support when your code is running independently, rather than while running as a code resource compiled into your main installer.
Note that Xcods are code resources, meaning they are 68K-only code. This means you need to ensure that you have 68K-compatible source code and use only 68K libraries. Hopefully MindVision will provide some means in the future to use Apple Code Fragment Manager (CFM) libraries, either dynamically or statically linked, in order to support PowerPC external code. Otherwise, you will not be able to use some of the new Carbon and Mac OS X APIs that are available.
Many Installer VISE installer archive settings can be changed through AppleScript. MindVision provides a complete AppleScript dictionary with 22 verbs. This allows for the building of installers using automated scripts. There is elaborate documentation and examples in the Installer VISE User Guide.
Note there is no support for decompiling Installer VISE installer archive specifications created using the GUI into AppleScript commands for later use. Therefore, any archives built from scripts should be cross-referenced with an archive built using the GUI, to be certain all of the values are being properly set.
The installer archive file itself is a proprietary binary file, so it is impossible to tell just by looking at the file if everything is correct. It might be nice if Installer VISE supported some type of text-based description language for archive files, perhaps similar to the way binary *.rsrc resource files can be decompiled into text *.r files and back again for fine-tuning.
In addition to building your installer using AppleScript, you can use AppleScript within your installer upon a user's system, or a user can use AppleScript to drive your installer during installation. The former is useful to perform complex actions that might be beyond the capability of an action item but not require a full-blown C/C++ Xcod. The latter is primarily for system administrators and others who may want all of their users to receive identical installations of your product. AppleScript is used to make the selections from the installer, rather than an end-user manipulating your installer directly.
Including an AppleScript in your installer involves many of the same steps as using a Xcod. You save the compiled script and copy the scpt resource for use as a code resource. The primary benefit is you can write your code in AppleScript, rather than a heavyweight development language such as C/C++.
The section in the User Guide on using AppleScript to drive an installer may not seem important to developers, but it may be worth a look, if only to see how an end user might try to use AppleScript on your installer. You can read about the standard recommended operations, and perhaps use that information to make your installer more easily scriptable.
Installer VISE includes a Forms feature on the Archive menu for the creation of various forms. One important use of this is to create user registration forms. This allows you to customize your registration form to include exactly the information you require and no more or less. The Forms layout editor is somewhat rough around the edges, however it does provide some valuable functionality, and frees you from using a default registration form that may not contain the data fields you need. You can have more than one form, which is useful if your software ships in multiple languages. The forms can be configured to appear when the appropriate language is in use. Completed registration forms can be configured to be printed by the user and mailed to your address, or you can insert your e-mail information and the user can send it to you electronically.
Installer VISE allows you to display images known as Billboards during an installation. Billboards are typically messages for the user to read while they wait. They can be used to explain how to use the software being installed, advertise for other software by your company, or simply to thank them for their purchase. Installer VISE provides a drag and drop interface for billboards in color or black and white, or you can include your billboard in a separate resource file. You can use one billboard or a sequence of billboards, and even assign different billboards for each disk of a multi-disk set or use different billboards for different installation packages. You activate the Billboards feature by selecting Billboards from the Archive menu.
Installer VISE supports the creation of Active Web Installers. These installers use FTP or HTTP connections to download data from the Internet for installation. The installer application itself can be very small, with most of the data residing on a server. Such an installer can also function as an updater, by going back to the server to look for newer versions of data. Internet Explorer was the first application to use web installer technology. Apple's own QuickTime 4 was the first to use the second generation web installer techology. Both the web and ftp installs work correctly with a wide variety of firewalls and proxy servers.
The basic creation of an Active Web Installer is the same as for any other installer. Once your files have been assembled, you make a few adjustments to the installer archive settings and then it is ready for web installation.
One of the benefits of web installation is to allow users to download only the data necessary for their installation. This means if they are performing a custom install of only part of your software, they should only need to download that part. To support this, you must separate your install files into file groups for the various package configurations. Then the installer only downloads the file groups from the server that are relevant to the desired installer package.
Note this model can break down when your installer becomes complicated, because each file group is either downloaded or not. For example, you may build an installer that contains a package to upgrade previously installed software of varying versions. The web installer will download all of the updated files for all of the supported older versions, even though only a few of the files might be needed to upgrade from a recent version to the latest version.
Alternatively, you can use Byte Range Downloads, where all the data is in one file, but the installer retrieves only the relevant byte ranges from the file for the required data. The drawback is this requires a server that supports HTTP/1.1, while basic web installation only requires HTTP/1.0. Fortunately, the major web servers support HTTP/1.1, so this is my recommended option.
You can also include items within the installer itself rather than store them on the server. This is useful for items that are always installed, such as ReadMe documents and other small files.
Installer VISE web installation works using any type of server to store the installation data. Therefore your server can run on Mac OS, or it can run on Linux, Unix, Windows, or other operating systems. The requirement is that it supports HTTP/1.0, or HTTP/1.1 or FTP for byte range downloads. Web installation also works through client-side proxy servers, provided the end-user enters the appropriate proxy server address information.
An updater is essentially an installer that only updates an existing set of files to a new set of files. For example, you may want to use an updater to update instances of your application in the field from version 1.0 to 1.1. Updaters are usually distributed free of charge, so even if you require users to purchase your software in shrink-wrapped format rather than by downloading from the Internet, updaters can be made available via web distribution.
One essential difference between updaters and installers is an updater does not contain all of the information needed for a full installation. Rather, it contains the incremental differences between the base version and the revised version, in much the same way as backup utilities generate new backups after the first by adding or modifying only those elements that have changed.
To create an updater, select New Archive from the File menu as with an installer. Click on the New Updater button to bring up the Update Item dialog. You fill in the fields with the file names of the old and new files for each of the 68K, PPC, and Fat configurations. Each field can include up to eight files. If you exceed that limit, you need to create additional updater items for the additional files. Thus, it is a good idea to keep your updates isolated to a few files.
Each set of files can also have an associated set of Resource Exceptions, in case you want to preserve some resources that may have been modified in the old version. This might be useful if you write registration information into a resource in the application itself, instead of in the Preferences folder.
You can use the Settings button to bring up a dialog with a large number of settings for what to do with each file. This allows you to decide what to do with the old files, change file dates, and other useful details. Then the updater item is stored in the archive as with any other item.
The standard Installer VISE installation also contains an updater creation tutorial, similar in content to the installer creation tutorial. Feel free to run through this if you are unclear on any aspect of updater generation.
One convenient feature in Installer VISE is Autocreate Updater Archive. This automatically builds an updater archive by comparing an old archive and a set of new files. For example, you can prepare both your 1.0 archive and 1.1 files, run Autocreate Updater Archive, and the output is an updater archive from 1.0 to 1.1. Once this new archive has been created, you can modify the archive as necessary, and then build your updater. The Autocreate Updater Archive feature can be found on the File menu.
You can generate an archive report to help track down problems in your installer. There are five types of reports, ranging from listing the contents of a particular package to producing a diagnostic report of possible errors in the archive. Select Print Archive Report from the File menu to bring up the Archive Report dialog, from which you can select report type and output options.
This is a useful feature to check the state of your installer archive, and is one step towards creating an export file containing all of the parameters associated with a particular installer archive. Such an export file would allow for automated build tools to automatically verify the state of an installer, rather than requiring manual examination by a human.
You can build your installer in debug mode, similar to building an application with debug flags enabled. Installer VISE Installers running in debug mode put up a window behind the installer GUI. This window displays each action taken by the installer during execution.
To set up a debug installer, you need to add another target to your archive. This is done by selecting Show Project Window from the Archive menu, then using Add on the Targets section. Check the Create Debug Installer box in the Target dialog to enable debug mode. Alternatively, you can set the Format to Ask at Build in the Target dialog under Attributes, and Installer VISE will put up a dialog at Installer generation time to ask if you want to create a debug installer or not.
One of the first questions that come to mind when choosing an installer is the cost. Fortunately, Installer VISE has a licensing model that is both reasonably priced and easy to manage. There is a sliding scale where you pay a fee based on the number of copies sold of your software. Therefore, you only need to keep track of the number of copies sold and write MindVision a check when you cross one of the fee thresholds. You do not need to maintain a count of how many developers are using Installer VISE, nor worry about CDs you have burned but not sold. The fees range from $275 for 3000 copies to $1500 for 60,000 copies. If you sell more than that, you need to talk to MindVision to arrange terms.
Shareware and freeware developers have an even better deal. MindVision will provide an unlimited license to Installer VISE free to developers who are not associated with a prominent commercial operation, a non-profit organization, nor with an educational institution. You simply need to fill out a form on the MindVision web site <http://www.mindvision.com/Pricing/shareware.asp> and then they will e-mail you a complementary Installer VISE serial number. You do need to include a small bit of text in your installer, noting that it was provided by MindVision. That is a small price to pay for a free, full featured, and robust installation solution for your product.
Installer VISE Lite and Updater VISE
MindVision also offers Installer VISE Lite 3.6 and Updater VISE 1.4. Installer VISE Lite was at one time positioned as a lightweight version of Installer VISE for simple installers. Updater VISE was originally a variant of Installer VISE used only to create updaters.
However, Installer VISE Lite and Updater VISE have not been updated since the time of Installer VISE 4.6 in 1997. With the release of Installer VISE 5.0 in 1998, all of the functionality of Updater VISE was incorporated into Installer VISE. Installer VISE 5.0 also included all of the features in Installer VISE Lite 3.6.
Therefore, I recommend that all new installers and updaters should be created with the full Installer VISE. Although Installer VISE Lite has quite a few features and offers a one-price licensing model, I do not recommend it or Updater VISE, because they are no longer being updated. Hopefully at some point MindVision will remove the Installer VISE Lite and Updater VISE downloads from their web site, and redirect interested parties to the latest version of the full Installer VISE.
Installer VISE for Windows
MindVision also has a Windows version of Installer VISE, with approximately same feature set as Macintosh Installer VISE. This is useful if your product ships on both Macintosh and Windows, and you want to provide an equivalent solution on both platforms. Note while Installer VISE is often considered as the industry-standard installer for the Macintosh, it has significant competition on the Windows platform.
Installer VISE 3.1 for Windows supports many of the same features as Installer VISE 6.5 for Macintosh, but it does it using the Windows standard look-and-feel. Both the Installer VISE application and created installers look different than on the Macintosh. The Installer VISE application contains elements such as an extensive toolbar and a hierarchical menu to represent installer packages. A created installer typically looks like the Windows system installer, such that it consists of a series of screens to obtain user input, and then it initiates the installation procedure following the last screen.
Installer VISE 3.1 follows the basic model of creating an installer archive using drag and drop, then generating a compressed executable file that the user can run to install the software.
Some of the advanced features from the Macintosh version also supported on Windows are: Archive Wizard (aka Task Assistant), build directives and targets, packages and sub-packages, multiple languages, installer log file, Archive Items (aka Action Items), properties (aka gestalts), external code in DLL format (aka Xcod), runtime variables, sub-launching other programs, billboards and splash screens, license agreements and ReadMe documents, Active Web Installers, and updaters with the Autocreate Updater Archive enhancement. There are also a number of Windows-specific features, such as updating *.INI files and the Registry, and enabling or disabling Windows NT Services.
Installer VISE was written first for the Macintosh, and this is reflected in the Windows version. For example, in the documentation I found several references to folders instead of directories, as they are generally known on Windows. There was also a sidebar that mentioned file types and creators, which are meaningless on Windows, as it uses file extensions and associations to match applications and their documents.
Installer VISE for Windows does have a slightly different licensing model that is worth contemplating. The price is $695 per developer for the Installer VISE application and one year of support, which includes free, unlimited phone and e-mail tech support. Future years of support are $295 per developer. There is no per-copy charge for software sold. There is also a separate one-time charge for language files, consisting of translated user interface components for generating multi-lingual installers. This fee is $200 per language, or $1000 for all supported languages. Note the per-copy costs are for your release engineer or another developer who creates your installers, not for every member of your development team.
Words of Wisdom
Sometimes developers build their installers at the last minute, just as their product is ready to ship. This can result in a less than fully professional result from the installer, often the first impression a user gets of your software. Installer VISE provides a powerful tool to deal with almost any situation, but it requires a through knowledge of the program. The learning curve is not steep but it is long, with the 526-page user guide testifying as to the depth of the Installer VISE feature set. I suggest that you take your installer seriously, and begin developing the installer as soon as you have your first pre-alpha build available. Then when it comes time to release the product, you will be an Installer VISE master and installer bugs will be a trivial issue.
This article has left out many advanced topics available to installer engineers. This includes build directives, runtime variables, and automatic localization. There are also dozens of individual settings that can be made to customize your installer. Developers using Installer VISE should read the Installer VISE User Guide and decide which areas of customization are important for their product. While Installer VISE may be able to create a functional installer using default settings and the basic features, to provide a powerful installer that can handle almost anything it might encounter requires learning the advanced features.
There are also many optimizations made possible through these advanced features. While hand-building a couple of installers is fine for a small shareware company, larger corporate users should consider looking into automating the build process by using build directives, AppleScripting, and other features meant to reduce overall product ship time at a small cost in release engineering time. If MindVision ever produces a version of Installer VISE that supports complete import and export features to allow for installer archives to be built in a fully-automated fashion, those developers who already take advantage of the current support for automation will be in position to further optimize their build process.
Steve Huntsberry is a Computer Scientist in the Type Development department at Adobe Systems Incorporated. He is the Technical Lead for the Adobe Type Library Japanese OpenType retail products. Steve can be reached at firstname.lastname@example.org.