From 64d2c3adb5825a6ce22f18c26ba3981f2c108acb Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Fri, 27 Jan 2023 09:01:37 +0100 Subject: [PATCH] Bump to Qt 6.5.0 and use FFMPEG FFMPEG will become default in 6.6.0 anyways and this fixes the broken rendering on osx and performs better on my AMD Vega VII on Windows --- .vscode/launch.json | 45 ++++++++++++++++++------------------ CMakePresets.json | 30 ++++++++++++------------ ScreenPlay/main.cpp | 1 + ScreenPlayWallpaper/main.cpp | 5 ++-- ScreenPlayWidget/main.cpp | 1 + Tools/defines.py | 2 +- 6 files changed, 43 insertions(+), 41 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index be4ae1ca..3518b41d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -18,16 +18,16 @@ "environment": [ { "name": "Path", - "value": "${env:Path};${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\bin\\;${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\modules\\;${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\qml\\;" + "value": "${env:Path};${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\bin\\;${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\modules\\;${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\qml\\;" } ], "type": "cppvsdbg", - "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_MSVC_Debug/bin/ScreenPlay.exe" + "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_MSVC_Debug/bin/ScreenPlay.exe" }, "osx": { "MIMode": "lldb", - "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.3.2_Clang_Debug/bin/ScreenPlay.app/Contents/MacOS/ScreenPlay", - "type": "cppdbg" + "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_Clang_Debug/bin/ScreenPlay.app/Contents/MacOS/ScreenPlay", + "type": "lldb" } }, { @@ -44,16 +44,15 @@ "environment": [ { "name": "Path", - "value": "${env:Path};${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\bin\\;${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\modules\\;${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\qml\\;" + "value": "${env:Path};${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\bin\\;${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\modules\\;${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\qml\\;" } ], - "type": "cppvsdbg", - "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_MSVC_RelWithDebInfo/bin/ScreenPlay.exe" + "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_MSVC_RelWithDebInfo/bin/ScreenPlay.exe" }, "osx": { "MIMode": "lldb", - "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.3.2_Clang_RelWithDebInfo/bin/ScreenPlay.app/Contents/MacOS/ScreenPlay", - "type": "cppdbg" + "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_Clang_RelWithDebInfo/bin/ScreenPlay.app/Contents/MacOS/ScreenPlay", + "type": "lldb" } }, { @@ -68,16 +67,16 @@ "environment": [ { "name": "Path", - "value": "${env:Path};${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\bin\\;${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\modules\\;${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\qml\\;" + "value": "${env:Path};${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\bin\\;${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\modules\\;${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\qml\\;" } ], - "type": "cppvsdbg", - "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_MSVC_Debug/bin/ScreenPlayWallpaper.exe" + "type": "lldb", + "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_MSVC_Debug/bin/ScreenPlayWallpaper.exe" }, "osx": { "MIMode": "lldb", - "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.3.2_Clang_Debug/bin/ScreenPlayWallpaper.app/Contents/MacOS/ScreenPlayWallpaper", - "type": "cppdbg" + "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_Clang_Debug/bin/ScreenPlayWallpaper.app/Contents/MacOS/ScreenPlayWallpaper", + "type": "lldb" } }, { @@ -94,16 +93,16 @@ "environment": [ { "name": "Path", - "value": "${env:Path};${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\bin\\;${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\modules\\;${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\qml\\;" + "value": "${env:Path};${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\bin\\;${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\modules\\;${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\qml\\;" } ], - "type": "cppvsdbg", - "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_MSVC_RelWithDebInfo/bin/ScreenPlayWallpaper.exe" + "type": "lldb", + "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_MSVC_RelWithDebInfo/bin/ScreenPlayWallpaper.exe" }, "osx": { "MIMode": "lldb", - "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.3.2_Clang_RelWithDebInfo/bin/ScreenPlayWallpaper.app/Contents/MacOS/ScreenPlayWallpaper", - "type": "cppdbg" + "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_Clang_RelWithDebInfo/bin/ScreenPlayWallpaper.app/Contents/MacOS/ScreenPlayWallpaper", + "type": "lldb" } }, { @@ -120,16 +119,16 @@ "environment": [ { "name": "Path", - "value": "${env:Path};${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\bin\\;${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\modules\\;${workspaceFolder}\\..\\aqt\\6.4.2\\msvc2019_64\\qml\\;" + "value": "${env:Path};${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\bin\\;${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\modules\\;${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\qml\\;" } ], "type": "cppvsdbg", - "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_MSVC_Debug/bin/ScreenPlayWidget.exe" + "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_MSVC_Debug/bin/ScreenPlayWidget.exe" }, "osx": { "MIMode": "lldb", - "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.3.2_Clang_Debug/bin/ScreenPlayWidget.app/Contents/MacOS/ScreenPlayWidget", - "type": "cppdbg" + "program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_Clang_Debug/bin/ScreenPlayWidget.app/Contents/MacOS/ScreenPlayWidget", + "type": "lldb" } } ] diff --git a/CMakePresets.json b/CMakePresets.json index 2dd30d4a..c399fa0a 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -19,7 +19,7 @@ }, "environment" : { "qt_path": "${sourceDir}/../aqt", - "qt_version": "6.4.2", + "qt_version": "6.5.0", "VCToolsVersion": "14.34.31933", "WindowsSDKVersion" : "10.0.22621.0", "VCArch": "x64", @@ -46,24 +46,24 @@ } }, { - "name": "windows-debug-qt-6.4.2", + "name": "windows-debug-qt-6.5.0", "inherits": "default-windows", - "displayName": "MSVC K3000 Qt 6.4.2 Debug", - "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.4.2_MSVC_Debug", + "displayName": "MSVC K3000 Qt 6.5.0 Debug", + "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.0_MSVC_Debug", "environment": { - "qt_version": "6.4.2" + "qt_version": "6.5.0" }, "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } }, { - "name": "windows-relwithdebinfo-qt-6.4.2", + "name": "windows-relwithdebinfo-qt-6.5.0", "inherits": "default-windows", - "displayName": "MSVC K3000 Qt 6.4.2 RelWithDebInfo", - "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.4.2_MSVC_RelWithDebInfo", + "displayName": "MSVC K3000 Qt 6.5.0 RelWithDebInfo", + "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.0_MSVC_RelWithDebInfo", "environment": { - "qt_version": "6.4.2" + "qt_version": "6.5.0" }, "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" @@ -74,7 +74,7 @@ "displayName": "ScreenPlay 64bit Debug Linux", "description": "Linux only!", "generator": "Ninja", - "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.4.2_GCC_Debug", + "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.0_GCC_Debug", "condition": { "type": "equals", "lhs": "${hostSystemName}", @@ -91,7 +91,7 @@ "CMAKE_CXX_COMPILER": "g++", "CMAKE_C_COMPILER": "gcc", "CMAKE_BUILD_TYPE": "Debug", - "CMAKE_PREFIX_PATH": "$env{qt_path}/6.4.2/gcc_64", + "CMAKE_PREFIX_PATH": "$env{qt_path}/6.5.0/gcc_64", "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/../vcpkg/scripts/buildsystems/vcpkg.cmake", "VCPKG_TARGET_TRIPLET": "x64-linux" } @@ -100,7 +100,7 @@ "name": "linux-relwithdebinfo", "displayName": "ScreenPlay 64bit RelWithDebInfo Linux", "inherits":"linux-debug", - "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.4.2_GCC_RelWithDebInfo", + "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.0_GCC_RelWithDebInfo", "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" } @@ -110,7 +110,7 @@ "displayName": "ScreenPlay 64bit Debug osx", "description": "Osx only!", "generator": "Ninja", - "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.3.2_Clang_Debug", + "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.0_Clang_Debug", "condition": { "type": "equals", "lhs": "${hostSystemName}", @@ -127,7 +127,7 @@ "CMAKE_CXX_COMPILER": "clang++", "CMAKE_C_COMPILER": "clang", "CMAKE_BUILD_TYPE": "Debug", - "CMAKE_PREFIX_PATH": "$env{qt_path}/6.3.2/macos", + "CMAKE_PREFIX_PATH": "$env{qt_path}/6.5.0/macos", "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/../vcpkg/scripts/buildsystems/vcpkg.cmake" } }, @@ -135,7 +135,7 @@ "name": "osx-relwithdebinfo", "displayName": "ScreenPlay 64bit RelWithDebInfo osx", "inherits": "osx-debug", - "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.3.2_Clang_RelWithDebInfo", + "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.0_Clang_RelWithDebInfo", "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" } diff --git a/ScreenPlay/main.cpp b/ScreenPlay/main.cpp index 0120e010..ca002e59 100644 --- a/ScreenPlay/main.cpp +++ b/ScreenPlay/main.cpp @@ -17,6 +17,7 @@ Q_IMPORT_QML_PLUGIN(ScreenPlayWorkshopPlugin) int main(int argc, char* argv[]) { + qputenv("QT_MEDIA_BACKEND","ffmpeg"); #if defined(Q_OS_WIN) // https://bugreports.qt.io/browse/QTBUG-72028 qputenv("QT_QPA_PLATFORM", "windows:darkmode=2"); diff --git a/ScreenPlayWallpaper/main.cpp b/ScreenPlayWallpaper/main.cpp index c1a78244..0a88e06b 100644 --- a/ScreenPlayWallpaper/main.cpp +++ b/ScreenPlayWallpaper/main.cpp @@ -20,7 +20,8 @@ Q_IMPORT_QML_PLUGIN(ScreenPlaySysInfoPlugin) Q_IMPORT_QML_PLUGIN(ScreenPlayWeatherPlugin) int main(int argc, char* argv[]) -{ +{ + qputenv("QT_MEDIA_BACKEND","ffmpeg"); QApplication::setAttribute(Qt::AA_ShareOpenGLContexts); QtWebEngineQuick::initialize(); @@ -42,7 +43,7 @@ int main(int argc, char* argv[]) if (argumentList.length() == 1) { window.setActiveScreensList({ 0 }); // window.setProjectPath("test"); - window.setProjectPath("C:/Program Files (x86)/Steam/steamapps/workshop/content/672870/1958068741"); + window.setProjectPath("C:/Program Files (x86)/Steam/steamapps/workshop/content/672870/19112022140605-Horde 1980"); window.setAppID("test"); window.setVolume(1); window.setFillMode("fill"); diff --git a/ScreenPlayWidget/main.cpp b/ScreenPlayWidget/main.cpp index a777bda3..a72a353b 100644 --- a/ScreenPlayWidget/main.cpp +++ b/ScreenPlayWidget/main.cpp @@ -14,6 +14,7 @@ Q_IMPORT_QML_PLUGIN(ScreenPlayWeatherPlugin) int main(int argc, char* argv[]) { + qputenv("QT_MEDIA_BACKEND","ffmpeg"); QtWebEngineQuick::initialize(); QApplication::setAttribute(Qt::AA_ShareOpenGLContexts); diff --git a/Tools/defines.py b/Tools/defines.py index b15c60b2..f2f4910c 100644 --- a/Tools/defines.py +++ b/Tools/defines.py @@ -21,7 +21,7 @@ SCREENPLAY_VERSION = "0.15.0-RC4" QT_PATH = Path.cwd().parent.parent.joinpath("aqt") -QT_VERSION = "6.4.2" if sys.platform != "darwin" else "6.3.2" +QT_VERSION = "6.5.0" QT_BIN_PATH = QT_PATH.joinpath(f"{QT_VERSION}/{QT_PLATFORM}/bin") QT_TOOLS_PATH = QT_PATH.joinpath("Tools/") QT_IFW_VERSION = "4.5"