MindVision Installer
Volume Number: 16
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.
Installation
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 . 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.
Basic Installers
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.
Advanced Installers
Archive Window
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.
Figure 1.Standard.
Figure 2.Menu.
Figure 3.QA.
Figure 4.WebCheck.
Action Items
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 5.Logic.
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
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