From 5de1cb53bbefbc01189d1611faf52342a69db818 Mon Sep 17 00:00:00 2001 From: anon Date: Sat, 26 Oct 2024 16:11:23 +0000 Subject: [PATCH 1/2] update-build-guides (#65) Windows - added summary Overview section for MSVC - consolidated Visual Studio settings screens for C++ etc at the beginning (instead of providing them in the CMake GUI steps if they get an error) - added notes to dependencies, to add them to Windows PATH if they ask for it - moved the MSVC command line section (from the very bottom of the page under the Clion section), to between "dependency installation" and the "GUI method of building" - prioritizing MSVC command line over GUI since it's much shorter and easier if all dependencies are installed correctly - moved/duplicated contents of MSVC "Clone with Git" section into both the "MSVC command line" and "MSVC GUI" sections, so all steps are together for each and not split up - changed some header sizes for better separation - added a large separator bar area between MSVC, MinGW and CLion sections, and smaller separator bar areas between the three main sections of MSVC for readability - added a specific repo-to-use note to the Clion cloning section - corrected repo urls Linux/Debian - added flatpak build section at the top, labeled the existing as native builds - added qttools5-dev and libva-dev to dependency cut and paste (were needed to compile on Debian) - corrected repo url MacOS - removed redundant to-do items - corrected repo url Android - corrected repo url Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/65 Co-authored-by: anon Co-committed-by: anon --- build-for-android.md | 2 +- build-for-linux.md | 51 ++++++++++-- build-for-macos.md | 2 - build-for-windows.md | 194 ++++++++++++++++++++++++++++--------------- 4 files changed, 174 insertions(+), 75 deletions(-) diff --git a/build-for-android.md b/build-for-android.md index f3e8fdc03e..887c6a0e54 100644 --- a/build-for-android.md +++ b/build-for-android.md @@ -14,7 +14,7 @@ ### Cloning yuzu with Git **from Codeberg repo (the `--recursive` option automatically clones the required Git submodules):** ``` -git clone --depth 1 --recursive https://codeberg.org/litucks/torzu.git +git clone --depth 1 --recursive https://notabug.org/litucks/torzu.git cd torzu ``` **from Torzu repo (assuming Tor is installed as a service):** diff --git a/build-for-linux.md b/build-for-linux.md index f11a3b0a51..e9d08b376b 100644 --- a/build-for-linux.md +++ b/build-for-linux.md @@ -1,4 +1,37 @@ -### Dependencies +# Flatpak Build + +Install flatpak and flatpak-builder: + +* Arch / Manjaro: + - `sudo pacman -Syu --needed flatpak flatpak-builder` +* Debian / Ubuntu / Linux Mint: + - `sudo apt-get install flatpak flatpak-builder` +* Fedora: + - `sudo dnf install flatpak flatpak-builder` + +Install flatpak dependencies: + +``` +flatpak install org.kde.Sdk//5.15-23.08 io.qt.qtwebengine.BaseApp//5.15-23.08 +``` +Clone the torzu-flatpak repo and dependencies: +``` +git clone --depth 1 --recursive https://github.com/litucks/onion.torzu_emu.torzu.git +``` +Enter the cloned directory and run build script: +``` +cd onion.torzu_emu.torzu && ./build.sh +``` +Resulting `torzu.flatpak` will be in the same directory as the build script. + +To install: +``` +flatpak install torzu.flatpak +``` + +# Native Builds + +### Dependencies (copy/paste commands provided after) You'll need to download and install the following to build yuzu: @@ -33,13 +66,16 @@ If an ARM64 build is intended, export `VCPKG_FORCE_SYSTEM_BINARIES=1`. Dependencies are listed here as commands that can be copied/pasted. Of course, they should be inspected before being run. - Arch / Manjaro: + - `sudo pacman -Syu --needed base-devel boost catch2 cmake ffmpeg fmt git glslang libzip lz4 mbedtls ninja nlohmann-json openssl opus qt5 sdl2 zlib zstd zip unzip` - Building with QT Web Engine needs to be specified when running CMake with the param `-DCMAKE_CXX_FLAGS="-I/usr/include/qt/QtWebEngineWidgets"` with qt5-webengine installed. - GCC 11 or later is required. -- Ubuntu / Linux Mint / Debian: - - `sudo apt-get install autoconf cmake g++-11 gcc-11 git glslang-tools libasound2 libboost-context-dev libglu1-mesa-dev libhidapi-dev libpulse-dev libtool libudev-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxext-dev libxkbcommon-x11-0 mesa-common-dev nasm ninja-build qtbase5-dev qtbase5-private-dev qtwebengine5-dev qtmultimedia5-dev libmbedtls-dev catch2 libfmt-dev liblz4-dev nlohmann-json3-dev libzstd-dev libssl-dev libavfilter-dev libavcodec-dev libswscale-dev` - - Ubuntu 22.04, Linux Mint 20, or Debian Bullseye or later is required. - - Users need to manually specify building with QT Web Engine enabled. This is done using the parameter `-DYUZU_USE_QT_WEB_ENGINE=ON` when running CMake. + +- Debian / Ubuntu / Linux Mint: + + - `sudo apt-get install autoconf cmake g++-11 gcc-11 git glslang-tools libasound2 libboost-context-dev libglu1-mesa-dev libhidapi-dev libpulse-dev libtool libudev-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxext-dev libxkbcommon-x11-0 libxxhash-dev mesa-common-dev nasm ninja-build qtbase5-dev qtbase5-private-dev qttools5-dev qtwebengine5-dev qtmultimedia5-dev libmbedtls-dev catch2 libfmt-dev liblz4-dev nlohmann-json3-dev libzstd-dev libssl-dev libavfilter-dev libavcodec-dev libswscale-dev libva-dev` + - Debian 11 (Bullseye), Ubuntu 22.04, Linux Mint 20 or later is required. + - Users need to manually specify building with QT Web Engine enabled. This is done using the parameter `-DYUZU_USE_QT_WEB_ENGINE=ON` when running CMake. - Users need to manually specify building with GCC 11. This can be done by adding the parameters `-DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11` when running CMake. i.e. - Users need to manually disable building SDL2 from externals if they intend to use the version provided by their system by adding the parameters `-DYUZU_USE_EXTERNAL_SDL2=OFF` @@ -49,6 +85,7 @@ cmake .. -GNinja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 ``` - Fedora: + - `sudo dnf install autoconf ccache cmake fmt-devel gcc{,-c++} glslang hidapi-devel json-devel libtool libusb1-devel libzstd-devel lz4-devel nasm ninja-build openssl-devel pulseaudio-libs-devel qt5-linguist qt5-qtbase{-private,}-devel qt5-qtwebengine-devel qt5-qtmultimedia-devel speexdsp-devel wayland-devel zlib-devel ffmpeg-devel libXext-devel` - Fedora 32 or later is required. - Due to GCC 12, Fedora 36 or later users need to install `clang`, and configure CMake to use it via `-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang` @@ -56,7 +93,9 @@ cmake .. -GNinja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 - SDL2: `-DYUZU_USE_BUNDLED_SDL2=OFF -DYUZU_USE_EXTERNAL_SDL2=OFF` - FFmpeg: `-DYUZU_USE_EXTERNAL_FFMPEG=OFF` - [RPM Fusion](https://rpmfusion.org/) (free) is required to install `ffmpeg-devel` + - Gentoo: + - **\*\*Disclaimer\*\***: this dependency list was written by a novice Gentoo user who first set it up with a DE, and then based this list off of the Fedora dependency list. This may be missing some requirements, or includes too many. Caveat emptor. - `emerge --ask app-arch/lz4 dev-libs/boost dev-libs/hidapi dev-libs/libzip dev-libs/openssl dev-qt/linguist dev-qt/qtconcurrent dev-qt/qtcore dev-util/cmake dev-util/glslang dev-vcs/git media-libs/alsa-lib media-libs/opus media-sound/pulseaudio media-video/ffmpeg net-libs/mbedtls sys-libs/zlib x11-libs/libXext` - GCC 11 or later is required. @@ -66,7 +105,7 @@ cmake .. -GNinja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 **from Codeberg repo (the `--recursive` option automatically clones the required Git submodules):** ``` -git clone --depth 1 --recursive https://codeberg.org/litucks/torzu.git +git clone --depth 1 --recursive https://notabug.org/litucks/torzu.git cd torzu ``` diff --git a/build-for-macos.md b/build-for-macos.md index a7c90172d1..864957f717 100644 --- a/build-for-macos.md +++ b/build-for-macos.md @@ -16,8 +16,6 @@ cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_USE_BUNDLED_VCPKG=OFF ninja ``` -TODO: use newer vcpkg. This fixes the boost context library, and allows using the web service -TODO: figure out what's up with libusb - TODO: use newer vcpkg. This fixes the boost context library, and allows using the web service - TODO: figure out what's up with libusb diff --git a/build-for-windows.md b/build-for-windows.md index 42d3ac1e59..1e23214c8f 100644 --- a/build-for-windows.md +++ b/build-for-windows.md @@ -1,58 +1,122 @@ -## Method I: MSVC Build for Windows +# Method I: MSVC Build for Windows (MS Visual Studio) -### Minimal Dependencies +### MSVC: Overview -On Windows, all library dependencies are automatically included within the `externals` folder, or can be downloaded on-demand. To build yuzu, you need to install: + * Install Minimal Dependencies (details and setup below) + * Visual Studio Community 2022 + * CMake + * Vulkan SDK + * Python + * Git for Windows + * Build via Command Line (simplest if dependencies are installed correctly) + * (or) Build with GUI Tools (backup graphical interface) - * **[Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/)** - **Make sure to select C++ support in the installer. Make sure to update to the latest version if already installed.** + +### MSVC: Install Minimal Dependencies + +To build torzu on Windows with Visual Studio, you need to install: + + * **[Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/)** + * **Update to the latest version if already installed. (continued below)** ![](https://i.imgur.com/0jwV1hW.png) - * **[CMake](https://cmake.org/download/)** - Used to generate Visual Studio project files. Does not matter if either 32-bit or 64-bit version is installed. + * **Visual Studio 2022 Community (continued)** + * Be sure to select "Desktop development with C++" + * Select the MSVC components outlined in red below (**especially VS 2019 build tools**.) + + ![](https://i.imgur.com/NtSnqjm.png) + + ![](https://i.imgur.com/YLr1Qw2.png) + + * **[CMake](https://cmake.org/download/)** - Used to generate Visual Studio project files. Choose 32-bit or 64-bit according to your system. + * **If it asks to be added to your system PATH, say YES.** ![](https://i.imgur.com/7pteS6d.png) - * **[Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows)** - **Make sure to select Latest SDK.** + * **[Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows)** - Make sure to select Latest SDK. + * **If it asks to be added to your system PATH, say YES.** ![](https://i.imgur.com/aHCJxsR.png) - * **[Python](https://www.python.org/downloads/windows/)** - Select latest stable Windows installer. Does not matter if either 32-bit or 64-bit version is installed. + * **[Python](https://www.python.org/downloads/windows/)** - Select latest stable Windows installer. Choose 32-bit or 64-bit according to your system. + * **If it asks to be added to your system PATH, say YES.** ![](https://i.imgur.com/xIEuM6R.png) - * **Git** - We recommend [Git for Windows](https://gitforwindows.org). + * **[Git for Windows](https://gitforwindows.org)** - (see next step) ![](https://i.imgur.com/UeSzkBw.png) - * While installing Git Bash, you should tell it to include Git in your system path. (Choose the "Git from the command line and also from 3rd-party software" option.) If you missed that, don't worry, you'll just have to manually tell CMake where your git.exe is, since it's used to include version info into the built executable. + * When installing Git, include it in your system PATH by choosing the "**Git from the command line and also from 3rd-party software**" option. ![](https://i.imgur.com/x0rRs1t.png) -### Cloning yuzu with Git + * **REBOOT YOUR SYSTEM, to be sure all dependencies are registered before proceeding.** -**from Codeberg repo (the `--recursive` option automatically clones the required Git submodules):** +--- +--- + +## MSVC: Build from the Command Line + +* Open a command line (cmd.exe), navigate to a directory where you want to download the repo, then pick one option to clone into a subdirectory named "torzu": + +**from Notabug repo:** ``` -git clone --depth 1 --recursive https://codeberg.org/litucks/torzu.git -cd torzu +git clone --depth 1 https://notabug.org/litucks/torzu.git ``` **from Torzu repo (assuming Tor is installed as a service):** ``` git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git +``` + +* Assuming all dependencies were installed correctly, you should be able to continue from the above `git clone` and run the following commands to build: + +``` +cd torzu +git submodule update --init --recursive +mkdir build +cd build +cmake .. -G "Visual Studio 17 2022" -A x64 -DYUZU_TESTS=OFF +cmake --build . --config Release +``` +* You'll find the resulting files in the `build/bin/Release` folder. To make it a portable install with all AppData files local to the torzu folder, add a "user" folder: +``` +cd bin +cd Release +mkdir user +``` + +* **ERRORS:** If you get an error after running the first cmake command (such as a missing library or CMakeLists.txt), first try running `git submodule update --init --recursive` from inside "torzu" folder again. If that doesn't work, try deleting the whole "torzu" folder and recloning via git from the beginning (as sometimes submodules will be incomplete without throwing an error.) + +--- +--- + +## MSVC: Build with GUI Tools (Graphical Interface) + +* Open a command line (cmd.exe), navigate to a directory where you want to download the repo, then pick one option to clone into a subdirectory named "torzu": + +**from Notabug repo:** +``` +git clone --depth 1 https://notabug.org/litucks/torzu.git +``` +**from Torzu repo (assuming Tor is installed as a service):** +``` +git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git +``` +then download dependencies with: +``` cd torzu git submodule update --init --recursive ``` - ![](https://i.imgur.com/CcxIAht.png) + -* *(Note: yuzu by default downloads to `C:\Users\\yuzu` (Master) or `C:\Users\\yuzu-mainline` (Mainline)* - -### Building - -* Open the CMake GUI application and point it to the `torzu` directory. +* Open the CMake GUI application and point it to the `torzu` directory (instead of `yuzu-canary`). ![](https://i.imgur.com/qOslIWv.png) -* For the build directory, use a `/build` subdirectory inside the source directory or some other directory of your choice. (Tell CMake to create it.) +* Use a `/build` subdirectory inside the `torzu` directory or some other directory of your choice. (Tell CMake to create it.) ![](https://i.imgur.com/cNnhs22.png) ![](https://github.com/yuzu-emu/yuzu/assets/20753089/738efcab-0da6-44ce-889d-becf3712db10) @@ -63,27 +127,23 @@ git submodule update --init --recursive * *(Note: If you used GitHub's own app to clone, run `git submodule update --init --recursive` to get the remaining dependencies)* -* If you get an error about missing packages, enable `YUZU_USE_BUNDLED_VCPKG`, and then click Configure again. +* **ERRORS:** If you get an error about missing packages, enable `YUZU_USE_BUNDLED_VCPKG`, and then click Configure again. * *(You may also want to disable `YUZU_TESTS` in this case since Catch2 is not yet supported with this.)* ![](https://user-images.githubusercontent.com/22451773/180585999-07316d6e-9751-4d11-b957-1cf57cd7cd58.png) -* If you get an error "Unable to find a valid Visual Studio instance", make sure that you installed following MSVC components (**especially VS 2019 build tools**.) and then try again. - - ![](https://i.imgur.com/NtSnqjm.png) - - ![](https://i.imgur.com/YLr1Qw2.png) +* **ERRORS:** If you get an error "Unable to find a valid Visual Studio instance", make sure that you installed the required MSVC components displayed above (**especially VS 2019 build tools**) and then try again. * Click "Generate" to create the project files. ![](https://i.imgur.com/5LKg92k.png) -* Open the solution file `yuzu.sln` in Visual Studio 2022, which is located in the build folder. +* Open the solution file `yuzu.sln` in Visual Studio 2022, which is located in the `build` directory. ![](https://i.imgur.com/208yMml.png) -* Depending if you want a graphical user interface or not (`yuzu` has the graphical user interface, while `yuzu-cmd` doesn't), select `yuzu` or `yuzu-cmd` in the Solution Explorer, right-click and `Set as StartUp Project`. +* Select `yuzu` in the Solution Explorer, right-click and `Set as StartUp Project` (the yuzu, yuzu-cmd and yuzu-room executables will all be built.) ![](https://i.imgur.com/nPMajnn.png) ![](https://i.imgur.com/BDMLzRZ.png) @@ -95,24 +155,32 @@ git submodule update --init --recursive ![](https://i.imgur.com/CkQgOFW.png) -* After build completed you can find the Torzu executable in directory specified in output log. +* After build completed you can find the Torzu program files in a directory specified in the output log (usually `build\bin\Release`.) ![](https://i.imgur.com/h78ugDN.png) +--- +--- +--- +--- +--- -## Method II: MinGW-w64 Build with MSYS2 +# Method II: MinGW-w64 Build with MSYS2 -### Prerequisites to install +## Prerequisites to install * [MSYS2](https://www.msys2.org) * [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows) - **Make sure to select Latest SDK.** * Make sure to follow the instructions and update to the latest version by running `pacman -Syu` as many times as needed. -### Install other dependencies +## Install other dependencies * Open the `MSYS2 MinGW 64-bit` (mingw64.exe) shell + +![](https://i.imgur.com/uZ33O7u.png) + * Download and install all dependencies using: `pacman -Syu git make mingw-w64-x86_64-SDL2 mingw-w64-x86_64-cmake mingw-w64-x86_64-qt5 mingw-w64-x86_64-toolchain` -### Setup environment variables +## Setup environment variables ``` export PATH=":$PATH" export VCPKG_DEFAULT_HOST_TRIPLET=x64-mingw-static @@ -121,29 +189,34 @@ export VCPKG_DEFAULT_TRIPLET=x64-mingw-static We have to manually set some VCPKG variables for some reason. This issue probably already exists in the original Yuzu. -### Clone the yuzu repository with Git +## Clone the torzu repository with Git -**from NotABug repo (the `--recursive` option automatically clones the required Git submodules):** +Navigate to a directory where you want the repo, then use one option below to clone into a subdirectory named "torzu": + + + +**from NotABug repo:** ``` -git clone --depth 1 --recursive https://notabug.org/litucks/torzu.git -cd torzu -git submodule update --init --recursive +git clone --depth 1 https://notabug.org/litucks/torzu.git ``` **from Torzu repo (assuming Tor is installed as a service):** ``` git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git +``` +then download the submodule dependencies with: +``` cd torzu -git submodule update --init --recursive +git submodule update --init --recursive ``` -### Generating makefile +## Generating makefile ``` mkdir build && cd build cmake -G "MSYS Makefiles" -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF -DVCPKG_TARGET_TRIPLET=x64-mingw-static .. ``` `DVCPKG_TARGET_TRIPLET` has to be overriden to `x64-mingw-static` here to generate a static build that doesn't require extra DLLs to be packaged. -### Build yuzu +## Build torzu ``` make -j$(nproc) yuzu ``` @@ -170,32 +243,41 @@ Please note that `-lw2_32` is already added, but the order is not correct and he Now the built executable should work properly. Repeating step 4 should build `yuzu-cmd` as well. Some DLLs (e.g., Qt) are still required as they cannot being linked statically. Copying those DLLs from the latest release is one option. -### Building without Qt (Optional) +## Building without Qt (Optional) Doesn't require the rather large Qt dependency, but you will lack a GUI frontend: * Pass the `-DENABLE_QT=NO` flag to cmake -## Method III: CLion Environment Setup +--- +--- +--- +--- +--- -### Minimal Dependencies +# Method III: CLion Environment Setup + +## Minimal Dependencies To build yuzu, you need to install the following: * [CLion](https://www.jetbrains.com/clion/) - This IDE is not free; for a free alternative, check Method I * [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows) - Make sure to select the Latest SDK. -### Cloning yuzu with CLion +## Cloning yuzu with CLion * Clone the Repository: ![1](https://user-images.githubusercontent.com/42481638/216899046-0d41d7d6-8e4d-4ed2-9587-b57088af5214.png) + +* using `https://notabug.org/litucks/torzu.git` (instead of the shown yuzu repo): + ![2](https://user-images.githubusercontent.com/42481638/216899061-b2ea274a-e88c-40ae-bf0b-4450b46e9fea.png) ![3](https://user-images.githubusercontent.com/42481638/216899076-0e5988c4-d431-4284-a5ff-9ecff973db76.png) -### Building & Setup +## Building & Setup * Once Cloned, You will be taken to a prompt like the image below: @@ -220,23 +302,3 @@ To build yuzu, you need to install the following: ![7](https://user-images.githubusercontent.com/42481638/216899275-d514ec6a-e563-470e-81e2-3e04f0429b68.png) -## Building from the command line with MSVC - -**from Codeberg repo (the `--recursive` option automatically clones the required Git submodules):** -``` -git clone --depth 1 --recursive https://codeberg.org/litucks/torzu.git -cd torzu -``` -**from Torzu repo (assuming Tor is installed as a service):** -``` -git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git -cd torzu -git submodule update --init --recursive -``` -followed by: -``` -mkdir build -cd build -cmake .. -G "Visual Studio 17 2022" -A x64 -cmake --build . --config Release -``` \ No newline at end of file From 9efce7107229ce53b1b31dda4ccc8596a03f2267 Mon Sep 17 00:00:00 2001 From: lui Date: Sun, 3 Nov 2024 12:25:47 +0000 Subject: [PATCH 2/2] externals: update fmt to 11.0.2 and vcpkg to 2024.09.30 (#68) Updated to fmt 11 with the required source changes for it to work. Also updated vcpkg for this, and as an added benefit it fixes the `Unable to find a valid Visual Studio instance` error, and the VS 2019 build tools are no longer required. Just make sure to delete the existing downloaded vcpkg tool and binaries in `externals/vcpkg` if you have compiled before, or else it will continue to use the old version and give the error. Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/68 Co-authored-by: lui Co-committed-by: lui --- CMakeLists.txt | 2 +- externals/fmt | 2 +- externals/vcpkg | 2 +- src/common/logging/formatter.h | 4 ++-- src/common/typed_address.h | 6 +++--- src/core/arm/dynarmic/dynarmic_cp15.cpp | 2 +- src/core/debugger/gdbstub.cpp | 1 + src/core/hle/service/nfc/common/device.cpp | 2 +- src/core/hle/service/psc/time/common.h | 8 ++++---- src/shader_recompiler/backend/glasm/reg_alloc.h | 14 +++++++------- src/shader_recompiler/frontend/ir/attribute.h | 2 +- src/shader_recompiler/frontend/ir/condition.h | 2 +- src/shader_recompiler/frontend/ir/flow_test.h | 2 +- src/shader_recompiler/frontend/ir/opcodes.h | 4 ++-- src/shader_recompiler/frontend/ir/pred.h | 2 +- src/shader_recompiler/frontend/ir/reg.h | 2 +- src/shader_recompiler/frontend/ir/type.h | 2 +- src/shader_recompiler/frontend/maxwell/location.h | 2 +- src/shader_recompiler/frontend/maxwell/opcodes.h | 2 +- src/video_core/renderer_vulkan/renderer_vulkan.cpp | 2 +- src/video_core/texture_cache/formatter.h | 10 +++++----- src/yuzu/main.cpp | 2 +- vcpkg.json | 4 ++-- 23 files changed, 41 insertions(+), 40 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fdc15d7e6..097b79e7a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -298,7 +298,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) # Enforce the search mode of non-required packages for better and shorter failure messages find_package(Boost 1.79.0 REQUIRED context) find_package(enet 1.3 MODULE) -find_package(fmt 9 REQUIRED) +find_package(fmt 11 REQUIRED) find_package(LLVM 17.0.2 MODULE COMPONENTS Demangle) find_package(lz4 REQUIRED) find_package(nlohmann_json 3.8 REQUIRED) diff --git a/externals/fmt b/externals/fmt index e69e5f977d..0c9fce2ffe 160000 --- a/externals/fmt +++ b/externals/fmt @@ -1 +1 @@ -Subproject commit e69e5f977d458f2650bb346dadf2ad30c5320281 +Subproject commit 0c9fce2ffefecfdce794e1859584e25877b7b592 diff --git a/externals/vcpkg b/externals/vcpkg index a42af01b72..c82f746672 160000 --- a/externals/vcpkg +++ b/externals/vcpkg @@ -1 +1 @@ -Subproject commit a42af01b72c28a8e1d7b48107b33e4f286a55ef6 +Subproject commit c82f74667287d3dc386bce81e44964370c91a289 diff --git a/src/common/logging/formatter.h b/src/common/logging/formatter.h index 88e55505de..30948ce72b 100644 --- a/src/common/logging/formatter.h +++ b/src/common/logging/formatter.h @@ -12,9 +12,9 @@ #if FMT_VERSION >= 80100 template struct fmt::formatter, char>> - : formatter> { + : fmt::formatter> { template - auto format(const T& value, FormatContext& ctx) -> decltype(ctx.out()) { + auto format(const T& value, FormatContext& ctx) const -> decltype(ctx.out()) { return fmt::formatter>::format( static_cast>(value), ctx); } diff --git a/src/common/typed_address.h b/src/common/typed_address.h index d5e743583d..a1deb89a04 100644 --- a/src/common/typed_address.h +++ b/src/common/typed_address.h @@ -262,7 +262,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Common::PhysicalAddress& addr, FormatContext& ctx) { + auto format(const Common::PhysicalAddress& addr, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{:#x}", static_cast(addr.GetValue())); } }; @@ -273,7 +273,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Common::ProcessAddress& addr, FormatContext& ctx) { + auto format(const Common::ProcessAddress& addr, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{:#x}", static_cast(addr.GetValue())); } }; @@ -284,7 +284,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Common::VirtualAddress& addr, FormatContext& ctx) { + auto format(const Common::VirtualAddress& addr, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{:#x}", static_cast(addr.GetValue())); } }; diff --git a/src/core/arm/dynarmic/dynarmic_cp15.cpp b/src/core/arm/dynarmic/dynarmic_cp15.cpp index f3eee0d42a..ee97ac6395 100644 --- a/src/core/arm/dynarmic/dynarmic_cp15.cpp +++ b/src/core/arm/dynarmic/dynarmic_cp15.cpp @@ -22,7 +22,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Dynarmic::A32::CoprocReg& reg, FormatContext& ctx) { + auto format(const Dynarmic::A32::CoprocReg& reg, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "cp{}", static_cast(reg)); } }; diff --git a/src/core/debugger/gdbstub.cpp b/src/core/debugger/gdbstub.cpp index 80091cc7e0..34b0b7d2b3 100644 --- a/src/core/debugger/gdbstub.cpp +++ b/src/core/debugger/gdbstub.cpp @@ -9,6 +9,7 @@ #include #include +#include #include "common/hex_util.h" #include "common/logging/log.h" diff --git a/src/core/hle/service/nfc/common/device.cpp b/src/core/hle/service/nfc/common/device.cpp index 28e3000bd9..96c45b1b51 100644 --- a/src/core/hle/service/nfc/common/device.cpp +++ b/src/core/hle/service/nfc/common/device.cpp @@ -14,7 +14,7 @@ #pragma warning(pop) #endif -#include +#include #include "common/fs/file.h" #include "common/fs/fs.h" diff --git a/src/core/hle/service/psc/time/common.h b/src/core/hle/service/psc/time/common.h index 3e13144a0d..ffa7d9ee3c 100644 --- a/src/core/hle/service/psc/time/common.h +++ b/src/core/hle/service/psc/time/common.h @@ -167,7 +167,7 @@ constexpr inline Result GetSpanBetweenTimePoints(s64* out_seconds, const SteadyC template <> struct fmt::formatter : fmt::formatter { template - auto format(Service::PSC::Time::TimeType type, FormatContext& ctx) { + auto format(Service::PSC::Time::TimeType type, FormatContext& ctx) const { const string_view name = [type] { using Service::PSC::Time::TimeType; switch (type) { @@ -180,7 +180,7 @@ struct fmt::formatter : fmt::formatter::format(name, ctx); + return fmt::formatter::format(name, ctx); } }; @@ -228,7 +228,7 @@ template <> struct fmt::formatter : fmt::formatter { template auto format(const Service::PSC::Time::LocationName& name, FormatContext& ctx) const { - return formatter::format(name.data(), ctx); + return fmt::formatter::format(name.data(), ctx); } }; @@ -236,7 +236,7 @@ template <> struct fmt::formatter : fmt::formatter { template auto format(const Service::PSC::Time::RuleVersion& version, FormatContext& ctx) const { - return formatter::format(version.data(), ctx); + return fmt::formatter::format(version.data(), ctx); } }; diff --git a/src/shader_recompiler/backend/glasm/reg_alloc.h b/src/shader_recompiler/backend/glasm/reg_alloc.h index bd6e2d929c..207a075f19 100644 --- a/src/shader_recompiler/backend/glasm/reg_alloc.h +++ b/src/shader_recompiler/backend/glasm/reg_alloc.h @@ -184,7 +184,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(Shader::Backend::GLASM::Id id, FormatContext& ctx) { + auto format(Shader::Backend::GLASM::Id id, FormatContext& ctx) const { return Shader::Backend::GLASM::FormatTo(ctx, id); } }; @@ -195,7 +195,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::Backend::GLASM::Register& value, FormatContext& ctx) { + auto format(const Shader::Backend::GLASM::Register& value, FormatContext& ctx) const { if (value.type != Shader::Backend::GLASM::Type::Register) { throw Shader::InvalidArgument("Register value type is not register"); } @@ -209,7 +209,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::Backend::GLASM::ScalarRegister& value, FormatContext& ctx) { + auto format(const Shader::Backend::GLASM::ScalarRegister& value, FormatContext& ctx) const { if (value.type != Shader::Backend::GLASM::Type::Register) { throw Shader::InvalidArgument("Register value type is not register"); } @@ -223,7 +223,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::Backend::GLASM::ScalarU32& value, FormatContext& ctx) { + auto format(const Shader::Backend::GLASM::ScalarU32& value, FormatContext& ctx) const { switch (value.type) { case Shader::Backend::GLASM::Type::Void: break; @@ -244,7 +244,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::Backend::GLASM::ScalarS32& value, FormatContext& ctx) { + auto format(const Shader::Backend::GLASM::ScalarS32& value, FormatContext& ctx) const { switch (value.type) { case Shader::Backend::GLASM::Type::Void: break; @@ -265,7 +265,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::Backend::GLASM::ScalarF32& value, FormatContext& ctx) { + auto format(const Shader::Backend::GLASM::ScalarF32& value, FormatContext& ctx) const { switch (value.type) { case Shader::Backend::GLASM::Type::Void: break; @@ -286,7 +286,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::Backend::GLASM::ScalarF64& value, FormatContext& ctx) { + auto format(const Shader::Backend::GLASM::ScalarF64& value, FormatContext& ctx) const { switch (value.type) { case Shader::Backend::GLASM::Type::Void: break; diff --git a/src/shader_recompiler/frontend/ir/attribute.h b/src/shader_recompiler/frontend/ir/attribute.h index 5f039b6f65..407a1f4bc1 100644 --- a/src/shader_recompiler/frontend/ir/attribute.h +++ b/src/shader_recompiler/frontend/ir/attribute.h @@ -250,7 +250,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::IR::Attribute& attribute, FormatContext& ctx) { + auto format(const Shader::IR::Attribute& attribute, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(attribute)); } }; diff --git a/src/shader_recompiler/frontend/ir/condition.h b/src/shader_recompiler/frontend/ir/condition.h index 1cad46b9b9..0b77b6590b 100644 --- a/src/shader_recompiler/frontend/ir/condition.h +++ b/src/shader_recompiler/frontend/ir/condition.h @@ -52,7 +52,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::IR::Condition& cond, FormatContext& ctx) { + auto format(const Shader::IR::Condition& cond, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(cond)); } }; diff --git a/src/shader_recompiler/frontend/ir/flow_test.h b/src/shader_recompiler/frontend/ir/flow_test.h index 88f7c9e82e..f758d13127 100644 --- a/src/shader_recompiler/frontend/ir/flow_test.h +++ b/src/shader_recompiler/frontend/ir/flow_test.h @@ -55,7 +55,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::IR::FlowTest& flow_test, FormatContext& ctx) { + auto format(const Shader::IR::FlowTest& flow_test, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(flow_test)); } }; diff --git a/src/shader_recompiler/frontend/ir/opcodes.h b/src/shader_recompiler/frontend/ir/opcodes.h index e300714f3a..767c5ae15a 100644 --- a/src/shader_recompiler/frontend/ir/opcodes.h +++ b/src/shader_recompiler/frontend/ir/opcodes.h @@ -54,7 +54,7 @@ constexpr Type F64x2{Type::F64x2}; constexpr Type F64x3{Type::F64x3}; constexpr Type F64x4{Type::F64x4}; -constexpr OpcodeMeta META_TABLE[]{ +constexpr OpcodeMeta META_TABLE[] { #define OPCODE(name_token, type_token, ...) \ { \ .name{#name_token}, \ @@ -103,7 +103,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::IR::Opcode& op, FormatContext& ctx) { + auto format(const Shader::IR::Opcode& op, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(op)); } }; diff --git a/src/shader_recompiler/frontend/ir/pred.h b/src/shader_recompiler/frontend/ir/pred.h index a77c1e2a7a..f3f92b063a 100644 --- a/src/shader_recompiler/frontend/ir/pred.h +++ b/src/shader_recompiler/frontend/ir/pred.h @@ -33,7 +33,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::IR::Pred& pred, FormatContext& ctx) { + auto format(const Shader::IR::Pred& pred, FormatContext& ctx) const { if (pred == Shader::IR::Pred::PT) { return fmt::format_to(ctx.out(), "PT"); } else { diff --git a/src/shader_recompiler/frontend/ir/reg.h b/src/shader_recompiler/frontend/ir/reg.h index f7cb716a97..610492759d 100644 --- a/src/shader_recompiler/frontend/ir/reg.h +++ b/src/shader_recompiler/frontend/ir/reg.h @@ -319,7 +319,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::IR::Reg& reg, FormatContext& ctx) { + auto format(const Shader::IR::Reg& reg, FormatContext& ctx) const { if (reg == Shader::IR::Reg::RZ) { return fmt::format_to(ctx.out(), "RZ"); } else if (static_cast(reg) >= 0 && static_cast(reg) < 255) { diff --git a/src/shader_recompiler/frontend/ir/type.h b/src/shader_recompiler/frontend/ir/type.h index 04c8c4ddbe..17b520c6dd 100644 --- a/src/shader_recompiler/frontend/ir/type.h +++ b/src/shader_recompiler/frontend/ir/type.h @@ -54,7 +54,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::IR::Type& type, FormatContext& ctx) { + auto format(const Shader::IR::Type& type, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{}", NameOf(type)); } }; diff --git a/src/shader_recompiler/frontend/maxwell/location.h b/src/shader_recompiler/frontend/maxwell/location.h index 0c0477e2db..0dd16723a2 100644 --- a/src/shader_recompiler/frontend/maxwell/location.h +++ b/src/shader_recompiler/frontend/maxwell/location.h @@ -102,7 +102,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::Maxwell::Location& location, FormatContext& ctx) { + auto format(const Shader::Maxwell::Location& location, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{:04x}", location.Offset()); } }; diff --git a/src/shader_recompiler/frontend/maxwell/opcodes.h b/src/shader_recompiler/frontend/maxwell/opcodes.h index 72dd143c2a..b3a493ff6a 100644 --- a/src/shader_recompiler/frontend/maxwell/opcodes.h +++ b/src/shader_recompiler/frontend/maxwell/opcodes.h @@ -23,7 +23,7 @@ struct fmt::formatter { return ctx.begin(); } template - auto format(const Shader::Maxwell::Opcode& opcode, FormatContext& ctx) { + auto format(const Shader::Maxwell::Opcode& opcode, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{}", NameOf(opcode)); } }; diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 364e8bdcc4..ce78ab16a7 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include "common/logging/log.h" #include "common/polyfill_ranges.h" diff --git a/src/video_core/texture_cache/formatter.h b/src/video_core/texture_cache/formatter.h index cabbfcb2dd..89f290fd5f 100644 --- a/src/video_core/texture_cache/formatter.h +++ b/src/video_core/texture_cache/formatter.h @@ -13,7 +13,7 @@ template <> struct fmt::formatter : fmt::formatter { template - auto format(VideoCore::Surface::PixelFormat format, FormatContext& ctx) { + auto format(VideoCore::Surface::PixelFormat format, FormatContext& ctx) const { using VideoCore::Surface::PixelFormat; const string_view name = [format] { switch (format) { @@ -227,14 +227,14 @@ struct fmt::formatter : fmt::formatter::format(name, ctx); + return fmt::formatter::format(name, ctx); } }; template <> struct fmt::formatter : fmt::formatter { template - auto format(VideoCommon::ImageType type, FormatContext& ctx) { + auto format(VideoCommon::ImageType type, FormatContext& ctx) const { const string_view name = [type] { using VideoCommon::ImageType; switch (type) { @@ -251,7 +251,7 @@ struct fmt::formatter : fmt::formatter } return "Invalid"; }(); - return formatter::format(name, ctx); + return fmt::formatter::format(name, ctx); } }; @@ -262,7 +262,7 @@ struct fmt::formatter { } template - auto format(const VideoCommon::Extent3D& extent, FormatContext& ctx) { + auto format(const VideoCommon::Extent3D& extent, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{{{}, {}, {}}}", extent.width, extent.height, extent.depth); } diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 4b160223cd..51a10a3e77 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -92,7 +92,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual #include // For SDL ScreenSaver functions #endif -#include +#include #include "common/detached_tasks.h" #include "common/fs/fs.h" #include "common/fs/path_util.h" diff --git a/vcpkg.json b/vcpkg.json index a9e895153e..3cb38cdbf9 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "yuzu", - "builtin-baseline": "a42af01b72c28a8e1d7b48107b33e4f286a55ef6", + "builtin-baseline": "c82f74667287d3dc386bce81e44964370c91a289", "version": "1.0", "dependencies": [ "boost-algorithm", @@ -59,7 +59,7 @@ }, { "name": "fmt", - "version": "10.1.1" + "version": "11.0.2" } ] }