Navigation: Commands and Procedures > Automated Builds > Console App |
|
The Visual Build console app can be used to perform automated builds. Unlike the GUI App, the console app:
• | Does not require interactive desktop access or a currently logged on user (but third party tools called in step actions may themselves require interactive desktop access in order to run properly). |
• | Discards any changes made to the project via the object model unless explicitly saved in the build. |
The console app supports the following syntax.
VisBuildCmd.exe ["MACRO=VALUE"] [/nologo] [/nooutput] [/loglevel level] [/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. |
• | See the Automatic Setup topic for scheduling builds with the necessary command-line flags. |
• | To hide the console build window, HideConsole.exe (installed in the same folder as VisBuildCmd.exe) can be used by prefixing HideConsole.exe to the VisBuildCmd.exe command-line call. |
"MACRO=VALUE" – defines one or more temporary macro values. Special characters within macros values should be escaped.
/nologo – Suppresses display of application version and copyright.
/nooutput – indicates silent mode for the build (does not echo build output to Std Output); if logging is enabled in Application Options, all build output will be logged as specified.
/loglevel – determines which level of log messages will be logged to Std Output when building a project (does not apply with the /nooutput option). Overrides the default log level defined in application options. Messages with a level the same or lower than the level specified here will be logged.
/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 – opens and builds the specified project (optional, for compatibility with GUI App).
"ProjectFile.bld" – indicates the Visual Build project to open and build. 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.
Note: Command-line arguments can also be provided in a response file using the syntax VisBuildCmd.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 |