The autoversioning plugin that I did may help you with that, it generate a version.h with various variable declarations and two defines to use on rc files. I haven't tested it with rc files but it should be something like this:
#include "version.h" //File generated by the plugin with the
//AutoVersion::RC_FILEVERSION and
//AutoVersion::RC_FILEVERSION_STRING
//defines.
aaaa ICON "app.ico"
1 VERSIONINFO
FILEVERSION AutoVersion::RC_FILEVERSION
PRODUCTVERSION AutoVersion::RC_FILEVERSION
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L // 0x1L = EXE, 0x2L = DLL
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "My Company"
VALUE "LegalCopyright", "(c) 2007 My Copyrights"
VALUE "FileDescription", "Blah"
VALUE "FileVersion", AutoVersion::RC_FILEVERSION_STRING
VALUE "InternalName", "AppName"
VALUE "OriginalFilename", "app.exe"
VALUE "ProductName", "Appname blahh"
VALUE "ProductVersion", AutoVersion::RC_FILEVERSION_STRING
VALUE "Comments", "This is a beta app"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
If you want to test it follow the links on my signature for mor info on the forum and downloads. I have created also a berlios account for it. If something goes wrong or goes fine I will appreciate if you report it :D. I think that the plugin should also generate an rc file under windows, that should be a feature maybe. :roll:
I think that the plugin should also generate an rc file under windows, that should be a feature maybe. :roll:
Definitely. In fact the version info I use is even more detailed than the one you have just shown. Here is how it looks like:
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL // VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS 0x1L // VS_FF_DEBUG|VS_FF_PRIVATEBUILD|VS_FF_PRERELEASE
#else
FILEFLAGS 0x0L // final version
#endif
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN // not used
{
BLOCK "StringFileInfo"
{
BLOCK "040904E4" // Lang=US English, CharSet=Windows Multilingual
{
VALUE "Build", "August 2007\0"
VALUE "Comments", "Free for personal use only.\0"
VALUE "CompanyName", "Fake Company\0"
VALUE "Developer", "The Developer\0"
VALUE "FileDescription", "Application implementing something\0"
VALUE "FileVersion", "1.0.000\0"
VALUE "InternalName", "AppInternalName\0"
VALUE "LegalCopyright", "Copyright (C) 2007 Fake Company\0"
VALUE "LegalTrademarks", "All rights reserved.\0"
VALUE "OriginalFilename", "TheEXE.exe\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "The EXE\0"
VALUE "ProductVersion", "1.0.000\0"
VALUE "SpecialBuild", "\0"
VALUE "Support", "TheEXE at fake-domain.com\0"
VALUE "Users", "Unlimited.\0"
} // BLOCK "040904E4"
} // BLOCK "StringFileInfo"
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x409, 1252 // 1252 = 0x04E4
} // BLOCK "VarFileInfo"
}
As you can see - a file version plugin (windows only) should offer a lot more than you describe. And a lot of it has nothing to do with versioning. So honestly: I think it's better to handle these things in another plugin (for Windows only). Hence this one *might* use the macros of the autoversioning plugin... (IMHO).
With regards, Morten.