Building from The Command Line

When launching DeployMaster from the command line, you can specify the following parameters:

DeployMaster [filename [/b [/q]]]

If you specify the file name of a valid DeployMaster setup script, DeployMaster will open it. If the file's name or the name of the folder it is in contains any spaces, you must enclose it between double quotes.

If DeployMaster can successfully open the file you specified on the command line, it will look for a /b parameter. If it is found, DeployMaster will build your setup file and then quit. This is useful if you are using a makefile or a similar tool to automate building your application.

If the file name and /b are both specified, DeployMaster will look for the /q parameter. If present, DeployMaster will build your installer without showing itself. Otherwise, DeployMaster's window will appear and show its progress on the Build tab.

Output Build Progress to The Console

If you're using a batch file or a build tool that uses I/O redirection, you can use DeployMasterCmd.exe instead of DeployMaster.exe to have the build output appear on the console or sent to standard output:

DeployMasterCmd [filename [/b [/q]]] [/v]

DeployMasterCmd.exe accepts all the same parameters as DeployMaster.exe. If you run it without any parameters, DeployMaster will show up as normal. The only difference is that the console will wait while DeployMasterCmd.exe is running and display any progress shown on the Build tab in DeployMaster. If you don't want DeployMaster to appear when using DeployMasterCmd.exe, you need to specify the full path to a DeployMaster setup script along with the /b and /q parameters.

DeployMasterCmd.exe does take one extra parameter. By default, DeployMasterCmd.exe only sends headline messages, errors, and warnings to the console or standard output. Specify the /v parameter to turn on "verbose" mode. Then everything that appears on the Build tab in DeployMaster will be written to the console or standard output.

Aborting Automated Builds Upon Errors

If you include DeployMaster in an automated build process, you may want to abort the build if DeployMaster encounters an error while building your installer. To make this possible, DeployMasterCmd.exe returns an exit code that indicates whether any warnings or errors occurred. The exit code is 3 if there was a fatal error that prevented the installer from being built. The exit code is 2 if there was an error that may prevent proper operation of your installer, but the installer was built anyway. The exit code is 1 if there were any warnings that suggest ways to improve your installer.

In most situations, you'll want to abort your build process if the exit code is 2 or higher. If your automated build process is a batch file, you can put this line after the line that runs DeployMasterCmd.exe to terminate the batch file if the exit code is 2 or higher:

@if errorlevel 2 exit 2

In Windows batch files, the if errorlevel command tests whether the exit code of the previous command is equal to or greater than the number you specified. So if errorlevel 1 tests whether there were any warnings or errors, if errorlevel 2 test whether there were any errors (fatal or not), and if errorlevel 3 tests whether there were any fatal errors. The exit command terminates the batch file with an exit code of its own.