Build-time conditions let you conditionally include or exclude files from your setup executable.
Every file in a Setup Factory project can have a build-time condition attached to it. The build-time condition determines whether that file gets included when the setup executable is built.
A build-time condition is a conditional expression that resolves to either true or false. If the expression resolves to true, the file gets included in the installer. If it resolves to false, the file is excluded from the installer.
By using design-time constants as switches, you can set up build-time conditions to conditionally include or exclude files from different "builds" of your installer. This enables you to easily manage concurrent versions of an installer within a single Setup Factory project.
NOTE |
|
|
|
|
You can use design-time constants as switches (or "flags") by assigning different values to them before initiating the build process. |
For example, you could use the same Setup Factory project to build installers for the commercial and evaluation versions of your software. Simply define a design-time constant to use as a switch-for the sake of discussion, let's name it #BUILD#-and use that constant in build-time conditions. Give the files that are only meant for your commercial release the condition #BUILD# = "full", and give the files that only belong to your demo the condition #BUILD# = "demo". This lets you control whether the files from the commercial or demo versions of your installer get included by assigning either "full" or "demo" to #BUILD#. Design-time constants are replaced at build time by the values currently assigned to them; when you assign "full" to #BUILD#, the condition for the commercial files will be true, because the expression "full" = "full" is true, and the condition for the demo files will be false, because the expression "full" = "demo" is false.
NOTE |
|
|
|
|
Only design-time constants can be used as flags in build-time conditions. You can't use variables in build-time conditions, because variables don't receive their values until run time. |
See Also: Run-time Conditions