From 02c485e0d96923bb0c652f861787d31dc88d539d Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Mon, 15 Nov 2021 03:46:33 +0200 Subject: [PATCH] Version number is shared between projects --- ExplorerPatcher/ExplorerPatcher.rc | 9 +++++---- ExplorerPatcher/ExplorerPatcher.vcxproj | 1 + ExplorerPatcher/ExplorerPatcher.vcxproj.filters | 3 +++ ep_setup/ep_setup.rc | 9 +++++---- version.h | 16 ++++++++++++++++ 5 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 version.h diff --git a/ExplorerPatcher/ExplorerPatcher.rc b/ExplorerPatcher/ExplorerPatcher.rc index f9951cb..bf2cbfe 100644 --- a/ExplorerPatcher/ExplorerPatcher.rc +++ b/ExplorerPatcher/ExplorerPatcher.rc @@ -49,10 +49,11 @@ END // // Version // +#include "..\version.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 22000,318,37,1 - PRODUCTVERSION 22000,318,37,1 + FILEVERSION VER_FILE + PRODUCTVERSION VER_PRODUCT FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -69,12 +70,12 @@ BEGIN BEGIN VALUE "CompanyName", "VALINET Solutions SRL" VALUE "FileDescription", "ExplorerPatcher" - VALUE "FileVersion", "22000.318.37.1" + VER_FILE_STRING VALUE "InternalName", "ExplorerPatcher.dll" VALUE "LegalCopyright", "Copyright (C) 2006-2021 VALINET Solutions SRL. All rights reserved." VALUE "OriginalFilename", "ExplorerPatcher.dll" VALUE "ProductName", "ExplorerPatcher" - VALUE "ProductVersion", "22000.318.37.1" + VER_PRODUCT_STRING END END BLOCK "VarFileInfo" diff --git a/ExplorerPatcher/ExplorerPatcher.vcxproj b/ExplorerPatcher/ExplorerPatcher.vcxproj index 23090ef..8422394 100644 --- a/ExplorerPatcher/ExplorerPatcher.vcxproj +++ b/ExplorerPatcher/ExplorerPatcher.vcxproj @@ -289,6 +289,7 @@ + diff --git a/ExplorerPatcher/ExplorerPatcher.vcxproj.filters b/ExplorerPatcher/ExplorerPatcher.vcxproj.filters index 81e93b7..fdca619 100644 --- a/ExplorerPatcher/ExplorerPatcher.vcxproj.filters +++ b/ExplorerPatcher/ExplorerPatcher.vcxproj.filters @@ -111,6 +111,9 @@ Header Files + + Header Files\internal + diff --git a/ep_setup/ep_setup.rc b/ep_setup/ep_setup.rc index ad005ea..2ea91ca 100644 --- a/ep_setup/ep_setup.rc +++ b/ep_setup/ep_setup.rc @@ -49,10 +49,11 @@ END // // Version // +#include "..\version.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 2021,11,13,1 - PRODUCTVERSION 2021,11,13,1 + FILEVERSION VER_FILE + PRODUCTVERSION VER_PRODUCT FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -69,12 +70,12 @@ BEGIN BEGIN VALUE "CompanyName", "VALINET Solutions SRL" VALUE "FileDescription", "ExplorerPatcher Setup Program" - VALUE "FileVersion", "2021.11.13.1" + VER_FILE_STRING VALUE "InternalName", "ep_setup.exe" VALUE "LegalCopyright", "Copyright (C) 2006-2021 VALINET Solutions SRL. All rights reserved." VALUE "OriginalFilename", "ep_setup.exe" VALUE "ProductName", "ExplorerPatcher" - VALUE "ProductVersion", "2021.11.13.1" + VER_PRODUCT_STRING END END BLOCK "VarFileInfo" diff --git a/version.h b/version.h new file mode 100644 index 0000000..7971527 --- /dev/null +++ b/version.h @@ -0,0 +1,16 @@ +#define VER_MAJOR 22000 +#define VER_MINOR 318 +#define VER_BUILD_HI 37 +#define VER_BUILD_LO 2 +#define VER_FLAGS VS_FF_PRERELEASE + + +// The Binary form of the version numbers +#define VER_FILE VER_MAJOR, VER_MINOR, VER_BUILD_HI, VER_BUILD_LO +#define VER_PRODUCT VER_MAJOR, VER_MINOR, VER_BUILD_HI, VER_BUILD_LO + +#define VER_STR(arg) #arg + +// The String form of the version numbers +#define VER_FILE_STRING VALUE "FileVersion", "22000.318.37.2" +#define VER_PRODUCT_STRING VALUE "ProductVersion", "22000.318.37.2"