Performing Build Operations With the Command Line Interface

You can use the command line interface (CLI) of Package Builder to load a solution and build the packages, repositories, and installers in the solution.

Note Before you build a package, repository, or installer, you must create and configure the solution using the Package Builder Editor and save it.

Use the following steps to invoke the CLI:

  1. Open a command prompt.
  2. Change directories to the location of Package Builder. The default location is C:\Program Files\National Instruments\Package Builder.
  3. Run the following command: nipbcli -o=<path of NIPB solution file> -b=packages.

    For example, if you enter C:\Program Files\National Instruments\Package Builder\nipbcli C:\temp\NewSolution.pbs -b=packages, Package Builder builds the packages specified in the solution.

The command line interface for Package Builder offers the following options:

Command Effect
-o, --open=VALUE Opens the Package Builder solution at the specified path. The path can be relative or absolute.
-b, --build=VALUE Performs a build operation on the open solution. Supported settings:
  • 'packages' - build all packages in solution
  • 'feeds' - build all installers|repositories in solution
  • 'solution' - build whole solution
-c, --clean=VALUE Performs a clean operation on the open solution. Supported settings:
  • 'packages' - clean all packages in solution
  • 'feeds' - clean all installers|repositories in solution
  • 'solution' - clean whole solution
-h, --help Show these messages and exit.
-v, --version Displays the application version.
--verbose-off Logging does not show additional details.
--save Saves build information of packages to solution file.
--teststand-env-path=VALUE TestStand environment file path.
--teststand-env-use-for-discovery Use the TestStand environment file for discovery.
--teststand-env-do-not-use-for-discovery Do not use the TestStand environment file for discovery.
--teststand-env-use-for-staging Use the TestStand environment file for staging.
--teststand-env-do-not-use-for-staging Do not use the TestStand environment file for staging.

Example of building a solution's packages:

NipbCli -o=C:\Foo\Bar\nipb.pbs -b=packages --save

The CLI may return the following exit codes:

Success = 0
GeneralError = 1
CommandLineError = 2
BuildDeployError = 3
Canceled = 4
SolutionLoadError = 5
SolutionSaveError = 6