From cb641f9b0c4a2987c8fb4fe4ff431ecb660a924f Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Tue, 22 Oct 2013 16:33:01 +0100 Subject: [PATCH] Rudimentary file versioning. Embed file version info in the resource file so that right-clicking the executable shows the application version. Unfortunately the version field must be formatted in a particular way so we can't reuse the NSSM_VERSION #define from nssm.h but instead must create a new #define and remember to update it when making a release. Thanks fREW Schmidt. --- nssm.h | 1 + nssm.rc | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/nssm.h b/nssm.h index 4a32859..0e918c3 100644 --- a/nssm.h +++ b/nssm.h @@ -18,6 +18,7 @@ int str_equiv(const char *, const char *); #define NSSM "nssm" #define NSSM_VERSION "2.16" +#define NSSM_VERSIONINFO 2,16,0,0 #define NSSM_DATE "2012-12-01" /* diff --git a/nssm.rc b/nssm.rc index b2e539e..d7c9d3b 100644 --- a/nssm.rc +++ b/nssm.rc @@ -1,5 +1,6 @@ // Microsoft Visual C++ generated resource script. // +#include "nssm.h" #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS @@ -110,6 +111,32 @@ BEGIN END #endif // APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION NSSM_VERSIONINFO + PRODUCTVERSION NSSM_VERSIONINFO + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + END + BLOCK "VarFileInfo" + BEGIN + END +END + #endif // English (U.K.) resources ///////////////////////////////////////////////////////////////////////////// -- 2.7.4