Exercise 9.1 Using InstallAnywhere's Basic Installer Organization

While we'll cover component architecture later in the book, we've advanced enough to delve into the basics of installer organization.

In this exercise, we'll extend our OfficeSuite installer to employ InstallAnywhere features and install sets.

1.
If it's not already open, open your OfficeSuite project in the InstallAnywhere advanced designer.

2.
Click on Files.

Depending on what files you added when initially creating the project, you probably have either a directory called OfficeSuite Source Files or one called OfficeSuite 2000.

3.
If you added the entire OfficeSuite Source Files directory, you can skip onto the next step. If not, we're now going to add some auxiliary files so that we have a little more to work with in the installer.

a. Click the Add Files button.

b. Use the file chooser to select the Images and Docs directory from within the OfficeSuite Source Files directory. Add this directory and its contents to your installer.

4.
If you originally added the entire OfficeSuite Source Files directory, we'll make a little change that will improve the “cleanliness” of the project and make it easier to organize. Using either the left and right arrows or the drag-and-drop functionality, move the OfficeSuite 2000 and Images and Docs folders into the root of your installation—the $USER_INSTALL_DIR$.

5.
Remove the OfficeSuite Source Files directory by highlighting it and clicking Remove.

The OfficeSuite Source Files directory should now be empty.

You should now have three separate directories under the root of your installation: OfficeSuite 2000, Images and Docs, and Uninstaller Data.

6.
Rename the OfficeSuite 2000 and Images and Docs folders. For this example, use the names Program and Data For OfficeSuite and Images and Docs.

NOTE

InstallAnywhere allows you to rename resources independently of the source directories and files. Simply highlight the file you need to rename and alter the entry in the Name field. This allows you to use multiple instances of the same file, but with different names. It also allows you to name files dynamically when necessary, using InstallAnywhere variables in the Name field in the InstallAnywhere advanced designer.

7.
Browse to the Organization | Install Sets task.

A default InstallAnywhere project contains two install sets—Typical and Minimal. We'll add a third called Documentation Only.

NOTE

The customizer available for the Files task allows you to set an image and description to appear on the Choose Install Sets panel. The Choose Install Sets panel presents your end-user with large radio-style buttons with a description of the installation option. At this stage, you should add descriptions of the Typical (All features), Minimal (Application only), and Documentation Only (Only the documentation) install sets.

8.
Select Typical as the default by clicking in the check boxes to the right of Install Set Names in the panel above the customizer.

Now, we're ready to assign features to the install sets. In this simple example, we only have two features: Application and Help.

9.
Navigate to the Organization | Features task.

Notice that two default features—Application and Help—have been created as part of the default project. As these meet our needs, we'll not have to add any additional features; however, the process by which they are added is identical to that used for install sets.

10.
Add a description for the features we'll use in this example.

Now, we'll assign the features to the install sets. We've defined three distinct sets; two have only one feature, and one has both of the features.

NOTE

The check boxes along the right-hand side of the install tree within the Files task are used to assign files, folders, and actions to features within the task.

a. Using the check boxes to the right of the panel, select Typical and Minimal for the Application feature.

b. Select Typical and Documentation for the Help feature, making sure to leave out Minimal.

11.
Assign files to features in the Files task.

a. Browse to the Files task.

b. Assign the entire contents of the OfficeSuite 2000 folder to the Application feature.

c. Assign the entire contents of the Images and Docs folder to the Help feature.

Now, we have all the files and actions assigned properly, and our organization is complete. However, we've still not presented a method to our end-user by which to alter the choice of install sets (in its current configuration, our installer will simply use the default install set).

12.
In order to offer our user a choice, we'll need to add a Choose Install panel to the Pre-Install task.

a. Browse back to the Pre-Install task, where we'll add the panel.

This panel is, of course, a built-in option in InstallAnywhere.

b. Open the Add Action palette and from the Panels tab, choose Panel: Choose Install Sets.

c. Use the arrows or the drag-and-drop functionality to move the panel to a location after the introduction, but before the user selects an installation location.

NOTE

The Choose Install Sets panel has several options that directly affect the options the user is presented with. The check box Allow end-user to customize installer via the Choose Product Features panel will allow the user to choose individual features to install. Although it is not strictly necessary in an installation as simple as our current example, we suggest engaging this option so that you may see the results.

13.
We're now ready to build our first organized installer.

a. Browse to the Build task.

b. Build the installer.

The option Show Product Features without the Choose Install Sets panel allows you to present only the features to your user, creating a highly flexible installer. For this example, do not engage this option.

When running the installer, note the Choose Product features panel. Select the Custom Install Set so that you can see the results of selecting the check box Allow end-user to customize installer via the Choose Product Features panel.

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

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