Hi Team,

I want set my product name and version from a properties file instead of giving a static value in "project details" section of project file. I have different product name for windows and linux and i will have these values in properties file and i want to read dynamically.

Is this possible with Bitrock InstallBuilder ? If yes, can anyone tell me how to achieve this?

Thanks, Shiva Prasad T

asked 07 Nov '11, 02:31

shivakmpl's gravatar image

accept rate: 0%

You could either read the information from the properties file in the <preBuildActionList>:


Or configure it through command line when building:

builder build project.xml --setvars project.version=1.8 project.fullName="Product B" project.shortName=productb

You can find additional information here.


answered 07 Nov '11, 04:05

juanjo's gravatar image

juanjo ♦♦
accept rate: 23%

I didn't know about the ability to read a property from a file. Very nice to have this available for peculiar build situations.

(08 Dec '11, 14:15) DevHopeful_2012

You can read it inside <preBuildActionList> actions. You will also need to create a hidden parameter so that this information is stored in installer as well.

For example in your case the following will read version.ini file from same directory where project XML file is located and read version key in [info] section:

   <iniFileGet file="${build_project_directory}/version.ini" key="version" section="info" variable="app_version" />
   <stringParameter name="app_version" ask="0" />

The ${app_version} variable will contain version at build and installation time. You can use it for other purposes.

Another approach is to use --setvars parameter when building to specify variables that can then be used in the fields - by removing the <iniFileGet> action and doing:

$ bin/builder build project.xml linux --setvars app_version=1.1

More complex examples of doing custom builds and custom build targets are described in our documentation: Creating Custom Builds


answered 07 Nov '11, 04:14

wojciechka's gravatar image

wojciechka ♦♦
accept rate: 26%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 07 Nov '11, 02:31

Seen: 2,751 times

Last updated: 08 Dec '11, 14:15