This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Capturing the date/time stamp at build time
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 15, 2006
01:28 PM
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)?
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)?
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 15, 2006
02:52 PM
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
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 15, 2006
06:01 PM
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!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 16, 2006
12:39 PM
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
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 16, 2006
03:28 PM
using product.getDateBuilt() is the simplest way. you can retrieve the product reference through ProductInstallContext
Senthil
Senthil
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 16, 2006
03:37 PM
This looks very promising. I'll check it out. Thank you, Senthil!