Navigation:  Commands and Procedures > Predefined Macros >

Global Macros

Previous pageReturn to chapter overviewNext page

Visual Build creates the several global macros when first installed.  By default, they are loaded/saved from/to the VisBuildPro.macros file in the configuration files path.  Modifications to global macros are saved to disk whenever a project is saved, the GUI application is closed, and before each step is built.  The values of these global macros will be initialized when Visual Build first run, but their values can be modified if necessary.  Also, by clicking the Reload button on the File Locations options page, these values will be reinitialized to their default values.

 

Global macros are defined for several Microsoft development tools.  Visual Build will attempt to locate the actual location of the tools and set the macros accordingly, but the value of these macros can be modified if necessary.  Also, by clicking the Reload button on the File Locations property page, these values will be reinitialized to their default values.  Note that these macros are not used by the built-in Microsoft actions.

 

Embarcadero/CodeGear/Borland Products: See the Make Delphi/C++Builder and Make Delphi Prism actions and Embarcadero.bld sample.

 

Notes: Global macros can be used for two-way communication between steps and projects.  When a global macro is modified, in the GUI via the Macros pane, within a Set Macro or Run Script action, or from an external step (for instance, a child project via VisBuildPro Project action or an external script that instantiates and modifies a macro via the object model), only the in-memory macro collection is modified.  However, when the objects holding that collection are disposed of (when the console or GUI app exits or references to the object model are released), if any global macro changes have been made, they will be saved to disk.  Also, within a project, before each step is built, any in-memory modifications to global macros will be saved, and if the global macros file gets modified by a step, the changes will be reloaded from disk when the step completes.