i use inno setup to build the installer for my app. i like to show the version number (from the version resource in the compiled exe) and the built date in the installer as show below:
since inno setup is script based, that can easily be done as below:
but i don't want to manually update the inno script every time i have a new build, so i automate it. i already have a make.prg which i run to build my project, all i have to do is to enhance it to update the version and timestamp automatically.
that boils down to the following steps:
1. using agetfileversion() and fdate() on the exe to get the version number and the built date
2. check out the inno script from sourcesafe
3. stuff it to the inno script using filetostr(), strextract(), strtran() and strtofile()
4. check in the inno script back to sourcesafe
3. call the inno setup compiler to build the installer
so by issuing do make at the vfp command window, i will have the installer automatically built with the correct version and timestamp, and also have the latest inno setup script in source control. the fact that both inno setup and sourcesafe have command line interface make things much easier, not to mention the readily available vfp built-in commands.
attached is the make.prg in its entirety.