Using build.exe to Build Installers from the Command Line

InstallAnywhere 2017

Note • For Windows-based development systems, InstallAnywhere provides two versions of the command-line build tool: build.exe and build-as-invoker.exe. Using build-as-invoker.exe is recommended for users who do not have administrative privileges on their Windows-based build system.

You can use the InstallAnywhere command-line build tool (build.exe) to build installers for the build configurations in an InstallAnywhere project.

Syntax

To build through the command line, use the following syntax:

build.exe Project_File_Path List_of_Build_Configurations

The path for the project file (Project_File_Path) must be specified. The build configuration list is optional.

Command-Line Parameters

The command-line build can be called with many options to override build targets, distribution options, working directory, and more. For details, see Build Command-Line Arguments.

Sample Command-Line Statements

If you do not list build configurations in your command-line statement, all of the build configurations that are defined in the project and that have their Add to project build check box selected are built—for example:

build.exe C:\MySetups\MyProduct.iap_xml

To build all of the build configurations that are defined in a project, you can use the -all command-line option—for example:

build.exe C:\MySetups\MyProduct.iap_xml -all

To build the installers for the build configurations that are named BuildConf1, BuildConf2, and BuildConf3, use the following command line:

build.exe C:\MySetups\MyProduct.iap_xml BuildConf1 BuildConf2 BuildConf3

You can also include additional parameters in your command-line statements. For example, to add additional platform-related arguments to the aforementioned command line, enter them directly after each build configuration name:

build.exe C:\MySetups\MyProduct.iap_xml BuildConf1 +X +L -s BuildConf2 w BuildConf3 a

The above statement launches the build of three different build configurations, each with their own platform-related build targets:

The build configuration named BuildConf1 is built with build targets of macOS or OS X without the VM option (+X), as well as Linux without the VM option (+L). The Solaris build target (-s) is not built.
The build configuration named BuildConf2 is built with a build target of Windows without the VM option.
The build configuration named BuildConf3 is built with a build target of AIX without the VM option.

Using a BuildProperties.xml File to Specify Build Parameters for Command-Line Builds

You can use a build properties XML file to build installers for a project. To do this, pass the -p argument with the path and name of the build properties file to build.exe:

build.exe C:\MySetups\MyProduct.iap_xml -p C:\Path\BuildPropeties.xml

The settings that are specified in the build properties file override the build settings in the project.

InstallAnywhere includes a build properties file template named BuildProperties.xml:

IA_HOME/resource/build/BuildProperties.xml

This template file provides a sample of all possible build settings; you can use it as a template to meet your build requirements.

Note • For more information, see BuildProperties.xml File.

Using a buildproperties.properties File to Specify Build Parameters for Command-Line Builds

You can use a buildproperties.properties file to build installers for a project. To do this, pass the ‑p argument with the path and name of the buildproperties.properties file to build.exe:

build.exe C:\MySetups\MyProduct.iap_xml -p C:\Path\buildproperties.properties

The settings that are specified in the .properties file override the build settings in the project.

InstallAnywhere includes a sample buildproperties.properties file:

IA_HOME/resource/build/buildproperties.properties

Note • For more information, see buildproperties.properties File.

Determining the Host ID of the Machine Through the Command Line

If the build machine is not connected to a network (but not necessarily to the Internet), Java’s API java.net.InetAddress is not able to obtain the host ID of the machine. Therefore, the -generateHostID argument does not provide the host ID. The following instructions explain how to obtain the host ID in this scenario.

To obtain the host ID of a machine that is not connected to a network:

1. Open a Command Prompt window.
2. At the command prompt, enter the following command:

ipconfig /all

Configuration information is displayed in the Command Prompt window.

3. In the Ethernet adapter Local Area Connection section, look at the Physical Address value.

This physical address value (for example, 00-24-E8-DC-55-9B) is the host ID of your machine. Use this value (without the dashes, and with all of the uppercase letters converted to lowercase letters—for example, 0024e8dc559b) when you are obtaining a license file.

See Also