PDA

View Full Version : How to use build time variable with ant?



jerome_IA
03-27-2012, 04:43 AM
Hi,

I tried setting build time variable properties file using ant. So following (missing) documentation, I tried this:

<buildinstaller
IALocation="${ia_home_dir}"
IAProjectFile="/home/myproject.iap_xml"
propertiesfile="${installer_output_dir}/iabuild.properties">
<arg value="-btv"/>
<arg value="${installer_output_dir}/iabuild_time_variables.properties"/>
</buildinstaller>

But this is not working as the parameter is given before the project name resulting in:
[buildinstaller] 0: -b
[buildinstaller] 1: -btv
[buildinstaller] 2: /home/build/iabuild_time_variables.properties
[buildinstaller] 3: /home/myproject.iap_xml
[buildinstaller] 4: -p
[buildinstaller] 5: /home/build/iabuild.properties

....
[buildinstaller] The project /home/InstallAnywhere_2011_Enterprise/-btv does not exist.
==> here, it should be: [buildinstaller] 0,[buildinstaller] 3,[buildinstaller] 1,[buildinstaller] 2, then 4 & 5 for the correct order!!!!


I also tried setting properties file exactly like explain in documentation (below), this is not working either!


Documentation extract:
------------------------------
Building Multiple Build Configurations
You can build multiple Build Configurations that have been defined in the project by using an external
BuildProperties.xml / buildproperties.properties file and the -p command line argument. For example:
<buildinstaller
IALocation="InstallAnywhere Home Location"
IAProjectFile="C:\Projects\myproject.iap_xml"
additionalparameter=value
>
<arg value="-p"/>
<arg value="<path_ to_ BuildProperties.xml_or__buildproperties.properties_files>"/>
</buildinstaller>
------------------------------

As anyone been able to configure build time variable with ant?

--Jerome

jmishra
03-28-2012, 01:19 AM
Hi,

Kindly try this below format :

<buildinstaller IALocation="${ia_home_dir}"
IAProjectFile="/home/myproject.iap_xml"
propertiesfile="${installer_output_dir}/iabuild.properties"
buildtimevarpropfile="${installer_output_dir}/iabuild_time_variables.properties"\>
</buildinstaller>

Hope it helps.

Thanks,
Jayashree

jerome_IA
03-28-2012, 02:24 AM
Hi,

Kindly try this below format :

<buildinstaller IALocation="${ia_home_dir}"
IAProjectFile="/home/myproject.iap_xml"
propertiesfile="${installer_output_dir}/iabuild.properties"
buildtimevarpropfile="${installer_output_dir}/iabuild_time_variables.properties"\>
</buildinstaller>

Hope it helps.

Thanks,
Jayashree




Hi,

YES, many thanks, this is working well with "buildtimevarpropfile" parameter.
Please update documentation/help so that other developers can find it easily.

Thanks again for your quick help.

--Jerome