Using Compiler Variables
InstallAware offers compiler variables in addition to regular, script variables. Compiler variables may be thought of as IFDEF statements available in traditional programming languages. The Compiler Variable If, Compiler Variable Else, and Compiler Variable End statements allow conditional compilation. In addition, much like constants, compiler variables may be used in the script to represent unchanging values.
The values compiler variables can take are set at compile time, either from the IDE or from the command line.
- When specifying a compiler variable for a command that expects a compiler variable, just type in the variable name. For instance, if the variable is called MYCOMPVAR, simply type MYCOMPVAR.
- With commands that do not specifically expect a variable, and work with string literals, you may still use compiler variables, however you must dereference them. The syntax for dereferencing a compiler variable in InstallAware is enclosing the variable name between pound signs. For instance, if the variable is called MYCOMPVAR, dereference the variable using #MYCOMPVAR#. You may freely combine multiple dereferenced compiler variables in your string literals.
You can always use compiler variables where regular string expressions are allowed, even if regular (script) variables have been prohibited.
A large selection of pre-defined compiler variables control build-time aspects of setup generation.