cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Gary_Lowther
Level 3

Capturing the date/time stamp at build time

Does anyone know how, or if it's even possible, to capture the date/time stamp at build time? I've been tasked with adding a string to the Welcome dialog that looks something like this:

Build Date: May 15, 2006 at 12:59 PM

I was able to create a custom wizard gets the current date/time, and I can easily access it at run-time... but not at build time, which is when I really need it to run.

I'm fairly sure that this could be done in a straightforward manner using Ant to manually update an external HTML file. However, this is a small project that is still built just through the ISMP editor (i.e. there is no Ant build, as of yet).

So am I out of luck? Or is it possible to capture a build event, and run an external class to populate that HTML file (sans Ant)?
Labels (1)
0 Kudos
(5) Replies
AlexanderRodov
Level 3

Here is a simple (and probably wrong) answer:

1) Create a new string in String Table, MyStrings section called BuildString
2) Add $L(MyStrings, BuildString) to the end of the text of the Welcome Dialog using UI Editor
3) Manually update the value of the BuildString string every time you build the project
4) Save the project
5) Build the project

Is there a requirement that such string has to be populated automatically?

Alex
0 Kudos
Gary_Lowther
Level 3

Thanks, Alex! Yeah, I can certainly do a "hard-coding" approach like that, and *will* do that, if it's my only option. Automatically generating/storing this value at build time is simply to avoid human error (i.e. the builder forgets to edit the build timestamp string). Something which is surely going to happen if I can't make this happen automagically!
0 Kudos
senthil_vpc
Level 4

I am not sure how you can achieve in InstallShield IDE.
Currently we build the project and create the launncher using ant though we do all the work using IDE.

My idea is is to have task in a ant to create a buildtime.txt that contains TimeStamp.Pack it along with the launcher. At run time , read from this file and display it to the user.

Here is some code snippet to build using ant.













Senthil
0 Kudos
senthil_vpc
Level 4

using product.getDateBuilt() is the simplest way. you can retrieve the product reference through ProductInstallContext

Senthil
0 Kudos
Gary_Lowther
Level 3

This looks very promising. I'll check it out. Thank you, Senthil!
0 Kudos