소스 검색

Require a token for our new dependencies

Pass -DDEPENDENCY_TOKEN=<token> to be able to download the dependencies
from plex site. For external users please install the dependencies with
your OS package manager.
Tobias Hieta 8 년 전
부모
커밋
5a52e75e6c
2개의 변경된 파일9개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 3
      CMakeModules/DependencyConfiguration.cmake
  2. 6 2
      CMakeModules/FetchDependencies.cmake

+ 3 - 3
CMakeModules/DependencyConfiguration.cmake

@@ -1,9 +1,8 @@
 find_package(PkgConfig)
-option(DISABLE_BUNDLED_DEPS "Disable the bundled deps on certain platforms" OFF)
 
 include(FetchDependencies)
 
-if(NOT DISABLE_BUNDLED_DEPS)
+if(DEPENDENCY_TOKEN)
   set(DEPENDCY_FOLDER "")
   if(OPENELEC)
     set(DEPENDCY_FOLDER plexmediaplayer-openelec-codecs)
@@ -17,11 +16,12 @@ if(NOT DISABLE_BUNDLED_DEPS)
       DIRECTORY dir
       DEPHASH_VAR DEPS_HASH
       DYLIB_SCRIPT_PATH ${PROJECT_SOURCE_DIR}/scripts/fix-install-names.py
+      TOKEN ${DEPENDENCY_TOKEN}
     )
     message("dependencies are: ${dir}")
     set(DEFAULT_ROOT ${dir})
   endif()
-endif(NOT DISABLE_BUNDLED_DEPS)
+endif(DEPENDENCY_TOKEN)
 
 if(WIN32)
   if(NOT EXISTS ${dir}/lib/mpv.lib)

+ 6 - 2
CMakeModules/FetchDependencies.cmake

@@ -81,7 +81,7 @@ function(get_content_of_url)
 endfunction(get_content_of_url)
 
 function(download_deps DD_NAME)
-  set(ARGS DIRECTORY BUILD_NUMBER ARTIFACTNAME VARIANT DEPHASH_VAR ARCHSTR DYLIB_SCRIPT_PATH)
+  set(ARGS DIRECTORY BUILD_NUMBER ARTIFACTNAME VARIANT DEPHASH_VAR ARCHSTR DYLIB_SCRIPT_PATH TOKEN)
   cmake_parse_arguments(DD "" "${ARGS}" "" ${ARGN})
 
   if(NOT DEFINED DD_VARIANT)
@@ -104,7 +104,11 @@ function(download_deps DD_NAME)
     set(DD_ALWAYS_DOWNLOAD ALWAYS)
   endif()
 
-  set(BASE_URL "https://nightlies.plex.tv/directdl/plex-dependencies/${DD_NAME}/${DD_BUILD_NUMBER}")
+  if(NOT DEFINED DD_TOKEN)
+    set(DD_TOKEN plex-dependencies)
+  endif()
+
+  set(BASE_URL "https://nightlies.plex.tv/directdl/${DD_TOKEN}/${DD_NAME}/${DD_BUILD_NUMBER}")
   set(DEP_DIR ${DEPENDENCY_UNTAR_DIR}/${DD_ARCHSTR}-${DD_NAME}/${DD_BUILD_NUMBER})
 
   set(HASH_FILENAME ${DD_NAME}-${DD_BUILD_NUMBER}-hash.txt)