From: Iain Patterson Date: Fri, 27 Dec 2013 14:15:21 +0000 (+0000) Subject: More detailed file properties. X-Git-Tag: v2.22~111 X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=2dcea1bd8f6939c9d894c6e3ba9ed28795c73e38;p=nssm.git More detailed file properties. Add build information, comments and copyright to the executable's version info fields. --- diff --git a/nssm.rc b/nssm.rc index 3cf4d3f..3c03bb4 100644 --- a/nssm.rc +++ b/nssm.rc @@ -262,23 +262,33 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION NSSM_VERSIONINFO - PRODUCTVERSION NSSM_VERSIONINFO - FILEFLAGSMASK 0x17L + FILEVERSION NSSM_VERSIONINFO + PRODUCTVERSION NSSM_VERSIONINFO + FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE #ifdef _DEBUG - FILEFLAGS 0x1L + FILEFLAGS NSSM_FILEFLAGS | VS_FF_DEBUG #else - FILEFLAGS 0x0L + FILEFLAGS NSSM_FILEFLAGS #endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN + BLOCK "040904E4" + BEGIN + VALUE "Comments", "http://nssm.cc/" + VALUE "FileDescription", "The non-sucking service manager" + VALUE "FileVersion", NSSM_VERSION + VALUE "LegalCopyright", "(c) Iain Patterson" + VALUE "ProductName", "NSSM" + VALUE "ProductVersion", NSSM_VERSION + END END BLOCK "VarFileInfo" BEGIN + VALUE "Translation", LANG_ENGLISH, SUBLANG_ENGLISH_US, LANG_FRENCH, SUBLANG_FRENCH, LANG_ITALIAN, SUBLANG_ITALIAN END END @@ -371,37 +381,6 @@ FONT 8, "MS Sans Serif" } -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -///////////////////////////////////////////////////////////////////////////// -// -// 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 // French resources ///////////////////////////////////////////////////////////////////////////// @@ -539,32 +518,6 @@ 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 // Italian (Italy) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/version.cmd b/version.cmd index 536c3e6..77045c9 100644 --- a/version.cmd +++ b/version.cmd @@ -21,13 +21,27 @@ set version=%version:~0,-1% set minor=%version:*.=% call set major=%%version:.%minor%=%% +@rem Build flags. +set flags=0L + @rem Don't include n and commit if we match a tag exactly. -if "%n%" == "0" set description=%major%.%minor% +if "%n%" == "0" (set description=%major%.%minor%) else set flags=VS_FF_PRERELEASE +@rem Maybe we couldn't get the git tag. +if "%commit%" == "prerelease" set flags=VS_FF_PRERELEASE @rem Ignore the build number if this isn't Jenkins. if "%BUILD_NUMBER%" == "" set BUILD_NUMBER=0 +@rem Copyright year provided by Jenkins. +if "%BUILD_ID%" == "" (set year=) else ( + set md=%BUILD_ID:*-=% + call set year=%%BUILD_ID:%md%=%% + set year=%year:~0,-1% +) + @rem Create version.h. @echo>version.h #define NSSM_VERSION _T("%description%") @echo>>version.h #define NSSM_VERSIONINFO %major%,%minor%,%n%,%BUILD_NUMBER% @echo>>version.h #define NSSM_DATE _T("%DATE%") +@echo>>version.h #define NSSM_FILEFLAGS %flags% +@echo>>version.h #define NSSM_COPYRIGHT _T("(c) 2003-%year% Iain Patterson")