summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.ci/scripts/clang/docker.sh12
-rw-r--r--.ci/scripts/linux/exec.sh7
-rwxr-xr-x.ci/scripts/transifex/docker.sh5
-rwxr-xr-x.ci/scripts/windows/docker.sh5
-rw-r--r--.ci/scripts/windows/upload.ps150
-rw-r--r--.ci/templates/build-msvc.yml4
-rw-r--r--.github/workflows/verify.yml10
-rw-r--r--.gitmodules7
-rw-r--r--CMakeLists.txt176
-rw-r--r--CMakeModules/CopyYuzuQt5Deps.cmake10
m---------externals/vcpkg0
-rw-r--r--src/common/CMakeLists.txt5
-rw-r--r--src/video_core/renderer_vulkan/vk_blit_screen.cpp13
-rw-r--r--vcpkg.json29
14 files changed, 160 insertions, 173 deletions
diff --git a/.ci/scripts/clang/docker.sh b/.ci/scripts/clang/docker.sh
index 94a9ca0ec..db736f72b 100755
--- a/.ci/scripts/clang/docker.sh
+++ b/.ci/scripts/clang/docker.sh
@@ -6,7 +6,17 @@ set -e
ccache -s
mkdir build || true && cd build
-cmake .. -GNinja -DDISPLAY_VERSION=$1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/clang -DCMAKE_CXX_COMPILER=/usr/lib/ccache/clang++ -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DCMAKE_INSTALL_PREFIX="/usr"
+cmake .. \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_CXX_COMPILER=/usr/lib/ccache/clang++ \
+ -DCMAKE_C_COMPILER=/usr/lib/ccache/clang \
+ -DCMAKE_INSTALL_PREFIX="/usr" \
+ -DDISPLAY_VERSION=$1 \
+ -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
+ -DENABLE_QT_TRANSLATION=ON \
+ -DUSE_DISCORD_PRESENCE=ON \
+ -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
+ -GNinja
ninja
diff --git a/.ci/scripts/linux/exec.sh b/.ci/scripts/linux/exec.sh
index fc4594d65..78e8aeabf 100644
--- a/.ci/scripts/linux/exec.sh
+++ b/.ci/scripts/linux/exec.sh
@@ -4,5 +4,10 @@ mkdir -p "ccache" || true
chmod a+x ./.ci/scripts/linux/docker.sh
# the UID for the container yuzu user is 1027
sudo chown -R 1027 ./
-docker run -e ENABLE_COMPATIBILITY_REPORTING -e CCACHE_DIR=/yuzu/ccache -v "$(pwd):/yuzu" -w /yuzu yuzuemu/build-environments:linux-fresh /bin/bash /yuzu/.ci/scripts/linux/docker.sh "$1"
+
+# The environment variables listed below:
+# AZURECIREPO TITLEBARFORMATIDLE TITLEBARFORMATRUNNING DISPLAYVERSION
+# are requested in src/common/CMakeLists.txt and appear to be provided somewhere in Azure DevOps
+
+docker run -e AZURECIREPO -e TITLEBARFORMATIDLE -e TITLEBARFORMATRUNNING -e DISPLAYVERSION -e ENABLE_COMPATIBILITY_REPORTING -e CCACHE_DIR=/yuzu/ccache -v "$(pwd):/yuzu" -w /yuzu yuzuemu/build-environments:linux-fresh /bin/bash /yuzu/.ci/scripts/linux/docker.sh "$1"
sudo chown -R $UID ./
diff --git a/.ci/scripts/transifex/docker.sh b/.ci/scripts/transifex/docker.sh
index bafd326f9..05e1a98f5 100755
--- a/.ci/scripts/transifex/docker.sh
+++ b/.ci/scripts/transifex/docker.sh
@@ -16,8 +16,11 @@ cmake --version
gcc -v
tx --version
+# vcpkg needs these: curl zip unzip tar, have tar
+apt-get install -y curl zip unzip
+
mkdir build && cd build
-cmake .. -DENABLE_QT_TRANSLATION=ON -DGENERATE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF
+cmake .. -DENABLE_QT_TRANSLATION=ON -DGENERATE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF -DYUZU_TESTS=OFF -DYUZU_USE_BUNDLED_VCPKG=ON
make translation
cd ..
diff --git a/.ci/scripts/windows/docker.sh b/.ci/scripts/windows/docker.sh
index 5bd5f0b6b..9f34530d6 100755
--- a/.ci/scripts/windows/docker.sh
+++ b/.ci/scripts/windows/docker.sh
@@ -6,10 +6,6 @@ set -e
ccache -sv
-mkdir -p "$HOME/.conan/profiles"
-wget -c "https://github.com/yuzu-emu/build-environments/raw/master/linux-mingw/default" -O "$HOME/.conan/profiles/default"
-wget -c "https://github.com/yuzu-emu/build-environments/raw/master/linux-mingw/settings.yml" -O "$HOME/.conan/settings.yml"
-
mkdir -p build && cd build
export LDFLAGS="-fuse-ld=lld"
# -femulated-tls required due to an incompatibility between GCC and Clang
@@ -24,6 +20,7 @@ cmake .. \
-DUSE_CCACHE=ON \
-DYUZU_USE_BUNDLED_SDL2=OFF \
-DYUZU_USE_EXTERNAL_SDL2=OFF \
+ -DYUZU_TESTS=OFF \
-GNinja
ninja yuzu yuzu-cmd
diff --git a/.ci/scripts/windows/upload.ps1 b/.ci/scripts/windows/upload.ps1
index 62483607b..ac2a38f1d 100644
--- a/.ci/scripts/windows/upload.ps1
+++ b/.ci/scripts/windows/upload.ps1
@@ -25,6 +25,9 @@ $env:BUILD_UPDATE = $MSVC_SEVENZIP
$BUILD_DIR = ".\build\bin\Release"
+# Cleanup unneeded data in submodules
+git submodule foreach git clean -fxd
+
# Upload debugging symbols
mkdir pdb
Get-ChildItem "$BUILD_DIR\" -Recurse -Filter "*.pdb" | Copy-Item -destination .\pdb
@@ -47,6 +50,49 @@ Copy-Item .\CMakeModules -Recurse -Destination $MSVC_SOURCE
7z a -r -ttar $MSVC_SOURCE_TAR $MSVC_SOURCE
7z a -r -txz $MSVC_SOURCE_TARXZ $MSVC_SOURCE_TAR
+# Following section is quick hack to package artifacts differently for GitHub Actions
+if ("$env:GITHUB_ACTIONS" -eq "true") {
+ echo "Hello GitHub Actions"
+
+ # Hopefully there is an exe in either .\build\bin or .\build\bin\Release
+ cp .\build\bin\yuzu*.exe .\artifacts\
+ Copy-Item "$BUILD_DIR\*" -Destination "artifacts" -Recurse
+ Remove-Item .\artifacts\tests.exe -ErrorAction ignore
+
+ # None of the other GHA builds are including source, so commenting out today
+ #Copy-Item $MSVC_SOURCE_TARXZ -Destination "artifacts"
+
+ # Are debug symbols important?
+ # cp .\build\bin\yuzu*.pdb .\pdb\
+
+ # Write out a tag BUILD_TAG to environment for the Upload step
+ # We're getting ${{ github.event.number }} as $env:PR_NUMBER"
+ echo "env:PR_NUMBER: $env:PR_NUMBER"
+ if (Test-Path env:PR_NUMBER) {
+ $PR_NUMBER = $env:PR_NUMBER.Substring(2) -as [int]
+ $PR_NUMBER_TAG = "pr"+([string]$PR_NUMBER).PadLeft(5,'0')
+ if ($PR_NUMBER -gt 1){
+ $BUILD_TAG="verify-$PR_NUMBER_TAG-$GITDATE-$GITREV"
+ } else {
+ $BUILD_TAG = "verify-$GITDATE-$GITREV"
+ }
+ } else {
+ # If env:PR_NUMBER isn't set, we should still write out a variable
+ $BUILD_TAG = "verify-$GITDATE-$GITREV"
+ }
+ echo "BUILD_TAG=$BUILD_TAG"
+ echo "BUILD_TAG=$BUILD_TAG" >> $env:GITHUB_ENV
+
+ # For extra job, just the exe
+ $INDIVIDUAL_EXE = "yuzu-msvc-$BUILD_TAG.exe"
+ echo "INDIVIDUAL_EXE=$INDIVIDUAL_EXE"
+ echo "INDIVIDUAL_EXE=$INDIVIDUAL_EXE" >> $env:GITHUB_ENV
+ echo "Just the exe: $INDIVIDUAL_EXE"
+ cp .\artifacts\yuzu.exe .\$INDIVIDUAL_EXE
+
+
+} else {
+
# Build the final release artifacts
Copy-Item $MSVC_SOURCE_TARXZ -Destination $RELEASE_DIST
Copy-Item "$BUILD_DIR\*" -Destination $RELEASE_DIST -Recurse
@@ -62,3 +108,7 @@ Get-ChildItem "$BUILD_DIR" -Recurse -Filter "QtWebEngineProcess*.exe" | Copy-Ite
Get-ChildItem . -Filter "*.zip" | Copy-Item -destination "artifacts"
Get-ChildItem . -Filter "*.7z" | Copy-Item -destination "artifacts"
Get-ChildItem . -Filter "*.tar.xz" | Copy-Item -destination "artifacts"
+}
+# Extra items
+git status
+cp .\build\src\common\scm_rev.cpp .\artifacts
diff --git a/.ci/templates/build-msvc.yml b/.ci/templates/build-msvc.yml
index cca3189fa..5d2e86179 100644
--- a/.ci/templates/build-msvc.yml
+++ b/.ci/templates/build-msvc.yml
@@ -6,9 +6,7 @@ parameters:
steps:
- script: choco install vulkan-sdk
displayName: 'Install vulkan-sdk'
-- script: python -m pip install --upgrade pip conan
- displayName: 'Install conan'
-- script: refreshenv && mkdir build && cd build && cmake -G "Visual Studio 17 2022" -A x64 -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DYUZU_TESTS=OFF -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DDISPLAY_VERSION=${{ parameters['version'] }} -DCMAKE_BUILD_TYPE=Release .. && cd ..
+- script: refreshenv && mkdir build && cd build && cmake -G "Visual Studio 17 2022" -A x64 -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DYUZU_TESTS=OFF -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DDISPLAY_VERSION=${{ parameters['version'] }} -DCMAKE_BUILD_TYPE=Release -DYUZU_TESTS=OFF -DYUZU_USE_BUNDLED_VCPKG=ON .. && cd ..
displayName: 'Configure CMake'
- task: MSBuild@1
displayName: 'Build'
diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml
index c1886b9f3..887220441 100644
--- a/.github/workflows/verify.yml
+++ b/.github/workflows/verify.yml
@@ -3,6 +3,8 @@ name: 'yuzu verify'
on:
pull_request:
branches: [ master ]
+env:
+ PR_NUMBER: pr${{ github.event.number }}
jobs:
format:
@@ -80,7 +82,6 @@ jobs:
shell: cmd
run: |
choco install vulkan-sdk wget
- python -m pip install --upgrade pip conan
call refreshenv
wget https://github.com/mbitsnbites/buildcache/releases/download/v0.27.6/buildcache-windows.zip
7z x buildcache-windows.zip
@@ -100,7 +101,7 @@ jobs:
run: |
glslangValidator --version
mkdir build
- cmake . -B build -GNinja -DCMAKE_TOOLCHAIN_FILE="CMakeModules/MSVCCache.cmake" -DUSE_CCACHE=ON -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release
+ cmake . -B build -GNinja -DCMAKE_TOOLCHAIN_FILE="CMakeModules/MSVCCache.cmake" -DUSE_CCACHE=ON -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DGIT_BRANCH=pr-verify -DCLANG_FORMAT_SUFFIX=discordplzdontclang -DYUZU_TESTS=OFF -DYUZU_USE_BUNDLED_VCPKG=ON
- name: Build
run: cmake --build build
- name: Cache Summary
@@ -113,3 +114,8 @@ jobs:
with:
name: msvc
path: artifacts/
+ - name: Upload EXE
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ env.INDIVIDUAL_EXE }}
+ path: ${{ env.INDIVIDUAL_EXE }}
diff --git a/.gitmodules b/.gitmodules
index ed533f8d4..3c0d15951 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -34,9 +34,12 @@
[submodule "SDL"]
path = externals/SDL
url = https://github.com/libsdl-org/SDL.git
-[submodule "externals/cpp-httplib"]
+[submodule "cpp-httplib"]
path = externals/cpp-httplib
url = https://github.com/yhirose/cpp-httplib.git
-[submodule "externals/ffmpeg/ffmpeg"]
+[submodule "ffmpeg"]
path = externals/ffmpeg/ffmpeg
url = https://git.ffmpeg.org/ffmpeg.git
+[submodule "vcpkg"]
+ path = externals/vcpkg
+ url = https://github.com/Microsoft/vcpkg.git
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 80a8d4ed8..3f7dcc924 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,6 +35,16 @@ option(YUZU_USE_BUNDLED_OPUS "Compile bundled opus" ON)
option(YUZU_TESTS "Compile tests" ON)
+option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" OFF)
+
+if (YUZU_USE_BUNDLED_VCPKG)
+ include(${CMAKE_SOURCE_DIR}/externals/vcpkg/scripts/buildsystems/vcpkg.cmake)
+elseif(NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "")
+ # Disable manifest mode (use vcpkg classic mode) when using a custom vcpkg installation
+ option(VCPKG_MANIFEST_MODE "")
+ include("$ENV{VCPKG_TOOLCHAIN_FILE}")
+endif()
+
# Default to a Release build
get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if (NOT IS_MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE)
@@ -144,82 +154,34 @@ endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
# System imported libraries
-# If not found, download any missing through Conan
# =======================================================================
-set(CONAN_CMAKE_SILENT_OUTPUT TRUE)
-set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
-if (YUZU_CONAN_INSTALLED)
- if (IS_MULTI_CONFIG)
- include(${CMAKE_BINARY_DIR}/conanbuildinfo_multi.cmake)
- else()
- include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
- endif()
- list(APPEND CMAKE_MODULE_PATH "${CMAKE_BINARY_DIR}")
- list(APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}")
- conan_basic_setup()
- message(STATUS "Adding conan installed libraries to the search path")
-endif()
-macro(yuzu_find_packages)
- set(options FORCE_REQUIRED)
- cmake_parse_arguments(FN "${options}" "" "" ${ARGN})
-
- # Cmake has a *serious* lack of 2D array or associative array...
- # Capitalization matters here. We need the naming to match the generated paths from Conan
- set(REQUIRED_LIBS
- # Cmake Pkg Prefix Version Conan Pkg
- "fmt 8.0.1 fmt/8.1.1"
- "lz4 1.8 lz4/1.9.2"
- "nlohmann_json 3.8 nlohmann_json/3.8.0"
- "ZLIB 1.2 zlib/1.2.11"
- "zstd 1.5 zstd/1.5.0"
- # can't use opus until AVX check is fixed: https://github.com/yuzu-emu/yuzu/pull/4068
- #"opus 1.3 opus/1.3.1"
- )
- if (YUZU_TESTS)
- list(APPEND REQUIRED_LIBS
- "Catch2 2.13.7 catch2/2.13.7"
- )
- endif()
+find_package(fmt 8.0.1 REQUIRED CONFIG)
+find_package(lz4 1.8 REQUIRED)
+find_package(nlohmann_json 3.8 REQUIRED CONFIG)
+find_package(ZLIB 1.2 REQUIRED)
- foreach(PACKAGE ${REQUIRED_LIBS})
- string(REGEX REPLACE "[ \t\r\n]+" ";" PACKAGE_SPLIT ${PACKAGE})
- list(GET PACKAGE_SPLIT 0 PACKAGE_PREFIX)
- list(GET PACKAGE_SPLIT 1 PACKAGE_VERSION)
- list(GET PACKAGE_SPLIT 2 PACKAGE_CONAN)
- # This function is called twice, once to check if the packages exist on the system already
- # and a second time to check if conan installed them properly. The second check passes in FORCE_REQUIRED
- if (NOT ${PACKAGE_PREFIX}_FOUND)
- if (FN_FORCE_REQUIRED)
- find_package(${PACKAGE_PREFIX} ${PACKAGE_VERSION} REQUIRED)
- else()
- find_package(${PACKAGE_PREFIX} ${PACKAGE_VERSION})
- endif()
- endif()
- if (NOT ${PACKAGE_PREFIX}_FOUND)
- list(APPEND CONAN_REQUIRED_LIBS ${PACKAGE_CONAN})
- else()
- # Set a legacy findPackage.cmake style PACKAGE_LIBRARIES variable for subprojects that rely on this
- set(${PACKAGE_PREFIX}_LIBRARIES "${PACKAGE_PREFIX}::${PACKAGE_PREFIX}")
- endif()
- endforeach()
- unset(FN_FORCE_REQUIRED)
-endmacro()
+# Search for config-only package first (for vcpkg), then try non-config
+find_package(zstd 1.5 CONFIG)
+if (NOT zstd_FOUND)
+ find_package(zstd 1.5 REQUIRED)
+endif()
+
+if (YUZU_TESTS)
+ find_package(Catch2 2.13.7 REQUIRED CONFIG)
+endif()
-find_package(Boost 1.73.0 COMPONENTS context headers)
+find_package(Boost 1.73.0 COMPONENTS context)
if (Boost_FOUND)
set(Boost_LIBRARIES Boost::boost)
- # Conditionally add Boost::context only if the active version of the Conan or system Boost package provides it
+ # Conditionally add Boost::context only if the found Boost package provides it
# The old version is missing Boost::context, so we want to avoid adding in that case
# The new version requires adding Boost::context to prevent linking issues
- #
- # This one is used by Conan on subsequent CMake configures, not the first configure.
if (TARGET Boost::context)
list(APPEND Boost_LIBRARIES Boost::context)
endif()
else()
- message(STATUS "Boost 1.79.0 or newer not found, falling back to Conan")
- list(APPEND CONAN_REQUIRED_LIBS "boost/1.79.0")
+ message(FATAL_ERROR "Boost 1.73.0 or newer not found")
endif()
# boost:asio has functions that require AcceptEx et al
@@ -227,19 +189,9 @@ if (MINGW)
find_library(MSWSOCK_LIBRARY mswsock REQUIRED)
endif()
-# Attempt to locate any packages that are required and report the missing ones in CONAN_REQUIRED_LIBS
-yuzu_find_packages()
-
# Qt5 requires that we find components, so it doesn't fit our pretty little find package function
if(ENABLE_QT)
set(QT_VERSION 5.15)
- # We want to load the generated conan qt config so that we get the QT_ROOT var so that we can use the official
- # Qt5Config inside the root folder instead of the conan generated one.
- if(EXISTS ${CMAKE_BINARY_DIR}/qtConfig.cmake)
- include(${CMAKE_BINARY_DIR}/qtConfig.cmake)
- list(APPEND CMAKE_MODULE_PATH "${CONAN_QT_ROOT_RELEASE}")
- list(APPEND CMAKE_PREFIX_PATH "${CONAN_QT_ROOT_RELEASE}")
- endif()
# Check for system Qt on Linux, fallback to bundled Qt
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
@@ -330,9 +282,6 @@ if(ENABLE_QT)
set(YUZU_QT_NO_CMAKE_SYSTEM_PATH)
- # Workaround for an issue where conan tries to build Qt from scratch instead of download prebuilt binaries
- set(QT_PREFIX_HINT)
-
if(YUZU_USE_BUNDLED_QT)
if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
set(QT_BUILD qt-5.15.2-msvc2019_64)
@@ -351,12 +300,12 @@ if(ENABLE_QT)
set(YUZU_QT_NO_CMAKE_SYSTEM_PATH "NO_CMAKE_SYSTEM_PATH")
endif()
if ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") AND YUZU_USE_BUNDLED_QT)
- find_package(Qt5 ${QT_VERSION} REQUIRED COMPONENTS Widgets DBus ${QT_PREFIX_HINT} ${YUZU_QT_NO_CMAKE_SYSTEM_PATH})
+ find_package(Qt5 ${QT_VERSION} REQUIRED COMPONENTS Widgets Concurrent DBus ${QT_PREFIX_HINT} ${YUZU_QT_NO_CMAKE_SYSTEM_PATH})
else()
- find_package(Qt5 ${QT_VERSION} REQUIRED COMPONENTS Widgets ${QT_PREFIX_HINT} ${YUZU_QT_NO_CMAKE_SYSTEM_PATH})
+ find_package(Qt5 ${QT_VERSION} REQUIRED COMPONENTS Widgets Concurrent ${QT_PREFIX_HINT} ${YUZU_QT_NO_CMAKE_SYSTEM_PATH})
endif()
if (YUZU_USE_QT_WEB_ENGINE)
- find_package(Qt5 COMPONENTS WebEngineCore WebEngineWidgets)
+ find_package(Qt5 REQUIRED COMPONENTS WebEngineCore WebEngineWidgets)
endif()
if (ENABLE_QT_TRANSLATION)
@@ -403,71 +352,8 @@ if (ENABLE_SDL2)
endif()
endif()
-# Install any missing dependencies with conan install
-if (CONAN_REQUIRED_LIBS)
- message(STATUS "Packages ${CONAN_REQUIRED_LIBS} not found!")
- # Use Conan to fetch the libraries that aren't found
- # Download conan.cmake automatically, you can also just copy the conan.cmake file
- if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
- message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
- file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/release/0.18/conan.cmake" "${CMAKE_BINARY_DIR}/conan.cmake")
- endif()
- include(${CMAKE_BINARY_DIR}/conan.cmake)
-
- conan_check(VERSION 1.45.0 REQUIRED)
-
- # Manually add iconv to fix a dep conflict between qt and sdl2
- # We don't need to add it through find_package or anything since the other two can find it just fine
- if ("${CONAN_REQUIRED_LIBS}" MATCHES "qt" AND "${CONAN_REQUIRED_LIBS}" MATCHES "sdl")
- list(APPEND CONAN_REQUIRED_LIBS "libiconv/1.16")
- endif()
- if (IS_MULTI_CONFIG)
- conan_cmake_run(REQUIRES ${CONAN_REQUIRED_LIBS}
- OPTIONS ${CONAN_LIB_OPTIONS}
- BUILD missing
- CONFIGURATION_TYPES "Release;Debug"
- GENERATORS cmake_multi cmake_find_package_multi)
- include(${CMAKE_BINARY_DIR}/conanbuildinfo_multi.cmake)
- else()
- conan_cmake_run(REQUIRES ${CONAN_REQUIRED_LIBS}
- OPTIONS ${CONAN_LIB_OPTIONS}
- BUILD missing
- GENERATORS cmake cmake_find_package_multi)
- include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
- endif()
- list(APPEND CMAKE_MODULE_PATH "${CMAKE_BINARY_DIR}")
- list(APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}")
- conan_basic_setup()
-
- set(YUZU_CONAN_INSTALLED TRUE CACHE BOOL "If true, the following builds will add conan to the lib search path" FORCE)
-
- # Now that we've installed what we are missing, try to locate them again,
- # this time with required, so we bail if its not found.
- yuzu_find_packages(FORCE_REQUIRED)
-
- if (NOT Boost_FOUND)
- find_package(Boost 1.73.0 REQUIRED COMPONENTS context headers)
- set(Boost_LIBRARIES Boost::boost)
- # Conditionally add Boost::context only if the active version of the Conan Boost package provides it
- # The old version is missing Boost::context, so we want to avoid adding in that case
- # The new version requires adding Boost::context to prevent linking issues
- if (TARGET Boost::context)
- list(APPEND Boost_LIBRARIES Boost::context)
- endif()
- endif()
-
- # Due to issues with variable scopes in functions, we need to also find_package(qt5) outside of the function
- if(ENABLE_QT)
- list(APPEND CMAKE_MODULE_PATH "${CONAN_QT_ROOT_RELEASE}")
- list(APPEND CMAKE_PREFIX_PATH "${CONAN_QT_ROOT_RELEASE}")
- find_package(Qt5 5.15 REQUIRED COMPONENTS Widgets)
- if (YUZU_USE_QT_WEB_ENGINE)
- find_package(Qt5 REQUIRED COMPONENTS WebEngineCore WebEngineWidgets)
- endif()
- endif()
-
-endif()
-
+# TODO(lat9nq): Determine what if any of this we still need
+#
# Reexport some targets that are named differently when using the upstream CmakeConfig vs the generated Conan config
# In order to ALIAS targets to a new name, they first need to be IMPORTED_GLOBAL
# Dynarmic checks for target `boost` and so we want to make sure it can find it through our system instead of using their external
diff --git a/CMakeModules/CopyYuzuQt5Deps.cmake b/CMakeModules/CopyYuzuQt5Deps.cmake
index dd97f5b2b..0c27d51a6 100644
--- a/CMakeModules/CopyYuzuQt5Deps.cmake
+++ b/CMakeModules/CopyYuzuQt5Deps.cmake
@@ -19,9 +19,6 @@ function(copy_yuzu_Qt5_deps target_dir)
set(IMAGEFORMATS ${DLL_DEST}plugins/imageformats/)
if (MSVC)
windows_copy_files(${target_dir} ${Qt5_DLL_DIR} ${DLL_DEST}
- icudt*.dll
- icuin*.dll
- icuuc*.dll
Qt5Core$<$<CONFIG:Debug>:d>.*
Qt5Gui$<$<CONFIG:Debug>:d>.*
Qt5Widgets$<$<CONFIG:Debug>:d>.*
@@ -37,18 +34,17 @@ function(copy_yuzu_Qt5_deps target_dir)
Qt5Quick$<$<CONFIG:Debug>:d>.*
Qt5QuickWidgets$<$<CONFIG:Debug>:d>.*
Qt5WebChannel$<$<CONFIG:Debug>:d>.*
- Qt5WebEngine$<$<CONFIG:Debug>:d>.*
Qt5WebEngineCore$<$<CONFIG:Debug>:d>.*
Qt5WebEngineWidgets$<$<CONFIG:Debug>:d>.*
QtWebEngineProcess$<$<CONFIG:Debug>:d>.*
)
windows_copy_files(${target_dir} ${Qt5_RESOURCES_DIR} ${DLL_DEST}
- qtwebengine_resources.pak
+ icudtl.dat
qtwebengine_devtools_resources.pak
+ qtwebengine_resources.pak
qtwebengine_resources_100p.pak
qtwebengine_resources_200p.pak
- icudtl.dat
)
endif ()
windows_copy_files(yuzu ${Qt5_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*)
@@ -56,7 +52,7 @@ function(copy_yuzu_Qt5_deps target_dir)
windows_copy_files(yuzu ${Qt5_IMAGEFORMATS_DIR} ${IMAGEFORMATS}
qjpeg$<$<CONFIG:Debug>:d>.*
qgif$<$<CONFIG:Debug>:d>.*
- )
+ )
else()
set(Qt5_DLLS
"${Qt5_DLL_DIR}libQt5Core.so.5"
diff --git a/externals/vcpkg b/externals/vcpkg
new file mode 160000
+Subproject cef0b3ec767df6e83806899fe9525f6cf8d7bc9
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 64bb753e6..d574e4b79 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -185,8 +185,9 @@ create_target_directory_groups(common)
target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile Threads::Threads)
target_link_libraries(common PRIVATE lz4::lz4 xbyak)
-if (MSVC)
+if (TARGET zstd::zstd)
target_link_libraries(common PRIVATE zstd::zstd)
else()
- target_link_libraries(common PRIVATE zstd)
+ target_link_libraries(common PRIVATE
+ $<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>)
endif()
diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp
index 1ec8392e1..4a1d96322 100644
--- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp
+++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp
@@ -87,8 +87,12 @@ u32 GetBytesPerPixel(const Tegra::FramebufferConfig& framebuffer) {
}
std::size_t GetSizeInBytes(const Tegra::FramebufferConfig& framebuffer) {
- return static_cast<std::size_t>(framebuffer.stride) *
- static_cast<std::size_t>(framebuffer.height) * GetBytesPerPixel(framebuffer);
+ // TODO(Rodrigo): Read this from HLE
+ constexpr u32 block_height_log2 = 4;
+ const u32 bytes_per_pixel = GetBytesPerPixel(framebuffer);
+ const u64 size_bytes{Tegra::Texture::CalculateSize(
+ true, bytes_per_pixel, framebuffer.stride, framebuffer.height, 1, block_height_log2, 0)};
+ return size_bytes;
}
VkFormat GetFormat(const Tegra::FramebufferConfig& framebuffer) {
@@ -169,9 +173,8 @@ VkSemaphore BlitScreen::Draw(const Tegra::FramebufferConfig& framebuffer,
// TODO(Rodrigo): Read this from HLE
constexpr u32 block_height_log2 = 4;
const u32 bytes_per_pixel = GetBytesPerPixel(framebuffer);
- const u64 size_bytes{Tegra::Texture::CalculateSize(true, bytes_per_pixel,
- framebuffer.stride, framebuffer.height,
- 1, block_height_log2, 0)};
+ const u64 size_bytes{GetSizeInBytes(framebuffer)};
+
Tegra::Texture::UnswizzleTexture(
mapped_span.subspan(image_offset, size_bytes), std::span(host_ptr, size_bytes),
bytes_per_pixel, framebuffer.width, framebuffer.height, 1, block_height_log2, 0);
diff --git a/vcpkg.json b/vcpkg.json
new file mode 100644
index 000000000..8d3c5919a
--- /dev/null
+++ b/vcpkg.json
@@ -0,0 +1,29 @@
+{
+ "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
+ "name": "yuzu",
+ "version": "1.0",
+ "dependencies": [
+ "boost-algorithm",
+ "boost-asio",
+ "boost-bind",
+ "boost-config",
+ "boost-container",
+ "boost-context",
+ "boost-crc",
+ "boost-functional",
+ "boost-icl",
+ "boost-intrusive",
+ "boost-mpl",
+ "boost-process",
+ "boost-range",
+ "boost-spirit",
+ "boost-test",
+ "boost-timer",
+ "boost-variant",
+ "fmt",
+ "lz4",
+ "nlohmann-json",
+ "zlib",
+ "zstd"
+ ]
+}