Dealing With Common or Changeable Text Fragments

Tarma Installer projects contain many pieces of text that are either not known until installation time (for example, the location of the Program Files or Windows folders on the customer's computer), or that are known, but are used in several places and must be kept consistent throughout the project.

To solve both problems at once, Tarma Installer uses project variables. Project variables have the form <Name> and act as placeholders for information stored elsewhere. When Tarma Installer creates the Setup package, it substitutes the actual information for each placeholder. This allows you to change the information in one place and be confident that those changes are automatically propagated to all other places that require the same information. For information that is not available until installation time, the Setup program performs the substitutions.

Tarma Installer comes with more than eighty predefined project variables, but you may also define your own, which can be used throughout the project just like the predefined variables.

How to define a common text fragment

To define a common text fragment for use throughout your Tarma Installer project, act as follows.

  1. Select the Advanced - Variables page by clicking on its bullet in the Navigation area.
  2. Right-click anywhere in the Variables list to open its context menu.
  3. From the context menu that appears, choose Insert Variable.
  4. Tarma Installer creates a new Unnamed variable and displays its Variable settings pane. In this pane, set the following options:

  5. Repeat steps 2-4 as required to define further variables.

How to refer to a common text fragment

To refer to a common text fragment, whether one that you defined or a predefined one, act as follows.

  1. Go to the text field in which you want to use the common text fragment.
  2. Place the caret (the blinking '.' symbol) at the position where you want to insert the text fragment. If you want to replace all or a part of a text field, select the part that you want to replace.
  3. Use one of the following methods to insert a reference to a common text fragment:

Note - The applicability of a given project variable depends on its context. For example, certain text fields must contain a (symbolic) path name. Tarma Installer verifies the validity of each text field during its preflight checks and will issue a diagnostic if something is amiss.