diff options
author | peak3d <pfau@peak3d.de> | 2020-06-03 20:29:44 +0200 |
---|---|---|
committer | peak3d <pfau@peak3d.de> | 2020-06-03 20:29:44 +0200 |
commit | 79b36345cdb9b550ec9687ff810398979c5ba089 (patch) | |
tree | 9ab6f193774d4158149984e0a768061c6cfedf5b | |
parent | 9afd7ab5eacc618293dfa7a8ef440c2752fa5585 (diff) |
[Backport] Insert VERSION_CODE into full kodi version string
-rw-r--r-- | cmake/KodiConfig.cmake.in | 1 | ||||
-rw-r--r-- | xbmc/CompileInfo.cpp.in | 5 | ||||
-rw-r--r-- | xbmc/CompileInfo.h | 1 | ||||
-rw-r--r-- | xbmc/utils/SystemInfo.cpp | 3 |
4 files changed, 9 insertions, 1 deletions
diff --git a/cmake/KodiConfig.cmake.in b/cmake/KodiConfig.cmake.in index 560374dd4b..7fd008b320 100644 --- a/cmake/KodiConfig.cmake.in +++ b/cmake/KodiConfig.cmake.in @@ -4,6 +4,7 @@ set(APP_NAME_UC @APP_NAME_UC@) set(APP_PACKAGE @APP_PACKAGE@) set(APP_VERSION_MAJOR @APP_VERSION_MAJOR@) set(APP_VERSION_MINOR @APP_VERSION_MINOR@) +set(APP_VERSION_CODE @APP_VERSION_CODE@) if(NOT @APP_NAME_UC@_PREFIX) set(@APP_NAME_UC@_PREFIX @APP_PREFIX@) endif() diff --git a/xbmc/CompileInfo.cpp.in b/xbmc/CompileInfo.cpp.in index c47e6cc594..ba4a11c7f6 100644 --- a/xbmc/CompileInfo.cpp.in +++ b/xbmc/CompileInfo.cpp.in @@ -70,3 +70,8 @@ std::string CCompileInfo::GetBuildDate() } return "1970-01-01"; } + +const char* CCompileInfo::GetVersionCode() +{ + return "@APP_VERSION_CODE@"; +} diff --git a/xbmc/CompileInfo.h b/xbmc/CompileInfo.h index db3cfbe0f2..8190c95015 100644 --- a/xbmc/CompileInfo.h +++ b/xbmc/CompileInfo.h @@ -22,4 +22,5 @@ public: static const char* GetSCMID(); // Git Revision static const char* GetCopyrightYears(); static std::string GetBuildDate(); + static const char* GetVersionCode(); }; diff --git a/xbmc/utils/SystemInfo.cpp b/xbmc/utils/SystemInfo.cpp index df5e043a3a..f14d1e8ada 100644 --- a/xbmc/utils/SystemInfo.cpp +++ b/xbmc/utils/SystemInfo.cpp @@ -1238,7 +1238,8 @@ std::string CSysInfo::GetVersionShort() std::string CSysInfo::GetVersion() { - return GetVersionShort() + " Git:" + CCompileInfo::GetSCMID(); + return GetVersionShort() + " (" + CCompileInfo::GetVersionCode() + ")" + + " Git:" + CCompileInfo::GetSCMID(); } std::string CSysInfo::GetBuildDate() |