From 952c064f1848e4710ea3caa982fe199786858a1d Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Mon, 8 Sep 2014 12:37:15 -0400 Subject: [PATCH] * Fix version resource information for wrapper and vboxwrapper. (From: Teemu Mannermaa) --- samples/vboxwrapper/vboxwrapper_win.rc | 8 ++++++-- samples/wrapper/wrapper_win.rc | 10 +++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/samples/vboxwrapper/vboxwrapper_win.rc b/samples/vboxwrapper/vboxwrapper_win.rc index 00370fbcc7..6ef09d88dc 100644 --- a/samples/vboxwrapper/vboxwrapper_win.rc +++ b/samples/vboxwrapper/vboxwrapper_win.rc @@ -33,6 +33,10 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL // Version // +// Helpful macros to convert version to string notation +#define TOSTR(s) #s +#define VER_TOSTR(maj,min,rel) TOSTR(maj) "." TOSTR(min) "." TOSTR(rel) "\0" + VS_VERSION_INFO VERSIONINFO FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,VBOXWRAPPER_RELEASE,0 PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,VBOXWRAPPER_RELEASE,0 @@ -52,12 +56,12 @@ BEGIN BEGIN VALUE "CompanyName", "Space Sciences Laboratory" VALUE "FileDescription", "BOINC VirtualBox Wrapper" - VALUE "FileVersion", BOINC_MAJOR_VERSION "." BOINC_MINOR_VERSION "." VBOXWRAPPER_RELEASE "\0" + VALUE "FileVersion", VER_TOSTR(BOINC_MAJOR_VERSION, BOINC_MINOR_VERSION, WRAPPER_RELEASE) VALUE "InternalName", "vboxwrapper" VALUE "LegalCopyright", "© 2011-2014 University of California" VALUE "OriginalFilename", "vboxwrapper.exe" VALUE "ProductName", "BOINC VirtualBox Wrapper" - VALUE "ProductVersion", BOINC_MAJOR_VERSION "." BOINC_MINOR_VERSION "." VBOXWRAPPER_RELEASE "\0" + VALUE "ProductVersion", VER_TOSTR(BOINC_MAJOR_VERSION, BOINC_MINOR_VERSION, WRAPPER_RELEASE) END END BLOCK "VarFileInfo" diff --git a/samples/wrapper/wrapper_win.rc b/samples/wrapper/wrapper_win.rc index c2cc3844ba..071240386c 100644 --- a/samples/wrapper/wrapper_win.rc +++ b/samples/wrapper/wrapper_win.rc @@ -33,6 +33,10 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL // Version // +// Helpful macros to convert version to string notation +#define TOSTR(s) #s +#define VER_TOSTR(maj,min,rel) TOSTR(maj) "." TOSTR(min) "." TOSTR(rel) "\0" + VS_VERSION_INFO VERSIONINFO FILEVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,WRAPPER_RELEASE,0 PRODUCTVERSION BOINC_MAJOR_VERSION,BOINC_MINOR_VERSION,WRAPPER_RELEASE,0 @@ -52,12 +56,12 @@ BEGIN BEGIN VALUE "CompanyName", "Space Sciences Laboratory" VALUE "FileDescription", "BOINC Wrapper" - VALUE "FileVersion", BOINC_MAJOR_VERSION "." BOINC_MINOR_VERSION "." WRAPPER_RELEASE "\0" - VALUE "InternalName", "vboxwrapper" + VALUE "FileVersion", VER_TOSTR(BOINC_MAJOR_VERSION, BOINC_MINOR_VERSION, WRAPPER_RELEASE) + VALUE "InternalName", "wrapper" VALUE "LegalCopyright", "© 2011-2014 University of California" VALUE "OriginalFilename", "wrapper.exe" VALUE "ProductName", "BOINC Wrapper" - VALUE "ProductVersion", BOINC_MAJOR_VERSION "." BOINC_MINOR_VERSION "." WRAPPER_RELEASE "\0" + VALUE "ProductVersion", VER_TOSTR(BOINC_MAJOR_VERSION, BOINC_MINOR_VERSION, WRAPPER_RELEASE) END END BLOCK "VarFileInfo"