Navigation: Commands and Procedures > Automated Builds > GUI App |
|
The Visual Build GUI app can be started from the command-line. It supports the following syntax (or use the VisBuildPro Project action to help configure the command-line to use):
VisBuildPro.exe ["MACRO=VALUE"] [/s] [/d] [/f] [/logfile "filename"] [/profile "profile"] [/pwd "password"] [/configpath "path"] [/config "config file"] [/macros "macro file"] [/script "script file"] [/steps "step file"] [/mta] [/b] ["[Drive+Path\]ProjectFile.bld"]
Notes:
• | Parameters in square brackets are optional, and the project filename must be the last parameter. |
• | See the Automatic Setup topic for scheduling builds with the necessary command-line flags. |
• | Use the Create Shortcut command to configure a shortcut with command-line flags to open the current project. |
"MACRO=VALUE" – defines one or more temporary macro values. Special characters within macros values should be escaped.
/s – indicates silent mode for the build (does not display message boxes or dialog boxes, prompt for input when encountering an undefined macro, or stop at breakpoints, and discards any changes to the project).
Note: Use this flag to cause the chained instance to exit on build failure.
/d – pauses the build at the first step of the project for debugging (cannot be used with silent mode).
/f – don't close Visual Build if the command-line build fails (applies only with silent mode).
/logfile – overrides the log file to use for the build. Can be a filename or "" to disable file logging.
/profile – sets the build profile to use for the build (defines a _BUILD_PROFILE_ temporary macro with the specified value). Note: The profile can also be updated in the vbld_ProjectLoaded script event, which overrides this value.
/pwd – specifies a user-defined key for decrypting protected properties in the project file.
/configpath – Specifies an alternate path to load all configuration files and user actions from (takes precedence over the flags below). If not specified, the default configuration files path will be used.
/config – Specifies an alternate configuration file (which holds Application Options) to use. If not specified, the VisBuildPro.config file in the configuration files path will be used.
/macros – Specifies an alternate global macros file to use. If not specified, the VisBuildPro.macros file in the configuration files path will be used.
/script – Specifies an alternate global scripts file to use. If not specified, the VisBuildPro.Global.scripts file in the configuration files path will be used.
/steps – Specifies an alternate global steps file to use. If not specified, the VisBuildPro.steps file in the configuration files path will be used.
/mta – Specifies that the Builder component and the build thread get created in the MTA.
/b – tells Visual Build to open and build the specified project. If the build succeeds, Visual Build exits with a (0) success code; if the build fails, one of the following codes will be returned to the operating system. Note: This flag must immediately precede the filename, and all other flags or macros must come before it.
"ProjectFile.bld" – indicates the Visual Build project to open
Note: Command-line arguments can also be provided in a response file using the syntax VisBuildPro.exe "@[Drive+Path\]ResponseFile.ext" .... Each response file specified will be processed for its command-line arguments. The response file must contain one parameter per line with no surrounding double quotes.
Exit code |
Meaning |
0 |
Success |
1 |
Error occurred building the last step |
2 |
Build aborted by user |
3 |
Error opening project file or file not found |
4 |
Error parsing command-line |
5 |
Exception occurred |
6 |
Unexpected error |
Note: The honor command-line switches user option determines whether these flags 'stick' if a build is canceled/failed and then continued.
To quickly launch Visual Build and create a step for a filename that has an associated action, this syntax can be used:
VisBuildPro.exe "[Drive+Path\]Filename.ext" ["[Drive+Path\]ProjectFile.bld"]