PDA

View Full Version : Embedded version resource



NewsArchive
09-23-2007, 01:12 PM
I use ds_GetFileVersionInfo() in my app to display the current version
number (and build) and also SB as my installer.

I have asked Friedrich if he can look into including this functionality
within SB but until then ....

I have added the template to my app but always forget to update the darned
thing. Is there any way this can be done within Clarion automatically either
using handcode or some other method?

The other alternative, not pretty but it would work, is to put a message
into SB to remind me what to do each time. i.e. Have you updated the version
etc. But how could that be incorporated into SB so the message only shows at
compile time and not run time.

I bet the answer is simple but ....

TIA

John Fligg

NewsArchive
09-23-2007, 01:34 PM
Hi John,

Unfortunately, the "Version Stamping" feature will not make it into the
upcoming SetupBuilder 6.6. We already have an experimental version
available (it was not trivial to develop) and we'll make it available in the
next maintenance release for 6.6.

What you can do to verify if you have updated your version resource in your
own files is:

1. Use the "#get file information" compiler directive to retrieve the
version number from your file. Store the value in, say, [FILE_VERSION]

2. Check if [FILE_VERSION] Equals [PRODUCTVER] (use #ifcompvar to handle
this)

I am assuming here that both your installer and your application files have
the same version format.

3. If [FILE_VERSION] <> [PRODUCTVER], do whatever has to be done (display
a message at compile time, abort the compilation process, etc.)

Does this help?

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.5
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
09-23-2007, 01:35 PM
That sounds exactly wghat I need. Will play when I get some time.

Many thanks

john

NewsArchive
09-23-2007, 01:36 PM
John

Larry Sands' Version Information Resource Compiler may do
what you need. Released as Open Source and available care
of Clarion Magazine -
http://clarionmag.com/cmag/downloads.html

It will, at least, remember to update itself for you <g>.

There are also a few articles in ClarionMag covering this.


Regards,
Bob

NewsArchive
09-23-2007, 01:37 PM
Hi John,

>I have added the template to my app but always forget to update the darned
>thing. Is there any way this can be done within Clarion automatically either
>using handcode or some other method?

If you are using Clarion, then there is a template in our Utilities,
that writes the version information to an INI file of your choice,
which you can then read in your SB install and update your variables
with it. The resulting INI looks like this:

[VersionInfo]
Application=MyApp.app
Application Path=C:\Clarion\Apps\C63\Clients\MyClient\
Product Name=My Application Name
File Description=My Application Name
ProductVersion=1.0.0.502
FileVersion=1.0.0.502

You should then be able to use the "Get INI Value" in SB to read it.

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
09-23-2007, 01:37 PM
Hi John,

>If you are using Clarion, then there is a template in our Utilities,
>that writes the version information to an INI file of your choice,
>which you can then read in your SB install and update your variables
>with it. The resulting INI looks like this:

Never mind, I see that Friedrich has a solution to do the comparison:)


Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
09-23-2007, 01:38 PM
CHT has the option and the info is available to the app as well (neat
for splash screen with version and build info)


Didier G. Le Duc