PDA

View Full Version : Passing build date into install.



jbognar
04-15-2003, 11:08 AM
I'd like my install to be able to display a build date to the user (e.g. on the welcome panel, display "Build 20030415"). I'm using an Ant script to build the install executables. In Ant, I can use the tstamp task and ${DSTAMP} variable to generate the string I require, but how do I pass it into the install?

I tried passing in the string to the build as an alias...
"-alias dstamp=${DSTAMP}"
...and then adding a system property to the launcher distribution...
"dstamp=$A(dstamp)"
...and then modified the text on the welcome panel to include...
"(Build: $J(dstamp))"
...but the welcome panel then displays...
"(Build: $A(dstamp))"
...so apparently there is no string resolution on the system properties on the launcher distribution panel.

Anyone have any other ideas?

donalquinlan
04-15-2003, 12:36 PM
String resolution is supported for $P and I assume also $W. We use $P(displayName) in our welcome.htm.

You can use the <replace> task in ant to replace e.g. @@BUILDTIME@@ with the timestamp. MP50 is effectively out of the loop.

An example of what we do with ant
<replace file="${installer.project.dir}/SBM.reg" token="@@BUILD_NUMBER@@" value="${build.number}"/>