aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--XBMC.xcodeproj/project.pbxproj4
-rw-r--r--configure.in22
-rw-r--r--guilib/system.h8
-rw-r--r--xbmc/Application.cpp4
-rw-r--r--xbmc/utils/GUIInfoManager.cpp4
6 files changed, 18 insertions, 26 deletions
diff --git a/.gitignore b/.gitignore
index ab005a0423..49df079ec4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -66,7 +66,7 @@ config.log
/stamp-h1
/xbmc.bin
/xbmc-xrandr
-/svn_revision.h
+/git_revision.h
# /addons/
/addons/com.nullsoft.milkdrop.xbmc/*.vis
diff --git a/XBMC.xcodeproj/project.pbxproj b/XBMC.xcodeproj/project.pbxproj
index 2bf8758619..2b995551df 100644
--- a/XBMC.xcodeproj/project.pbxproj
+++ b/XBMC.xcodeproj/project.pbxproj
@@ -7184,7 +7184,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# Update version in Info.plist with SVN revision\nSVN_REVISION=\"Unknown\"\nBUNDLE_NAME=\"XBMC\"\n\nSVN_REVISION=\"SVN-\"$(cat svn_revision.h | sed -n 's/\\(.*\\)\\\"\\(.*\\)\\\"\\(.*\\)/\\2/p')\nperl -p -i -e \"s/r####/$SVN_REVISION/\" \"$TARGET_BUILD_DIR/$BUNDLE_NAME.app/Contents/Info.plist\"\n";
+ shellScript = "# Update version in Info.plist with Git revision\nGIT_REVISION=\"Unknown\"\nBUNDLE_NAME=\"XBMC\"\n\nGIT_REVISION=\"Git-\"$(cat git_revision.h | sed -n 's/\\(.*\\)\\\"\\(.*\\)\\\"\\(.*\\)/\\2/p')\nperl -p -i -e \"s/r####/$GIT_REVISION/\" \"$TARGET_BUILD_DIR/$BUNDLE_NAME.app/Contents/Info.plist\"\n";
};
F5A1CBDE0F6B0B4700A96ABD /* copy root files */ = {
isa = PBXShellScriptBuildPhase;
@@ -7227,7 +7227,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# Update version in Info.plist with SVN revision\nSVN_REVISION=\"Unknown\"\nBUNDLE_NAME=\"XBMC\"\n\nSVN_REVISION=\"SVN-\"$(cat svn_revision.h | sed -n 's/\\(.*\\)\\\"\\(.*\\)\\\"\\(.*\\)/\\2/p')\nperl -p -i -e \"s/r####/$SVN_REVISION/\" \"$TARGET_BUILD_DIR/$BUNDLE_NAME.app/Contents/Info.plist\"\n";
+ shellScript = "# Update version in Info.plist with Git revision\nGIT_REVISION=\"Unknown\"\nBUNDLE_NAME=\"XBMC\"\n\nGIT_REVISION=\"Git-\"$(cat git_revision.h | sed -n 's/\\(.*\\)\\\"\\(.*\\)\\\"\\(.*\\)/\\2/p')\nperl -p -i -e \"s/r####/$GIT_REVISION/\" \"$TARGET_BUILD_DIR/$BUNDLE_NAME.app/Contents/Info.plist\"\n";
};
F5DEC3580E6DEBB2005A4E24 /* copy root files */ = {
isa = PBXShellScriptBuildPhase;
diff --git a/configure.in b/configure.in
index b387c61960..e7edf7efa8 100644
--- a/configure.in
+++ b/configure.in
@@ -1085,7 +1085,6 @@ if test "$ARCH" != "x86_64-linux"; then
fi
fi
-AC_CHECK_PROG(HAVE_SVNVERSION,svnversion,"yes","no",)
AC_CHECK_PROG(HAVE_GIT,git,"yes","no",)
# Checks for header files.
@@ -1258,23 +1257,16 @@ else
final_message="$final_message\n Avahi:\tNo"
fi
-if ! test -n "$SVN_REV" -a "$SVN_REV" != "" ; then
- if test "$HAVE_SVNVERSION" = "yes" ; then
- SVN_REV=$(svnversion -n -c 2>/dev/null | grep -iv ^exported | sed -e 's/.*\://')
- fi
- if test "$SVN_REV" = ""; then
- if test "$HAVE_GIT" = "yes"; then
- SVN_REV=$(./gitrev.sh)
- fi
- fi
- if test "$SVN_REV" = ""; then
- SVN_REV="Unknown"
- fi
+if test "$HAVE_GIT" = "yes"; then
+ GIT_REV=$(git rev-parse --short HEAD)
+fi
+if test "$GIT_REV" = ""; then
+ GIT_REV="Unknown"
fi
if test "$host_vendor" = "apple"; then
- echo "#define SVN_REV \"$SVN_REV\"" > svn_revision.h
+ echo "#define GIT_REV \"$GIT_REV\"" > git_revision.h
else
- SDL_DEFINES="$SDL_DEFINES -D'SVN_REV=\"$SVN_REV\"'"
+ SDL_DEFINES="$SDL_DEFINES -D'GIT_REV=\"$GIT_REV\"'"
fi
if test "$use_nonfree" = "yes"; then
diff --git a/guilib/system.h b/guilib/system.h
index 21a18d63b8..7ad7a1cfeb 100644
--- a/guilib/system.h
+++ b/guilib/system.h
@@ -144,15 +144,15 @@
#endif
/*****************
- * SVN revision
+ * Git revision
*****************/
#ifdef __APPLE__
-#include "../svn_revision.h"
+#include "../git_revision.h"
#endif
-#ifndef SVN_REV
-#define SVN_REV "Unknown"
+#ifndef GIT_REV
+#define GIT_REV "Unknown"
#endif
/****************************************
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index a9bac87240..cbef7ba784 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -499,9 +499,9 @@ bool CApplication::Create()
CLog::Log(LOGNOTICE, "-----------------------------------------------------------------------");
#if defined(__APPLE__)
- CLog::Log(LOGNOTICE, "Starting XBMC, Platform: Mac OS X (%s). Built on %s (SVN:%s)", g_sysinfo.GetUnameVersion().c_str(), __DATE__, SVN_REV);
+ CLog::Log(LOGNOTICE, "Starting XBMC, Platform: Mac OS X (%s). Built on %s (Git:%s)", g_sysinfo.GetUnameVersion().c_str(), __DATE__, GIT_REV);
#elif defined(_LINUX)
- CLog::Log(LOGNOTICE, "Starting XBMC, Platform: Linux (%s, %s). Built on %s (SVN:%s)", g_sysinfo.GetLinuxDistro().c_str(), g_sysinfo.GetUnameVersion().c_str(), __DATE__, SVN_REV);
+ CLog::Log(LOGNOTICE, "Starting XBMC, Platform: Linux (%s, %s). Built on %s (Git:%s)", g_sysinfo.GetLinuxDistro().c_str(), g_sysinfo.GetUnameVersion().c_str(), __DATE__, GIT_REV);
#elif defined(_WIN32)
CLog::Log(LOGNOTICE, "Starting XBMC, Platform: %s. Built on %s (SVN:%s, compiler %i)",g_sysinfo.GetKernelVersion().c_str(), __DATE__, SVN_REV, _MSC_VER);
CLog::Log(LOGNOTICE, g_cpuInfo.getCPUModel().c_str());
diff --git a/xbmc/utils/GUIInfoManager.cpp b/xbmc/utils/GUIInfoManager.cpp
index 592e569d0b..20e96fed14 100644
--- a/xbmc/utils/GUIInfoManager.cpp
+++ b/xbmc/utils/GUIInfoManager.cpp
@@ -3439,8 +3439,8 @@ CTemperature CGUIInfoManager::GetGPUTemperature()
CStdString CGUIInfoManager::GetVersion()
{
CStdString tmp;
-#ifdef SVN_REV
- tmp.Format("%s r%s", VERSION_STRING, SVN_REV);
+#ifdef GIT_REV
+ tmp.Format("%s Git:%s", VERSION_STRING, GIT_REV);
#else
tmp.Format("%s", VERSION_STRING);
#endif