aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/xbmc.addon/addon.xml.in (renamed from addons/xbmc.addon/addon.xml)2
-rwxr-xr-xtools/Linux/packaging/mk-debian-package.sh4
-rw-r--r--tools/android/packaging/xbmc/AndroidManifest.xml.in (renamed from tools/android/packaging/xbmc/AndroidManifest.xml)4
-rwxr-xr-xtools/buildsteps/osx32/package2
-rwxr-xr-xtools/buildsteps/osx64/package2
-rwxr-xr-xtools/darwin/Support/makepythoninterface.command1
-rw-r--r--tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in4
-rw-r--r--tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in4
-rwxr-xr-xtools/darwin/packaging/xbmc-osx/mkdmg-xbmc-osx.sh.in (renamed from tools/darwin/packaging/xbmc-osx/mkdmg-xbmc-osx.sh)4
-rw-r--r--xbmc/CompileInfo.cpp.in (renamed from xbmc/GitRevision.cpp)25
-rw-r--r--xbmc/CompileInfo.h (renamed from xbmc/GitRevision.h)12
-rw-r--r--xbmc/GUIInfoManager.cpp12
-rw-r--r--xbmc/GUIInfoManager.h4
-rw-r--r--xbmc/Makefile.in10
-rw-r--r--xbmc/gen-compileinfo.mk10
-rw-r--r--xbmc/interfaces/json-rpc/ApplicationOperations.cpp18
-rw-r--r--xbmc/osx/Info.plist.in (renamed from xbmc/osx/Info.plist)4
17 files changed, 78 insertions, 44 deletions
diff --git a/addons/xbmc.addon/addon.xml b/addons/xbmc.addon/addon.xml.in
index 9e42db7128..9409cbfad1 100644
--- a/addons/xbmc.addon/addon.xml
+++ b/addons/xbmc.addon/addon.xml.in
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<addon id="xbmc.addon" version="13.9.701" provider-name="Team XBMC">
+<addon id="xbmc.addon" version="@APP_ADDON_API@" provider-name="Team XBMC">
<backwards-compatibility abi="12.0"/>
<requires>
<import addon="xbmc.core" version="0.1.0"/>
diff --git a/tools/Linux/packaging/mk-debian-package.sh b/tools/Linux/packaging/mk-debian-package.sh
index 5fd2efc976..9a39dfc1c0 100755
--- a/tools/Linux/packaging/mk-debian-package.sh
+++ b/tools/Linux/packaging/mk-debian-package.sh
@@ -73,8 +73,8 @@ function getVersion {
getGitRev
if [[ $RELEASEV == "auto" ]]
then
- local MAJORVER=$(grep VERSION_MAJOR $REPO_DIR/xbmc/GUIInfoManager.h | awk '{ print $3 }')
- local MINORVER=$(grep VERSION_MINOR $REPO_DIR/xbmc/GUIInfoManager.h | awk '{ print $3 }')
+ local MAJORVER=$(grep VERSION_MAJOR $REPO_DIR/version.txt | awk '{ print $2 }')
+ local MINORVER=$(grep VERSION_MINOR $REPO_DIR/version.txt | awk '{ print $2 }')
RELEASEV=${MAJORVER}.${MINORVER}
else
PACKAGEVERSION="${RELEASEV}~git$(date '+%Y%m%d.%H%M')-${TAG}"
diff --git a/tools/android/packaging/xbmc/AndroidManifest.xml b/tools/android/packaging/xbmc/AndroidManifest.xml.in
index d69a5b330c..3edc5142e5 100644
--- a/tools/android/packaging/xbmc/AndroidManifest.xml
+++ b/tools/android/packaging/xbmc/AndroidManifest.xml.in
@@ -2,8 +2,8 @@
<!-- BEGIN_INCLUDE(manifest) -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.xbmc.xbmc"
- android:versionCode="139701"
- android:versionName="14.0-ALPHA1" >
+ android:versionCode="@APP_VERSION_CODE@"
+ android:versionName="@APP_VERSION_MAJOR@.@APP_VERSION_MINOR@-@APP_VERSION_TAG@" >
<!-- This is the platform API where NativeActivity was introduced. -->
<uses-sdk android:minSdkVersion="14" />
diff --git a/tools/buildsteps/osx32/package b/tools/buildsteps/osx32/package
index 5bce61925a..ca9c655123 100755
--- a/tools/buildsteps/osx32/package
+++ b/tools/buildsteps/osx32/package
@@ -2,7 +2,7 @@ WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
XBMC_PLATFORM_DIR=osx32
. $WORKSPACE/tools/buildsteps/defaultenv
-cd $WORKSPACE/tools/darwin/packaging/xbmc-osx/;./mkdmg-xbmc-osx.sh $Configuration
+cd $WORKSPACE/tools/darwin/packaging/xbmc-osx/; sh ./mkdmg-xbmc-osx.sh $Configuration
#rename for upload
#e.x. xbmc-20130314-8c2fb31-Frodo-i386.dmg
diff --git a/tools/buildsteps/osx64/package b/tools/buildsteps/osx64/package
index ac50195325..6ce8da47e6 100755
--- a/tools/buildsteps/osx64/package
+++ b/tools/buildsteps/osx64/package
@@ -2,7 +2,7 @@ WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
XBMC_PLATFORM_DIR=osx64
. $WORKSPACE/tools/buildsteps/defaultenv
-cd $WORKSPACE/tools/darwin/packaging/xbmc-osx/;./mkdmg-xbmc-osx.sh $Configuration
+cd $WORKSPACE/tools/darwin/packaging/xbmc-osx/; sh ./mkdmg-xbmc-osx.sh $Configuration
#rename for upload
#e.x. xbmc-20130314-8c2fb31-Frodo-x86_64.dmg
diff --git a/tools/darwin/Support/makepythoninterface.command b/tools/darwin/Support/makepythoninterface.command
index 50d3a2233b..ec2d2b42ef 100755
--- a/tools/darwin/Support/makepythoninterface.command
+++ b/tools/darwin/Support/makepythoninterface.command
@@ -8,4 +8,5 @@ fi
if [ "$ACTION" = build ] ; then
make -f ${SRCROOT}/codegenerator.mk
+ make -f ${SRCROOT}/xbmc/gen-compileinfo.mk
fi
diff --git a/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in b/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in
index ec15372fd9..a40af5ab9f 100644
--- a/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in
+++ b/tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh.in
@@ -45,8 +45,8 @@ fi
PACKAGE=org.xbmc.xbmc-atv2
-VERSION=14.0
-REVISION=0~alpha1
+VERSION=@APP_VERSION_MAJOR@.@APP_VERSION_MINOR@
+REVISION=0~@APP_VERSION_TAG_LC@
ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_iphoneos-arm.deb
echo Creating $PACKAGE package version $VERSION revision $REVISION
diff --git a/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in b/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in
index be99c0cb79..1db595e49a 100644
--- a/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in
+++ b/tools/darwin/packaging/xbmc-ios/mkdeb-xbmc-ios.sh.in
@@ -46,8 +46,8 @@ fi
PACKAGE=org.xbmc.xbmc-ios
-VERSION=14.0
-REVISION=0~alpha1
+VERSION=@APP_VERSION_MAJOR@.@APP_VERSION_MINOR@
+REVISION=0~@APP_VERSION_TAG_LC@
ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_iphoneos-arm.deb
echo Creating $PACKAGE package version $VERSION revision $REVISION
diff --git a/tools/darwin/packaging/xbmc-osx/mkdmg-xbmc-osx.sh b/tools/darwin/packaging/xbmc-osx/mkdmg-xbmc-osx.sh.in
index efec7f80c4..60764d2f28 100755
--- a/tools/darwin/packaging/xbmc-osx/mkdmg-xbmc-osx.sh
+++ b/tools/darwin/packaging/xbmc-osx/mkdmg-xbmc-osx.sh.in
@@ -24,8 +24,8 @@ ARCHITECTURE=`file $XBMC/Contents/MacOS/XBMC | awk '{print $NF}'`
PACKAGE=org.xbmc.xbmc-osx
-VERSION=14.0
-REVISION=0~alpha1
+VERSION=@APP_VERSION_MAJOR@.@APP_VERSION_MINOR@
+REVISION=0~@APP_VERSION_TAG_LC@
ARCHIVE=${PACKAGE}_${VERSION}-${REVISION}_macosx-intel-${ARCHITECTURE}
echo Creating $PACKAGE package version $VERSION revision $REVISION
diff --git a/xbmc/GitRevision.cpp b/xbmc/CompileInfo.cpp.in
index c6d209ba1a..7903e1b1b9 100644
--- a/xbmc/GitRevision.cpp
+++ b/xbmc/CompileInfo.cpp.in
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011-2013 Team XBMC
+ * Copyright (C) 2014 Team XBMC
* http://xbmc.org
*
* This Program is free software; you can redistribute it and/or modify
@@ -18,19 +18,34 @@
*
*/
-#include "GitRevision.h"
-
+#include "CompileInfo.h"
#include <cstddef>
#if defined(TARGET_DARWIN) || (defined(TARGET_WINDOWS) && !defined(_DEBUG))
#include "../git_revision.h" // generated file
#endif
-const char *GetXbmcGitRevision()
+
+int CCompileInfo::GetMajor()
+{
+ return @APP_VERSION_MAJOR@;
+}
+
+int CCompileInfo::GetMinor()
+{
+ return @APP_VERSION_MINOR@;
+}
+
+const char* CCompileInfo::GetSuffix()
+{
+ return "@APP_VERSION_TAG@";
+}
+
+const char* CCompileInfo::GetSCMID()
{
#ifdef GIT_REV
return GIT_REV;
#else
- return NULL;
+ return "Unknown";
#endif
}
diff --git a/xbmc/GitRevision.h b/xbmc/CompileInfo.h
index f4425d1755..d6e8dd79e2 100644
--- a/xbmc/GitRevision.h
+++ b/xbmc/CompileInfo.h
@@ -1,7 +1,7 @@
#pragma once
/*
- * Copyright (C) 2011-2013 Team XBMC
+ * Copyright (C) 2014 Team XBMC
* http://xbmc.org
*
* This Program is free software; you can redistribute it and/or modify
@@ -20,5 +20,11 @@
*
*/
-// Returns the current Git revision, or NULL if unavailable.
-const char *GetXbmcGitRevision();
+class CCompileInfo
+{
+public:
+ static int GetMajor();
+ static int GetMinor();
+ static const char *GetSuffix(); // Git "Tag", e.g. alpha1
+ static const char* GetSCMID(); // Git Revision
+};
diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp
index 58c79f4746..4c523ec46a 100644
--- a/xbmc/GUIInfoManager.cpp
+++ b/xbmc/GUIInfoManager.cpp
@@ -20,7 +20,7 @@
#include "network/Network.h"
#include "system.h"
-#include "GitRevision.h"
+#include "CompileInfo.h"
#include "GUIInfoManager.h"
#include "windows/GUIMediaWindow.h"
#include "dialogs/GUIDialogProgress.h"
@@ -4211,15 +4211,15 @@ CTemperature CGUIInfoManager::GetGPUTemperature()
// in the HTTP request user agent.
std::string CGUIInfoManager::GetVersionShort(void)
{
- return StringUtils::Format("%d.%d%s", VERSION_MAJOR, VERSION_MINOR, VERSION_TAG);
+ if (strlen(CCompileInfo::GetSuffix()) == 0)
+ return StringUtils::Format("%d.%d", CCompileInfo::GetMajor(), CCompileInfo::GetMinor());
+ else
+ return StringUtils::Format("%d.%d-%s", CCompileInfo::GetMajor(), CCompileInfo::GetMinor(), CCompileInfo::GetSuffix());
}
CStdString CGUIInfoManager::GetVersion()
{
- if (GetXbmcGitRevision())
- return GetVersionShort() + " Git:" + GetXbmcGitRevision();
-
- return GetVersionShort();
+ return GetVersionShort() + " Git:" + CCompileInfo::GetSCMID();
}
CStdString CGUIInfoManager::GetBuild()
diff --git a/xbmc/GUIInfoManager.h b/xbmc/GUIInfoManager.h
index e5366fad73..45de649a9d 100644
--- a/xbmc/GUIInfoManager.h
+++ b/xbmc/GUIInfoManager.h
@@ -498,10 +498,6 @@ namespace INFO
#define CONTROL_GROUP_HAS_FOCUS 29999
#define CONTROL_HAS_FOCUS 30000
-#define VERSION_MAJOR 14
-#define VERSION_MINOR 0
-#define VERSION_TAG "-ALPHA1"
-
#define LISTITEM_START 35000
#define LISTITEM_THUMB (LISTITEM_START)
#define LISTITEM_LABEL (LISTITEM_START + 1)
diff --git a/xbmc/Makefile.in b/xbmc/Makefile.in
index 76ec9bf5ac..dc80d54c00 100644
--- a/xbmc/Makefile.in
+++ b/xbmc/Makefile.in
@@ -11,7 +11,6 @@ SRCS=Application.cpp \
DynamicDll.cpp \
FileItem.cpp \
FileItemListModification.cpp \
- GitRevision.cpp \
GUIInfoManager.cpp \
GUILargeTextureManager.cpp \
GUIPassword.cpp \
@@ -35,10 +34,17 @@ SRCS=Application.cpp \
XBDateTime.cpp \
xbmc.cpp \
XbmcContext.cpp \
+ CompileInfo.cpp \
LIB=xbmc.a
-DISTCLEAN_FILES=DllPaths_generated.h
+DISTCLEAN_FILES=DllPaths_generated.h CompileInfo.cpp
+
+all: $(SRCS) $(LIB)
+
+include gen-compileinfo.mk
+CompileInfo.cpp: ../version.txt CompileInfo.cpp.in
+ make -f gen-compileinfo.mk
include @abs_top_srcdir@/Makefile.include
-include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(SRCS)))
diff --git a/xbmc/gen-compileinfo.mk b/xbmc/gen-compileinfo.mk
new file mode 100644
index 0000000000..a40ed85991
--- /dev/null
+++ b/xbmc/gen-compileinfo.mk
@@ -0,0 +1,10 @@
+# This file is sourced from xbmc/Makefile and tools/darwin/Support/makepythoninterface.command
+
+FILEPATH := $(abspath $(dir $(MAKEFILE_LIST)))
+VERSION.TXT := $(FILEPATH)/../version.txt
+
+$(FILEPATH)/CompileInfo.cpp: $(VERSION.TXT) $(FILEPATH)/CompileInfo.cpp.in
+ @MAJOR=$$(awk '/VERSION_MAJOR/ {print $$2}' $(VERSION.TXT)) ;\
+ MINOR=$$(awk '/VERSION_MINOR/ {print $$2}' $(VERSION.TXT)) ;\
+ TAG=$$(awk '/VERSION_TAG/ {print $$2}' $(VERSION.TXT)) ;\
+ sed -e "s/\@APP_VERSION_MAJOR\@/$$MAJOR/" -e "s/\@APP_VERSION_MINOR\@/$$MINOR/" -e "s/\@APP_VERSION_TAG\@/$$TAG/" $@.in > $@
diff --git a/xbmc/interfaces/json-rpc/ApplicationOperations.cpp b/xbmc/interfaces/json-rpc/ApplicationOperations.cpp
index f8f30e4f15..0438e7a6b0 100644
--- a/xbmc/interfaces/json-rpc/ApplicationOperations.cpp
+++ b/xbmc/interfaces/json-rpc/ApplicationOperations.cpp
@@ -27,8 +27,9 @@
#include "utils/log.h"
#include "GUIInfoManager.h"
#include "system.h"
-#include "GitRevision.h"
+#include "CompileInfo.h"
#include "utils/StringUtils.h"
+#include <string.h>
using namespace JSONRPC;
@@ -119,16 +120,15 @@ JSONRPC_STATUS CApplicationOperations::GetPropertyValue(const CStdString &proper
else if (property.Equals("version"))
{
result = CVariant(CVariant::VariantTypeObject);
- result["major"] = VERSION_MAJOR;
- result["minor"] = VERSION_MINOR;
- if (GetXbmcGitRevision())
- result["revision"] = GetXbmcGitRevision();
- CStdString tag(VERSION_TAG);
- if (StringUtils::EqualsNoCase(tag, "-pre"))
+ result["major"] = CCompileInfo::GetMajor();
+ result["minor"] = CCompileInfo::GetMinor();
+ result["revision"] = CCompileInfo::GetSCMID();
+ std::string tag = CCompileInfo::GetSuffix();
+ if (StringUtils::EqualsNoCase(tag, "pre"))
result["tag"] = "alpha";
- else if (StringUtils::StartsWithNoCase(tag, "-beta"))
+ else if (StringUtils::StartsWithNoCase(tag, "beta"))
result["tag"] = "beta";
- else if (StringUtils::StartsWithNoCase(tag, "-rc"))
+ else if (StringUtils::StartsWithNoCase(tag, "rc"))
result["tag"] = "releasecandidate";
else if (tag.empty())
result["tag"] = "stable";
diff --git a/xbmc/osx/Info.plist b/xbmc/osx/Info.plist.in
index 5659c11d80..f3ec1897c7 100644
--- a/xbmc/osx/Info.plist
+++ b/xbmc/osx/Info.plist.in
@@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>XBMC</string>
<key>CFBundleGetInfoString</key>
- <string>14.0.alpha1</string>
+ <string>@APP_VERSION_MAJOR@.@APP_VERSION_MINOR@.@APP_VERSION_TAG_LC@</string>
<key>CFBundleIconFile</key>
<string>xbmc.icns</string>
<key>CFBundleIdentifier</key>
@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>14.0.alpha1</string>
+ <string>@APP_VERSION_MAJOR@.@APP_VERSION_MINOR@.@APP_VERSION_TAG_LC@</string>
<key>CFBundleVersion</key>
<string>r####</string>
<key>CFBundleSignature</key>