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.
- Select the Advanced - Variables page by clicking on its bullet
in the Navigation area.
- Right-click anywhere in the Variables list to open its context
menu.
- From the context menu that appears, choose Insert Variable.
-
Tarma Installer creates a new Unnamed variable and displays
its Variable settings pane. In this pane, set the following
options:
- Name - Enter any suitable name that is not already used
by an existing project variable. Variable names are not case-sensitive
and may only contain letters, digits, and the '_' (underscore).
- Value (all or 9x) - Enter the text fragment that you want
to insert whenever this variable is used. You may use references
to other project variables, if desired. Browse through the Variables
List to see some examples of this.
- Value (NT) - If desired, check this box and enter an alternate
value for use on Windows NT platforms. This facility is not often
needed, so in most cases you should leave this box cleared.
- Description - Optionally, enter a description for the
newly created variable. This is for documentation purposes only;
it is not used in the Setup package.
- Value type - Leave at Generic text unless you have
reason to change it. See Variable settings in the online
help for an explanation of the various types.
- 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.
- Go to the text field in which you want to use the common text fragment.
- 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.
-
Use one of the following methods to insert a reference to a common
text fragment:
- Type '<' followed by the name of the project variable that
contains the text fragment, followed by '>'
- Click the button to the right of the text field, if it has one.
This opens a menu with descriptions of project variables that
are appropriate for the text field. Select the desired variable
from this menu, or select Browse for Variable... to browse
for any project variable.
- Choose Insert > Predefined Variable from the main menu,
then select the desired variable from the submenu that appears,
or select Browse for Variable... to browse for any project
variable.
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.