src/gui/imageinfo.cpp: change SVN Version to GIT Version

This commit is contained in:
satbaby
2012-10-28 13:08:55 +01:00
parent cc73e4de86
commit 2ee2bb63f0
2 changed files with 21 additions and 16 deletions

View File

@@ -1,16 +1,21 @@
AM_CPPFLAGS = -fno-rtti -fno-exceptions AM_CPPFLAGS = -fno-rtti -fno-exceptions
#AM_CPPFLAGS = -fno-rtti #AM_CPPFLAGS = -fno-rtti
.PHONY:git_version.h
BUILT_SOURCES = svn_version.h BUILT_SOURCES = git_version.h
git_version.h:
svn_version.h: @if test -d ../../.git; then \
@if test -d .svn ; then \ echo "#define GITVERSION \"$$(git describe --dirty || echo '#define BUILT_DATE "'`date`'"' )\" " > git_version.h.tmp ; \
sleep 180 && rm svn_version.h & echo "#define SVNVERSION \"$$(svnversion -n || echo svn_oops!)\" " > svn_version.h ; \ if diff -q git_version.h git_version.h.tmp >/dev/null 2>&1 ; then \
rm -f git_version.h.tmp ; \
else \ else \
rm svn_version.h; echo '#define BUILT_DATE "'`date`'"' > svn_version.h ; \ rm -f git_version.h ; \
mv git_version.h.tmp git_version.h ; \
fi; \
else \
rm git_version.h; echo '#define BUILT_DATE "'`date`'"' > git_version.h ; \
fi fi
noinst_HEADERS = svn_version.h noinst_HEADERS = git_version.h
SUBDIRS = widget bedit SUBDIRS = widget bedit

View File

@@ -39,8 +39,8 @@
#include <system/flashtool.h> #include <system/flashtool.h>
#include <video.h> #include <video.h>
#include "svn_version.h" #include "git_version.h"
#define SVN_REV "SVN Rev.:" #define GIT_DESC "GIT Desc.:"
#define GIT_REV "GIT Build:" #define GIT_REV "GIT Build:"
extern cVideo * videoDecoder; extern cVideo * videoDecoder;
@@ -92,8 +92,8 @@ void CImageInfo::Init(void)
offset = tmpoffset; offset = tmpoffset;
} }
} }
#ifdef SVNVERSION #ifdef GITVERSION
int off_tmp = g_Font[font_info]->getRenderWidth(SVN_REV); int off_tmp = g_Font[font_info]->getRenderWidth(GIT_DESC);
#else #else
int off_tmp = g_Font[font_info]->getRenderWidth(GIT_REV); int off_tmp = g_Font[font_info]->getRenderWidth(GIT_REV);
#endif #endif
@@ -206,8 +206,8 @@ void CImageInfo::paint()
const char * version = config.getString("version", "no version").c_str(); const char * version = config.getString("version", "no version").c_str();
const char * docs = config.getString("docs", "http://wiki.neutrino-hd.de").c_str(); const char * docs = config.getString("docs", "http://wiki.neutrino-hd.de").c_str();
const char * forum = config.getString("forum", "http://forum.tuxbox.org").c_str(); const char * forum = config.getString("forum", "http://forum.tuxbox.org").c_str();
#ifdef SVNVERSION #ifdef GITVERSION
const char * builddate = config.getString("builddate", SVNVERSION).c_str(); const char * builddate = GITVERSION;
#else #else
const char * builddate = config.getString("builddate", BUILT_DATE).c_str(); const char * builddate = config.getString("builddate", BUILT_DATE).c_str();
#endif #endif
@@ -244,8 +244,8 @@ void CImageInfo::paint()
paintLine(xpos+offset, font_info, Version_Kernel.c_str()); paintLine(xpos+offset, font_info, Version_Kernel.c_str());
ypos += iheight; ypos += iheight;
#ifdef SVNVERSION #ifdef GITVERSION
paintLine(xpos , font_info, SVN_REV); paintLine(xpos , font_info, GIT_DESC);
#else #else
paintLine(xpos , font_info, GIT_REV); paintLine(xpos , font_info, GIT_REV);
#endif #endif