You are on page 1of 6

W H I T E PA P E R

Introducing Merge Modules


by Robert Dickau Principal Technical Training Writer, Flexera Software

Introducing Merge Modules


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. 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 modules 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.
Flexera Software: InstallAnywhere White Paper Series

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
2

Introducing Merge Modules

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

projects may be added and removed; however, any changes that are made once theyve 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, Buildtime 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.

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
Flexera Software: InstallAnywhere White Paper Series

Introducing Merge Modules

Dynamic Merge Modules Merge Modules can be configured to be dynamic, meaning that the InstallAnywhere Advanced Designer will check for updates to the imported module at load and build time. To use a dynamic Merge Module, you must first have built your sub component as a Merge Module, without the Read Only flag. Then, in the Organization > Modules task, click Import Dynamic Merge Module to merge the component into the current installer. All of the merge modules files, actions, and panels (optionally) will be combined into current project. The actions will appear as in an action group in Pre-Install and Post-install. Dynamic Merge Modules are recommended if you have merge modules whose contents constantly change. A parent project will automatically refresh dynamic merge modules when the parent project is loaded and built. This enables another group to continue parallel development on a Merge Module and its components, with those changes coming into the master installer automatically at build time. Note: Merge modules cannot be authenticated. If you need authentication for a Merge Module, add it to your main installer project. The Merge Module will then inherit this setting during the installation.

project using the Project > Modules task. Advertised Variables Advertised Variables are a list of all variables in a Merge Module installer project. The main installer project can pass InstallAnywhere variables to a Merge Module at install time. The Merge Module will then use these variables as regular InstallAnywhere variables.

Creating Merge Modules

You create merge modules much in the same way as regular installers are created. Add any panels, actions, and rules just as you would for a typical installer project, then before building in Build > Distribution > Merge Module/Template Option select Build Merge Module/Template. Once Merge Modules are built, they have almost the same contents as a regular installer project, except they do not contain an IAClasses.zip file or a launcher. Build Options When you have an InstallAnywhere project ready to be made into a merge module, go to the Build > Distribution > Merge Module/Template Option. Select Build Merge Module/ Template. Build options are used to optimize the size of the merge module, define whether it is to be read only, and edit the advertised variables for the merge module. Merge Module Size Merge modules will contain an approximation of their required size (based on the largest amount of space any given module could need), but you may override this size with your own calculation by setting an advertised variable. The variable $DISK_SPACE_REQUIRED$ may be set to override the automatic approximation. Creating Merge Modules as Read Only You have the option of designating Merge Modules as read-only. This option protects the integrity of the Merge Modules; the only way it can be added to an installer project is through the Install Merge Module action. This type of module cannot be integrated with the main installer
4

There may be cases however when the Merge Module cannot run without already having had some variables set. Those variables should be advertised so the Merge Module can be configured easily. To do this, click Edit Advertised Variables on the build settings tab and set up your variables.

Now, if you go to the main installer project, add a Merge Module, and look at the settings for variables that will be passed to the Merge Module, you will see that the names of advertised variables have been added to your list and some may have been set to default values. Change the values as required, and these will be passed to the Merge Module at install time. To add advertised variables, go to the Build task and then select Build Settings. Click Edit Advertised Variables. The Edit Advertised Variables dialog box appears. In the Edit Advertised Variables dialog box, list all variables to be set in the installer project.

Flexera Software: InstallAnywhere White Paper Series

Introducing Merge Modules

The variable name is the same as it was defined for the Merge Module. The value is the corresponding value in the main installer project. For example, if you included the common Magic Folder $IA_ PROJECT_DIR$ in your Merge Module, and you wanted that to correspond with the value of $IA_PROJECT_DIR$ in the main installer project, the variable name and value would both be $IA_PROJECT_DIR$. Note: Variables in InstallAnywhere must be expressed with dollar signs ($) on either side. To add your own variables to be passed to a merge module, go to the customizer for the Install Merge Module action in the designer, and click Edit Variables to add some variables.

Summary

This white paper discussed the benefits of Merge Modules and the different Merge Module types. It also described how to create Merge Modules using InstallAnywhere from Flexera Software.

Begin a Free Evaluation of InstallAnywhere

You can download a free trial version of InstallAnywhere from the Flexera Software Web site at: www.flexerasoftware.com/installanywhere/eval.

Learn More Best Practices for Building Quality Installations Join an InstallAnywhere training class visit www.flexerasoftware.com/training for available classes. Also, if you have a critical installation project but are short on developer bandwidth or expertise, Flexera Softwares Professional Services team can help. Learn more at: www.flexerasoftware.com/services/consulting/softwareinstallations.htm.

Flexera Software: InstallAnywhere White Paper Series

Flexera Software LLC 1000 East Woodfield Road, Suite 400 Schaumburg, IL 60173 USA

Schaumburg (Global Headquarters): +1 800-809-5659

United Kingdom (Europe, Middle East Headquarters): +44 870-871-1111 +44 870-873-6300

Japan (Asia, Pacific Headquarters): +81 3-4360-8291

For more office locations visit: www.flexerasoftware.com

Copyright 2011 Flexera Software LLC. All other brand and product names mentioned herein may be the trademarks and registered trademarks of their respective owners. IA_WP_Merge-Modules_Oct11

You might also like