mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
src/gui/imageinfo.cpp: change SVN Version to GIT Version
This commit is contained in:
@@ -1,16 +1,21 @@
|
||||
AM_CPPFLAGS = -fno-rtti -fno-exceptions
|
||||
#AM_CPPFLAGS = -fno-rtti
|
||||
|
||||
BUILT_SOURCES = svn_version.h
|
||||
|
||||
svn_version.h:
|
||||
@if test -d .svn ; then \
|
||||
sleep 180 && rm svn_version.h & echo "#define SVNVERSION \"$$(svnversion -n || echo svn_oops!)\" " > svn_version.h ; \
|
||||
.PHONY:git_version.h
|
||||
BUILT_SOURCES = git_version.h
|
||||
git_version.h:
|
||||
@if test -d ../../.git; then \
|
||||
echo "#define GITVERSION \"$$(git describe --dirty || echo '#define BUILT_DATE "'`date`'"' )\" " > git_version.h.tmp ; \
|
||||
if diff -q git_version.h git_version.h.tmp >/dev/null 2>&1 ; then \
|
||||
rm -f git_version.h.tmp ; \
|
||||
else \
|
||||
rm -f git_version.h ; \
|
||||
mv git_version.h.tmp git_version.h ; \
|
||||
fi; \
|
||||
else \
|
||||
rm svn_version.h; echo '#define BUILT_DATE "'`date`'"' > svn_version.h ; \
|
||||
rm git_version.h; echo '#define BUILT_DATE "'`date`'"' > git_version.h ; \
|
||||
fi
|
||||
|
||||
noinst_HEADERS = svn_version.h
|
||||
noinst_HEADERS = git_version.h
|
||||
|
||||
SUBDIRS = widget bedit
|
||||
|
||||
|
@@ -39,8 +39,8 @@
|
||||
#include <system/flashtool.h>
|
||||
#include <video.h>
|
||||
|
||||
#include "svn_version.h"
|
||||
#define SVN_REV "SVN Rev.:"
|
||||
#include "git_version.h"
|
||||
#define GIT_DESC "GIT Desc.:"
|
||||
#define GIT_REV "GIT Build:"
|
||||
extern cVideo * videoDecoder;
|
||||
|
||||
@@ -92,8 +92,8 @@ void CImageInfo::Init(void)
|
||||
offset = tmpoffset;
|
||||
}
|
||||
}
|
||||
#ifdef SVNVERSION
|
||||
int off_tmp = g_Font[font_info]->getRenderWidth(SVN_REV);
|
||||
#ifdef GITVERSION
|
||||
int off_tmp = g_Font[font_info]->getRenderWidth(GIT_DESC);
|
||||
#else
|
||||
int off_tmp = g_Font[font_info]->getRenderWidth(GIT_REV);
|
||||
#endif
|
||||
@@ -206,8 +206,8 @@ void CImageInfo::paint()
|
||||
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 * forum = config.getString("forum", "http://forum.tuxbox.org").c_str();
|
||||
#ifdef SVNVERSION
|
||||
const char * builddate = config.getString("builddate", SVNVERSION).c_str();
|
||||
#ifdef GITVERSION
|
||||
const char * builddate = GITVERSION;
|
||||
#else
|
||||
const char * builddate = config.getString("builddate", BUILT_DATE).c_str();
|
||||
#endif
|
||||
@@ -244,8 +244,8 @@ void CImageInfo::paint()
|
||||
paintLine(xpos+offset, font_info, Version_Kernel.c_str());
|
||||
|
||||
ypos += iheight;
|
||||
#ifdef SVNVERSION
|
||||
paintLine(xpos , font_info, SVN_REV);
|
||||
#ifdef GITVERSION
|
||||
paintLine(xpos , font_info, GIT_DESC);
|
||||
#else
|
||||
paintLine(xpos , font_info, GIT_REV);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user