From 644b83e0b4b47911f35ea34976d767f020f42f4e Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sun, 1 Jul 2012 19:06:34 +0200 Subject: Add version information to Windows file properties. Windows can show the version in the file properties. This requires an additional entry in its resource. Restructure global version defines since the former requires a different format than used previously. Change-Id: I2bf261a02ea8e0af6dc081568960debfb779d396 --- rbutil/rbutilqt/rbutilqt.rc | 34 +++++++++++++++++++++++++++++++++- rbutil/rbutilqt/version.h | 10 +++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/rbutil/rbutilqt/rbutilqt.rc b/rbutil/rbutilqt/rbutilqt.rc index 8b7938b69c..8ffe2b2424 100644 --- a/rbutil/rbutilqt/rbutilqt.rc +++ b/rbutil/rbutilqt/rbutilqt.rc @@ -1,2 +1,34 @@ -1 24 MOVEABLE PURE "rbutilqt.manifest" +#include +#include "version.h" +1 MANIFEST MOVEABLE PURE "rbutilqt.manifest" RBUTIL_ICON ICON DISCARDABLE "icons/rockbox.ico" + +// Version Info + +VS_VERSION_INFO VERSIONINFO +FILEVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_MICRO,VERSION_PATCH +PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_MICRO,VERSION_PATCH +FILEFLAGSMASK 0x17L +FILEFLAGS 0x0L +FILEOS 0x4L +FILETYPE 0x0L +FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "FileDescription", "Rockbox Utility" + VALUE "FileVersion", VERSIONSTRING(VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO) + VALUE "LegalCopyright", "Rockbox developers" + VALUE "ProductName", "Rockbox Utility" + VALUE "ProductVersion", VERSIONSTRING(VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO) + VALUE "OriginalFilename", "RockboxUtility.exe" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END + diff --git a/rbutil/rbutilqt/version.h b/rbutil/rbutilqt/version.h index a4a007867e..ac3728c630 100644 --- a/rbutil/rbutilqt/version.h +++ b/rbutil/rbutilqt/version.h @@ -26,7 +26,15 @@ // rebuilds because of issues like dependency problems or library updates). // Usually empty. #define BUILDID "" -#define VERSION "1.2.14" BUILDID +// Version string is constructed from parts, since the Windows rc file needs it +// combined differently. +#define VERSION_MAJOR 1 +#define VERSION_MINOR 2 +#define VERSION_MICRO 14 +#define VERSION_PATCH 0 +#define STR(x) #x +#define VERSIONSTRING(a, b, c) STR(a) "." STR(b) "." STR(c) +#define VERSION VERSIONSTRING(VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO) BUILDID // PUREVERSION should identify the build uniquely. Use version string for now. #define PUREVERSION "$Rev$" -- cgit v1.2.3