InstallAnyWhere6.1快速建立安装程序

类别:Java 点击:0 评论:0 推荐:
Building an 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 "Office Suite for Java," which is included in the InstallAnywhere folder.

Create New Project

Launch InstallAnywhere.

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

Click Save As to save and name the project.

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

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

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

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.

Type the information in the appropriate textboxes.

For this tutorial, use the following:

Product Name: OfficeSuite

Install Folder Name: OfficeSuite

Application Shortcut Name: OfficeSuite

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

Files tasks

Add Files

Click Add Files. The Add Files to Project dialog box appears. Browse through the list to find the OfficeSuiteSourceFiles folder. The OfficeSuiteSourceFiles folder is within the InstallAnywhere installation folder.

Click Add All to add the ImagesAndDocs and OfficeSuite2000 folders, which are inside the OfficeSuiteSourceFiles folder.

These files should appear in the Files to Add list.

Click Done.

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

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

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

Choose 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.

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

Select the Main Class.

Specify a custom icon for the LaunchAnywhere executable by clicking Change and choosing a 32x32 or a 16x16 pixel GIF for the application icon (NOTE: ICO files are not supported.) Navigate to the Image and Docs folder and choose OfficeIcon.gif.

Click OK to confirm and close the dialog box.

The icon will appear on the main screen.

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

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

Set Classpath

Set Classpath automatically configures a Java application’s classpath.

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.

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

Build Installer

The first several items on the Build Installer screen, from Mac OS X through Unix (All), represent installers that are double-clickable 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.

Pick the appropriate destination platforms and click Build.

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

Test

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

After deploying the sample installer:

On Windows, go to the OfficeSuite program group and choose 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.

After launching Office Suite 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).

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 CDROM installer, transfer the entire contents of the CDROM_Installers folder.

本文地址:http://com.8s8s.com/it/it15098.htm