diff --git a/CMakeModules/CompleteBundle.cmake b/CMakeModules/CompleteBundle.cmake index 949577d..07ab4b3 100644 --- a/CMakeModules/CompleteBundle.cmake +++ b/CMakeModules/CompleteBundle.cmake @@ -11,6 +11,12 @@ else(CODE_SIGN) set(DO_SIGN 0) endif(CODE_SIGN) +if(ENABLE_ANGLE_DEP) + set(DO_ENABLE_ANGLE_DEP 1) +else() + set(DO_ENABLE_ANGLE_DEP 0) +endif() + if(SCRIPT) configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/${SCRIPT}.cmake.in ${SCRIPT}.cmake @ONLY) install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/${SCRIPT}.cmake) diff --git a/CMakeModules/CompleteBundleWin.cmake.in b/CMakeModules/CompleteBundleWin.cmake.in index eb59bde..e08dcba 100644 --- a/CMakeModules/CompleteBundleWin.cmake.in +++ b/CMakeModules/CompleteBundleWin.cmake.in @@ -16,6 +16,13 @@ list(APPEND SEARCHDIRS ${CEC_DIR}) fixup_bundle("${CMAKE_INSTALL_PREFIX}/PlexMediaPlayer.exe" "" "${SEARCHDIRS}") #install(PROGRAMS ${VCREDIST_DIR}/vc_redist_2015_x64.exe DESTINATION .) +if(@DO_ENABLE_ANGLE_DEP@) + message(STATUS "Deploying separate ANGLE deps") + file(INSTALL @DEPENDENCY_CACHE_DIR@/libEGL.dll @DEPENDENCY_CACHE_DIR@/libGLESv2.dll @DEPENDENCY_CACHE_DIR@/d3dcompiler_47.dll DESTINATION ${CMAKE_INSTALL_PREFIX}) +else() + message(STATUS "Not using separate ANGLE deps") +endif() + if(@DO_SIGN@) file(GLOB_RECURSE EXES ${CMAKE_INSTALL_PREFIX}/*.exe ${CMAKE_INSTALL_PREFIX}/*.dll) set(ENV{errorlevel} 1) diff --git a/CMakeModules/DependencyConfiguration.cmake b/CMakeModules/DependencyConfiguration.cmake index c7acd73..181c8c7 100644 --- a/CMakeModules/DependencyConfiguration.cmake +++ b/CMakeModules/DependencyConfiguration.cmake @@ -36,6 +36,21 @@ if(WIN32) ARTIFACTNAME windows-redist-2015 ARCHSTR windows-x86_x64 ) + + option(ENABLE_ANGLE_DEP "Enable downloading and deployment of separate ANGLE deps" ON) + if(ENABLE_ANGLE_DEP) + message(STATUS "Downloading separate ANGLE deps...") + foreach(angle_file libEGL.dll libGLESv2.dll d3dcompiler_47.dll) + download_dep_file( + "plexmediaplayer-angle" + BUILD_NUMBER 53 + DIRECTORY angle + ARTIFACTNAME "plexmediaplayer-angle" + FILENAME ${angle_file} + ) + endforeach() + endif() + endif(WIN32) set(DEPENDENCY_ROOT ${DEFAULT_ROOT} CACHE PATH "Path where the deps are located") diff --git a/CMakeModules/FetchDependencies.cmake b/CMakeModules/FetchDependencies.cmake index 3897148..cc983b2 100644 --- a/CMakeModules/FetchDependencies.cmake +++ b/CMakeModules/FetchDependencies.cmake @@ -187,3 +187,48 @@ function(download_deps DD_NAME) message(STATUS "Directory ${DEP_DIR}/${DEP_DIRNAME} already exists, remove it to redownload") endif(NOT EXISTS ${DEP_DIR}/${DEP_DIRNAME}/_FINISHED) endfunction(download_deps DD_NAME) + +function(download_dep_file DD_NAME) + set(ARGS DIRECTORY BUILD_NUMBER ARTIFACTNAME TOKEN FILENAME DST_FILENAME) + cmake_parse_arguments(DD "" "${ARGS}" "" ${ARGN}) + + if(NOT DEFINED DD_ARTIFACTNAME) + set(DD_ARTIFACTNAME ${DD_NAME}) + endif(NOT DEFINED DD_ARTIFACTNAME) + + if(NOT DEFINED DD_BUILD_NUMBER) + set(DD_BUILD_NUMBER "latest") + endif(NOT DEFINED DD_BUILD_NUMBER) + + if(DD_BUILD_NUMBER STREQUAL latest) + set(DD_ALWAYS_DOWNLOAD ALWAYS) + endif() + + 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_URL "${BASE_URL}/${DD_FILENAME}") + + if(NOT EXISTS ${DEPENDENCY_CACHE_DIR}/${DD_FILENAME}) + message(STATUS "Downloading ${DD_FILENAME}...") + file( + DOWNLOAD ${DEP_URL} ${DEPENDENCY_CACHE_DIR}/${DD_FILENAME} + SHOW_PROGRESS + STATUS DEP_STATUS + LOG DEP_LOG + ) + + list(GET DEP_STATUS 0 DEP_SUCCESS) + + if(NOT DEP_SUCCESS EQUAL 0) + list(GET DEP_STATUS 1 DEP_ERROR) + file(REMOVE ${DEPENDENCY_CACHE_DIR}/${DD_FILENAME}) + message(FATAL_ERROR "Failed to download ${DEP_URL}: ${DEP_ERROR}\n${DEP_LOG}") + endif() + endif() + + #file(COPY ${DEPENDENCY_CACHE_DIR}/${FILENAME} ${DST_FILENAME}) +endfunction() diff --git a/release-notes/1.3.5.txt b/release-notes/1.3.5.txt index 34850e5..0419190 100644 --- a/release-notes/1.3.5.txt +++ b/release-notes/1.3.5.txt @@ -1,3 +1,6 @@ NEW: - Desktop web-client updated to 3.10.0 - Updated dependencies (Windows/macOS) + +FIXES: + - Update ANGLE on Windows. This should improve video performance in some cases.