From ac88fdd80fe160671bca9c1b64a9d96cbaec9b26 Mon Sep 17 00:00:00 2001 From: Paulchen Panther Date: Sat, 30 Jan 2021 12:38:35 +0100 Subject: [PATCH] [HotFix] DirectX 9 grabber is now optional The DirectX SDK from Microsoft is officially no longer offered. --- .github/workflows/pull-request.yml | 10 ++------ .github/workflows/push-master.yml | 10 ++------ CMakeLists.txt | 8 +++--- CompileHowto.md | 7 +++-- cmake/Dependencies.cmake | 38 +++++++++++++++------------- cmake/nsis/template/NSIS.template.in | 6 ----- 6 files changed, 33 insertions(+), 46 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index a5c462e9..af5e0e9f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -159,16 +159,10 @@ jobs: path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey key: ${{ runner.os }}-chocolatey - - name: "Remove Redistributable" - shell: cmd - run: | - MsiExec.exe /passive /X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5} - MsiExec.exe /passive /X{1D8E6291-B0D5-35EC-8441-6616F567A0F7} - - - name: Install Python, NSIS, OpenSSL, DirectX SDK + - name: Install Python, NSIS, OpenSSL shell: powershell run: | - choco install --no-progress python nsis openssl directx-sdk -y + choco install --no-progress python nsis openssl -y - name: Set up x64 build architecture environment shell: cmd diff --git a/.github/workflows/push-master.yml b/.github/workflows/push-master.yml index 647e5f99..35a8d7e6 100644 --- a/.github/workflows/push-master.yml +++ b/.github/workflows/push-master.yml @@ -123,16 +123,10 @@ jobs: path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey key: ${{ runner.os }}-chocolatey - - name: "Remove Redistributable" - shell: cmd - run: | - MsiExec.exe /passive /X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5} - MsiExec.exe /passive /X{1D8E6291-B0D5-35EC-8441-6616F567A0F7} - - - name: Install Python, NSIS, OpenSSL, DirectX SDK + - name: Install Python, NSIS, OpenSSL shell: powershell run: | - choco install --no-progress python nsis openssl directx-sdk -y + choco install --no-progress python nsis openssl -y - name: Set up x64 build architecture environment shell: cmd diff --git a/CMakeLists.txt b/CMakeLists.txt index 62200bb2..3faf3fb3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,7 +59,7 @@ IF ( ${CMAKE_SYSTEM} MATCHES "Linux" ) SET ( DEFAULT_USB_HID ON ) SET ( DEFAULT_CEC ON ) ELSEIF ( WIN32 ) - SET ( DEFAULT_DX ON ) + SET ( DEFAULT_DX OFF ) ELSE() SET ( DEFAULT_V4L2 OFF ) SET ( DEFAULT_FB OFF ) @@ -303,7 +303,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") # The Qt5_DIR should point to Qt5Config.cmake -> C:/Qt/5.xx/msvc2017_64/lib/cmake/Qt5 # The CMAKE_PREFIX_PATH should point to the install directory -> C:/Qt/5.xx/msvc2017_64 # - # Alternatively, use Qt5_BASE_DIR environment variable to point to Qt version to be used + # Alternatively, use Qt5_BASE_DIR environment variable to point to Qt version to be used # In MSVC19 add into CMakeSettings.json # # "environments": [ @@ -333,14 +333,14 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") message(STATUS "Add ${qt_module_path} to CMAKE_MODULE_PATH") SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${qt_module_path}") - + #message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}") #message(STATUS "CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}") # Search for DirectX9 if (ENABLE_DX) find_package(DirectX9 REQUIRED) - endif() + endif(ENABLE_DX) endif() diff --git a/CompileHowto.md b/CompileHowto.md index c69d9742..5b662e83 100644 --- a/CompileHowto.md +++ b/CompileHowto.md @@ -101,9 +101,12 @@ We assume a 64bit Windows 10. Install the following; - [Python 3 (Windows x86-64 executable installer)](https://www.python.org/downloads/windows/) (Check: Add to PATH and Debug Symbols) - Open a console window and execute `pip install aqtinstall`. - Now we can download Qt to _C:\Qt_ `mkdir c:\Qt && aqt install -O c:\Qt 5.15.0 windows desktop win64_msvc2019_64` -- [DirectX Software Development Kit](https://www.microsoft.com/en-us/download/details.aspx?id=6812) ([direct link](https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe)) -- Optional for package creation: [NSIS 3.x](https://sourceforge.net/projects/nsis/files/NSIS%203/) ([direct link](https://sourceforge.net/projects/nsis/files/latest/download)) +### Optional: +- For DirectX9 grabber: + - DirectX Software Development Kit. The download link is no longer available, so you will have to search for it yourself. +- For package creation: + - [NSIS 3.x](https://sourceforge.net/projects/nsis/files/NSIS%203/) ([direct link](https://sourceforge.net/projects/nsis/files/latest/download)) # Compiling and installing Hyperion diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index a3012a62..14f910ee 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -318,27 +318,29 @@ macro(DeployWindows TARGET) ) endforeach() - # Download DirectX End-User Runtimes (June 2010) - set(url "https://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe") - if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/dx_redist.exe") - file(DOWNLOAD "${url}" "${CMAKE_CURRENT_BINARY_DIR}/dx_redist.exe" - STATUS result - ) + if(ENABLE_DX) + # Download DirectX End-User Runtimes (June 2010) + set(url "https://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe") + if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/dx_redist.exe") + file(DOWNLOAD "${url}" "${CMAKE_CURRENT_BINARY_DIR}/dx_redist.exe" + STATUS result + ) - # Check if the download is successful - list(GET result 0 result_code) - if(NOT result_code EQUAL 0) - list(GET result 1 reason) - message(FATAL_ERROR "Could not download DirectX End-User Runtimes: ${reason}") + # Check if the download is successful + list(GET result 0 result_code) + if(NOT result_code EQUAL 0) + list(GET result 1 reason) + message(FATAL_ERROR "Could not download DirectX End-User Runtimes: ${reason}") + endif() endif() - endif() - # Copy DirectX End-User Runtimes to 'hyperion' - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/dx_redist.exe - DESTINATION "bin" - COMPONENT "Hyperion" - ) + # Copy DirectX End-User Runtimes to 'hyperion' + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/dx_redist.exe + DESTINATION "bin" + COMPONENT "Hyperion" + ) + endif (ENABLE_DX) else() # Run CMake after target was built diff --git a/cmake/nsis/template/NSIS.template.in b/cmake/nsis/template/NSIS.template.in index ccb28ce5..5f9a1a40 100644 --- a/cmake/nsis/template/NSIS.template.in +++ b/cmake/nsis/template/NSIS.template.in @@ -792,12 +792,6 @@ Section "-Core installation" ; Install Visual c++ Redistributable ExecWait '"$INSTDIR\bin\vc_redist.x64.exe" /install /quiet' -; Install DirectX 9 Redistributable -ExecWait '"$INSTDIR\bin\dx_redist.exe" /q /t:"$INSTDIR\tmp"' - ExecWait '"$INSTDIR\tmp\DXSETUP.exe" /silent' - Delete '$INSTDIR\tmp\*.*' - RMDir '$INSTDIR\tmp' - SectionEnd Section "-Add to path"