InstallAnywhere
Volume Number: 15 (1999)
Issue Number: 12
Column Tag: Tools of the Trade
InstallAnywhere
Contributing Editor, Andrew Downs
A Truly Multi-Platform Deployment Solution
This article is set-up to provide you with an introduction to InstallAnywhere and lead you on a tour of the product's main functionality. If you'd like to see the functionality in action as you read you can download fully functional trial versions of the product from the Zero G Software Web site at http://www.ZeroG.com. This article will focus on the new InstallAnywhere Enterprise Edition. |
Installers are one of those vital tools that no one thinks about unless they don't work. Everyone has experience blind clicking "next" buttons, only finding out after the fact that something wasn't configured correctly or a file was placed in the wrong location. Fortunately for developers, today's native solutions make the process of building installers for platform-specific software easy and reliable.
Then Came Java[TM]...
The "Write Once, Run Anywhere[TM]" promise of the Java[TM] programming language has enticed many developers to adopt the technology, letting them write an application once and deploy it to a wide variety of end-users, regardless of which operating system they are running. In theory this is a very attractive proposition; in practice deploying software across multiple platforms is a highly complex process. For example, simply running a Java application takes a high level of technological prowess. Unlike the ease of launching a native application, launching Java software is a multi-step process that involves setting system environment variables, and invoking (via a command-line interface) one of the many Java class files that comprise an application. To add a layer of complexity, Java software needs a Java virtual machine (VM) installed on the system that can execute the program.
Until recently, no way existed to build multi-platform deployment solutions that provide the ease-of-use and reliability of native installation tools. Older, legacy installation solutions are not up to the task. First of all, these installers are platform-native products and can only run on the platform for which they were built. Secondly, they are unable to adapt to the conventions of other operating systems. For example, Mac "aliases" are created in an entirely different manner then Windows "shortcuts".
A Multi-Platform Solution...
Enter the InstallAnywhere® family of products. InstallAnywhere from Zero G Software is a Java-based tool designed to address the challenges of deploying software across multiple platforms. InstallAnywhere provides developers the functionality they've come to expect in native solutions, the difference is that InstallAnywhere handles all the platform-specific details and allows developers to build a single, universal installer that can deploy software to any Java-enabled system from intranets, the Internet or CD-ROM. This includes Mac OS, Linux, Solaris, AIX, HP-UX, IRIX, OS/2 and Windows 95, 98 and NT.
Essentially what Zero G has done is taken the time to incorporate functionality into InstallAnywhere that addresses all the idiosyncrasies of deploying to "native" platforms, and provides developers with a powerful design environment for building customized deployment solutions. The benefit to developers is that they have a tool that allows them to tailor an installation to their needs, and they do not have to be expert in the platforms to which they are deploying. For example, if you want to deploy your Java application to a Unix-based system all that you need to do is click a button. InstallAnywhere deals with the rest of the platform specific details. Not only does this make it easy for Mac developers who want to deploy software to other, possibly unfamiliar, platforms, it also makes the process of deploying Java software to the Mac easy.
InstallAnywhere's support for the Mac is one of the key features that set it apart from other multi-platform deployment tools. Where InstallAnywhere is especially handy is building double-clickable application launchers. Similar to "native" launchers, InstallAnywhere creates what are called LaunchAnywhere[TM] executables that can be placed wherever the end-user chooses, such as on the desktop or in the applications folder. When creating LaunchAnywhere executables, LaunchAnywhere automatically locates the correct Java VM, configures all runtime options (including classpath) and starts the application, making Java software as easy to run as native software. Zero G has also recreated the Mac "look and feel" for both the InstallAnywhere design environment and for the installers that it builds. Mac software developers and end-users are assured a graphical environment that is familiar and easy to use.
Virtual Machine Flexibility
Another key feature of InstallAnywhere is its ability to include the installation of a Java VM with any installer. With the inclusion of a Java VM, InstallAnywhere eliminates the need to download and install a Java VM separately, enabling an end user to run the Java software they are installing with no added complications. InstallAnywhere is fully compatible with the most recent Java VM technology, including the Macintosh Runtime for Java (MRJ) 2.1, Sun's Java 2 (JDK 1.2) and Hot Spot', Microsoft's Java, IBM's Java VM, and Symantec's JIT, allowing developers to deploy their software for use with the latest Java VM releases.
Producing an Installer
InstallAnywhere provides developers with two interchangeable design environments, both utilizing a graphical interface for ease-of-use. The six-step Project Wizard is an easy way to start and allows users to set the basic parameters of the installer: naming, setting classpaths, finding main classes, picking which platforms to build installers for, etc. When you're ready to start adding advanced functionality you can easily switch to the Advanced Designer. Within the Advanced Designer, all of InstallAnywhere's advanced features are accessible and can be manipulated to fit the needs of each specific installer.
Walking through the six steps of the Project Wizard entails little user intervention. It includes six separate GUI panels, each with a descriptive title; brief instructions for general reference; and clearly defined buttons allowing for a return to any previously visited step.
The process begins with the "New Project" screen, whether you wish to build an installer under the Advanced Designer or the Project Wizard. This screen is where the designation of a new project takes place or where an existing project can be opened. If you choose to create a new project, you will be prompted to browse your system and designate a folder and name under which to save the project. Once this is complete, you can enter the Advanced Designer. However, you may also choose to proceed through the Wizard to the second step, the "Set Info" screen.
It is important to note that all information can be manipulated under both build environments, and is never set in stone until a build has been completed. Even after this point, a developer can re-open an "existing" project, make changes and rebuild it as many times as necessary. This comes in handy when a product requires small product updates or changes in files, which can be handled quickly without starting from scratch.
The "Set Info" screen is where you add information about the project. You can specify such information as the name of the product, the name of the installer, the name of the installer folder and an application name. For added convenience, InstallAnywhere automatically fills-in these fields with the project's name, as noted in the first step.
Next in the process is the "Add Files" step, where all the necessary files and folders that your project requires are added into the installer. In order to support any type of Java application, InstallAnywhere has the power to install any type of file: Java class files, HTML files, shell scripts or batch files, even native shared libraries and executables. This step is further enhanced with browsing capabilities to help you find the folders on your hard drive, and a GUI that shows the hierarchy of files and folders (see Figure 1).
Figure 1. Adding files to the project in the Project Wizard.
One of the trickiest parts of running a Java application is knowing what Java class file to invoke (Java applications may consist of hundreds of individual class files). InstallAnywhere has solved the complexity of this issue by allowing you to automatically find the application's Main Classes in the "Choose Main" step. Alternatively you can type in the fully-qualified package name for your main() class (see Figure 2).
Although not required, you can also specify a custom icon to be associated with the application. These icons can be placed on desktops or in folders and via InstallAnywhere's LaunchAnywhere technology will serve as the double-clickable application launchers. Assigning custom icons for LaunchAnywhere executables are another way that InstallAnywhere helps make Java applications run in the same manner as traditional platform-native applications.
Figure 2. Selecting the main class.
The fourth step, "Set Classpath", is a timesaver for anyone that has tried to run a Java application but had trouble getting their CLASSPATH configured properly. This is illustrated in Figure 3.
Figure 3. Setting the classpath.
Clicking on the "Automatically Determine Classpath" button will notify InstallAnywhere to locate all files that need to be added to your application's classpath. (Notice the small, red "CP" icon that appears at the bottom of the folders. This icon indicates which files are in the classpath.) Like automatically detecting the main class, InstallAnywhere is unique in its ability to determine your application's classpath. The alternative, manually determining all folders and file archives that need to be on the classpath, is cumbersome and tremendously error-prone, especially if you are part of a larger software development team.
The first three items on the "Build Installer" screen (depicted in Figure 4) in both the Project Wizard and Advanced Designer mode are "Win32", "Mac OS", and "Unix." These represent the platforms for which InstallAnywhere will build double-clickable LaunchAnywhere executables. The final option, "Other Platforms", is a pure Java installer that can be invoked on any Java 1.1-compatible system. You can also decide whether you should build installers that have an embedded VM or not. Installers built without a VM are smaller and download faster than installers with an embedded VM. This size advantage comes at a price, however: in order to run the installer, the target platform needs to have a Java VM pre-installed. If you are unsure of whether your target audience has a VM already installed on their systems, you might consider building both installers, one with and one without a Java VM. One of the nice things about InstallAnywhere installers is that they can tell which platform they are deploying to and will let the end-user know if they need to install a VM or not. For example, the InstallAnywhere Web Install feature will automatically pick the best installer for the users' system or allow them to choose which installer they'd like to use. The options are easily outlined and can be chosen according to a developer's precise needs.
Figure 4. Platform installer options.
At this point you may choose to take one of two options: either complete the build for the chosen platforms or enter the Advanced Designer by clicking the "Advanced Mode" button.
Advanced Features
The Advanced Designer provides developers with the opportunity to create highly customized deployment solutions by utilizing features above and beyond those available in the Project Wizard. For example, installations can execute custom code, be designed to check disk space and require password or serial number validation. Additionally, InstallAnywhere allows you to tailor the look and feel of an installation to an application or company image using specialized graphics and text.
By offering such features, the InstallAnywhere family of products allows developers to build deployment solutions that fit their specific deployment needs. The InstallAnywhere family is made up of four distinct products that provide developers different levels of functionality. For example, InstallAnywhere Now! is a freeware product that provides a very quick and easy solution for simple deployments. The Express and Standard Editions provide increased functionality at competitive price points. The latest addition to the family, InstallAnywhere Enterprise Edition, provides developers the ultimate in customization options. At the heart of the Enterprise Edition is an Open Application Programming Interface (API) that allows you to "plug in" virtually any type of functionality. For the purposes of this tutorial we've decided to focus on the full capacity of the Advanced Designer found within the new InstallAnywhere Enterprise Edition.
Get Advanced
You may enter the Advanced Designer during any point of an installer's build using the "Advanced Mode" button found at the lower left hand corner of each Project Wizard screen. This gives you the option to create an installer entirely within the advanced mode. You may also find that it is easier to use the Project Wizard to walk you through the basic steps of an installer's build, and then use the Advanced Designer to update your installer with more advanced features. Once within the Advanced Designer, you will have access to make changes and rebuild your installer as many times as you feel necessary.
Upon entering the Advanced Designer, you will encounter the Quick Start dialog box. The content of this dialog provides you with step-by-step instructions for getting started with InstallAnywhere's Advanced Designer. After browsing its content, you can navigate the Advanced Designer by simply pressing any of the tabs found on the left hand-side. Unlike the Project Wizard, the feature panels of the Advanced Designer can be accessed in a random fashion. This user-friendly, easy-to-navigate GUI environment sets InstallAnywhere apart from other installation tools, which tend to operate linearly and are difficult to manage.
Figure 5. InstallAnywhere's Advanced Designer.
In this environment you can create an installer entirely outside of the Project Wizard. For this reason, the Advanced Designer contains many sections whose requested information fields are the same as those seen throughout the six steps of the Project Wizard. In this tutorial we will focus on the features that set the two environments apart.
Performing Advanced Actions
"Actions" provide functionality to installers built with InstallAnywhere. More specifically, they are events that occur during the execution of an installation. An example would be checking to see how much disk space is available; another might be the creation of custom user dialogs to request information. An action is set up under the "Files" tab either before or after the necessary program files have been added. The addition of an action is as easy as clicking on the "Add Action" button, selecting an action and setting the specific variables in the predetermined fields that appear, all while remaining under one user interface. InstallAnywhere provides pre-written actions for performing a variety of functions; in addition, you can create custom actions and plug them in via InstallAnywhere's Open API. Some of the provided actions include the ability to:
- Ability to add "custom code actions" and user interface panels for performing virtually any function before, during or after an installation, such as making database queries or sending data to a server.
- Search for existing applications or software components on the target system.
- Add user interface dialogs to ask for application specific information.
- Request and validate passwords or serial numbers to allow for custom installation behavior.
- Extract archives from a variety of formats (zip, jar, StuffIt, MacBinary, etc.) during an installation, allowing for the preservation of resource forks in Mac OS files across platforms.
- Retrieve Win32 Registry entries.
- Define, query or set variables with the Variable Manager.
- Display bug information to the console, retrieve Win32 Registry entries, and more...
Setting Rules
"Rules", which differ from actions, are true-false statements that govern the execution of specific actions, depending on the characteristics of the end user's system. The set of rules in InstallAnywhere allow a developer to: 1) check if a folder exists, 2) verify the platform of target systems, 3) check a user's chosen locale/language, and 4) perform comparisons between specific InstallAnywhere Variables. This combination of choices comes in handy when you wish to only run specific actions on target systems that match specific criteria.
For instance, you can choose to install particular folders if the files do not currently exist on an end user's hard drive. You can also include the addition of a license agreement and product information in Japanese for users who designate Japanese as the installation language, or alert an end user of files that will be replaced before installation resumes. For added ease, these rules are accessible under the "Files", "Bundle", "Install Sets", and "Install" tabs to eliminate a cumbersome hunt through the Advanced Designer.
Install Sets
Differentiating between installations of the same application, such as a client install verses a server install, or a typical verses minimal install, has become increasingly common in the software industry. The creation of both "bundles" and "install sets" with InstallAnywhere simplifies the process of creating these specialized installers, even for the least technically advanced developer. Folders may be gathered into groupings called bundles, and bundles are grouped together to form install sets. These separate install sets, in turn, install specific files and run specific actions depending on the end user's choice or a target system's characteristics.
Set Platform-Specific Details
Selecting a default position for any alias (shortcut) created at install time is necessary when the configuration of target systems varies greatly. Determining a set position for the alias on the Mac, a shortcut on Windows machines, and directory for UNIX users is InstallAnywhere's solution to this problem.
Installer Preferences
Several visually differentiating characteristics can be configured in the "Installer" section of the Advanced Designer. In addition to providing a visual representation of the main classpath settings and specifying rules for the install, this section lets you customize the most important parts of the look and feel of the entire installer. You can:
- Choose to execute specific actions and rules during the Start-up, Pre-install or Post-install phases of the installation process.
- Configure the parts of an installation that end users will see and have control over. This is especially important to developers unaware of the experience level of end users. The options allow you to include, exclude and configure:
- Introductory text (unable to exclude this step)
- License agreements
- Important product information
- The choice of a destination for files being installed
- The choice of a destination for the aliases being installed
- The choice of a Java Virtual Machine on which to run the installer
- The ability to pick an install set (e.g. Typical, Minimal)
- The ability to run the install (unable to exclude this step)
- A message for display upon the completion of an install.
- Visually adapt a product's image within an installer by adding billboards that display throughout an installation. You can adjust them to display during the installation of specific bundles of files, or have them automatically run for equal time. Add as many billboards as needed to fill the installation time, but remember that each billboard adds to the size of your installer (a crucial factor if you are trying to conserve space with a small installer).
Customer Satisfaction
InstallAnywhere's customers range from the largest commercial and enterprise software developers to the smallest of start-up companies. What they all share is a common desire to build deployment solutions that allow them to successfully install and configure their software on multiple-platforms. However, each company has unique deployment challenges and requirements.
Novafex Software Limited
With help from InstallAnywhere, graphic designers can manipulate the resolution of 3-dimensional graphics on virtually any operating system, using the latest version of Flamingo Optimizer from Novafex Software Limited. Flamingo Optimizer utilizes Java technology to reduce the polygon count of graphical images that are bound for insertion into Web sites of varied resolution requirements. Novafex chose to develop in Java in order to cater to a larger customer base that could run their software on various platforms. Java was also used to speed up the development process and provide customers with a feature rich user interface in which to work. However, Novafex found that distributing Flamingo Optimizer via other multi-platform installation tools had its downside.
Using other multi-platform installation tools to deploy the first beta trials of Flamingo Optimizer, Novafex noticed that problems arose that these tools could not resolve. After dealing with three beta versions and several installation-related support calls, Novafex discovered InstallAnywhere and decided to give it a try. Within two days of the initial trial download, Senior Software Designer Jon-David Lacey was so convinced of its capabilities and performance that he purchased the product and forever changed the distribution process of Flamingo Optimizer.
"We were very impressed by how easy it was to put a distribution together," commented Lacey. "It was also apparent that the product was well thought out from a feature standpoint. I was able to customize LaunchAnywhere files executed during an install, specify particular Java Virtual Machine requirements, and bundle installed information all within an intuitive user interface."
Sun Microsystems, Inc.
As founders and leaders in the production of the Java programming language, Sun Microsystems, Inc. faces daily the challenge of managing and maintaining the distribution of Java technology to developers worldwide. One of the products which Sun deploys with InstallAnywhere is the Java Foundation Classes (JFC), also known as Swing.
The JFC is a comprehensive set of classes arming developers with Java technology tailored to add advanced user interfaces (GUIs) to Java-based software. To make it easier to understand and implement the class files, Swing is distributed with demonstrations of the GUI technology.
Although Sun maintains the ability to build an installer on their own, they've chosen to use a Java-based installation tool like InstallAnywhere because of the functionality and flexibility that it provides. More specifically, Sun needed a solution that would allow users on any Java technology-enabled platform to install the product. Using InstallAnywhere has ensured that Sun can deploy the JFC to software developers around the world. To date over 500,000 copies of the Java Foundation Classes have been downloaded.
Conclusion
In today's global computing environments "write once, run anywhere" has never been a more profound statement. As computing environments continue to add operating systems and computing devices, application deployment solutions need to be flexible enough to meet the demands of these diverse environments and smart enough to understand the global systems on which they are deployed. This tutorial has highlighted some of the ways in which InstallAnywhere is addressing the complexity of multi-platform deployment. To further explore the products, fully functional trial versions of all editions are available from the Zero G Software Web site at: <http://www.ZeroG.com>.
Andrew Downs blah blah