Version info in resources suggestion
"Georges Berenger" <[email protected]>
| Newsgroups | gmane.network.vnc.ultravnc.general |
|---|---|
| Message-ID | <76261096A156DE42AA68E538D3B401B60FF93E@DALY-MSG.global.avidww.com> |
For feature requests and bug reports RC15 RC16. Please use the forum at http://forum.ultravnc.net/
First, I want to thank the team of creating a tag for the RC20.5. This
really helps me merge changes in a clean way.
Second: I notice that version information is duplicated in different
location when it doesn't strictly need to.
The versioninfo.h file that lives at the top of the source tree contains
all the info needed. The resource files then need to include that file
and use the definitions made in it.
If you have problems with a resource editor (Visual Studio will replace
the defines by their value if you open the resources with a non-text
editor), you can place the version resource in an other file included in
the original .rc file. For instance:
Winvnc.rc:
#include "winvnc.rc2"
... (remove the version info and leave the file otherwise unchanged)
Winvnc.rc2: (to be edited with a text editor only)
#include "versioninfo.h" // adjust the path as necessary...
#ifndef _MAC
////////////////////////////////////////////////////////////////////////
/////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION INT_VERSION
PRODUCTVERSION INT_VERSION
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904b0"
BEGIN
VALUE "Comments", "\0"
VALUE "CompanyName", STR_COMPANYNAME
VALUE "FileDescription", "VNC server for Win32\0"
VALUE "FileVersion", STR_FILEVERSION
VALUE "InternalName", "WinVNC\0"
VALUE "LegalCopyright", STR_COPYRIGHT
VALUE "LegalTrademarks", "VNC\0"
VALUE "OriginalFilename", "WinVNC.exe\0"
VALUE "ProductName", "Ultr@VNC\0"
VALUE "ProductVersion", STR_PRODUCTVERSION
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x809, 1200
END
END
#endif // !_MAC
I write this because I see that version info is not very consistently
maintained accross builds, probably simply because it is a pain to
maintain. For instance, winvnc_fr.rc is still stuck at 1.0.0.12...
I have used this method successfuly to create version info accross our
multiple binaries and I just thought it could be used in Winvnc as well.
-georges
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click