Introducing Merge Modules

by Robert Dickau, Principal Technical Training Writer, Flexera Software

Introduction

Merge Modules support the easy creation of suite installers, subinstallers, and templates, delivering reusability from project to project, within development teams, across the enterprise, or from third-party providers. This white paper discusses the benefits of Merge Modules and the different Merge Module types. It also describes how to create Merge Modules using InstallAnywhere from Flexera Software.

Learn More about InstallAnywhere

If you wish to learn more about the capabilities of InstallAnywhere and download a free evaluation, please visit the Flexera Software Web site at www.flexerasoftware.com/installanywhere

Merge Modules

Merge Modules are essentially installer sub-projects that can be created independently of one another and later merged together. Like an installer, a Merge Module is a reusable collection of installation functionality, complete with features, components, panels, actions, and files. However, a Merge Module cannot be installed on its own; instead, developers use Merge Modules when they want to include the functionality of one installer within another installer.

Merge Modules provide many benefits and provide solutions to complex installation requirements. For instance:

  • Combine several Merge Modules from different products to create a "Suite Installer."
  • Independent development teams in different locations can create Merge Modules for different software components. A release engineer can combine those Merge Modules into a single product installer.
  • Create self-contained units of installer functionality for reuse in future installer projects. For instance, if the same software component needs to be in several different installers, build it into a Merge Module and make it available for all of the installer developers.
  • Save common installer functionality, such as License Agreement panels and Custom User Input panels, into Merge Modules to simplify future installer project creation.
  • Combine Merge Modules from third-party software packages to build complex software "Solutions", without having to figure out how to install each individual package.
  • Use a Merge Module as the starting point for a new installer project. These Merge Modules are referred to as Templates, and are covered in another section.
  • Any installer project can be built into a Merge Module. And any Merge Module can be used within any other installer project.
  • Merge Modules are created as an option through the installer build process. Since a Merge Module contains all of the resources for a project, it is just like building an installer. They can be built automatically when the installer is built, or they can be explicitly built from the Advanced Designer (check the Build Merge Module option on the Build task, under the Distribution tab) or from the command line (use the +merge option).

Merge Modules can be merged into an existing installer in one of two ways:

  • In the Organization > Modules task, click Import Merge Module to merge a merge module into the current installer. All of the merge module's features, components, files, actions, and panels (optionally) will be combined into the current project, enabling developers to further customize any settings.
  • Merge Modules can also be installed as self-contained subinstaller units, without merging them into the current project. This is useful if developers do not know what will be in a Merge Module, or they will not be modifying any settings. Merge Modules added in this manner are run as silent subinstallers.

Merge Modules can be integrated with a project in one of two ways:

  • Use the Install Merge Module action and select Bundle Merge Module at Build Time, if the merge module is available when ready to build the installer. These Merge Modules will be included in the actual generated installer.
  • Use the Install Merge Module action and select Locate Merge Module at Install Time to have the installer install a Merge Module that is available at install time, but external to the installer. The Merge Module can be either on the end user's system or stored on a CD. If the location is a folder that contains several Merge Modules, they will all be installed.

Other important facts about Merge Modules:

  • Read-Only option: Merge Modules can be locked, preventing them from being opened, used as templates, or being merged into an installer. Read-Only Merge Modules can only be installed as a self-contained installer unit.
  • Optimize Merge Module Size by Platform option: Separate Merge Modules will be created for each platform. Each will only contain the resources needed for that specific platform. Do not use this option if Merge Modules will be imported into another installer. Importing a Merge Module requires a non-optimized merge module.
  • Advertised Variables: These are InstallAnywhere variables that will be necessary to set before a Merge Module can be installed using the Install Merge Module action. On the Build task, under the Distribution tab, click Edit Advertised Variables to add variables, set default values, and add comments. Use Advertised Variables to inform master installers of settings required for a Merge Modules configuration.
  • InstallAnywhere Variables can be passed to the merge module when using the Install Merge Module action. Only selected variables will be passed to the merge module. By default, any Advertised Variable set by the Merge Module (Advertised Variables are set when the module is built) will be automatically passed in. Specific variables can also be passed in through the customizer of the Merge Module. For example, if the Magic Folder variable $IA_PROJECT_DIR$ was advertised by the Merge Module, it will be passed in. If the variable $OTHER_VARIABLE$ was not advertised, but was set in the customizer of the Install Merge Module action, it, too would be passed in.

Merge Module Types

Design-time Merge Modules

Use Design-time Merge Modules to integrate a Merge Module into your main installer project. Once a Merge Module has been imported, it is fully integrated into your master project file; all files, actions, and panels will appear as if they were a part of your main installer project. Merged projects may be added and removed; however, any changes that are made once they've been imported will be lost if you remove a merged project from the suite.

For example, if you were to import a Merge Module into your master installer and then modify a few panels, when you save the project, those changes will be saved. If you remove the imported Merge Module from the suite, all of these changes will be lost, regardless of how many times your main installer project is saved.

Design-time Merge Modules display all panels you add to the project. They are the only Merge Module type that is not run silently.

Note: Only non-optimized Merge Modules may be imported as Design-Time Merge Modules.

Build-time Merge Modules

A Build-time Merge Module is a Merge Module that is included in your installer at build time, and installed by the master installer. Unlike Install Time Merge Modules, Build- time Merge Modules are included with the master installer when you build the installer project. At install time, the Master Installer will install the Build-time Merge Module. To specify that the Merge Module be Build Time, select the option labeled Bundle Merge Module at Build Time from the Install Merge Module action customizer and pick a Merge Module with the Choose Merge Module button.

Build-time Merge Modules are packaged along with the master installer project in one .iap_xml file. Build Time Suite Installers can build a number of separate installers into a single executable. In this scenario, a single master installer runs a number of Merge Modules silently during the installation process. The master installer is responsible for the user interface and for passing properties files to the Merge Modules so that they run with the correct configuration information. The Merge Modules may also advertise specific properties they require to operate properly.

Install-time Merge Modules

An Install-time Merge Module is a Merge Module that is executed by the main installer at install time. Install-time Merge Modules are external to the main installer project. At install time, the master installer looks for the Merge Module at the specified path and launches whatever Merge Module it finds there. If the Install Time Merge Module path points to a directory then all Merge Modules contained in that directory will be installed. This enables Suite installers to be updated without having to update the master installer package.

To specify that the Merge Module will be an install time Merge Module, select the Locate Merge Module at Install Time option from the Install Merge Module action customizer and then put a path in the text field next to it.

This is an excerpt. Download the entire pdf: Introducing Merge Modules