The following article uses options that are available starting with the Enterprise edition and project type.
This tutorial will guide you in creating a project with multiple build configurations.
Lets suppose our product is a Java application and we need to distribute it in three different forms: one for MacOS X and two for Windows (with and without bundled JRE).
- 1. Add your application files to the project
- 2. Create a new build configuration
- 3. Create and configure your Java products
- 4. Select the JRE to be bundled in the product
- 5. Configure build properties
- 6. Create a second feature and add files to it
- 7. Add a prerequisite for a build configuration
- 8. Configure a Mac OS X Build
- 9. Build your project
- 10. Video tutorial
Select “Files and Folders” from the “Resources” menu on the left pane and add your application files.
Go to the Builds page by clicking on “Builds” on the left pane.
Use thetoolbar button to add a new build configuration. Rename it "BuildWithJre". This build will contain the bundled JRE.
Go to the Java Products page by clicking on “Java Products” on the left pane page menu.
Create a new Java Product by clicking on thetoolbar button and configure it as necessary.
Go to "Settings", select "BuildWithJre" from the "Build" ribbon section and press the "Add JRE Bundle..." button to select the desired JRE.
This operation automatically created a new feature called "JRE Bundle" and added all JRE files to it. This feature will also be automatically marked to be included only in the "BuildWithJre" build.
The "DefaultBuild" build will use the default output configuration (MSI, with one cab file inside), while the "BuildWithJre" build will be configured to use LZMA compression (EXE, with all files inside). These settings will be independently configured for each of the project builds. Select a build from the "Builds" pane and then edit its properties in the "Configuration" tab.
Go to the Organization page by clicking on “Organization” on the left pane page menu.
Use thetoolbar button to add a new feature named "SecondFeature".
In the "Feature Properties" pane choose the "Include feature only in the selected builds" option and select only the "DefaultBuild" configuration in the list.
Go to the Prerequisites page by clicking on “Prerequisites” from the “Requirements” menu on the left pane.
In the "Additional Packages" pane click onand select Java -> Java Development Kit.
For more information on how to set "Prerequisites" please see: Prerequisites Page.
From this prerequisite's context menu select "Builds..." (CTRL + B), and choose to include it only in the "BuildWithJre" build configuration.
Go to the Build page by clicking on “Build” on the left pane.
You can build all the output configurations at once or you can choose to build only a certain build configuration by selecting it in the "Build" drop-down menu.