Browse Source

Expose dependencies and qt dependencies hash version to the debug overlay

Tobias Hieta 8 years ago
parent
commit
e24e5ef359

+ 1 - 1
CMakeLists.txt

@@ -29,10 +29,10 @@ set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME Core)
 add_definitions(-DQS_LOG_LINE_NUMBERS -DQHTTPSERVER_EXPORT)
 
 include(DependencyConfiguration)
+include(QtConfiguration)
 include(VersionConfiguration)
 include(NameConfiguration)
 include(utils)
-include(QtConfiguration)
 include(PlayerConfiguration)
 include(InputConfiguration)
 include(FindBreakpad)

+ 1 - 1
CMakeModules/DependencyConfiguration.cmake

@@ -4,7 +4,7 @@ option(DISABLE_BUNDLED_DEPS "Disable the bundled deps on certain platforms" OFF)
 include(FetchDependencies)
 
 if(APPLE AND NOT DISABLE_BUNDLED_DEPS)  
-  download_deps("plexmediaplayer-dependencies" dir)
+  download_deps("plexmediaplayer-dependencies" dir DEPS_HASH)
   message("dependencies are: ${dir}")
   set(DEFAULT_ROOT ${dir})
 endif(APPLE AND NOT DISABLE_BUNDLED_DEPS)

+ 2 - 1
CMakeModules/FetchDependencies.cmake

@@ -11,7 +11,7 @@ endif()
 # note that hardcoding the ARCH here is not correct.
 set(ARCHSTR "${OS}-x86_64")
 
-function(download_deps depname dirpath)
+function(download_deps depname dirpath dephash)
   file(MAKE_DIRECTORY ${DEP_DIR})
 
   message(STATUS "Downloading ${depname}.hash.txt...")
@@ -39,6 +39,7 @@ function(download_deps depname dirpath)
     set(DEP_URL "https://nightlies.plex.tv/directdl/plex-dependencies/${depname}/latest/${DEP_FILENAME}")
 
     set(${dirpath} ${DEP_DIR}/${DEP_DIRNAME} PARENT_SCOPE)
+    set(${dephash} ${DEP_HASH} PARENT_SCOPE)
 
     if(NOT EXISTS ${DEP_DIR}/${DEP_DIRNAME})
       message(STATUS "Downloading ${DEP_FILENAME}.sha.txt...")

+ 1 - 1
CMakeModules/QtConfiguration.cmake

@@ -1,7 +1,7 @@
 
 include(FetchDependencies)
 if(NOT IS_DIRECTORY ${QTROOT})
-  download_deps("plexmediaplayer-qt" dir)
+  download_deps("plexmediaplayer-qt" dir QT_DEPS_HASH)
   set(QTROOT ${dir})
 endif()
 list(APPEND CMAKE_FIND_ROOT_PATH ${QTROOT})

+ 10 - 0
src/Version.cpp.in

@@ -21,4 +21,14 @@ QString Version::GetBuildDate()
 QString Version::GetWebVersion()
 {
   return QString("@WEB_CLIENT_VERSION@");
+}
+
+QString Version::GetDependenciesVersion()
+{
+  return QString("@DEPS_HASH@");
+}
+
+QString Version::GetQtDepsVersion()
+{
+  return QString("@QT_DEPS_HASH@");
 }

+ 2 - 0
src/Version.h

@@ -7,6 +7,8 @@ namespace Version
   QString GetCanonicalVersionString();
   QString GetBuildDate();
   QString GetWebVersion();
+  QString GetQtDepsVersion();
+  QString GetDependenciesVersion();
 };
 
 #endif // VERSION_H

+ 2 - 1
src/system/SystemComponent.cpp

@@ -209,7 +209,8 @@ QString SystemComponent::debugInformation()
   stream << "  Web Client URL: " << SettingsComponent::Get().value(SETTINGS_SECTION_PATH, "startupurl").toString() << endl;
   stream << "  Platform: " << getPlatformTypeString() << "-" << getPlatformArchString() << endl;
   stream << "  User-Agent: " << getUserAgent() << endl;
-  stream << "  Qt version: " << qVersion() << endl;
+  stream << "  Qt version: " << qVersion() << QString("(%1)").arg(Version::GetQtDepsVersion()) << endl;
+  stream << "  Depends version: " << Version::GetDependenciesVersion() << endl;
   stream << endl;
 
   stream << "Files" << endl;