Building Your First Installer

It is possible to build a basic installer with the Project Wizard in six steps and about five minutes. The following tutorial teaches how to build an installer for a sample Java application, called OfficeSuite for Java, which is included in the InstallAnywhere folder.

1.
Creating new projects

a. Launch InstallAnywhere.

On the first screen, the Create New Project option should already be selected.

b. Click Save As to save and name the project.

The Save New Project As dialog appears. By default the project is named My_Product, but any name could be used.

c. Click Save to confirm the name and close this dialog.

d. Click Next to move to the next step of the Project Wizard.

2.
Setting info

Set Info defines basic information about the installer, such as the product name (as displayed on the installer), the name of the installer to be produced, the name of the destination folder, and the application name.

a. Type the information in the appropriate textboxes. For this tutorial, use the following:

Product Name: OfficeSuite

Install Folder Name: OfficeSuite

Application Shortcut Name: OfficeSuite

b. Click Next to move to the next step in the Project Wizard.

3.
Files tasks

a. Add files.

  1. Click Add Files. The Add Files to Project dialog appears. Browse through the list to find the OfficeSuite Source Files folder. The OfficeSuite Source Files folder is within the InstallAnywhere installation folder.

  2. Click Add All to add the Images and Docs and OfficeSuite 2000 folders, which are inside the OfficeSuite Source Files folder.

    These files should appear in the Files to Add list.

  3. Click Done.

    The selected files should appear in the File/Folder Hierarchy.

  4. Click Next to move to the next step in the Project Wizard.

b. Choose the main class.

Choose Main Class selects the starting class for the application. This frame also allows developers to specify custom icons (in GIF format) for the LaunchAnywhere executable file.

  1. Click Automatically Find Main Classes at the bottom of the screen.

  2. Select the main class.

  3. Specify a custom icon for the LaunchAnywhere executable by clicking Change and choosing a 32 × 32 or a 16 × 16 pixel GIF for the application icon. (Note: ICO files are not supported.) Navigate to the Images and Docs folder and select OfficeIcon.gif.

  4. Click OK to confirm and close the dialog.

    The icon will appear on the main screen.

  5. Click Next to move to the next step in the Project Wizard.

NOTE

Unless you are installing a Java application, skip ahead by clicking Next without specifying a main class. The Choose a Main Class dialog appears. Click No to move to the next step.

c. Set the classpath.

Set Classpath automatically configures a Java application's classpath.

  1. Click Automatically Set Classpath. InstallAnywhere will calculate which files need to be added to the classpath. A small “CP” icon will appear at the bottom of those folders.

  2. Click Next to move to the next step in the Project Wizard.

4.
Building the installer

The first several items on the Build Installer screen, from Mac OS X through UNIX (All), represent installers that are double-click-able on their respective platforms. The final option, Other Java-Enabled Platforms, is a “pure” Java installer that can be invoked from the command line on any Java-enabled platform. Developers may also choose to build installers with an embedded virtual machine. Installers that are built without VMs are smaller and download faster than installers bundled with one. The InstallAnywhere Web Install process will allow end-users to choose the appropriate installer for their system.

a. Pick the appropriate destination platforms and click Build.

The installer folder will be placed in a subdirectory in the same location as the project file. This location cannot be changed.

5.
Testing

a. Now that an installer has been built, it can be tested by clicking Try It.

b. After deploying the sample installer

  • On Windows, go to the OfficeSuite program group and select OfficeSuite.

  • On UNIX, “cd” to the directory where the program was installed and type “OfficeSuite.”

  • On Mac OS X, double-click the OfficeSuite icon on the desktop.

c. After launching OfficeSuite for Java, quit by selecting Exit from its File menu.

It is possible to post the installer folder to a Web server and install the software onto another platform as well.

TIP

Hold down the Control (ctrl) key while the installer launches to see the debug output (Windows only).

d. Run the completed installer.

When building for a platform other than that on which the installer is being developed, transfer that installer and run it manually. By default, installers will be located in the Build_Output directories found in the same folder as the .iap_xml project file. Within the Build_Output folder, will be Web_Installers and/or CDROM_installers. From within each of these directories, choose the platform to test. For the CD-ROM installer, transfer the entire contents of the CDROM_Installers folder.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.15.99