Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RESOURCE VS_VERSION_INFO VERSIONINFO

221 views
Skip to first unread message

richard.to...@googlemail.com

unread,
Jan 11, 2008, 7:03:39 AM1/11/08
to
hi all

here's a well known piece of code for setting the version stuff.

RESOURCE VS_VERSION_INFO VERSIONINFO
FILEVERSION _TDOC_VERSION,_TDOC_MAJORRELEASE
PRODUCTVERSION _TDOC_VERSION,_TDOC_MAJORRELEASE

however, it doesn't like TDOC_MAJORRELEASE set to "03e"

its the "e" it wont accept.
well aan RC1116 Error - terminate after preprocessor
expected exponent not 'r

so we have gone from "d" to "f" - like skipping 13 for no good reason.

regards

richard

Malcolm Gray

unread,
Jan 11, 2008, 7:21:00 AM1/11/08
to

Does d and f actually appear in the file version info (I thought that
was the numeric version so 03f would read as 03 but 03e would read as a
badly formatted numeric literal?

I think this may be a bug in the MS resource compiler accepting d and f.

Geoff Schaller

unread,
Jan 11, 2008, 8:50:00 PM1/11/08
to
You can't do this <g>. The acceptance is an accident of fate. Here below
is what I use for a version resource. It is an English-only one (Joachim
has a good german + enlgish one in bBrowser) and I use VOPP to
automatically increment the build number.

Cheers,

Geoff

DEFINE VER_ORIGINAL := '"SQLMaster.exe"'
DEFINE VER_DESCRIPTION := '"SQLMaster Executable"'
DEFINE VER_COMMENTS := '"SQL Master SQL Development Tool"'
DEFINE VER_SUPPORT := '"Telephone Australia 1300790102 for support or
+61 3 9762 3155 intl"'
RESOURCE VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILEVERSION
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x00L
FILEOS VOS__WINDOWS32
FILETYPE VER_TYPE
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Build", VER_BUILD
VALUE "FileVersion", VER_VERSION
VALUE "FileDescription", VER_DESCRIPTION
VALUE "Support", VER_SUPPORT
VALUE "LegalCopyright", "Copyright \251 2007 GCS Software Pty Ltd"
VALUE "Comments", VER_COMMENTS
VALUE "Company Name", "Software Objectives"
VALUE "Company Address", "Unit 1, 11 Chandler Road, Boronia Vic
3155, Australia"
VALUE "Compiled Using", "CA Visual Objects 2.8 Build %VER%"
VALUE "Version Date", VER_DATE
VALUE "Website", "www.softwareobjectives.com.au"
VALUE "Original Filename", VER_ORIGINAL
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
DEFINE VER_TYPE := VFT_APP // VFT_DLL - choose which
DEFINE VER_FILEVERSION := VER_FILEMAIN + "," + VER_FILESUB + "," +
VER_FILESUBSUB + "," + VER_VOPP_FILEBUILD
DEFINE VER_BUILD := '"' + VER_VOPP_FILEBUILD + '"'
DEFINE VER_VERSION := '"' + VER_VERSIONAPP + "." + VER_VOPP_FILEBUILD +
'"'
DEFINE VER_DATE := ["]+VER_DATERAW+["]
DEFINE VER_VERSIONAPP := VER_FILEMAIN + "." + VER_FILESUB + "." +
VER_FILESUBSUB
DEFINE VER_FILEMAIN := "1"
DEFINE VER_FILESUB := "7"
DEFINE VER_FILESUBSUB := "5"
DEFINE VER_DATERAW := "02/09/2007"
DEFINE VER_VOPP_FILEBUILD := "320"


richard.to...@googlemail.com

unread,
Jan 12, 2008, 3:06:21 PM1/12/08
to
malcolm

**I think this may be a bug in the MS resource compiler accepting d
and f. **

i have no idea, but it always has done since we started this in vo
2.5, and always have had a problem with the e - is it trying e to the
power of ?

richard

Malcolm Gray

unread,
Jan 13, 2008, 11:35:41 AM1/13/08
to

1e2 is in most languages another way of writing 100

XeY is defined to be X * 10^Y

Alessandro Antonangeli

unread,
Jan 21, 2008, 10:47:53 AM1/21/08
to
Thanks Geoff for this code, I was just looking for it.

When using it I've found this little (but annoyng bug)

I put all the stuff in a new module of one application, made the necessary
changes, tryed it. All ok
Then i drag and dropped the whole module in another application, made the
necessary changes, tryed it.
The result was that the strings shown in the program properties were of the
previous application. I re-changed but nothing. I reindexed the repositary,
but nothing.
I had to Cut all the code, save the changes, copy back the code.
Then it worked

--
Ciao
Alessandro


richard.to...@googlemail.com

unread,
Jan 28, 2008, 7:01:46 AM1/28/08
to
Geoff, et al

So i am now overhauling what has workled for years - and doing some
investigations ...

First is the version, driven by DEFINES
RESOURCE VS_VERSION_INFO VERSIONINFO
FILEVERSION _TDOC_VERSION,_TDOC_MAJORRELEASE,_TDOC_MINORRELEASE,0

It does NOT seem to matter if the defines are numeric or character.
Even a mixture works.

In order for the Company information to show up in Windows Explorer
(aka File Manager) having selected it using View; Choose Details, then
the following syntax is needed in the Block section.

BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "TDOC Projects Ltd"

So that the Copyright shows up above the properties{Other Version
Information}, one must use:
VALUE "LegalCopyright", "1998-2008 Eur Ing R.G.Townsend-
Rose"

The following just shows it in the properties box.
VALUE "Copyright", "1998-2008 Eur Ing R.G.Townsend-Rose"

However NEITHER shows up in Windows Explorer if the Copyright
attribute is selected

Both following show up fine.
VALUE "ProductName", "The TDOC System"
VALUE "ProductVersion", "Version 5.24.7.2"

If one leaves out this one - then sometimes you get NO INFORMATION
anywhere ....
VALUE "FileVersion", "Version 5.24.7.2"
BUT it can be different to that declared in the resource, which is the
one which shows up in Windows Explorer

all in all it seems like a total classic ms fiasco
and this shows it is as abad as it ever was ...
Minimum operating systems Windows 95, Windows NT 3.1
and then papers which say the informnation may be dispoalyed
incorrectly ...

however, i wound up here on msdn
http://msdn2.microsoft.com/en-us/library/ms646981(VS.85).aspx

and not really any the wiser ....

regards

richard

0 new messages