Update Qt to 6.8.3 and fixes dark mode being forced automatically even when light theme is set in app settings
All checks were successful
eden-build / source (push) Successful in 4m17s
eden-build / linux (push) Successful in 24m41s
eden-build / android (push) Successful in 15m16s
eden-build / windows (msvc) (push) Successful in 57m38s

This commit is contained in:
MaranBr 2025-05-13 14:44:29 -04:00
parent daab352512
commit 8254a0e0de
4 changed files with 27 additions and 20 deletions

View file

@ -399,7 +399,7 @@ add_subdirectory(externals)
if (ENABLE_QT)
if (NOT USE_SYSTEM_QT)
download_qt(6.7.3)
download_qt(6.8.3)
endif()
find_package(Qt6 REQUIRED COMPONENTS Widgets Multimedia Concurrent)

View file

@ -16,7 +16,7 @@ function(copy_yuzu_Qt6_deps target_dir)
set(PLATFORMS ${DLL_DEST}plugins/platforms/)
set(STYLES ${DLL_DEST}plugins/styles/)
set(IMAGEFORMATS ${DLL_DEST}plugins/imageformats/)
set(RESOURCES ${DLL_DEST}resources/)
if (MSVC)
windows_copy_files(${target_dir} ${Qt6_DLL_DIR} ${DLL_DEST}
Qt6Core$<$<CONFIG:Debug>:d>.*
@ -31,20 +31,31 @@ function(copy_yuzu_Qt6_deps target_dir)
endif()
if (YUZU_USE_QT_WEB_ENGINE)
windows_copy_files(${target_dir} ${Qt6_DLL_DIR} ${DLL_DEST}
Qt6OpenGL$<$<CONFIG:Debug>:d>.*
Qt6Positioning$<$<CONFIG:Debug>:d>.*
Qt6PrintSupport$<$<CONFIG:Debug>:d>.*
Qt6Qml$<$<CONFIG:Debug>:d>.*
Qt6QmlMeta$<$<CONFIG:Debug>:d>.*
Qt6QmlModels$<$<CONFIG:Debug>:d>.*
Qt6QmlWorkerScript$<$<CONFIG:Debug>:d>.*
Qt6Quick$<$<CONFIG:Debug>:d>.*
Qt6QuickWidgets$<$<CONFIG:Debug>:d>.*
Qt6WebChannel$<$<CONFIG:Debug>:d>.*
Qt6WebEngineCore$<$<CONFIG:Debug>:d>.*
Qt6WebEngineWidgets$<$<CONFIG:Debug>:d>.*
QtWebEngineProcess$<$<CONFIG:Debug>:d>.*
QtWebEngineProcess$<$<CONFIG:Debug>:d>.*
)
windows_copy_files(${target_dir} ${Qt6_RESOURCES_DIR} ${DLL_DEST}
windows_copy_files(${target_dir} ${Qt6_RESOURCES_DIR} ${RESOURCES}
icudtl.dat
qtwebengine_devtools_resources.pak
qtwebengine_resources.pak
qtwebengine_resources_100p.pak
qtwebengine_resources_200p.pak
v8_context_snapshot.bin
)
endif()
windows_copy_files(yuzu ${Qt6_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*)
windows_copy_files(yuzu ${Qt6_STYLES_DIR} ${STYLES} qwindowsvistastyle$<$<CONFIG:Debug>:d>.*)
windows_copy_files(yuzu ${Qt6_STYLES_DIR} ${STYLES} qmodernwindowsstyle$<$<CONFIG:Debug>:d>.*)
windows_copy_files(yuzu ${Qt6_IMAGEFORMATS_DIR} ${IMAGEFORMATS}
qjpeg$<$<CONFIG:Debug>:d>.*
qgif$<$<CONFIG:Debug>:d>.*
@ -52,9 +63,6 @@ function(copy_yuzu_Qt6_deps target_dir)
else()
# Update for non-MSVC platforms if needed
endif()
# Create an empty qt.conf file
add_custom_command(TARGET yuzu POST_BUILD
COMMAND ${CMAKE_COMMAND} -E touch ${DLL_DEST}qt.conf
)
# Fixes dark mode being forced automatically even when light theme is set in app settings.
file(WRITE "${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/qt.conf" "[Platforms]\nWindowsArguments = darkmode=0")
endfunction(copy_yuzu_Qt6_deps)

View file

@ -68,18 +68,18 @@ function(determine_qt_parameters target host_out type_out arch_out arch_path_out
set(arch_path "mingw_64")
elseif (MSVC)
if ("arm64" IN_LIST ARCHITECTURE)
set(arch_path "msvc2019_arm64")
set(arch_path "msvc2022_arm64")
elseif ("x86_64" IN_LIST ARCHITECTURE)
set(arch_path "msvc2019_64")
set(arch_path "msvc2022_64")
else()
message(FATAL_ERROR "Unsupported bundled Qt architecture. Enable USE_SYSTEM_QT and provide your own.")
endif()
set(arch "win64_${arch_path}")
if (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64")
set(host_arch_path "msvc2019_64")
set(host_arch_path "msvc2022_64")
elseif (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "ARM64")
set(host_arch_path "msvc2019_64")
set(host_arch_path "msvc2022_arm64")
endif()
set(host_arch "win64_${host_arch_path}")
else()
@ -133,13 +133,12 @@ function(download_qt_configuration prefix_out target host type arch arch_path ba
set(install_args ${install_args} install-tool --outputdir ${base_path} ${host} desktop ${target})
else()
set(prefix "${base_path}/${target}/${arch_path}")
set(install_args ${install_args} install-qt --outputdir ${base_path} ${host} ${type} ${target} ${arch}
-m qtmultimedia --archives qttranslations qttools qtsvg qtbase)
set(install_args ${install_args} install-qt --outputdir ${base_path} ${host} ${type} ${target} ${arch} -m qt3d qt5compat qtactiveqt qtcharts qtconnectivity qtdatavis3d qtgraphs qtgrpc qthttpserver qtimageformats qtlanguageserver qtlocation qtlottie qtmultimedia qtnetworkauth qtpdf qtpositioning qtquick3d qtquick3dphysics qtquickeffectmaker qtquicktimeline qtremoteobjects qtscxml qtsensors qtserialbus qtserialport qtshadertools qtspeech qtvirtualkeyboard qtwebchannel qtwebengine qtwebsockets qtwebview)
endif()
if (NOT EXISTS "${prefix}")
message(STATUS "Downloading Qt binaries for ${target}:${host}:${type}:${arch}:${arch_path}")
set(AQT_PREBUILD_BASE_URL "https://github.com/miurahr/aqtinstall/releases/download/v3.1.18")
set(AQT_PREBUILD_BASE_URL "https://github.com/miurahr/aqtinstall/releases/download/v3.2.1")
if (WIN32)
set(aqt_path "${base_path}/aqt.exe")
if (NOT EXISTS "${aqt_path}")

View file

@ -450,12 +450,12 @@ if(UNIX AND NOT APPLE)
install(TARGETS yuzu)
endif()
if (WIN32 AND QT_VERSION VERSION_GREATER_EQUAL 6)
if (WIN32 AND USE_SYSTEM_QT AND QT_VERSION VERSION_GREATER_EQUAL 6)
set(YUZU_EXE_DIR "$<TARGET_FILE_DIR:yuzu>")
add_custom_command(TARGET yuzu POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} "${YUZU_EXE_DIR}/yuzu.exe" --dir "${YUZU_EXE_DIR}" --libdir "${YUZU_EXE_DIR}" --plugindir "${YUZU_EXE_DIR}/plugins" --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --verbose 0)
add_custom_command(TARGET yuzu POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} "${YUZU_EXE_DIR}/eden.exe" --dir "${YUZU_EXE_DIR}" --libdir "${YUZU_EXE_DIR}" --plugindir "${YUZU_EXE_DIR}/plugins" --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --verbose 0)
endif()
if (YUZU_USE_BUNDLED_QT)
if (NOT USE_SYSTEM_QT)
include(CopyYuzuQt6Deps)
copy_yuzu_Qt6_deps(yuzu)
endif()