summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt251
-rw-r--r--CMakeModules/CopyYuzuQt5Deps.cmake7
-rw-r--r--src/yuzu/CMakeLists.txt26
-rw-r--r--src/yuzu/multiplayer/direct_connect.cpp2
-rw-r--r--src/yuzu/multiplayer/validation.h16
5 files changed, 182 insertions, 120 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d13dc74e..2d2761ec1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,9 @@ CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" ON
19CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ON "ENABLE_SDL2;NOT MSVC" OFF) 19CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ON "ENABLE_SDL2;NOT MSVC" OFF)
20 20
21option(ENABLE_QT "Enable the Qt frontend" ON) 21option(ENABLE_QT "Enable the Qt frontend" ON)
22option(ENABLE_QT6 "Allow usage of Qt6 to be attempted" OFF)
23set(QT6_LOCATION "" CACHE PATH "Additional Location to search for Qt6 libraries like C:/Qt/6.3.1/msvc2019_64/")
24
22option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF) 25option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
23CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF) 26CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF)
24 27
@@ -28,6 +31,8 @@ option(YUZU_USE_BUNDLED_LIBUSB "Compile bundled libusb" OFF)
28 31
29option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" "${WIN32}") 32option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" "${WIN32}")
30 33
34option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF)
35
31option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF) 36option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF)
32 37
33option(ENABLE_CUBEB "Enables the cubeb audio backend" ON) 38option(ENABLE_CUBEB "Enables the cubeb audio backend" ON)
@@ -213,128 +218,166 @@ if (MINGW)
213 find_library(MSWSOCK_LIBRARY mswsock REQUIRED) 218 find_library(MSWSOCK_LIBRARY mswsock REQUIRED)
214endif() 219endif()
215 220
221# Please consider this as a stub
222if(ENABLE_QT6 AND Qt6_LOCATION)
223 list(APPEND CMAKE_PREFIX_PATH "${Qt6_LOCATION}")
224endif()
225
226function(set_yuzu_qt_components)
227 # Best practice is to ask for all components at once, so they are from the same version
228 set(YUZU_QT_COMPONENTS2 Core Widgets Concurrent)
229 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
230 list(APPEND YUZU_QT_COMPONENTS2 DBus)
231 endif()
232 if (YUZU_USE_QT_MULTIMEDIA)
233 list(APPEND YUZU_QT_COMPONENTS2 Multimedia)
234 endif()
235 if (YUZU_USE_QT_WEB_ENGINE)
236 list(APPEND YUZU_QT_COMPONENTS2 WebEngineCore WebEngineWidgets)
237 endif()
238 if (ENABLE_QT_TRANSLATION)
239 list(APPEND YUZU_QT_COMPONENTS2 LinguistTools)
240 endif()
241 set(YUZU_QT_COMPONENTS ${YUZU_QT_COMPONENTS2} PARENT_SCOPE)
242endfunction(set_yuzu_qt_components)
243
216# Qt5 requires that we find components, so it doesn't fit our pretty little find package function 244# Qt5 requires that we find components, so it doesn't fit our pretty little find package function
217if(ENABLE_QT) 245if(ENABLE_QT)
218 set(QT_VERSION 5.15) 246 set(QT_VERSION 5.15)
247 # These are used to specify minimum versions
248 set(QT5_VERSION 5.15)
249 set(QT6_VERSION 6.3.1)
219 250
220 # Check for system Qt on Linux, fallback to bundled Qt 251 set_yuzu_qt_components()
221 if (UNIX AND NOT APPLE) 252 if (ENABLE_QT6)
222 if (NOT YUZU_USE_BUNDLED_QT) 253 find_package(Qt6 ${QT6_VERSION} COMPONENTS ${YUZU_QT_COMPONENTS})
223 find_package(Qt5 ${QT_VERSION} COMPONENTS Widgets DBus Multimedia) 254 endif()
224 endif() 255 if (Qt6_FOUND)
225 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND (NOT Qt5_FOUND OR YUZU_USE_BUNDLED_QT)) 256 message(STATUS "yuzu/CMakeLists.txt: Qt6Widgets_VERSION ${Qt6Widgets_VERSION}, setting QT_VERSION")
226 # Check for dependencies, then enable bundled Qt download 257 set(QT_VERSION ${Qt6Widgets_VERSION})
227 258 set(QT_MAJOR_VERSION 6)
228 # Check that the system GLIBCXX version is compatible 259 # Qt6 sets cxx_std_17 and we need to undo that
229 find_program(OBJDUMP objdump) 260 set_target_properties(Qt6::Platform PROPERTIES INTERFACE_COMPILE_FEATURES "")
230 if ("${OBJDUMP}" STREQUAL "OBJDUMP-NOTFOUND") 261 else()
231 message(FATAL_ERROR "Required program `objdump` not found.") 262 message(STATUS "yuzu/CMakeLists.txt: Qt6 not found/not selected, trying for Qt5")
232 endif() 263 # When Qt6 partially found, need this set to use Qt5 when not specifying version
233 find_library(LIBSTDCXX libstdc++.so.6) 264 set(QT_DEFAULT_MAJOR_VERSION 5)
234 execute_process( 265 set(QT_MAJOR_VERSION 5)
235 COMMAND 266
236 ${OBJDUMP} -T ${LIBSTDCXX} 267 set(YUZU_USE_QT_MULTIMEDIA ON)
237 COMMAND 268 # Check for system Qt on Linux, fallback to bundled Qt
238 grep GLIBCXX_3.4.28 269 if (UNIX AND NOT APPLE)
239 COMMAND 270 if (NOT YUZU_USE_BUNDLED_QT)
240 sed "s/[0-9a-f]*.* //" 271 find_package(Qt5 ${QT5_VERSION} COMPONENTS Widgets DBus Multimedia)
241 COMMAND
242 sed "s/ .*//"
243 COMMAND
244 sort -u
245 OUTPUT_VARIABLE
246 GLIBCXX_MET
247 )
248 if (NOT GLIBCXX_MET)
249 message(FATAL_ERROR "Qt too old or not found, and bundled Qt package is not \
250 compatible with this system. Either install Qt ${QT_VERSION}, or provide the path \
251 to Qt by setting the variable Qt5_ROOT.")
252 endif() 272 endif()
273 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND (NOT Qt5_FOUND OR YUZU_USE_BUNDLED_QT))
274 # Check for dependencies, then enable bundled Qt download
253 275
254 # Check for headers 276 # Check that the system GLIBCXX version is compatible
255 find_package(PkgConfig REQUIRED) 277 find_program(OBJDUMP objdump)
256 pkg_check_modules(QT_DEP_GLU QUIET glu>=9.0.0) 278 if (NOT OBJDUMP)
257 if (NOT QT_DEP_GLU_FOUND) 279 message(FATAL_ERROR "Required program `objdump` not found.")
258 message(FATAL_ERROR "Qt bundled pacakge dependency `glu` not found. \ 280 endif()
259 Perhaps `libglu1-mesa-dev` needs to be installed?") 281 find_library(LIBSTDCXX libstdc++.so.6)
260 endif() 282 execute_process(
261 pkg_check_modules(QT_DEP_MESA QUIET dri>=20.0.8) 283 COMMAND
262 if (NOT QT_DEP_MESA_FOUND) 284 ${OBJDUMP} -T ${LIBSTDCXX}
263 message(FATAL_ERROR "Qt bundled pacakge dependency `dri` not found. \ 285 COMMAND
264 Perhaps `mesa-common-dev` needs to be installed?") 286 grep GLIBCXX_3.4.28
265 endif() 287 COMMAND
288 sed "s/[0-9a-f]*.* //"
289 COMMAND
290 sed "s/ .*//"
291 COMMAND
292 sort -u
293 OUTPUT_VARIABLE
294 GLIBCXX_MET
295 )
296 if (NOT GLIBCXX_MET)
297 message(FATAL_ERROR "Qt too old or not found, and bundled Qt package is not \
298 compatible with this system. Either install Qt ${QT_VERSION}, or provide the path \
299 to Qt by setting the variable Qt5_ROOT.")
300 endif()
266 301
267 # Check for X libraries 302 # Check for headers
268 set(BUNDLED_QT_REQUIREMENTS 303 find_package(PkgConfig REQUIRED)
269 libxcb-icccm.so.4 304 pkg_check_modules(QT_DEP_GLU QUIET glu>=9.0.0)
270 libxcb-image.so.0 305 if (NOT QT_DEP_GLU_FOUND)
271 libxcb-keysyms.so.1 306 message(FATAL_ERROR "Qt bundled pacakge dependency `glu` not found. \
272 libxcb-randr.so.0 307 Perhaps `libglu1-mesa-dev` needs to be installed?")
273 libxcb-render-util.so.0 308 endif()
274 libxcb-render.so.0 309 pkg_check_modules(QT_DEP_MESA QUIET dri>=20.0.8)
275 libxcb-shape.so.0 310 if (NOT QT_DEP_MESA_FOUND)
276 libxcb-shm.so.0 311 message(FATAL_ERROR "Qt bundled pacakge dependency `dri` not found. \
277 libxcb-sync.so.1 312 Perhaps `mesa-common-dev` needs to be installed?")
278 libxcb-xfixes.so.0
279 libxcb-xinerama.so.0
280 libxcb-xkb.so.1
281 libxcb.so.1
282 libxkbcommon-x11.so.0
283 libxkbcommon.so.0
284 )
285 set(UNRESOLVED_QT_DEPS "")
286 foreach (REQUIREMENT ${BUNDLED_QT_REQUIREMENTS})
287 find_library(BUNDLED_QT_${REQUIREMENT} ${REQUIREMENT})
288 if ("${BUNDLED_QT_${REQUIREMENT}}" STREQUAL "BUNDLED_QT_${REQUIREMENT}-NOTFOUND")
289 set(UNRESOLVED_QT_DEPS ${UNRESOLVED_QT_DEPS} ${REQUIREMENT})
290 endif() 313 endif()
291 unset(BUNDLED_QT_${REQUIREMENT})
292 endforeach()
293 unset(BUNDLED_QT_REQUIREMENTS)
294 314
295 if (NOT "${UNRESOLVED_QT_DEPS}" STREQUAL "") 315 # Check for X libraries
296 message(FATAL_ERROR "Bundled Qt package missing required dependencies: ${UNRESOLVED_QT_DEPS}") 316 set(BUNDLED_QT_REQUIREMENTS
297 endif() 317 libxcb-icccm.so.4
318 libxcb-image.so.0
319 libxcb-keysyms.so.1
320 libxcb-randr.so.0
321 libxcb-render-util.so.0
322 libxcb-render.so.0
323 libxcb-shape.so.0
324 libxcb-shm.so.0
325 libxcb-sync.so.1
326 libxcb-xfixes.so.0
327 libxcb-xinerama.so.0
328 libxcb-xkb.so.1
329 libxcb.so.1
330 libxkbcommon-x11.so.0
331 libxkbcommon.so.0
332 )
333 set(UNRESOLVED_QT_DEPS "")
334 foreach (REQUIREMENT ${BUNDLED_QT_REQUIREMENTS})
335 find_library(BUNDLED_QT_${REQUIREMENT} ${REQUIREMENT})
336 if (NOT BUNDLED_QT_${REQUIREMENT})
337 set(UNRESOLVED_QT_DEPS ${UNRESOLVED_QT_DEPS} ${REQUIREMENT})
338 endif()
339 unset(BUNDLED_QT_${REQUIREMENT})
340 endforeach()
341 unset(BUNDLED_QT_REQUIREMENTS)
342
343 if (NOT "${UNRESOLVED_QT_DEPS}" STREQUAL "")
344 message(FATAL_ERROR "Bundled Qt package missing required dependencies: ${UNRESOLVED_QT_DEPS}")
345 endif()
298 346
299 set(YUZU_USE_BUNDLED_QT ON CACHE BOOL "Download bundled Qt" FORCE) 347 set(YUZU_USE_BUNDLED_QT ON CACHE BOOL "Download bundled Qt" FORCE)
300 endif() 348 endif()
301 if (YUZU_USE_BUNDLED_QT) 349 if (YUZU_USE_BUNDLED_QT)
302 # Binary package currently does not support Qt webengine, so make sure it's disabled 350 # Binary package currently does not support Qt webengine, so make sure it's disabled
303 set(YUZU_USE_QT_WEB_ENGINE OFF CACHE BOOL "Use Qt Webengine" FORCE) 351 set(YUZU_USE_QT_WEB_ENGINE OFF CACHE BOOL "Use Qt Webengine" FORCE)
352 endif()
304 endif() 353 endif()
305 endif()
306 354
307 set(YUZU_QT_NO_CMAKE_SYSTEM_PATH) 355 set(YUZU_QT_NO_CMAKE_SYSTEM_PATH)
308 356
309 if(YUZU_USE_BUNDLED_QT) 357 if(YUZU_USE_BUNDLED_QT)
310 if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64) 358 if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
311 set(QT_BUILD qt-5.15.2-msvc2019_64) 359 set(QT_BUILD qt-5.15.2-msvc2019_64)
312 elseif ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") AND NOT MINGW AND ARCHITECTURE_x86_64) 360 elseif ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") AND NOT MINGW AND ARCHITECTURE_x86_64)
313 set(QT_BUILD qt5_5_15_2) 361 set(QT_BUILD qt5_5_15_2)
314 else() 362 else()
315 message(FATAL_ERROR "No bundled Qt binaries for your toolchain. Disable YUZU_USE_BUNDLED_QT and provide your own.") 363 message(FATAL_ERROR "No bundled Qt binaries for your toolchain. Disable YUZU_USE_BUNDLED_QT and provide your own.")
316 endif() 364 endif()
317 365
318 if (DEFINED QT_BUILD) 366 if (DEFINED QT_BUILD)
319 download_bundled_external("qt/" ${QT_BUILD} QT_PREFIX) 367 download_bundled_external("qt/" ${QT_BUILD} QT_PREFIX)
320 endif() 368 endif()
321 369
322 set(QT_PREFIX_HINT HINTS "${QT_PREFIX}") 370 set(QT_PREFIX_HINT HINTS "${QT_PREFIX}")
323 371
324 set(YUZU_QT_NO_CMAKE_SYSTEM_PATH "NO_CMAKE_SYSTEM_PATH") 372 set(YUZU_QT_NO_CMAKE_SYSTEM_PATH "NO_CMAKE_SYSTEM_PATH")
325 endif() 373 # Binary package for Qt5 has Qt Multimedia
326 if (UNIX AND NOT APPLE AND YUZU_USE_BUNDLED_QT) 374 set(YUZU_USE_QT_MULTIMEDIA ON CACHE BOOL "Use Qt Multimedia" FORCE)
327 find_package(Qt5 ${QT_VERSION} REQUIRED COMPONENTS Widgets Concurrent Multimedia DBus ${QT_PREFIX_HINT} ${YUZU_QT_NO_CMAKE_SYSTEM_PATH}) 375 endif()
328 else()
329 find_package(Qt5 ${QT_VERSION} REQUIRED COMPONENTS Widgets Concurrent Multimedia ${QT_PREFIX_HINT} ${YUZU_QT_NO_CMAKE_SYSTEM_PATH})
330 endif()
331 if (YUZU_USE_QT_WEB_ENGINE)
332 find_package(Qt5 REQUIRED COMPONENTS WebEngineCore WebEngineWidgets)
333 endif()
334 376
335 if (ENABLE_QT_TRANSLATION) 377 set_yuzu_qt_components()
336 find_package(Qt5 REQUIRED COMPONENTS LinguistTools ${QT_PREFIX_HINT}) 378 find_package(Qt5 ${QT5_VERSION} COMPONENTS ${YUZU_QT_COMPONENTS} ${QT_PREFIX_HINT} ${YUZU_QT_NO_CMAKE_SYSTEM_PATH})
337 endif() 379 endif()
380
338endif() 381endif()
339 382
340# find SDL2 exports a bunch of variables that are needed, so its easier to do this outside of the yuzu_find_package 383# find SDL2 exports a bunch of variables that are needed, so its easier to do this outside of the yuzu_find_package
diff --git a/CMakeModules/CopyYuzuQt5Deps.cmake b/CMakeModules/CopyYuzuQt5Deps.cmake
index a353ddbb7..ab56de444 100644
--- a/CMakeModules/CopyYuzuQt5Deps.cmake
+++ b/CMakeModules/CopyYuzuQt5Deps.cmake
@@ -27,10 +27,13 @@ function(copy_yuzu_Qt5_deps target_dir)
27 Qt5Core$<$<CONFIG:Debug>:d>.* 27 Qt5Core$<$<CONFIG:Debug>:d>.*
28 Qt5Gui$<$<CONFIG:Debug>:d>.* 28 Qt5Gui$<$<CONFIG:Debug>:d>.*
29 Qt5Widgets$<$<CONFIG:Debug>:d>.* 29 Qt5Widgets$<$<CONFIG:Debug>:d>.*
30 Qt5Multimedia$<$<CONFIG:Debug>:d>.*
31 Qt5Network$<$<CONFIG:Debug>:d>.* 30 Qt5Network$<$<CONFIG:Debug>:d>.*
32 ) 31 )
33 32 if (YUZU_USE_QT_MULTIMEDIA)
33 windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST}
34 Qt5Multimedia$<$<CONFIG:Debug>:d>.*
35 )
36 endif()
34 if (YUZU_USE_QT_WEB_ENGINE) 37 if (YUZU_USE_QT_WEB_ENGINE)
35 windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST} 38 windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST}
36 Qt5Network$<$<CONFIG:Debug>:d>.* 39 Qt5Network$<$<CONFIG:Debug>:d>.*
diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt
index 5cc1fbf32..ec9246e74 100644
--- a/src/yuzu/CMakeLists.txt
+++ b/src/yuzu/CMakeLists.txt
@@ -292,7 +292,7 @@ if (APPLE)
292 set_target_properties(yuzu PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) 292 set_target_properties(yuzu PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
293elseif(WIN32) 293elseif(WIN32)
294 # compile as a win32 gui application instead of a console application 294 # compile as a win32 gui application instead of a console application
295 if (QT_VERSION VERSION_GREATER 6) 295 if (QT_VERSION VERSION_GREATER_EQUAL 6)
296 target_link_libraries(yuzu PRIVATE Qt6::EntryPointPrivate) 296 target_link_libraries(yuzu PRIVATE Qt6::EntryPointPrivate)
297 else() 297 else()
298 target_link_libraries(yuzu PRIVATE Qt5::WinMain) 298 target_link_libraries(yuzu PRIVATE Qt5::WinMain)
@@ -308,15 +308,15 @@ endif()
308create_target_directory_groups(yuzu) 308create_target_directory_groups(yuzu)
309 309
310target_link_libraries(yuzu PRIVATE common core input_common network video_core) 310target_link_libraries(yuzu PRIVATE common core input_common network video_core)
311target_link_libraries(yuzu PRIVATE Boost::boost glad Qt::Widgets Qt::Multimedia) 311target_link_libraries(yuzu PRIVATE Boost::boost glad Qt${QT_MAJOR_VERSION}::Widgets)
312target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) 312target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
313 313
314target_include_directories(yuzu PRIVATE ../../externals/Vulkan-Headers/include) 314target_include_directories(yuzu PRIVATE ../../externals/Vulkan-Headers/include)
315if (NOT WIN32) 315if (NOT WIN32)
316 target_include_directories(yuzu PRIVATE ${Qt5Gui_PRIVATE_INCLUDE_DIRS}) 316 target_include_directories(yuzu PRIVATE ${Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS})
317endif() 317endif()
318if (UNIX AND NOT APPLE) 318if (UNIX AND NOT APPLE)
319 target_link_libraries(yuzu PRIVATE Qt::DBus) 319 target_link_libraries(yuzu PRIVATE Qt${QT_MAJOR_VERSION}::DBus)
320endif() 320endif()
321 321
322target_compile_definitions(yuzu PRIVATE 322target_compile_definitions(yuzu PRIVATE
@@ -355,8 +355,13 @@ if (ENABLE_WEB_SERVICE)
355 target_compile_definitions(yuzu PRIVATE -DENABLE_WEB_SERVICE) 355 target_compile_definitions(yuzu PRIVATE -DENABLE_WEB_SERVICE)
356endif() 356endif()
357 357
358if (YUZU_USE_QT_MULTIMEDIA)
359 target_link_libraries(yuzu PRIVATE Qt${QT_MAJOR_VERSION}::Multimedia)
360 target_compile_definitions(yuzu PRIVATE -DYUZU_USE_QT_MULTIMEDIA)
361endif ()
362
358if (YUZU_USE_QT_WEB_ENGINE) 363if (YUZU_USE_QT_WEB_ENGINE)
359 target_link_libraries(yuzu PRIVATE Qt::WebEngineCore Qt::WebEngineWidgets) 364 target_link_libraries(yuzu PRIVATE Qt${QT_MAJOR_VERSION}::WebEngineCore Qt${QT_MAJOR_VERSION}::WebEngineWidgets)
360 target_compile_definitions(yuzu PRIVATE -DYUZU_USE_QT_WEB_ENGINE) 365 target_compile_definitions(yuzu PRIVATE -DYUZU_USE_QT_WEB_ENGINE)
361endif () 366endif ()
362 367
@@ -364,7 +369,16 @@ if(UNIX AND NOT APPLE)
364 install(TARGETS yuzu) 369 install(TARGETS yuzu)
365endif() 370endif()
366 371
367if (YUZU_USE_BUNDLED_QT) 372if (WIN32 AND QT_VERSION VERSION_GREATER_EQUAL 6)
373 if (MSVC AND NOT ${CMAKE_GENERATOR} STREQUAL "Ninja")
374 set(YUZU_EXE_DIR "${CMAKE_BINARY_DIR}/bin/$<CONFIG>")
375 else()
376 set(YUZU_EXE_DIR "${CMAKE_BINARY_DIR}/bin")
377 endif()
378 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)
379endif()
380
381if (YUZU_USE_BUNDLED_QT AND QT_VERSION VERSION_LESS 6)
368 include(CopyYuzuQt5Deps) 382 include(CopyYuzuQt5Deps)
369 copy_yuzu_Qt5_deps(yuzu) 383 copy_yuzu_Qt5_deps(yuzu)
370endif() 384endif()
diff --git a/src/yuzu/multiplayer/direct_connect.cpp b/src/yuzu/multiplayer/direct_connect.cpp
index 10bf0a4fb..cbd52da85 100644
--- a/src/yuzu/multiplayer/direct_connect.cpp
+++ b/src/yuzu/multiplayer/direct_connect.cpp
@@ -4,7 +4,7 @@
4#include <QComboBox> 4#include <QComboBox>
5#include <QFuture> 5#include <QFuture>
6#include <QIntValidator> 6#include <QIntValidator>
7#include <QRegExpValidator> 7#include <QRegularExpressionValidator>
8#include <QString> 8#include <QString>
9#include <QtConcurrent/QtConcurrentRun> 9#include <QtConcurrent/QtConcurrentRun>
10#include "common/settings.h" 10#include "common/settings.h"
diff --git a/src/yuzu/multiplayer/validation.h b/src/yuzu/multiplayer/validation.h
index dabf860be..dd25af280 100644
--- a/src/yuzu/multiplayer/validation.h
+++ b/src/yuzu/multiplayer/validation.h
@@ -3,7 +3,7 @@
3 3
4#pragma once 4#pragma once
5 5
6#include <QRegExp> 6#include <QRegularExpression>
7#include <QString> 7#include <QString>
8#include <QValidator> 8#include <QValidator>
9 9
@@ -29,19 +29,21 @@ public:
29 29
30private: 30private:
31 /// room name can be alphanumeric and " " "_" "." and "-" and must have a size of 4-20 31 /// room name can be alphanumeric and " " "_" "." and "-" and must have a size of 4-20
32 QRegExp room_name_regex = QRegExp(QStringLiteral("^[a-zA-Z0-9._- ]{4,20}$")); 32 QRegularExpression room_name_regex =
33 QRegExpValidator room_name; 33 QRegularExpression(QStringLiteral("^[a-zA-Z0-9._ -]{4,20}"));
34 QRegularExpressionValidator room_name;
34 35
35 /// nickname can be alphanumeric and " " "_" "." and "-" and must have a size of 4-20 36 /// nickname can be alphanumeric and " " "_" "." and "-" and must have a size of 4-20
36 QRegExp nickname_regex = QRegExp(QStringLiteral("^[a-zA-Z0-9._- ]{4,20}$")); 37 const QRegularExpression nickname_regex =
37 QRegExpValidator nickname; 38 QRegularExpression(QStringLiteral("^[a-zA-Z0-9._ -]{4,20}"));
39 QRegularExpressionValidator nickname;
38 40
39 /// ipv4 address only 41 /// ipv4 address only
40 // TODO remove this when we support hostnames in direct connect 42 // TODO remove this when we support hostnames in direct connect
41 QRegExp ip_regex = QRegExp(QStringLiteral( 43 QRegularExpression ip_regex = QRegularExpression(QStringLiteral(
42 "(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|" 44 "(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|"
43 "2[0-4][0-9]|25[0-5])")); 45 "2[0-4][0-9]|25[0-5])"));
44 QRegExpValidator ip; 46 QRegularExpressionValidator ip;
45 47
46 /// port must be between 0 and 65535 48 /// port must be between 0 and 65535
47 QIntValidator port; 49 QIntValidator port;