Quite often you may need to create different versions of your application from the
same sources: for instance, a debug version, a demo version or a release version.
Typically, macros that generate these versions are a bit different: there are just
some changes in the logic, operation properties and values of constants and stored
variables. For example, when using the Compile Visual C++ 6.0 Project operation,
you may want to disable all optimizations for the debug version, but turn on optimization
for the release version.
You can create an individual macro to generate each version independently, but this
approach is not efficient, because these macros will have lots of identical parts.
Of course, you could divide the reusable logic parts into submacros or external
macros. But in this case, you would still have to manage several macros, which is
not convenient either.
Using macro configurations, you can easily solve these problems. A configuration
includes values of operation properties as well as values of the macro constants
and variables. Each configuration (that is, all the settings that are unified by
a configuration) is part of a macro. You create the operation hierarchy and the
set of variables and custom constants only once and then, using individual configurations,
work with data specific to a particular configuration. That is, instead of creating
several macros, you can create only one macro with several configurations for generating
several application versions from the same sources. You can select the desired configuration
before the macro run:
To manage macro configurations, Automated Build Studio includes a special dialog.
As you can see, use of macro configurations allows you to create a single macro
and reuse it multiple times, changing its nature by simply selecting a different
configuration. Using operation properties you can even change the operation hierarchy
to some extent, without adding or removing operations (this can be achieved by using
the Enabled property of some operations).