The define variable action allows you to define a new FinalBuilder variable during the execution of the project. Project variables are supported.
Define Variable
Variable Name
Variable Name
Choose a name for your new variable. FinalBuilder will warn you (but not stop you) if you type the name of a preexisting variable.
Default Value
Choose a default value for your new variable. If the 'Set default value if variable already defined' box is checked, this will be the new default value for a preexisting variable, as well.
Expand variables before assigning default value
If you check this box, then variables you enter in the Default Value box (ie %MyVariable%) will be expanded to their current values before being assigned as the default value for the new variable.
Variable Options
Make Available as Environment Variable
If checked, the new variable will be available as an environment variable.
Macro
The Is Macro flag forces FinalBuilder to re-evaluate the variable whenever it's referenced during the build, otherwise the value of the variable is evaluated when the build starts and that value is used throughout the build. An Is Macro variable is like a function - its value cannot be set during the build using the Set Variable action or any other means.
Persistent
If checked, the new variable will be persistent (the value will be saved between builds.)
Behaviour
The action can be set to fail if the variable is already defined (Variables defined during the build are persistent, so if you save a project file after defining a new variable, the new variable will remained defined in the Variables window.)
If the action is set to ignore preexisting variables, it can be set to update the default value. This is the only part of the preexisting variable which can be updated by the action - it is impossible to change any other properties of the variable.
If the "update default value" box is not checked, the action will do nothing if the variable already exists.
If the variable is persistent, then the "set default value if variable already defined" has no effect.