forked from eden-emu/eden
[compat] Solaris build fixes for openssl, catch2; NetBSD build fixes (#2752)
Signed-off-by: lizzie <lizzie@eden-emu.dev> Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: eden-emu/eden#2752 Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
1c90b099d3
commit
3e8fe622a7
22 changed files with 247 additions and 100 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -10,6 +10,12 @@ doc-build/
|
|||
AppDir/
|
||||
uruntime
|
||||
|
||||
# dtrace and ktrace stuffs
|
||||
[dk]trace-out/
|
||||
[dk]trace.out
|
||||
*.core
|
||||
log.txt
|
||||
|
||||
# Generated source files
|
||||
src/common/scm_rev.cpp
|
||||
dist/english_plurals/generated_en.ts
|
||||
|
|
12
.patch/catch2/0001-solaris-isnan-fix.patch
Normal file
12
.patch/catch2/0001-solaris-isnan-fix.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff --git a/src/catch2/matchers/catch_matchers_floating_point.cpp b/src/catch2/matchers/catch_matchers_floating_point.cpp
|
||||
index fc7b444..0e1a3c2 100644
|
||||
--- a/src/catch2/matchers/catch_matchers_floating_point.cpp
|
||||
+++ b/src/catch2/matchers/catch_matchers_floating_point.cpp
|
||||
@@ -5,6 +5,7 @@
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
+#include <catch2/internal/catch_polyfills.hpp>
|
||||
#include <catch2/matchers/catch_matchers_floating_point.hpp>
|
||||
#include <catch2/internal/catch_enforce.hpp>
|
||||
#include <catch2/internal/catch_polyfills.hpp>
|
25
.patch/libusb/0001-netbsd-gettime.patch
Normal file
25
.patch/libusb/0001-netbsd-gettime.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
diff --git a/libusb/os/netbsd_usb.c b/libusb/os/netbsd_usb.c
|
||||
index a9a50b2..56e681b 100644
|
||||
--- a/libusb/os/netbsd_usb.c
|
||||
+++ b/libusb/os/netbsd_usb.c
|
||||
@@ -580,6 +580,20 @@ _access_endpoint(struct libusb_transfer *transfer)
|
||||
return hpriv->endpoints[endpt];
|
||||
}
|
||||
|
||||
+void usbi_get_monotonic_time(struct timespec *tp) {
|
||||
+ struct timeval tv;
|
||||
+ gettimeofday(&tv, NULL);
|
||||
+ tp->tv_sec = tv.tv_sec;
|
||||
+ tp->tv_nsec = tv.tv_usec * 1000ull;
|
||||
+}
|
||||
+
|
||||
+void usbi_get_real_time(struct timespec *tp) {
|
||||
+ struct timeval tv;
|
||||
+ gettimeofday(&tv, NULL);
|
||||
+ tp->tv_sec = tv.tv_sec;
|
||||
+ tp->tv_nsec = tv.tv_usec * 1000ull;
|
||||
+}
|
||||
+
|
||||
int
|
||||
_sync_gen_transfer(struct usbi_transfer *itransfer)
|
||||
{
|
14
.patch/spirv-tools/0001-netbsd-fix.patch
Normal file
14
.patch/spirv-tools/0001-netbsd-fix.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
|
||||
index eb4e69e..3155805 100644
|
||||
--- a/external/CMakeLists.txt
|
||||
+++ b/external/CMakeLists.txt
|
||||
@@ -72,7 +72,8 @@ if (SPIRV_TOOLS_USE_MIMALLOC)
|
||||
pop_variable(MI_BUILD_TESTS)
|
||||
endif()
|
||||
|
||||
-if (DEFINED SPIRV-Headers_SOURCE_DIR)
|
||||
+# NetBSD doesn't have SPIRV-Headers readily available on system
|
||||
+if (DEFINED SPIRV-Headers_SOURCE_DIR AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "NetBSD")
|
||||
# This allows flexible position of the SPIRV-Headers repo.
|
||||
set(SPIRV_HEADER_DIR ${SPIRV-Headers_SOURCE_DIR})
|
||||
else()
|
|
@ -11,6 +11,8 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
|||
set(PLATFORM_FREEBSD ON)
|
||||
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
|
||||
set(PLATFORM_OPENBSD ON)
|
||||
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "NetBSD")
|
||||
set(PLATFORM_NETBSD ON)
|
||||
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
set(PLATFORM_LINUX ON)
|
||||
endif()
|
||||
|
@ -41,8 +43,7 @@ if (PLATFORM_SUN)
|
|||
list(APPEND CMAKE_PREFIX_PATH "/usr/lib/qt/6.6/lib/amd64/cmake")
|
||||
list(APPEND CMAKE_MODULE_PATH "/usr/lib/qt/6.6/lib/amd64/cmake")
|
||||
|
||||
# amazing
|
||||
# absolutely incredible
|
||||
# Amazing - absolutely incredible
|
||||
list(APPEND CMAKE_PREFIX_PATH "/usr/lib/amd64/cmake")
|
||||
list(APPEND CMAKE_MODULE_PATH "/usr/lib/amd64/cmake")
|
||||
|
||||
|
@ -63,6 +64,15 @@ if (PLATFORM_OPENBSD)
|
|||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/X11R6/include")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/X11R6/include")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/X11R6/lib")
|
||||
elseif (PLATFORM_NETBSD)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/X11R7/include")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/X11R7/include")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/X11R7/lib")
|
||||
endif()
|
||||
|
||||
# NetBSD: Fun for the whole family!
|
||||
if (PLATFORM_NETBSD)
|
||||
set(ENV{PKG_CONFIG_PATH} "${PKG_CONFIG_PATH}:/usr/pkg/lib/ffmpeg7/pkgconfig")
|
||||
endif()
|
||||
|
||||
# Detect current compilation architecture and create standard definitions
|
||||
|
@ -149,6 +159,7 @@ endif()
|
|||
|
||||
if (PLATFORM_FREEBSD)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib")
|
||||
|
||||
endif()
|
||||
|
||||
# Set bundled sdl2/qt as dependent options.
|
||||
|
@ -264,7 +275,11 @@ if (ENABLE_WEB_SERVICE)
|
|||
endif()
|
||||
option(ENABLE_OPENSSL "Enable OpenSSL backend for ISslConnection" ${DEFAULT_ENABLE_OPENSSL})
|
||||
if (ENABLE_OPENSSL)
|
||||
cmake_dependent_option(YUZU_USE_BUNDLED_OPENSSL "Download bundled OpenSSL build" "${MSVC}" "NOT ANDROID" ON)
|
||||
set(DEFAULT_YUZU_USE_BUNDLED_OPENSSL OFF)
|
||||
if (EXT_DEFAULT OR PLATFORM_SUN)
|
||||
set(DEFAULT_YUZU_USE_BUNDLED_OPENSSL ON)
|
||||
endif()
|
||||
option(YUZU_USE_BUNDLED_OPENSSL "Download bundled OpenSSL build" ${DEFAULT_YUZU_USE_BUNDLED_OPENSSL})
|
||||
endif()
|
||||
|
||||
if (ANDROID AND YUZU_DOWNLOAD_ANDROID_VVL)
|
||||
|
@ -351,7 +366,7 @@ if (YUZU_ROOM)
|
|||
add_compile_definitions(YUZU_ROOM)
|
||||
endif()
|
||||
|
||||
if (ANDROID OR PLATFORM_FREEBSD OR PLATFORM_OPENBSD OR PLATFORM_SUN OR APPLE)
|
||||
if ((ANDROID OR APPLE OR UNIX) AND (NOT PLATFORM_LINUX OR ANDROID) AND NOT WIN32)
|
||||
if(CXX_APPLE OR CXX_CLANG)
|
||||
# libc++ has stop_token and jthread as experimental
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexperimental-library")
|
||||
|
|
|
@ -8,6 +8,9 @@ Eden-specific options:
|
|||
|
||||
- `YUZU_USE_CPM` is set by default on MSVC and Android. Other platforms should use this if certain "required" system dependencies (e.g. OpenSSL) are broken or missing
|
||||
* If this is `OFF`, required system dependencies will be searched via `find_package`, although most externals use CPM regardless.
|
||||
- Force system libraries via CMake arguments:
|
||||
* SDL2: `YUZU_USE_BUNDLED_SDL2` and `YUZU_USE_EXTERNAL_SDL2`
|
||||
* FFmpeg: `YUZU_USE_EXTERNAL_FFMPEG`
|
||||
|
||||
## Tooling
|
||||
|
||||
|
|
|
@ -45,8 +45,18 @@ export LIBGL_ALWAYS_SOFTWARE=1
|
|||
|
||||
After configuration, you may need to modify `externals/ffmpeg/CMakeFiles/ffmpeg-build/build.make` to use `-j$(nproc)` instead of just `-j`.
|
||||
|
||||
`-lc++-experimental` doesn't exist in OpenBSD but the LLVM driver still tries to link against it, to solve just symlink `ln -s /usr/lib/libc++.a /usr/lib/libc++experimental.a`.
|
||||
|
||||
If clang has errors, try using `g++-11`.
|
||||
|
||||
## FreeBSD
|
||||
|
||||
Eden is not currently available as a port on FreeBSD, though it is in the works. For now, the recommended method of usage is to compile it yourself.
|
||||
|
||||
The available OpenSSL port (3.0.17) is out-of-date, and using a bundled static library instead is recommended; to do so, add `-DYUZU_USE_BUNDLED_OPENSSL=ON` to your CMake configure command.
|
||||
The available OpenSSL port (3.0.17) is out-of-date, and using a bundled static library instead is recommended; to do so, add `-DYUZU_USE_BUNDLED_OPENSSL=ON` to your CMake configure command.
|
||||
|
||||
## NetBSD
|
||||
|
||||
System provides a default `g++-10` which doesn't support the current C++ codebase; install `clang-19` with `pkgin install clang-19`. Then build with `cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -B build`.
|
||||
|
||||
Make may error out when generating C++ headers of SPIRV shaders, hence it's recommended to use `gmake` over the default system one.
|
||||
|
|
91
docs/Deps.md
91
docs/Deps.md
|
@ -102,7 +102,7 @@ sudo pacman -Syu --needed base-devel boost catch2 cmake enet ffmpeg fmt git glsl
|
|||
<summary>Ubuntu, Debian, Mint Linux</summary>
|
||||
|
||||
```sh
|
||||
sudo apt-get install autoconf cmake g++ gcc git glslang-tools libasound2t64 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 qt6-base-private-dev libmbedtls-dev catch2 libfmt-dev liblz4-dev nlohmann-json3-dev libzstd-dev libssl-dev libavfilter-dev libavcodec-dev libswscale-dev pkg-config zlib1g-dev libva-dev libvdpau-dev qt6-tools-dev libzydis-dev zydis-tools libzycore-dev vulkan-utility-libraries-dev libvulkan-dev spirv-tools spirv-headers libusb-1.0-0-dev libxbyak-dev
|
||||
sudo apt-get install autoconf cmake g++ gcc git glslang-tools 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 qt6-base-private-dev libmbedtls-dev catch2 libfmt-dev liblz4-dev nlohmann-json3-dev libzstd-dev libssl-dev libavfilter-dev libavcodec-dev libswscale-dev pkg-config zlib1g-dev libva-dev libvdpau-dev qt6-tools-dev libzydis-dev zydis-tools libzycore-dev libvulkan-dev spirv-tools spirv-headers libusb-1.0-0-dev libxbyak-dev libboost-dev libboost-fiber-dev libboost-context-dev libsdl2-dev libopus-dev libasound2t64 vulkan-utility-libraries-dev
|
||||
```
|
||||
|
||||
* Ubuntu 22.04, Linux Mint 20, or Debian 12 or later is required.
|
||||
|
@ -110,18 +110,28 @@ sudo apt-get install autoconf cmake g++ gcc git glslang-tools libasound2t64 libb
|
|||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Fedora Linux</summary>
|
||||
<summary>AlmaLinux, Fedora, Red Hat Linux</summary>
|
||||
|
||||
Fedora:
|
||||
```sh
|
||||
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 qt6-linguist qt6-qtbase{-private,}-devel qt6-qtwebengine-devel qt6-qtmultimedia-devel speexdsp-devel wayland-devel zlib-devel ffmpeg-devel libXext-devel
|
||||
sudo dnf install autoconf 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 qt6-linguist qt6-qtbase{-private,}-devel qt6-qtwebengine-devel qt6-qtmultimedia-devel speexdsp-devel wayland-devel zlib-devel ffmpeg-devel libXext-devel boost jq
|
||||
```
|
||||
|
||||
* Force system libraries via CMake arguments:
|
||||
* SDL2: `-DYUZU_USE_BUNDLED_SDL2=OFF -DYUZU_USE_EXTERNAL_SDL2=OFF`
|
||||
* FFmpeg: `-DYUZU_USE_EXTERNAL_FFMPEG=OFF`
|
||||
* [RPM Fusion](https://rpmfusion.org/) is required for `ffmpeg-devel`
|
||||
AlmaLinux (use `YUZU_USE_CPM=ON`):
|
||||
```sh
|
||||
# vvv - Only if RPMfusion is not installed or EPEL isn't either
|
||||
sudo dnf install epel-release dnf-utils
|
||||
# (run rpmfusion installation afterwards)
|
||||
# vvv - This will work for most systems
|
||||
sudo dnf install autoconf cmake libtool libudev cmake gcc gcc-c++ qt6-qtbase-devel zlib-devel openssl-devel boost SDL2 ffmpeg-devel libdrm glslang jq patch
|
||||
# Qt6 private GUI must be taken from CRB repos
|
||||
sudo dnf config-manager --enable crb
|
||||
sudo dnf install qt6-qtbase-private-devel
|
||||
```
|
||||
|
||||
* [RPM Fusion](https://rpmfusion.org/Configuration) is required for `ffmpeg-devel`
|
||||
* Fedora 32 or later is required.
|
||||
* Fedora 36+ users with GCC 12 need Clang and should configure CMake with:
|
||||
* Fedora 36+ users with GCC 12 need Clang and should configure CMake with: `cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -B build`
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
@ -145,44 +155,43 @@ brew install molten-vk vulkan-loader
|
|||
<details>
|
||||
<summary>FreeBSD</summary>
|
||||
|
||||
```
|
||||
devel/cmake
|
||||
devel/sdl20
|
||||
devel/boost-libs
|
||||
devel/catch2
|
||||
devel/libfmt
|
||||
devel/nlohmann-json
|
||||
devel/ninja
|
||||
devel/nasm
|
||||
devel/autoconf
|
||||
devel/pkgconf
|
||||
devel/qt6-base
|
||||
|
||||
net/enet
|
||||
|
||||
multimedia/ffnvcodec-headers
|
||||
multimedia/ffmpeg
|
||||
|
||||
audio/opus
|
||||
|
||||
archivers/liblz4
|
||||
|
||||
lang/gcc12
|
||||
|
||||
graphics/glslang
|
||||
graphics/vulkan-utility-libraries
|
||||
```
|
||||
As root run: `pkg install devel/cmake devel/sdl20 devel/boost-libs devel/catch2 devel/libfmt devel/nlohmann-json devel/ninja devel/nasm devel/autoconf devel/pkgconf devel/qt6-base devel/simpleini net/enet multimedia/ffnvcodec-headers multimedia/ffmpeg audio/opus archivers/liblz4 lang/gcc12 graphics/glslang graphics/vulkan-utility-libraries graphics/spirv-tools www/cpp-httplib devel/jwt-cpp devel/unordered-dense devel/zydis`
|
||||
|
||||
If using FreeBSD 12 or prior, use `devel/pkg-config` instead.
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>NetBSD</summary>
|
||||
|
||||
Install `pkgin` if not already `pkg_add pkgin`, see also the general [pkgsrc guide](https://www.netbsd.org/docs/pkgsrc/using.html). For NetBSD 10.1 provide `cat 'PKG_PATH="https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/10.0_2025Q3/All/"' >/etc/pkg_install.conf`. If `pkgin` is taking too much time consider adding the following to `/etc/rc.conf`:
|
||||
```
|
||||
ip6addrctl=YES
|
||||
ip6addrctl_policy=ipv4_prefer
|
||||
```
|
||||
|
||||
For NetBSD +10.1: `pkgin install git cmake boost fmtlib SDL2 catch2 libjwt spirv-headers ffmpeg7 libva nlohmann-json jq libopus qt6 mbedtls3 cpp-httplib lz4 vulkan-headers nasm autoconf enet pkg-config libusb1`.
|
||||
|
||||
glslang is not available on NetBSD, to circumvent this simply build glslang by yourself:
|
||||
```sh
|
||||
pkgin python313
|
||||
git clone https://github.com/KhronosGroup/glslang.git
|
||||
cd glslang
|
||||
python3.13 ./update_glslang_sources.py
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build -- -j`nproc`
|
||||
cmake --install build
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>OpenBSD</summary>
|
||||
|
||||
```sh
|
||||
pkg_add -u
|
||||
pkg_add cmake nasm git boost unzip--iconv autoconf-2.72p0 bash ffmpeg glslang gmake llvm-19.1.7p3 qt6 jq fmt nlohmann-json enet boost vulkan-utility-libraries vulkan-headers spirv-headers spirv-tools catch2 sdl2 libusb1.1.0.27
|
||||
pkg_add cmake nasm git boost unzip--iconv autoconf-2.72p0 bash ffmpeg glslang gmake llvm-19.1.7p3 qt6 jq fmt nlohmann-json enet boost vulkan-utility-libraries vulkan-headers spirv-headers spirv-tools catch2 sdl2 libusb1-1.0.27
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
@ -210,6 +219,16 @@ Then install the libraries: `sudo pkg install qt6 boost glslang libzip library/l
|
|||
* `echo 'PATH=$(readlink -e /c/VulkanSDK/*/Bin/):$PATH' >> ~/.bashrc`
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>RedoxOS</summary>
|
||||
|
||||
```sh
|
||||
sudo pkg update && sudo pkg install git cmake
|
||||
sudo pkg install ffmpeg6 sdl2 zlib llvm18
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## All Done
|
||||
|
||||
You may now return to the **[root build guide](Build.md)**.
|
||||
|
|
|
@ -54,6 +54,7 @@ The vast majority of Eden's testing is done on Windows, Linux, and Android. Howe
|
|||
|
||||
- FreeBSD
|
||||
- OpenBSD
|
||||
- NetBSD
|
||||
- OpenIndiana (Solaris)
|
||||
- macOS
|
||||
|
||||
|
@ -127,6 +128,6 @@ AMD GPU support on these platforms is limited or nonexistent.
|
|||
|
||||
## VMs
|
||||
|
||||
Eden "can" run in a VM, but only with the software renderer, *unless* you create a hardware-accelerated KVM with GPU passthrough. If you *really* want to do this and don't have a spare GPU lying around, RX 570 and 580 GPUs are extremely cheap on the black market and are powerful enough to run most commercial games at 60fps.
|
||||
Eden "can" run in a VM, but only with the software renderer, *unless* you create a hardware-accelerated KVM with GPU passthrough. If you *really* want to do this and don't have a spare GPU lying around, RX 570 and 580 GPUs are extremely cheap on the black market and are powerful enough to run most commercial games at 60 FPS.
|
||||
|
||||
Some users and developers have had success using a pure OpenGL-accelerated KVM on Linux with a Windows VM, but this is ridiculously tedious to set up. You're probably better off dual-booting.
|
13
externals/cpmfile.json
vendored
13
externals/cpmfile.json
vendored
|
@ -46,9 +46,10 @@
|
|||
"package": "xbyak",
|
||||
"repo": "herumi/xbyak",
|
||||
"tag": "v%VERSION%",
|
||||
"hash": "e84992c65ad62c577e2746ec5180132fd2875166d1e6b1521a0ff619787e1645792fe5f6a858fe94ed66f297912b6a6b89a509b5d5f5e81a2db1dd7e6790b1f5",
|
||||
"hash": "b40dade90fb0e46a2bd52934f7ce461e37be931b571e58cbe2203bc08ed5b54c7ff1a29026c74c7f9805e4e3f6c9636deca528e6b4a8093ce7eae145218599f1",
|
||||
"git_version": "7.29",
|
||||
"bundled": true,
|
||||
"git_version": "7.30"
|
||||
"skip_updates": true
|
||||
},
|
||||
"xbyak": {
|
||||
"package": "xbyak",
|
||||
|
@ -128,6 +129,9 @@
|
|||
"git_version": "2025.4",
|
||||
"options": [
|
||||
"SPIRV_SKIP_EXECUTABLES ON"
|
||||
],
|
||||
"patches": [
|
||||
"0001-netbsd-fix.patch"
|
||||
]
|
||||
},
|
||||
"spirv-headers": {
|
||||
|
@ -168,7 +172,10 @@
|
|||
"tag": "v%VERSION%",
|
||||
"hash": "a95495142f915d6e9c2a23e80fe360343e9097680066a2f9d3037a070ba5f81ee5559a0407cc9e972dc2afae325873f1fc7ea07a64012c0f01aac6e549f03e3f",
|
||||
"version": "3.0.1",
|
||||
"git_version": "3.11.0"
|
||||
"git_version": "3.11.0",
|
||||
"patches": [
|
||||
"0001-solaris-isnan-fix.patch"
|
||||
]
|
||||
},
|
||||
"discord-rpc": {
|
||||
"package": "DiscordRPC",
|
||||
|
|
5
externals/libusb/cpmfile.json
vendored
5
externals/libusb/cpmfile.json
vendored
|
@ -4,6 +4,9 @@
|
|||
"tag": "v%VERSION%",
|
||||
"hash": "98c5f7940ff06b25c9aa65aa98e23de4c79a4c1067595f4c73cc145af23a1c286639e1ba11185cd91bab702081f307b973f08a4c9746576dc8d01b3620a3aeb5",
|
||||
"find_args": "MODULE",
|
||||
"git_version": "1.0.29"
|
||||
"git_version": "1.0.29",
|
||||
"patches": [
|
||||
"0001-netbsd-gettime.patch"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
2
externals/renderdoc/renderdoc_app.h
vendored
2
externals/renderdoc/renderdoc_app.h
vendored
|
@ -43,7 +43,7 @@
|
|||
#define RENDERDOC_CC __cdecl
|
||||
#elif defined(__linux__) || defined(__FreeBSD__) || defined(__sun__)
|
||||
#define RENDERDOC_CC
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#define RENDERDOC_CC
|
||||
#else
|
||||
#error "Unknown platform"
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <llvm/Demangle/Demangle.h>
|
||||
|
||||
#include "common/demangle.h"
|
||||
|
@ -9,29 +14,22 @@
|
|||
namespace Common {
|
||||
|
||||
std::string DemangleSymbol(const std::string& mangled) {
|
||||
auto is_itanium = [](const std::string& name) -> bool {
|
||||
// A valid Itanium encoding requires 1-4 leading underscores, followed by 'Z'.
|
||||
auto pos = name.find_first_not_of('_');
|
||||
return pos > 0 && pos <= 4 && pos < name.size() && name[pos] == 'Z';
|
||||
};
|
||||
|
||||
if (mangled.empty()) {
|
||||
return mangled;
|
||||
if (mangled.size() > 0) {
|
||||
auto const is_itanium = [](std::string_view name) -> bool {
|
||||
// A valid Itanium encoding requires 1-4 leading underscores, followed by 'Z'.
|
||||
auto const pos = name.find_first_not_of('_');
|
||||
return pos > 0 && pos <= 4 && pos < name.size() && name[pos] == 'Z';
|
||||
};
|
||||
std::string ret = mangled;
|
||||
if (is_itanium(mangled)) {
|
||||
if (char* p = llvm::itaniumDemangle(mangled); p != nullptr) {
|
||||
ret = std::string{p};
|
||||
std::free(p);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
char* demangled = nullptr;
|
||||
SCOPE_EXIT {
|
||||
std::free(demangled);
|
||||
};
|
||||
|
||||
if (is_itanium(mangled)) {
|
||||
demangled = llvm::itaniumDemangle(mangled.c_str());
|
||||
}
|
||||
|
||||
if (!demangled) {
|
||||
return mangled;
|
||||
}
|
||||
return demangled;
|
||||
return std::string{};
|
||||
}
|
||||
|
||||
} // namespace Common
|
||||
|
|
|
@ -21,8 +21,8 @@ template <typename T>
|
|||
struct EnumMetadata {
|
||||
static std::vector<std::pair<std::string_view, T>> Canonicalizations();
|
||||
static u32 Index();
|
||||
static constexpr T GetFirst();
|
||||
static constexpr T GetLast();
|
||||
static T GetFirst();
|
||||
static T GetLast();
|
||||
};
|
||||
|
||||
#define PAIR_45(N, X, ...) {#X, N::X} __VA_OPT__(, PAIR_46(N, __VA_ARGS__))
|
||||
|
@ -82,10 +82,10 @@ struct EnumMetadata {
|
|||
template<> inline u32 EnumMetadata<NAME>::Index() { \
|
||||
return __COUNTER__; \
|
||||
} \
|
||||
template<> inline constexpr NAME EnumMetadata<NAME>::GetFirst() { \
|
||||
template<> inline NAME EnumMetadata<NAME>::GetFirst() { \
|
||||
return NAME::PP_HEAD(__VA_ARGS__); \
|
||||
} \
|
||||
template<> inline constexpr NAME EnumMetadata<NAME>::GetLast() { \
|
||||
template<> inline NAME EnumMetadata<NAME>::GetLast() { \
|
||||
return (std::vector<std::pair<std::string_view, NAME>>{PAIR(NAME, __VA_ARGS__)}).back().second; \
|
||||
}
|
||||
|
||||
|
@ -106,17 +106,17 @@ inline u32 EnumMetadata<AudioEngine>::Index() {
|
|||
return 100;
|
||||
}
|
||||
template<>
|
||||
inline constexpr AudioEngine EnumMetadata<AudioEngine>::GetFirst() {
|
||||
inline AudioEngine EnumMetadata<AudioEngine>::GetFirst() {
|
||||
return AudioEngine::Auto;
|
||||
}
|
||||
template<>
|
||||
inline constexpr AudioEngine EnumMetadata<AudioEngine>::GetLast() {
|
||||
inline AudioEngine EnumMetadata<AudioEngine>::GetLast() {
|
||||
return AudioEngine::Oboe;
|
||||
}
|
||||
|
||||
ENUM(AudioMode, Mono, Stereo, Surround);
|
||||
static_assert(EnumMetadata<AudioMode>::GetFirst() == AudioMode::Mono);
|
||||
static_assert(EnumMetadata<AudioMode>::GetLast() == AudioMode::Surround);
|
||||
//static_assert(EnumMetadata<AudioMode>::GetFirst() == AudioMode::Mono);
|
||||
//static_assert(EnumMetadata<AudioMode>::GetLast() == AudioMode::Surround);
|
||||
|
||||
ENUM(Language, Japanese, EnglishAmerican, French, German, Italian, Spanish, Chinese, Korean, Dutch,
|
||||
Portuguese, Russian, Taiwanese, EnglishBritish, FrenchCanadian, SpanishLatin,
|
||||
|
|
|
@ -12,7 +12,22 @@
|
|||
# include <ucontext.h>
|
||||
# endif
|
||||
# ifdef __sun__
|
||||
// Thanks C macros for exisitng in Solaris headers, thanks a lot
|
||||
// We really needed to define FOR EVERY SINGLE REGISTER didn't we?
|
||||
# include <sys/regset.h>
|
||||
# undef EAX
|
||||
# undef EBX
|
||||
# undef ECX
|
||||
# undef EDX
|
||||
# undef ESP
|
||||
# undef EBP
|
||||
# undef ESI
|
||||
# undef EDI
|
||||
# undef ERR
|
||||
# undef SS
|
||||
# undef CS
|
||||
# undef ES
|
||||
# undef DS
|
||||
# endif
|
||||
# ifdef __linux__
|
||||
# include <sys/syscall.h>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
@ -13,10 +16,10 @@ namespace Dynarmic {
|
|||
using const_pointer = const value_type*;
|
||||
using reference = value_type&;
|
||||
using const_reference = const value_type&;
|
||||
using iterator = std::deque<value_type>::iterator;
|
||||
using const_iterator = std::deque<value_type>::const_iterator;
|
||||
using reverse_iterator = std::reverse_iterator<iterator>;
|
||||
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
|
||||
using iterator = typename std::deque<value_type>::iterator;
|
||||
using const_iterator = typename std::deque<value_type>::const_iterator;
|
||||
using reverse_iterator = typename std::reverse_iterator<iterator>;
|
||||
using const_reverse_iterator = typename std::reverse_iterator<const_iterator>;
|
||||
|
||||
inline bool empty() const noexcept { return list.empty(); }
|
||||
inline size_type size() const noexcept { return list.size(); }
|
||||
|
|
|
@ -86,7 +86,7 @@ static void ConstantMemoryReads(IR::Block& block, A32::UserCallbacks* cb) {
|
|||
}
|
||||
|
||||
static void FlagsPass(IR::Block& block) {
|
||||
using Iterator = std::reverse_iterator<IR::Block::iterator>;
|
||||
using Iterator = typename std::reverse_iterator<IR::Block::iterator>;
|
||||
|
||||
struct FlagInfo {
|
||||
bool set_not_required = false;
|
||||
|
|
|
@ -1,9 +1,25 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#ifdef __AVX__
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
|
||||
// NetBSD apparently still needs these... ugh
|
||||
#ifdef __cpp_lib_bit_cast
|
||||
#include <bit>
|
||||
template <typename To, typename From> constexpr inline To BitCast(const From& from) {
|
||||
return std::bit_cast<To>(from);
|
||||
}
|
||||
#else
|
||||
template <typename To, typename From> constexpr inline To BitCast(const From& from) {
|
||||
return __builtin_bit_cast(To, from);
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename F>
|
||||
void CheckedRun(F&& fn) {
|
||||
#ifdef __AVX__
|
||||
|
@ -32,18 +48,18 @@ void CheckedRun(F&& fn) {
|
|||
, "+x"(xmm8), "+x"(xmm9), "+x"(xmm10), "+x"(xmm11)
|
||||
:
|
||||
);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm0[0]) == 0);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm1[0]) == 1);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm2[0]) == 2);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm3[0]) == 3);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm4[0]) == 4);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm5[0]) == 5);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm6[0]) == 6);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm7[0]) == 7);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm8[0]) == 8);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm9[0]) == 9);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm10[0]) == 10);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm11[0]) == 11);
|
||||
CHECK(BitCast<std::uint64_t>(xmm0[0]) == 0);
|
||||
CHECK(BitCast<std::uint64_t>(xmm1[0]) == 1);
|
||||
CHECK(BitCast<std::uint64_t>(xmm2[0]) == 2);
|
||||
CHECK(BitCast<std::uint64_t>(xmm3[0]) == 3);
|
||||
CHECK(BitCast<std::uint64_t>(xmm4[0]) == 4);
|
||||
CHECK(BitCast<std::uint64_t>(xmm5[0]) == 5);
|
||||
CHECK(BitCast<std::uint64_t>(xmm6[0]) == 6);
|
||||
CHECK(BitCast<std::uint64_t>(xmm7[0]) == 7);
|
||||
CHECK(BitCast<std::uint64_t>(xmm8[0]) == 8);
|
||||
CHECK(BitCast<std::uint64_t>(xmm9[0]) == 9);
|
||||
CHECK(BitCast<std::uint64_t>(xmm10[0]) == 10);
|
||||
CHECK(BitCast<std::uint64_t>(xmm11[0]) == 11);
|
||||
#else
|
||||
fn();
|
||||
#endif
|
||||
|
|
|
@ -76,9 +76,9 @@ if (NOT APPLE AND ENABLE_OPENGL)
|
|||
endif()
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
if (TARGET Qt6::GuiPrivate)
|
||||
target_link_libraries(qt_common PRIVATE Qt6::GuiPrivate)
|
||||
else()
|
||||
if (DEFINED Qt6Gui_PRIVATE_INCLUDE_DIRS)
|
||||
target_include_directories(qt_common PRIVATE ${Qt6Gui_PRIVATE_INCLUDE_DIRS})
|
||||
else()
|
||||
target_link_libraries(qt_common PRIVATE Qt6::GuiPrivate)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -501,7 +501,6 @@ void ImportDataDir(FrontendCommon::DataManager::DataDir data_dir,
|
|||
auto progress_callback = [=](size_t total_size, size_t processed_size) {
|
||||
QMetaObject::invokeMethod(progress, "setValue", Qt::DirectConnection,
|
||||
Q_ARG(int, static_cast<int>((processed_size * 100) / total_size)));
|
||||
|
||||
return !progress->wasCanceled();
|
||||
};
|
||||
|
||||
|
|
|
@ -542,7 +542,8 @@ void CreateShortcut(const std::string& game_path,
|
|||
qgame_title);
|
||||
}
|
||||
|
||||
constexpr std::string GetShortcutPath(ShortcutTarget target) {
|
||||
// TODO: You want this to be constexpr? Well too bad, clang19 doesn't believe this is a string literal
|
||||
std::string GetShortcutPath(ShortcutTarget target) {
|
||||
{
|
||||
std::string shortcut_path{};
|
||||
if (target == ShortcutTarget::Desktop) {
|
||||
|
|
|
@ -78,7 +78,7 @@ void CreateShortcut(const std::string& game_path,
|
|||
std::string arguments_,
|
||||
const bool needs_title);
|
||||
|
||||
constexpr std::string GetShortcutPath(ShortcutTarget target);
|
||||
std::string GetShortcutPath(ShortcutTarget target);
|
||||
void CreateHomeMenuShortcut(ShortcutTarget target);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue