This commit is contained in:
Kyzentun
2015-01-27 21:01:42 -07:00
4 changed files with 25 additions and 10 deletions
+14 -7
View File
@@ -28,12 +28,10 @@ AM_CXXFLAGS += -finline-limit=300
AM_CXXFLAGS += $(GL_CFLAGS)
.PHONY: increment_version
all: increment_version
.PHONY: increment_version gitversion
increment_version:
if test -e ver.cpp; then \
if test -e ver.h; then \
build=`sed -rs 's/.*version_num = ([[:digit:]]+);/\1/;q' ver.cpp`; \
build=`expr $$build + 1`; \
else \
@@ -43,8 +41,17 @@ increment_version:
echo "extern const char *const version_time = \"`date +"%X %Z (UTC%:z)"`\";" >> ver.cpp;
echo "extern const char *const version_date = \"`date +"%Y%m%d"`\";" >> ver.cpp;
ver.cpp:
$(MAKE) increment_version
ver.cpp: increment_version
gitversion:
rm -f gitversion.h
touch gitversion.h
if git rev-parse --short HEAD; then \
echo "#define PRODUCT_VER_BARE 5.0-git-`git rev-parse --short HEAD`" > gitversion.h; \
fi
gitversion.h: gitversion
ProductInfo.h: gitversion.h
PNG = \
../extern/libpng/include/png.c ../extern/libpng/include/.png.h \
@@ -737,7 +744,7 @@ main_LDADD = \
$(GL_LIBS) \
libtomcrypt.a libtommath.a
nodist_stepmania_SOURCES = ver.cpp
nodist_stepmania_SOURCES = ver.cpp gitversion.h
stepmania_CPPFLAGS = $(main_CPPFLAGS)
stepmania_SOURCES = $(main_SOURCES)
+8 -2
View File
@@ -3,6 +3,12 @@
#ifndef PRODUCT_INFO_H
#define PRODUCT_INFO_H
// XXX: VC doesn't generate this yet. Hack around it for now
#include "config.h"
#ifdef USE_GITVERSION
#include "gitversion.h"
#endif
/**
* @brief A friendly string to refer to the product in crash dialogs, etc.
*
@@ -16,7 +22,7 @@
* As an example, use "StepMania4" here, not "StepMania".
* It would cause a conflict with older versions such as StepMania 3.X.
*/
#define PRODUCT_ID_BARE StepMania 5
#define PRODUCT_ID_BARE StepMania 5.0
/**
* @brief Version info displayed to the user.
@@ -30,7 +36,7 @@
* </li></ul>
*/
#ifndef PRODUCT_VER_BARE
#define PRODUCT_VER_BARE v5.0 beta 4a
#define PRODUCT_VER_BARE 5.0-UNKNOWN
#endif
/**