Skip to content

Commit

Permalink
Unify location of version description (see gh-16).
Browse files Browse the repository at this point in the history
  • Loading branch information
yak1ex committed Sep 1, 2013
1 parent 4b68672 commit cf0b534
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
/test.db
/dist.sh
*.BAK
release.h
16 changes: 11 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
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)
cp -p Release/ax7z.spi ax7z.txt $(DIR)
(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:
Expand Down
11 changes: 6 additions & 5 deletions ax7z.rc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#include "release.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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"
Expand Down
1 change: 1 addition & 0 deletions diff-exclude.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ test.cpp
test.sh
test.db
*.iso
release.h.in
3 changes: 2 additions & 1 deletion entryFuncs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ax7z entry funcs
#include "version.hpp"
#include <sys/types.h>
#include <sys/stat.h>
#include "release.h"

#ifdef NDEBUG
#define OutputDebugPrintf (void)
Expand Down Expand Up @@ -203,7 +204,7 @@ void ExtManager::SetPluginInfo(std::vector<std::string> &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<std::string, std::string>::const_iterator ci2, ciEnd2 = mResmap.end();
for(ci2 = mResmap.begin(); ci2 != ciEnd2; ++ci2) {
Expand Down
9 changes: 9 additions & 0 deletions release.h.in
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cf0b534

Please sign in to comment.