Creating cross-platform applications has always been a challenge. Java can insulate us from much of the hassle during application development, but often the particulars of each platform become painfully acute when distributing the application to a host of varied platforms. Most commercial installer programs support only one platform, which leads developers to support multiple installers on multiple platforms (using multiple products from multiple vendors). Fortunately, several Java installer applications exist in the market and are robust enough to deal with many of the particulars of platform-specific functionality within a unified code base.
InstallAnywhere from Zero G is a Java-based install product that allows you to create and customize cross-platform installers for any type of application (Java, C++, Perl). You can make installers for Windows, Macintosh (OS 9 and Mac OS X), Linux, and any OS that supports Java 1.1 or higher. Installers can be designed for Web or CD-ROM distribution, GUI or console interface, and a Java app plus native wrapper or pure Java executable. InstallAnywhere is available in several versions; this review focuses on the Enterprise Edition.
Installation and Setup
The design environment of InstallAnywhere runs on any OS that supports Java 1.3 or higher. A fully functional trial with an unlimited evaluation period can be downloaded from Zero G's Web site - be prepared, though, the download is 50MB. The InstallAnywhere environment requires about 80MB of hard disk space. Installation is quite simple and takes only a few minutes. The evaluation product gives you a good idea of what an InstallAnywhere installer looks like and how it functions (see Figure 1).
If you're new to installers or InstallAnywhere, read through the Introduction and Concepts sections of the User Guide. In general the documentation is good, but at times it doesn't seem as if it's been updated to match the current version of the product (5.0). This inconsistency is a bit disappointing as I often refer to the documentation as I develop.
InstallAnywhere uses two different schemes for installer creation: Wizard and Advanced Designer. The Wizard scheme is good for straightforward applications that don't need to customize the end user's environment (i.e., set environment variables, change registry settings, etc.). As shown in Figure 2, the Wizard offers a simple interface in which you can set the name of the application and installer, set classpaths (if you're installing a Java application), and choose which platforms you want to build installers for. Thus, you can create a multiplatform installer in under 10 minutes, assuming your installer needs are relatively uncomplicated.
InstallAnywhere's Advanced Designer, on the other hand, is more complex yet more powerful than the Wizard. As shown in Figure 3, the Advanced Designer allows you to create custom panels, execute scripts, set environment variables, and even call your own custom Java code. It is through the Advanced Designer that you can begin to tackle those tricky and arduous cross-platform issues, especially if you're attempting to achieve a unified code base for your installers.
For instance, the Advanced Designer has an action to set an environment variable on the end user's platform (in InstallAnywhere parlance, "actions" are functions that the installer can perform). All you need to do is provide a name and value for the environment variable and InstallAnywhere takes care of the platform-specific details of actually setting it. Similarly, the "Create Alias, Link, Shortcut" action can create a link in a platform-independent location ("Desktop"), or it can be created in a platform-dependent location (Mac OS X Dock, Windows Start menu). In addition, the Advanced Designer handles several Windows-specific actions such as reading and writing to the registry and starting and stopping services.
When you find that your requirements call for functionality is beyond what is available through InstallAnywhere's standard actions, you have the option of incorporating "custom code" into your installer. Custom code consists of classes that you write in Java that extend InstallAnywhere's functionality and can be run at install or uninstall time. Also, custom code runs in the same VM space as the installer, and thus allows you to get and set runtime InstallAnywhere variables. You can create custom actions, panels, or console actions to extend your installer.
In the course of developing an installer, you'll occasionally run into an issue that's a real noggin-scratcher. Zero G's technical support is quite helpful and willing to offer suggestions for difficult problems. For example, I inquired about creating a two-CD installer that runs on Windows and Macintosh, and they recommended several sound, real-world solutions (one of which I implemented in my client's application). Potentially more helpful, though, is the Community Forums section of the Zero G Web site. This is a typical message board where users post questions and (hopefully) get responses from other InstallAnywhere users or from Zero G themselves. I have found the Community Forums invaluable as I develop InstallAnywhere installers. The forums are free, but you need to register (also free) to post questions or replies.
Overall, InstallAnywhere is a very solid product. As with any installer environment, you need to learn the idiosyncrasies of the tool and then tailor it to meet your requirements. The advantages of using InstallAnywhere to package and distribute a Java application are clear, but the benefits may not be as obvious for a C++ program. The mechanisms InstallAnywhere provides for platform-specific functionality within a single installer code base are certainly worth investigating though, and the ability to extend the installer through platform-independent Java makes supporting multiple platforms a significantly easier task.
Zero G Software, Inc.
514 Bryant Street
San Francisco, CA 94107
Platforms: Designer - any platform that supports Java 1.3.x (1.3.0 or greater)
Installer: Java 1.1 or greater, must be installed on the target system or bundled with the installer
Pricing: Licensing - initial cost $2,995; premium support/year $1,495, maintenance and upgrades/year included with support
Dell Inspiron 4150, 1.7GHz Pentium 4-M Processor, 256MB RAM, Windows XP
Product Snapshot Cross-platform installer
Extend installers through custom code
VM management on end user's machine
Community Forums Cons
Documentation spotty in sections
Price may be steep for some organizations
Target Audience: Build/release engineers, Java developers
Level: Beginner to advanced Pros