From cf0b534479544baca344c278b612d6fad773297c Mon Sep 17 00:00:00 2001 From: Yak! Date: Sun, 1 Sep 2013 14:52:00 +0900 Subject: [PATCH] Unify location of version description (see gh-16). --- .gitignore | 1 + Makefile | 16 +++++++++++----- ax7z.rc | 11 ++++++----- diff-exclude.txt | 1 + entryFuncs.cpp | 3 ++- release.h.in | 9 +++++++++ 6 files changed, 30 insertions(+), 11 deletions(-) create mode 100644 release.h.in diff --git a/.gitignore b/.gitignore index 23778a1..a5cbcd9 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /test.db /dist.sh *.BAK +release.h diff --git a/Makefile b/Makefile index c3089f4..351cfc6 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,16 @@ -VER = 0.7-457y3b1 +PMAJOR = 3 +PMINOR = 1 +REL = y$(PMAJOR)b$(PMINOR) +VER = 0.7-457$(REL) DIR = ax7z-$(VER) .PHONY: release dist build mkpatch tag gtag retag test release: build dist +release.h: Makefile release.h.in + sed -e 's/@PMAJOR@/$(PMAJOR)/;s/@PMINOR@/$(PMINOR)/;s/@REL@/$(REL)/' release.h.in > release.h + dist: mkpatch rm -rf $(DIR) mkdir -p $(DIR) @@ -12,16 +18,16 @@ dist: mkpatch (cd $(DIR); zip ../$(DIR).zip *) rm -rf $(DIR) -build: +build: release.h /cygdrive/c/Program\ Files\ \(x86\)/Application/Microsoft\ Visual\ Studio\ 11.0/Common7/IDE/devenv.exe ./00am.sln /Build Release -rebuild: +rebuild: release.h /cygdrive/c/Program\ Files\ \(x86\)/Application/Microsoft\ Visual\ Studio\ 11.0/Common7/IDE/devenv.exe ./00am.sln /Rebuild Release -dbuild: +dbuild: release.h /cygdrive/c/Program\ Files\ \(x86\)/Application/Microsoft\ Visual\ Studio\ 11.0/Common7/IDE/devenv.exe ./00am.sln /Build Debug -drebuild: +drebuild: release.h /cygdrive/c/Program\ Files\ \(x86\)/Application/Microsoft\ Visual\ Studio\ 11.0/Common7/IDE/devenv.exe ./00am.sln /Rebuild Debug mkpatch: diff --git a/ax7z.rc b/ax7z.rc index 7872e25..99bdc78 100644 --- a/ax7z.rc +++ b/ax7z.rc @@ -1,6 +1,7 @@ // Microsoft Visual C++ generated resource script. // #include "resource.h" +#include "release.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// @@ -88,7 +89,7 @@ BEGIN LTEXT "ax7z.spi v0.7",IDC_STATIC,7,7,62,10 LTEXT "7Z/RAR/CBR/CAB/ARJ etc. plug-in using 7z",IDC_STATIC,7,28,151,12 LTEXT "(c) Makito Miyano",IDC_STATIC,98,7,62,12 - LTEXT "for 7-zip 4.57+ y3b1",IDC_STATIC,22,17,74,10 + LTEXT RELEASE_LONG_STR,IDC_STATIC,22,17,74,10 LTEXT "Enhanced by Yak!",IDC_STATIC,98,17,62,12 LTEXT "Using 7z.dll version",IDC_STATIC,27,40,62,8 LTEXT "",IDC_7ZVERSION,92,40,70,8 @@ -113,8 +114,8 @@ END // IDV_VERSIONINFO VERSIONINFO - FILEVERSION 0,7,3,1 - PRODUCTVERSION 0,7,3,1 + FILEVERSION 0,7,PATCH_MAJOR,PATCH_MINOR + PRODUCTVERSION 0,7,PATCH_MAJOR,PATCH_MINOR FILEFLAGSMASK 0x0L #ifdef _DEBUG FILEFLAGS 0x1L @@ -131,12 +132,12 @@ BEGIN BEGIN VALUE "CompanyName", "Yak!" VALUE "FileDescription", "ax7z.spi - 7Z/RAR/CBR/CAB/ARJ etc. plug-in using 7z" - VALUE "FileVersion", "v0.7 y3b1" + VALUE "FileVersion", "v0.7 " RELEASE_STR VALUE "InternalName", "ax7z.spi" VALUE "LegalCopyright", "(c) Makito Miyano, enhanced by Yak!" VALUE "OriginalFilename", "ax7z.spi" VALUE "ProductName", "ax7z.spi" - VALUE "ProductVersion", "v0.7 y3b1" + VALUE "ProductVersion", "v0.7 " RELEASE_STR END END BLOCK "VarFileInfo" diff --git a/diff-exclude.txt b/diff-exclude.txt index eca4f24..e9a4d92 100644 --- a/diff-exclude.txt +++ b/diff-exclude.txt @@ -44,3 +44,4 @@ test.cpp test.sh test.db *.iso +release.h.in diff --git a/entryFuncs.cpp b/entryFuncs.cpp index 530fd83..a3164df 100644 --- a/entryFuncs.cpp +++ b/entryFuncs.cpp @@ -22,6 +22,7 @@ ax7z entry funcs #include "version.hpp" #include #include +#include "release.h" #ifdef NDEBUG #define OutputDebugPrintf (void) @@ -203,7 +204,7 @@ void ExtManager::SetPluginInfo(std::vector &vsPluginInfo) const vsPluginInfo.clear(); vsPluginInfo.push_back("00AM"); - vsPluginInfo.push_back("7z extract library v0.7 for 7-zip 4.57+ y3b1 (C) Makito Miyano / enhanced by Yak!"); + vsPluginInfo.push_back("7z extract library v0.7 for 7-zip 4.57+ " RELEASE_STR " (C) Makito Miyano / enhanced by Yak!"); std::map::const_iterator ci2, ciEnd2 = mResmap.end(); for(ci2 = mResmap.begin(); ci2 != ciEnd2; ++ci2) { diff --git a/release.h.in b/release.h.in new file mode 100644 index 0000000..38811f1 --- /dev/null +++ b/release.h.in @@ -0,0 +1,9 @@ +#ifndef RELEASE_H +#define RELEASE_H + +#define RELEASE_STR "@REL@" +#define RELEASE_LONG_STR "for 7-zip 4.57+ @REL@" +#define PATCH_MAJOR @PMAJOR@ +#define PATCH_MINOR @PMINOR@ + +#endif