mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-14 12:56:09 +00:00
Compare commits
47 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cb07a431b8 | |||
| 3ae3e1fdfc | |||
| 87e65c5192 | |||
| 95401eeed5 | |||
| 05f14b897c | |||
| a6423a88cc | |||
| f87b1dafc8 | |||
| 707e8afb29 | |||
| bf115ef5a7 | |||
| b154a7da3c | |||
| 37026c8aaa | |||
| 65beea7c73 | |||
| 86eae5cc41 | |||
| 8b9a841d99 | |||
| ca1fcaca3b | |||
| 8f4e8c6d6a | |||
| 4f4c298a39 | |||
| fee603f0b9 | |||
| fc5fa7f1b2 | |||
| 17c341ff6c | |||
| 2deee80f29 | |||
| 27e5cb0f12 | |||
| a76c76d122 | |||
| 44fa2805d6 | |||
| 7d0e79335e | |||
| d17ecb01af | |||
| b537e83bed | |||
| 8765b49512 | |||
| a587b7dc3a | |||
| 90515bc6a2 | |||
| 676b1aabfc | |||
| 77decca678 | |||
| ed225f8a8b | |||
| d69bd86183 | |||
| c172abfb53 | |||
| d33dc16820 | |||
| 8cdaf19a83 | |||
| f088f5bd45 | |||
| cbeea5b954 | |||
| 1590e7c061 | |||
| c95f8df8a5 | |||
| e81f5111de | |||
| 91058d7383 | |||
| 048d02e5b4 | |||
| 17e2be173c | |||
| bd6dd7ecec | |||
| 72ae613176 |
@@ -1,116 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
case "$1" in
|
||||
amd64 | "")
|
||||
echo "Making amd64-v3 optimized build of Eden"
|
||||
ARCH="amd64_v3"
|
||||
ARCH_FLAGS="-march=x86-64-v3"
|
||||
export EXTRA_CMAKE_FLAGS=(-DYUZU_BUILD_PRESET=v3)
|
||||
;;
|
||||
steamdeck | zen2)
|
||||
echo "Making Steam Deck (Zen 2) optimized build of Eden"
|
||||
ARCH="steamdeck"
|
||||
ARCH_FLAGS="-march=znver2 -mtune=znver2"
|
||||
export EXTRA_CMAKE_FLAGS=(-DYUZU_BUILD_PRESET=zen2 -DYUZU_SYSTEM_PROFILE=steamdeck)
|
||||
;;
|
||||
rog-ally | allyx | zen4)
|
||||
echo "Making ROG Ally X (Zen 4) optimized build of Eden"
|
||||
ARCH="rog-ally-x"
|
||||
ARCH_FLAGS="-march=znver4 -mtune=znver4"
|
||||
export EXTRA_CMAKE_FLAGS=(-DYUZU_BUILD_PRESET=zen2 -DYUZU_SYSTEM_PROFILE=steamdeck)
|
||||
;;
|
||||
legacy)
|
||||
echo "Making amd64 generic build of Eden"
|
||||
ARCH=amd64
|
||||
ARCH_FLAGS="-march=x86-64 -mtune=generic"
|
||||
export EXTRA_CMAKE_FLAGS=(-DYUZU_BUILD_PRESET=generic)
|
||||
;;
|
||||
aarch64)
|
||||
echo "Making armv8-a build of Eden"
|
||||
ARCH=aarch64
|
||||
ARCH_FLAGS="-march=armv8-a -mtune=generic -w"
|
||||
export EXTRA_CMAKE_FLAGS=(-DYUZU_BUILD_PRESET=generic)
|
||||
;;
|
||||
armv9)
|
||||
echo "Making armv9-a build of Eden"
|
||||
ARCH=armv9
|
||||
ARCH_FLAGS="-march=armv9-a -mtune=generic -w"
|
||||
export EXTRA_CMAKE_FLAGS=(-DYUZU_BUILD_PRESET=armv9)
|
||||
;;
|
||||
native)
|
||||
echo "Making native build of Eden"
|
||||
ARCH="$(uname -m)"
|
||||
ARCH_FLAGS="-march=native -mtune=native"
|
||||
export EXTRA_CMAKE_FLAGS=(-DYUZU_BUILD_PRESET=native)
|
||||
;;
|
||||
*)
|
||||
echo "Invalid target $1 specified, must be one of native, amd64, steamdeck, zen2, allyx, rog-ally, zen4, legacy, aarch64, armv9"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
export ARCH_FLAGS="$ARCH_FLAGS -O3"
|
||||
|
||||
if [ -z "$NPROC" ]; then
|
||||
NPROC="$(nproc)"
|
||||
fi
|
||||
|
||||
if [ "$1" != "" ]; then shift; fi
|
||||
|
||||
if [ "$TARGET" = "appimage" ]; then
|
||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DCMAKE_INSTALL_PREFIX=/usr -DYUZU_ROOM=ON -DYUZU_ROOM_STANDALONE=OFF -DYUZU_CMD=OFF)
|
||||
else
|
||||
# For the linux-fresh verification target, verify compilation without PCH as well.
|
||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DYUZU_USE_PRECOMPILED_HEADERS=OFF)
|
||||
fi
|
||||
|
||||
|
||||
if [ "$DEVEL" != "true" ]; then
|
||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DENABLE_UPDATE_CHECKER=ON)
|
||||
fi
|
||||
|
||||
if [ "$USE_WEBENGINE" = "true" ]; then
|
||||
WEBENGINE=ON
|
||||
else
|
||||
WEBENGINE=OFF
|
||||
fi
|
||||
|
||||
if [ "$USE_MULTIMEDIA" = "false" ]; then
|
||||
MULTIMEDIA=OFF
|
||||
else
|
||||
MULTIMEDIA=ON
|
||||
fi
|
||||
|
||||
if [ -z "$BUILD_TYPE" ]; then
|
||||
export BUILD_TYPE="Release"
|
||||
fi
|
||||
|
||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" $@)
|
||||
|
||||
mkdir -p build && cd build
|
||||
cmake .. -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
||||
-DENABLE_QT_TRANSLATION=ON \
|
||||
-DUSE_DISCORD_PRESENCE=ON \
|
||||
-DCMAKE_CXX_FLAGS="$ARCH_FLAGS" \
|
||||
-DCMAKE_C_FLAGS="$ARCH_FLAGS" \
|
||||
-DYUZU_USE_BUNDLED_QT=OFF \
|
||||
-DYUZU_USE_BUNDLED_SDL2=OFF \
|
||||
-DYUZU_USE_EXTERNAL_SDL2=ON \
|
||||
-DYUZU_TESTS=OFF \
|
||||
-DYUZU_USE_QT_MULTIMEDIA=$MULTIMEDIA \
|
||||
-DYUZU_USE_QT_WEB_ENGINE=$WEBENGINE \
|
||||
-DYUZU_USE_FASTER_LD=ON \
|
||||
-DENABLE_LTO=ON \
|
||||
"${EXTRA_CMAKE_FLAGS[@]}"
|
||||
|
||||
ninja -j${NPROC}
|
||||
|
||||
if [ -d "bin/Release" ]; then
|
||||
strip -s bin/Release/*
|
||||
else
|
||||
strip -s bin/*
|
||||
fi
|
||||
@@ -1,250 +0,0 @@
|
||||
AppRun
|
||||
eden.desktop
|
||||
dev.eden_emu.eden.desktop
|
||||
shared/bin/eden
|
||||
shared/lib/lib.path
|
||||
shared/lib/ld-linux-x86-64.so.2
|
||||
shared/lib/libQt6Widgets.so.6.4.2
|
||||
shared/lib/libQt6DBus.so.6.4.2
|
||||
shared/lib/libudev.so.1.7.5
|
||||
shared/lib/libbrotlienc.so.1.0.9
|
||||
shared/lib/libbrotlidec.so.1.0.9
|
||||
shared/lib/libssl.so.3
|
||||
shared/lib/libcrypto.so.3
|
||||
shared/lib/libavcodec.so.59.37.100
|
||||
shared/lib/libavutil.so.57.28.100
|
||||
shared/lib/libQt6Gui.so.6.4.2
|
||||
shared/lib/libQt6Core.so.6.4.2
|
||||
shared/lib/libstdc++.so.6.0.30
|
||||
shared/lib/libm.so.6
|
||||
shared/lib/libgcc_s.so.1
|
||||
shared/lib/libc.so.6
|
||||
shared/lib/libdbus-1.so.3.32.4
|
||||
shared/lib/libbrotlicommon.so.1.0.9
|
||||
shared/lib/libswresample.so.4.7.100
|
||||
shared/lib/libvpx.so.7.1.0
|
||||
shared/lib/libwebpmux.so.3.0.10
|
||||
shared/lib/libwebp.so.7.1.5
|
||||
shared/lib/liblzma.so.5.4.1
|
||||
shared/lib/libdav1d.so.6.6.0
|
||||
shared/lib/librsvg-2.so.2.48.0
|
||||
shared/lib/libgobject-2.0.so.0.7400.6
|
||||
shared/lib/libglib-2.0.so.0.7400.6
|
||||
shared/lib/libcairo.so.2.11600.0
|
||||
shared/lib/libzvbi.so.0.13.2
|
||||
shared/lib/libz.so.1.2.13
|
||||
shared/lib/libsnappy.so.1.1.9
|
||||
shared/lib/libaom.so.3.6.0
|
||||
shared/lib/libcodec2.so.1.0
|
||||
shared/lib/libgsm.so.1.0.19
|
||||
shared/lib/libjxl.so.0.7.0
|
||||
shared/lib/libjxl_threads.so.0.7.0
|
||||
shared/lib/libmp3lame.so.0.0.0
|
||||
shared/lib/libopenjp2.so.2.5.0
|
||||
shared/lib/libopus.so.0.8.0
|
||||
shared/lib/librav1e.so.0.5.1
|
||||
shared/lib/libshine.so.3.0.1
|
||||
shared/lib/libspeex.so.1.5.2
|
||||
shared/lib/libSvtAv1Enc.so.1.4.1
|
||||
shared/lib/libtheoraenc.so.1.1.2
|
||||
shared/lib/libtheoradec.so.1.1.4
|
||||
shared/lib/libtwolame.so.0.0.0
|
||||
shared/lib/libvorbis.so.0.4.9
|
||||
shared/lib/libvorbisenc.so.2.0.12
|
||||
shared/lib/libx264.so.164
|
||||
shared/lib/libx265.so.199
|
||||
shared/lib/libxvidcore.so.4.3
|
||||
shared/lib/libva.so.2.1700.0
|
||||
shared/lib/libmfx.so.1.35
|
||||
shared/lib/libva-drm.so.2.1700.0
|
||||
shared/lib/libva-x11.so.2.1700.0
|
||||
shared/lib/libvdpau.so.1.0.0
|
||||
shared/lib/libX11.so.6.4.0
|
||||
shared/lib/libdrm.so.2.4.0
|
||||
shared/lib/libOpenCL.so.1.0.0
|
||||
shared/lib/libEGL.so.1.1.0
|
||||
shared/lib/libfontconfig.so.1.12.0
|
||||
shared/lib/libxkbcommon.so.0.0.0
|
||||
shared/lib/libGLX.so.0.0.0
|
||||
shared/lib/libOpenGL.so.0.0.0
|
||||
shared/lib/libpng16.so.16.39.0
|
||||
shared/lib/libharfbuzz.so.0.60000.0
|
||||
shared/lib/libmd4c.so.0.4.8
|
||||
shared/lib/libfreetype.so.6.18.3
|
||||
shared/lib/libicui18n.so.72.1
|
||||
shared/lib/libicuuc.so.72.1
|
||||
shared/lib/libdouble-conversion.so.3.1
|
||||
shared/lib/libb2.so.1.0.4
|
||||
shared/lib/libpcre2-16.so.0.11.2
|
||||
shared/lib/libzstd.so.1.5.4
|
||||
shared/lib/libsystemd.so.0.35.0
|
||||
shared/lib/libsoxr.so.0.1.2
|
||||
shared/lib/libcairo-gobject.so.2.11600.0
|
||||
shared/lib/libgdk_pixbuf-2.0.so.0.4200.10
|
||||
shared/lib/libgio-2.0.so.0.7400.6
|
||||
shared/lib/libxml2.so.2.9.14
|
||||
shared/lib/libpangocairo-1.0.so.0.5000.12
|
||||
shared/lib/libpango-1.0.so.0.5000.12
|
||||
shared/lib/libffi.so.8.1.2
|
||||
shared/lib/libpcre2-8.so.0.11.2
|
||||
shared/lib/libpixman-1.so.0.42.2
|
||||
shared/lib/libxcb-shm.so.0.0.0
|
||||
shared/lib/libxcb.so.1.1.0
|
||||
shared/lib/libxcb-render.so.0.0.0
|
||||
shared/lib/libXrender.so.1.3.0
|
||||
shared/lib/libXext.so.6.4.0
|
||||
shared/lib/libhwy.so.1.0.3
|
||||
shared/lib/liblcms2.so.2.0.14
|
||||
shared/lib/libogg.so.0.8.5
|
||||
shared/lib/libnuma.so.1.0.0
|
||||
shared/lib/libpthread.so.0
|
||||
shared/lib/libXfixes.so.3.1.0
|
||||
shared/lib/libX11-xcb.so.1.0.0
|
||||
shared/lib/libxcb-dri3.so.0.1.0
|
||||
shared/lib/libGLdispatch.so.0.0.0
|
||||
shared/lib/libexpat.so.1.8.10
|
||||
shared/lib/libgraphite2.so.3.2.1
|
||||
shared/lib/libicudata.so.72.1
|
||||
shared/lib/libgomp.so.1.0.0
|
||||
shared/lib/libcap.so.2.66
|
||||
shared/lib/libgcrypt.so.20.4.1
|
||||
shared/lib/liblz4.so.1.9.4
|
||||
shared/lib/libgmodule-2.0.so.0.7400.6
|
||||
shared/lib/libjpeg.so.62.3.0
|
||||
shared/lib/libmount.so.1.1.0
|
||||
shared/lib/libselinux.so.1
|
||||
shared/lib/libpangoft2-1.0.so.0.5000.12
|
||||
shared/lib/libfribidi.so.0.4.0
|
||||
shared/lib/libthai.so.0.3.1
|
||||
shared/lib/libXau.so.6.0.0
|
||||
shared/lib/libXdmcp.so.6.0.0
|
||||
shared/lib/libgpg-error.so.0.33.1
|
||||
shared/lib/libblkid.so.1.1.0
|
||||
shared/lib/libdatrie.so.1.4.0
|
||||
shared/lib/libbsd.so.0.11.7
|
||||
shared/lib/libmd.so.0.0.5
|
||||
shared/lib/libvulkan.so.1.3.239
|
||||
share/vulkan/icd.d/intel_hasvk_icd.x86_64.json
|
||||
shared/lib/libvulkan_intel_hasvk.so
|
||||
shared/lib/libwayland-client.so.0.21.0
|
||||
shared/lib/libxcb-present.so.0.0.0
|
||||
shared/lib/libxcb-xfixes.so.0.0.0
|
||||
shared/lib/libxcb-sync.so.1.0.0
|
||||
shared/lib/libxcb-randr.so.0.1.0
|
||||
shared/lib/libxshmfence.so.1.0.0
|
||||
share/vulkan/icd.d/intel_icd.x86_64.json
|
||||
shared/lib/libvulkan_intel.so
|
||||
share/vulkan/icd.d/lvp_icd.x86_64.json
|
||||
shared/lib/libvulkan_lvp.so
|
||||
shared/lib/libLLVM-15.so.1
|
||||
shared/lib/libedit.so.2.0.70
|
||||
shared/lib/libz3.so.4
|
||||
shared/lib/libtinfo.so.6.4
|
||||
share/vulkan/icd.d/radeon_icd.x86_64.json
|
||||
shared/lib/libvulkan_radeon.so
|
||||
shared/lib/libdrm_amdgpu.so.1.0.0
|
||||
shared/lib/libelf-0.188.so
|
||||
shared/lib/libVkLayer_MESA_device_select.so
|
||||
bin/qt.conf
|
||||
shared/lib/qt6/plugins/platforms/libqeglfs.so
|
||||
shared/lib/qt6/plugins/platforms/libqlinuxfb.so
|
||||
shared/lib/qt6/plugins/platforms/libqminimal.so
|
||||
shared/lib/qt6/plugins/platforms/libqminimalegl.so
|
||||
shared/lib/qt6/plugins/platforms/libqoffscreen.so
|
||||
shared/lib/qt6/plugins/platforms/libqvkkhrdisplay.so
|
||||
shared/lib/qt6/plugins/platforms/libqvnc.so
|
||||
shared/lib/qt6/plugins/platforms/libqwayland-egl.so
|
||||
shared/lib/qt6/plugins/platforms/libqwayland-generic.so
|
||||
shared/lib/qt6/plugins/platforms/libqxcb.so
|
||||
shared/lib/libQt6WaylandClient.so.6.4.2
|
||||
shared/lib/libwayland-cursor.so.0.21.0
|
||||
shared/lib/qt6/plugins/platformthemes/libqgtk3.so
|
||||
shared/lib/libgtk-3.so.0.2406.32
|
||||
shared/lib/libgdk-3.so.0.2406.32
|
||||
shared/lib/libatk-1.0.so.0.24609.1
|
||||
shared/lib/libepoxy.so.0.0.0
|
||||
shared/lib/libXi.so.6.1.0
|
||||
shared/lib/libatk-bridge-2.0.so.0.0.0
|
||||
shared/lib/libwayland-egl.so.1.21.0
|
||||
shared/lib/libXcursor.so.1.0.2
|
||||
shared/lib/libXdamage.so.1.1.0
|
||||
shared/lib/libXcomposite.so.1.0.0
|
||||
shared/lib/libXrandr.so.2.2.0
|
||||
shared/lib/libXinerama.so.1.0.0
|
||||
shared/lib/libdl.so.2
|
||||
shared/lib/libatspi.so.0.0.1
|
||||
share/glib-2.0/schemas/gschemas.compiled
|
||||
shared/lib/gio/modules/giomodule.cache
|
||||
shared/lib/gio/modules/libdconfsettings.so
|
||||
shared/lib/gio/modules/libgvfsdbus.so
|
||||
shared/lib/gvfs/libgvfscommon.so
|
||||
share/X11/xkb/rules/evdev
|
||||
share/X11/xkb/keycodes/evdev
|
||||
share/X11/xkb/keycodes/aliases
|
||||
share/X11/xkb/types/complete
|
||||
share/X11/xkb/types/basic
|
||||
share/X11/xkb/types/mousekeys
|
||||
share/X11/xkb/types/pc
|
||||
share/X11/xkb/types/iso9995
|
||||
share/X11/xkb/types/level5
|
||||
share/X11/xkb/types/extra
|
||||
share/X11/xkb/types/numpad
|
||||
share/X11/xkb/compat/complete
|
||||
share/X11/xkb/compat/basic
|
||||
share/X11/xkb/compat/ledcaps
|
||||
share/X11/xkb/compat/lednum
|
||||
share/X11/xkb/compat/iso9995
|
||||
share/X11/xkb/compat/mousekeys
|
||||
share/X11/xkb/compat/accessx
|
||||
share/X11/xkb/compat/misc
|
||||
share/X11/xkb/compat/ledscroll
|
||||
share/X11/xkb/compat/xfree86
|
||||
share/X11/xkb/compat/level5
|
||||
share/X11/xkb/compat/caps
|
||||
share/X11/xkb/symbols/pc
|
||||
share/X11/xkb/symbols/srvr_ctrl
|
||||
share/X11/xkb/symbols/keypad
|
||||
share/X11/xkb/symbols/altwin
|
||||
share/X11/xkb/symbols/us
|
||||
share/X11/xkb/symbols/inet
|
||||
shared/lib/qt6/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so
|
||||
shared/lib/qt6/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so
|
||||
shared/lib/qt6/plugins/iconengines/libqsvgicon.so
|
||||
shared/lib/qt6/plugins/imageformats/libqgif.so
|
||||
shared/lib/qt6/plugins/imageformats/libqico.so
|
||||
shared/lib/qt6/plugins/imageformats/libqjpeg.so
|
||||
shared/lib/qt6/plugins/imageformats/libqsvg.so
|
||||
shared/lib/libQt6Svg.so.6.4.2
|
||||
etc/fonts/fonts.conf
|
||||
shared/lib/qt6/plugins/wayland-shell-integration/libfullscreen-shell-v1.so
|
||||
shared/lib/qt6/plugins/wayland-shell-integration/libivi-shell.so
|
||||
shared/lib/qt6/plugins/wayland-shell-integration/libqt-shell.so
|
||||
shared/lib/qt6/plugins/wayland-shell-integration/libwl-shell-plugin.so
|
||||
shared/lib/qt6/plugins/wayland-shell-integration/libxdg-shell.so
|
||||
shared/lib/qt6/plugins/wayland-graphics-integration-client/libdmabuf-server.so
|
||||
shared/lib/qt6/plugins/wayland-graphics-integration-client/libdrm-egl-server.so
|
||||
shared/lib/qt6/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so
|
||||
shared/lib/qt6/plugins/wayland-graphics-integration-client/libshm-emulation-server.so
|
||||
shared/lib/qt6/plugins/wayland-graphics-integration-client/libvulkan-server.so
|
||||
shared/lib/libQt6WaylandEglClientHwIntegration.so.6.4.2
|
||||
shared/lib/libQt6OpenGL.so.6.4.2
|
||||
share/glvnd/egl_vendor.d/50_mesa.json
|
||||
shared/lib/libEGL_mesa.so.0.0.0
|
||||
shared/lib/libgbm.so.1.0.0
|
||||
shared/lib/libglapi.so.0.0.0
|
||||
shared/lib/libxcb-dri2.so.0.0.0
|
||||
shared/lib/libwayland-server.so.0.21.0
|
||||
shared/lib/dri/swrast_dri.so
|
||||
shared/lib/libsensors.so.5.0.0
|
||||
shared/lib/libdrm_radeon.so.1.0.1
|
||||
shared/lib/libdrm_nouveau.so.2.0.0
|
||||
shared/lib/libdrm_intel.so.1.0.0
|
||||
shared/lib/libpciaccess.so.0.11.1
|
||||
shared/lib/qt6/plugins/wayland-decoration-client/libbradient.so
|
||||
shared/lib/gtk-3.0/modules/libcanberra-gtk3-module.so
|
||||
shared/lib/libcanberra-gtk3.so.0.1.9
|
||||
shared/lib/libcanberra.so.0.2.5
|
||||
shared/lib/libvorbisfile.so.3.3.8
|
||||
shared/lib/libtdb.so.1.4.8
|
||||
shared/lib/libltdl.so.7.3.2
|
||||
shared/lib/libXss.so.1.0.0
|
||||
@@ -1,153 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# This script assumes you're in the source directory
|
||||
|
||||
export APPIMAGE_EXTRACT_AND_RUN=1
|
||||
export BASE_ARCH="$(uname -m)"
|
||||
|
||||
SHARUN="https://github.com/VHSgunzo/sharun/releases/latest/download/sharun-${BASE_ARCH}-aio"
|
||||
URUNTIME="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-${BASE_ARCH}"
|
||||
|
||||
case "$1" in
|
||||
amd64|"")
|
||||
echo "Packaging amd64-v3 optimized build of Eden"
|
||||
ARCH="amd64_v3"
|
||||
;;
|
||||
steamdeck|zen2)
|
||||
echo "Packaging Steam Deck (Zen 2) optimized build of Eden"
|
||||
ARCH="steamdeck"
|
||||
;;
|
||||
rog-ally|allyx|zen4)
|
||||
echo "Packaging ROG Ally X (Zen 4) optimized build of Eden"
|
||||
ARCH="rog-ally-x"
|
||||
;;
|
||||
legacy)
|
||||
echo "Packaging amd64 generic build of Eden"
|
||||
ARCH=amd64
|
||||
;;
|
||||
aarch64)
|
||||
echo "Packaging armv8-a build of Eden"
|
||||
ARCH=aarch64
|
||||
;;
|
||||
armv9)
|
||||
echo "Packaging armv9-a build of Eden"
|
||||
ARCH=armv9
|
||||
;;
|
||||
native)
|
||||
echo "Packaging native build of Eden"
|
||||
ARCH="$BASE_ARCH"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
export BUILDDIR="$2"
|
||||
|
||||
if [ "$BUILDDIR" = '' ]
|
||||
then
|
||||
BUILDDIR=build
|
||||
fi
|
||||
|
||||
EDEN_TAG=$(git describe --tags --abbrev=0)
|
||||
echo "Making \"$EDEN_TAG\" build"
|
||||
# git checkout "$EDEN_TAG"
|
||||
VERSION="$(echo "$EDEN_TAG")"
|
||||
|
||||
# NOW MAKE APPIMAGE
|
||||
mkdir -p ./AppDir
|
||||
cd ./AppDir
|
||||
|
||||
cp ../dist/dev.eden_emu.eden.desktop .
|
||||
cp ../dist/dev.eden_emu.eden.svg .
|
||||
|
||||
ln -sf ./dev.eden_emu.eden.svg ./.DirIcon
|
||||
|
||||
UPINFO='gh-releases-zsync|eden-emulator|Releases|latest|*.AppImage.zsync'
|
||||
|
||||
if [ "$DEVEL" = 'true' ]; then
|
||||
sed -i 's|Name=Eden|Name=Eden Nightly|' ./dev.eden_emu.eden.desktop
|
||||
UPINFO="$(echo "$UPINFO" | sed 's|Releases|nightly|')"
|
||||
fi
|
||||
|
||||
LIBDIR="/usr/lib"
|
||||
|
||||
# Workaround for Gentoo
|
||||
if [ ! -d "$LIBDIR/qt6" ]
|
||||
then
|
||||
LIBDIR="/usr/lib64"
|
||||
fi
|
||||
|
||||
# Workaround for Debian
|
||||
if [ ! -d "$LIBDIR/qt6" ]
|
||||
then
|
||||
LIBDIR="/usr/lib/${BASE_ARCH}-linux-gnu"
|
||||
fi
|
||||
|
||||
# Bundle all libs
|
||||
|
||||
wget --retry-connrefused --tries=30 "$SHARUN" -O ./sharun-aio
|
||||
chmod +x ./sharun-aio
|
||||
xvfb-run -a ./sharun-aio l -p -v -e -s -k \
|
||||
../$BUILDDIR/bin/eden* \
|
||||
$LIBDIR/lib*GL*.so* \
|
||||
$LIBDIR/dri/* \
|
||||
$LIBDIR/vdpau/* \
|
||||
$LIBDIR/libvulkan* \
|
||||
$LIBDIR/libXss.so* \
|
||||
$LIBDIR/libdecor-0.so* \
|
||||
$LIBDIR/libgamemode.so* \
|
||||
$LIBDIR/qt6/plugins/audio/* \
|
||||
$LIBDIR/qt6/plugins/bearer/* \
|
||||
$LIBDIR/qt6/plugins/imageformats/* \
|
||||
$LIBDIR/qt6/plugins/iconengines/* \
|
||||
$LIBDIR/qt6/plugins/platforms/* \
|
||||
$LIBDIR/qt6/plugins/platformthemes/* \
|
||||
$LIBDIR/qt6/plugins/platforminputcontexts/* \
|
||||
$LIBDIR/qt6/plugins/styles/* \
|
||||
$LIBDIR/qt6/plugins/xcbglintegrations/* \
|
||||
$LIBDIR/qt6/plugins/wayland-*/* \
|
||||
$LIBDIR/pulseaudio/* \
|
||||
$LIBDIR/pipewire-0.3/* \
|
||||
$LIBDIR/spa-0.2/*/* \
|
||||
$LIBDIR/alsa-lib/*
|
||||
|
||||
rm -f ./sharun-aio
|
||||
|
||||
# Prepare sharun
|
||||
if [ "$ARCH" = 'aarch64' ]; then
|
||||
# allow the host vulkan to be used for aarch64 given the sad situation
|
||||
echo 'SHARUN_ALLOW_SYS_VKICD=1' > ./.env
|
||||
fi
|
||||
|
||||
# Workaround for Gentoo
|
||||
if [ -d "shared/libproxy" ]; then
|
||||
cp shared/libproxy/* lib/
|
||||
fi
|
||||
|
||||
ln -f ./sharun ./AppRun
|
||||
./sharun -g
|
||||
|
||||
# turn appdir into appimage
|
||||
cd ..
|
||||
wget -q "$URUNTIME" -O ./uruntime
|
||||
chmod +x ./uruntime
|
||||
|
||||
#Add udpate info to runtime
|
||||
echo "Adding update information \"$UPINFO\" to runtime..."
|
||||
./uruntime --appimage-addupdinfo "$UPINFO"
|
||||
|
||||
echo "Generating AppImage..."
|
||||
./uruntime --appimage-mkdwarfs -f \
|
||||
--set-owner 0 --set-group 0 \
|
||||
--no-history --no-create-timestamp \
|
||||
--categorize=hotness --hotness-list=.ci/linux/eden.dwfsprof \
|
||||
--compression zstd:level=22 -S26 -B32 \
|
||||
--header uruntime \
|
||||
-N 4 \
|
||||
-i ./AppDir -o Eden-"$VERSION"-"$ARCH".AppImage
|
||||
|
||||
echo "Generating zsync file..."
|
||||
zsyncmake *.AppImage -u *.AppImage
|
||||
echo "All Done!"
|
||||
@@ -1,51 +0,0 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
if [ "$COMPILER" == "clang" ]
|
||||
then
|
||||
EXTRA_CMAKE_FLAGS+=(
|
||||
-DCMAKE_CXX_COMPILER=clang-cl
|
||||
-DCMAKE_C_COMPILER=clang-cl
|
||||
-DCMAKE_CXX_FLAGS="-O3"
|
||||
-DCMAKE_C_FLAGS="-O3"
|
||||
)
|
||||
|
||||
BUILD_TYPE="RelWithDebInfo"
|
||||
fi
|
||||
|
||||
[ -z "$WINDEPLOYQT" ] && { echo "WINDEPLOYQT environment variable required."; exit 1; }
|
||||
|
||||
echo $EXTRA_CMAKE_FLAGS
|
||||
|
||||
mkdir -p build && cd build
|
||||
cmake .. -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE="${BUILD_TYPE:-Release}" \
|
||||
-DENABLE_QT_TRANSLATION=ON \
|
||||
-DUSE_DISCORD_PRESENCE=ON \
|
||||
-DYUZU_USE_BUNDLED_SDL2=ON \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DYUZU_TESTS=OFF \
|
||||
-DDYNARMIC_TESTS=OFF \
|
||||
-DYUZU_CMD=OFF \
|
||||
-DYUZU_ROOM_STANDALONE=OFF \
|
||||
-DYUZU_USE_QT_MULTIMEDIA=${USE_MULTIMEDIA:-false} \
|
||||
-DYUZU_USE_QT_WEB_ENGINE=${USE_WEBENGINE:-false} \
|
||||
-DENABLE_LTO=ON \
|
||||
-DCMAKE_EXE_LINKER_FLAGS=" /LTCG" \
|
||||
-DYUZU_USE_BUNDLED_QT=${BUNDLE_QT:-false} \
|
||||
-DUSE_CCACHE=${CCACHE:-false} \
|
||||
-DENABLE_UPDATE_CHECKER=${DEVEL:-true} \
|
||||
"${EXTRA_CMAKE_FLAGS[@]}" \
|
||||
"$@"
|
||||
|
||||
ninja
|
||||
|
||||
set +e
|
||||
rm -f bin/*.pdb
|
||||
set -e
|
||||
|
||||
$WINDEPLOYQT --release --no-compiler-runtime --no-opengl-sw --no-system-dxc-compiler --no-system-d3d-compiler --dir pkg bin/eden.exe
|
||||
|
||||
cp bin/* pkg
|
||||
@@ -1,18 +0,0 @@
|
||||
GITDATE=$(git show -s --date=short --format='%ad' | tr -d "-")
|
||||
GITREV=$(git show -s --format='%h')
|
||||
|
||||
ZIP_NAME="Eden-Windows-${ARCH}-${GITDATE}-${GITREV}.zip"
|
||||
|
||||
ARTIFACTS_DIR="artifacts"
|
||||
PKG_DIR="build/pkg"
|
||||
|
||||
mkdir -p "$ARTIFACTS_DIR"
|
||||
|
||||
TMP_DIR=$(mktemp -d)
|
||||
|
||||
cp -r "$PKG_DIR"/* "$TMP_DIR"/
|
||||
cp LICENSE* README* "$TMP_DIR"/
|
||||
|
||||
7z a -tzip "$ARTIFACTS_DIR/$ZIP_NAME" "$TMP_DIR"/*
|
||||
|
||||
rm -rf "$TMP_DIR"
|
||||
@@ -3,6 +3,8 @@ name: Check Strings
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
check-strings:
|
||||
@@ -10,7 +12,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Find Unused Strings
|
||||
run: ./tools/unused-strings.sh
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
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()
|
||||
@@ -1,287 +0,0 @@
|
||||
From 67bf3d1381b1faf59e87001d6156ba4e21cada14 Mon Sep 17 00:00:00 2001
|
||||
From: crueter <crueter@eden-emu.dev>
|
||||
Date: Mon, 29 Dec 2025 21:22:36 -0500
|
||||
Subject: [PATCH] [cmake] refactor: shared/static handling
|
||||
|
||||
This significantly redoes the way shared and static libraries are
|
||||
handled. Now, it's controlled by two options: `SPIRV_TOOLS_BUILD_STATIC`
|
||||
and `SPIRV_TOOLS_BUILD_SHARED`.
|
||||
|
||||
The default configuration (no `BUILD_SHARED_LIBS` set, options left at
|
||||
default) is to build shared ONLY if this is the master project, or
|
||||
static ONLY if this is a subproject (e.g. FetchContent, CPM.cmake). Also
|
||||
I should note that static-only (i.e. no shared) is now a supported
|
||||
target, this is done because projects including it as a submodule e.g.
|
||||
on Android or Windows may prefer this.
|
||||
|
||||
Now the shared/static handling:
|
||||
- static ON, shared OFF: Only generates `.a` libraries.
|
||||
- static ON, shared ON: Generates `.a` libraries, but also
|
||||
`libSPIRV-Tools.so`
|
||||
- static OFF, shared ON: Only generates `.so` libraries.
|
||||
|
||||
Notable TODOs:
|
||||
- SPIRV-Tools-shared.pc seems redundant--how should we handle which one
|
||||
to use in the case of distributions that distribute both types (MSYS2
|
||||
for instance)?
|
||||
* *Note: pkgconfig sucks at this and usually just leaves it up to the
|
||||
user, so the optimal solution may indeed be doing absolutely
|
||||
nothing.* CMake is unaffected :)
|
||||
- use namespaces in the CMake config files pleaaaaase
|
||||
|
||||
This is going to change things a good bit for package maintainers, but
|
||||
cest la vie. It's for the greater good, I promise.
|
||||
|
||||
Signed-off-by: crueter <crueter@eden-emu.dev>
|
||||
---
|
||||
CMakeLists.txt | 108 +++++++++++++++++++++++++-----------------
|
||||
source/CMakeLists.txt | 62 ++++++++++++------------
|
||||
2 files changed, 94 insertions(+), 76 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 4d843b4d2f..07201f690f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -14,6 +14,15 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.22.1)
|
||||
|
||||
+# master project detection--useful for FetchContent/submodule inclusion
|
||||
+set(master_project OFF)
|
||||
+set(subproject ON)
|
||||
+
|
||||
+if (NOT DEFINED PROJECT_NAME)
|
||||
+ set(master_project ON)
|
||||
+ set(subproject OFF)
|
||||
+endif()
|
||||
+
|
||||
project(spirv-tools)
|
||||
|
||||
# Avoid a bug in CMake 3.22.1. By default it will set -std=c++11 for
|
||||
@@ -135,46 +144,49 @@ if (DEFINED SPIRV_TOOLS_EXTRA_DEFINITIONS)
|
||||
add_definitions(${SPIRV_TOOLS_EXTRA_DEFINITIONS})
|
||||
endif()
|
||||
|
||||
-# Library build setting definitions:
|
||||
-#
|
||||
-# * SPIRV_TOOLS_BUILD_STATIC - ON or OFF - Defaults to ON.
|
||||
-# If enabled the following targets will be created:
|
||||
-# ${SPIRV_TOOLS}-static - STATIC library.
|
||||
-# Has full public symbol visibility.
|
||||
-# ${SPIRV_TOOLS}-shared - SHARED library.
|
||||
-# Has default-hidden symbol visibility.
|
||||
-# ${SPIRV_TOOLS} - will alias to one of above, based on BUILD_SHARED_LIBS.
|
||||
-# If disabled the following targets will be created:
|
||||
-# ${SPIRV_TOOLS} - either STATIC or SHARED based on SPIRV_TOOLS_LIBRARY_TYPE.
|
||||
-# Has full public symbol visibility.
|
||||
-# ${SPIRV_TOOLS}-shared - SHARED library.
|
||||
-# Has default-hidden symbol visibility.
|
||||
-#
|
||||
-# * SPIRV_TOOLS_LIBRARY_TYPE - SHARED or STATIC.
|
||||
-# Specifies the library type used for building SPIRV-Tools libraries.
|
||||
-# Defaults to SHARED when BUILD_SHARED_LIBS=1, otherwise STATIC.
|
||||
-#
|
||||
-# * SPIRV_TOOLS_FULL_VISIBILITY - "${SPIRV_TOOLS}-static" or "${SPIRV_TOOLS}"
|
||||
-# Evaluates to the SPIRV_TOOLS target library name that has no hidden symbols.
|
||||
-# This is used by internal targets for accessing symbols that are non-public.
|
||||
-# Note this target provides no API stability guarantees.
|
||||
-#
|
||||
-# Ideally, all of these will go away - see https://github.com/KhronosGroup/SPIRV-Tools/issues/3909.
|
||||
-option(ENABLE_EXCEPTIONS_ON_MSVC "Build SPIRV-TOOLS with c++ exceptions enabled in MSVC" ON)
|
||||
-option(SPIRV_TOOLS_BUILD_STATIC "Build ${SPIRV_TOOLS}-static target. ${SPIRV_TOOLS} will alias to ${SPIRV_TOOLS}-static or ${SPIRV_TOOLS}-shared based on BUILD_SHARED_LIBS" ON)
|
||||
-if(SPIRV_TOOLS_BUILD_STATIC)
|
||||
- set(SPIRV_TOOLS_FULL_VISIBILITY ${SPIRV_TOOLS}-static)
|
||||
+# If BUILD_SHARED_LIBS is undefined, set it based on whether we are
|
||||
+# the master project or a subproject
|
||||
+if (NOT DEFINED BUILD_SHARED_LIBS)
|
||||
+ set(BUILD_SHARED_LIBS ${master_project})
|
||||
+endif()
|
||||
+
|
||||
+if (BUILD_SHARED_LIBS)
|
||||
+ set(static_default OFF)
|
||||
+else()
|
||||
+ set(static_default ON)
|
||||
+endif()
|
||||
+
|
||||
+option(SPIRV_TOOLS_BUILD_SHARED "Build ${SPIRV_TOOLS} as a shared library"
|
||||
+ ${BUILD_SHARED_LIBS})
|
||||
+option(SPIRV_TOOLS_BUILD_STATIC "Build ${SPIRV_TOOLS} as a static library"
|
||||
+ ${static_default})
|
||||
+
|
||||
+# Avoid conflict between the dll import library and
|
||||
+# the static library (thanks microsoft)
|
||||
+if(CMAKE_STATIC_LIBRARY_PREFIX STREQUAL "" AND
|
||||
+ CMAKE_STATIC_LIBRARY_SUFFIX STREQUAL ".lib")
|
||||
+ set(SPIRV_TOOLS_STATIC_LIBNAME "${SPIRV_TOOLS}-static")
|
||||
+else()
|
||||
+ set(SPIRV_TOOLS_STATIC_LIBNAME "${SPIRV_TOOLS}")
|
||||
+endif()
|
||||
+
|
||||
+if (SPIRV_TOOLS_BUILD_STATIC)
|
||||
+ # If building a static library at all, always build other libraries as static,
|
||||
+ # and link to the static SPIRV-Tools library.
|
||||
set(SPIRV_TOOLS_LIBRARY_TYPE "STATIC")
|
||||
-else(SPIRV_TOOLS_BUILD_STATIC)
|
||||
- set(SPIRV_TOOLS_FULL_VISIBILITY ${SPIRV_TOOLS})
|
||||
- if (NOT DEFINED SPIRV_TOOLS_LIBRARY_TYPE)
|
||||
- if(BUILD_SHARED_LIBS)
|
||||
- set(SPIRV_TOOLS_LIBRARY_TYPE "SHARED")
|
||||
- else()
|
||||
- set(SPIRV_TOOLS_LIBRARY_TYPE "STATIC")
|
||||
- endif()
|
||||
- endif()
|
||||
-endif(SPIRV_TOOLS_BUILD_STATIC)
|
||||
+ set(SPIRV_TOOLS_FULL_VISIBILITY ${SPIRV_TOOLS}-static)
|
||||
+elseif (SPIRV_TOOLS_BUILD_SHARED)
|
||||
+ # If only building a shared library, link other libraries to the
|
||||
+ # shared library. Also, other libraries should be shared
|
||||
+ set(SPIRV_TOOLS_LIBRARY_TYPE "SHARED")
|
||||
+ set(SPIRV_TOOLS_FULL_VISIBILITY ${SPIRV_TOOLS}-shared)
|
||||
+else()
|
||||
+ message(FATAL_ERROR "You must set one of "
|
||||
+ "SPIRV_TOOLS_BUILD_STATIC or SPIRV_TOOLS_BUILD_SHARED!")
|
||||
+endif()
|
||||
+
|
||||
+option(ENABLE_EXCEPTIONS_ON_MSVC
|
||||
+ "Build SPIRV-TOOLS with C++ exceptions enabled in MSVC" ON)
|
||||
|
||||
function(spvtools_default_compile_options TARGET)
|
||||
target_compile_options(${TARGET} PRIVATE ${SPIRV_WARNINGS})
|
||||
@@ -372,7 +384,7 @@ if (NOT "${SPIRV_SKIP_TESTS}")
|
||||
endif()
|
||||
|
||||
set(SPIRV_LIBRARIES "-lSPIRV-Tools-opt -lSPIRV-Tools -lSPIRV-Tools-link")
|
||||
-set(SPIRV_SHARED_LIBRARIES "-lSPIRV-Tools-shared")
|
||||
+set(SPIRV_SHARED_LIBRARIES "-lSPIRV-Tools")
|
||||
|
||||
# Build pkg-config file
|
||||
# Use a first-class target so it's regenerated when relevant files are updated.
|
||||
@@ -388,7 +400,12 @@ add_custom_command(
|
||||
-DSPIRV_LIBRARIES=${SPIRV_LIBRARIES}
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/write_pkg_config.cmake
|
||||
DEPENDS "CHANGES" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/SPIRV-Tools.pc.in" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/write_pkg_config.cmake")
|
||||
-add_custom_command(
|
||||
+
|
||||
+set(pc_files ${CMAKE_CURRENT_BINARY_DIR}/SPIRV-Tools.pc)
|
||||
+
|
||||
+# TODO(crueter): remove?
|
||||
+if (SPIRV_TOOLS_BUILD_SHARED)
|
||||
+ add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/SPIRV-Tools-shared.pc
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DCHANGES_FILE=${CMAKE_CURRENT_SOURCE_DIR}/CHANGES
|
||||
@@ -400,9 +417,12 @@ add_custom_command(
|
||||
-DSPIRV_SHARED_LIBRARIES=${SPIRV_SHARED_LIBRARIES}
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/write_pkg_config.cmake
|
||||
DEPENDS "CHANGES" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/SPIRV-Tools-shared.pc.in" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/write_pkg_config.cmake")
|
||||
-add_custom_target(spirv-tools-pkg-config
|
||||
- ALL
|
||||
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/SPIRV-Tools-shared.pc ${CMAKE_CURRENT_BINARY_DIR}/SPIRV-Tools.pc)
|
||||
+ set(pc_files ${pc_files} ${CMAKE_CURRENT_BINARY_DIR}/SPIRV-Tools-shared.pc)
|
||||
+endif()
|
||||
+
|
||||
+add_custom_target(spirv-tools-pkg-config
|
||||
+ ALL
|
||||
+ DEPENDS ${pc_files})
|
||||
|
||||
# Install pkg-config file
|
||||
if (ENABLE_SPIRV_TOOLS_INSTALL)
|
||||
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
|
||||
index bfa1e661bc..fd3712c70c 100644
|
||||
--- a/source/CMakeLists.txt
|
||||
+++ b/source/CMakeLists.txt
|
||||
@@ -337,49 +337,44 @@ function(spirv_tools_default_target_options target)
|
||||
)
|
||||
set_property(TARGET ${target} PROPERTY FOLDER "SPIRV-Tools libraries")
|
||||
spvtools_check_symbol_exports(${target})
|
||||
- add_dependencies(${target} spirv-tools-build-version core_tables extinst_tables)
|
||||
+ add_dependencies(${target}
|
||||
+ spirv-tools-build-version core_tables extinst_tables)
|
||||
endfunction()
|
||||
|
||||
-# Always build ${SPIRV_TOOLS}-shared. This is expected distro packages, and
|
||||
-# unlike the other SPIRV_TOOLS target, defaults to hidden symbol visibility.
|
||||
-add_library(${SPIRV_TOOLS}-shared SHARED ${SPIRV_SOURCES})
|
||||
-if (SPIRV_TOOLS_USE_MIMALLOC)
|
||||
- target_link_libraries(${SPIRV_TOOLS}-shared PRIVATE mimalloc-static)
|
||||
+if (SPIRV_TOOLS_BUILD_SHARED)
|
||||
+ add_library(${SPIRV_TOOLS}-shared SHARED ${SPIRV_SOURCES})
|
||||
+ if (SPIRV_TOOLS_USE_MIMALLOC)
|
||||
+ target_link_libraries(${SPIRV_TOOLS}-shared PRIVATE mimalloc-static)
|
||||
+ endif()
|
||||
+
|
||||
+ set_target_properties(${SPIRV_TOOLS}-shared PROPERTIES
|
||||
+ OUTPUT_NAME "${SPIRV_TOOLS}")
|
||||
+ spirv_tools_default_target_options(${SPIRV_TOOLS}-shared)
|
||||
+
|
||||
+ target_compile_definitions(${SPIRV_TOOLS}-shared
|
||||
+ PRIVATE SPIRV_TOOLS_IMPLEMENTATION
|
||||
+ PUBLIC SPIRV_TOOLS_SHAREDLIB)
|
||||
+
|
||||
+ list(APPEND SPIRV_TOOLS_TARGETS ${SPIRV_TOOLS}-shared)
|
||||
endif()
|
||||
-spirv_tools_default_target_options(${SPIRV_TOOLS}-shared)
|
||||
-set_target_properties(${SPIRV_TOOLS}-shared PROPERTIES CXX_VISIBILITY_PRESET hidden)
|
||||
-target_compile_definitions(${SPIRV_TOOLS}-shared
|
||||
- PRIVATE SPIRV_TOOLS_IMPLEMENTATION
|
||||
- PUBLIC SPIRV_TOOLS_SHAREDLIB
|
||||
-)
|
||||
|
||||
if(SPIRV_TOOLS_BUILD_STATIC)
|
||||
add_library(${SPIRV_TOOLS}-static STATIC ${SPIRV_SOURCES})
|
||||
if (SPIRV_TOOLS_USE_MIMALLOC AND SPIRV_TOOLS_USE_MIMALLOC_IN_STATIC_BUILD)
|
||||
target_link_libraries(${SPIRV_TOOLS}-shared PRIVATE mimalloc-static)
|
||||
endif()
|
||||
+
|
||||
spirv_tools_default_target_options(${SPIRV_TOOLS}-static)
|
||||
- # The static target does not have the '-static' suffix.
|
||||
- set_target_properties(${SPIRV_TOOLS}-static PROPERTIES OUTPUT_NAME "${SPIRV_TOOLS}")
|
||||
-
|
||||
- # Create the "${SPIRV_TOOLS}" target as an alias to either "${SPIRV_TOOLS}-static"
|
||||
- # or "${SPIRV_TOOLS}-shared" depending on the value of BUILD_SHARED_LIBS.
|
||||
- if(BUILD_SHARED_LIBS)
|
||||
- add_library(${SPIRV_TOOLS} ALIAS ${SPIRV_TOOLS}-shared)
|
||||
- else()
|
||||
- add_library(${SPIRV_TOOLS} ALIAS ${SPIRV_TOOLS}-static)
|
||||
- endif()
|
||||
+ set_target_properties(${SPIRV_TOOLS}-static PROPERTIES
|
||||
+ OUTPUT_NAME "${SPIRV_TOOLS_STATIC_LIBNAME}")
|
||||
|
||||
- set(SPIRV_TOOLS_TARGETS ${SPIRV_TOOLS}-static ${SPIRV_TOOLS}-shared)
|
||||
-else()
|
||||
- add_library(${SPIRV_TOOLS} ${SPIRV_TOOLS_LIBRARY_TYPE} ${SPIRV_SOURCES})
|
||||
- if (SPIRV_TOOLS_USE_MIMALLOC)
|
||||
- target_link_libraries(${SPIRV_TOOLS} PRIVATE mimalloc-static)
|
||||
- endif()
|
||||
- spirv_tools_default_target_options(${SPIRV_TOOLS})
|
||||
- set(SPIRV_TOOLS_TARGETS ${SPIRV_TOOLS} ${SPIRV_TOOLS}-shared)
|
||||
+ list(APPEND SPIRV_TOOLS_TARGETS ${SPIRV_TOOLS}-static)
|
||||
endif()
|
||||
|
||||
+# Create the "SPIRV-Tools" target as an alias to either "SPIRV-Tools-static"
|
||||
+# or "SPIRV-Tools-shared" depending on the value of SPIRV_TOOLS_BUILD_SHARED.
|
||||
+add_library(${SPIRV_TOOLS} ALIAS ${SPIRV_TOOLS_FULL_VISIBILITY})
|
||||
+
|
||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
find_library(LIBRT rt)
|
||||
if(LIBRT)
|
||||
@@ -390,14 +385,17 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
endif()
|
||||
|
||||
if(ENABLE_SPIRV_TOOLS_INSTALL)
|
||||
- if (SPIRV_TOOLS_USE_MIMALLOC AND (NOT SPIRV_TOOLS_BUILD_STATIC OR SPIRV_TOOLS_USE_MIMALLOC_IN_STATIC_BUILD))
|
||||
+ if (SPIRV_TOOLS_USE_MIMALLOC AND
|
||||
+ (NOT SPIRV_TOOLS_BUILD_STATIC OR SPIRV_TOOLS_USE_MIMALLOC_IN_STATIC_BUILD))
|
||||
list(APPEND SPIRV_TOOLS_TARGETS mimalloc-static)
|
||||
endif()
|
||||
install(TARGETS ${SPIRV_TOOLS_TARGETS} EXPORT ${SPIRV_TOOLS}Targets)
|
||||
export(EXPORT ${SPIRV_TOOLS}Targets FILE ${SPIRV_TOOLS}Target.cmake)
|
||||
|
||||
spvtools_config_package_dir(${SPIRV_TOOLS} PACKAGE_DIR)
|
||||
- install(EXPORT ${SPIRV_TOOLS}Targets FILE ${SPIRV_TOOLS}Target.cmake DESTINATION ${PACKAGE_DIR})
|
||||
+ install(EXPORT ${SPIRV_TOOLS}Targets
|
||||
+ FILE ${SPIRV_TOOLS}Target.cmake
|
||||
+ DESTINATION ${PACKAGE_DIR})
|
||||
|
||||
# Special config file for root library compared to other libs.
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/${SPIRV_TOOLS}Config.cmake
|
||||
+4
-11
@@ -130,7 +130,6 @@ if (YUZU_STATIC_BUILD)
|
||||
|
||||
# these libs do not properly provide static libs/let you do it with cmake
|
||||
set(fmt_FORCE_BUNDLED ON)
|
||||
set(SPIRV-Tools_FORCE_BUNDLED ON)
|
||||
set(SPIRV-Headers_FORCE_BUNDLED ON)
|
||||
set(zstd_FORCE_BUNDLED ON)
|
||||
endif()
|
||||
@@ -269,11 +268,6 @@ if (NOT EXISTS ${PROJECT_BINARY_DIR}/${compat_json})
|
||||
file(WRITE ${PROJECT_BINARY_DIR}/${compat_json} "")
|
||||
endif()
|
||||
|
||||
if (YUZU_LEGACY)
|
||||
message(WARNING "Making legacy build. Performance may suffer.")
|
||||
add_compile_definitions(YUZU_LEGACY)
|
||||
endif()
|
||||
|
||||
if (ARCHITECTURE_arm64 AND (ANDROID OR PLATFORM_LINUX))
|
||||
set(HAS_NCE 1)
|
||||
add_compile_definitions(HAS_NCE=1)
|
||||
@@ -425,10 +419,10 @@ if (zstd_ADDED)
|
||||
add_library(zstd::libzstd ALIAS libzstd_static)
|
||||
endif()
|
||||
|
||||
if (NOT YUZU_STATIC_ROOM)
|
||||
# nlohmann
|
||||
AddJsonPackage(nlohmann)
|
||||
# nlohmann
|
||||
AddJsonPackage(nlohmann)
|
||||
|
||||
if (NOT YUZU_STATIC_ROOM)
|
||||
# zlib
|
||||
AddJsonPackage(zlib)
|
||||
|
||||
@@ -486,7 +480,7 @@ endfunction()
|
||||
# =============================================
|
||||
|
||||
if (APPLE)
|
||||
foreach(fw Carbon Metal Cocoa IOKit CoreVideo CoreMedia)
|
||||
foreach(fw Carbon Metal Cocoa IOKit CoreVideo CoreMedia Security)
|
||||
find_library(${fw}_LIBRARY ${fw} REQUIRED)
|
||||
list(APPEND PLATFORM_LIBRARIES ${${fw}_LIBRARY})
|
||||
endforeach()
|
||||
@@ -523,7 +517,6 @@ if (NOT YUZU_STATIC_ROOM)
|
||||
find_package(VulkanMemoryAllocator)
|
||||
find_package(VulkanUtilityLibraries)
|
||||
find_package(SimpleIni)
|
||||
find_package(SPIRV-Tools)
|
||||
find_package(sirit)
|
||||
find_package(gamemode)
|
||||
find_package(frozen)
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# SPDX-FileCopyrightText: 2022 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_search_module(SPIRV-Tools QUIET IMPORTED_TARGET SPIRV-Tools)
|
||||
find_package_handle_standard_args(SPIRV-Tools
|
||||
REQUIRED_VARS SPIRV-Tools_LINK_LIBRARIES
|
||||
VERSION_VAR SPIRV-Tools_VERSION
|
||||
)
|
||||
|
||||
if (PLATFORM_MSYS)
|
||||
FixMsysPath(PkgConfig::SPIRV-Tools)
|
||||
endif()
|
||||
|
||||
if (SPIRV-Tools_FOUND AND NOT TARGET SPIRV-Tools::SPIRV-Tools)
|
||||
if (TARGET SPIRV-Tools)
|
||||
add_library(SPIRV-Tools::SPIRV-Tools ALIAS SPIRV-Tools)
|
||||
else()
|
||||
add_library(SPIRV-Tools::SPIRV-Tools ALIAS PkgConfig::SPIRV-Tools)
|
||||
endif()
|
||||
endif()
|
||||
@@ -33,9 +33,11 @@ endif()
|
||||
set(GIT_DESC ${BUILD_VERSION})
|
||||
|
||||
# Generate cpp with Git revision from template
|
||||
# Also if this is a CI build, add the build name (ie: Nightly, Canary) to the scm_rev file as well
|
||||
|
||||
# Auto-updater metadata! Must somewhat mirror GitHub/Forgejo API endpoint
|
||||
# TODO(crueter): Stable releases feed.
|
||||
set(BUILD_AUTO_UPDATE_STABLE_REPO "eden-emu/eden")
|
||||
set(BUILD_AUTO_UPDATE_STABLE_API "git.eden-emu.dev")
|
||||
set(BUILD_AUTO_UPDATE_STABLE_API_PATH "/api/v1/repos/")
|
||||
|
||||
set(BUILD_AUTO_UPDATE_API_PATH "/latest/release.json")
|
||||
if (NIGHTLY_BUILD)
|
||||
|
||||
Vendored
+566
-498
File diff suppressed because it is too large
Load Diff
Vendored
+566
-496
File diff suppressed because it is too large
Load Diff
Vendored
+566
-496
File diff suppressed because it is too large
Load Diff
Vendored
+566
-496
File diff suppressed because it is too large
Load Diff
Vendored
+566
-496
File diff suppressed because it is too large
Load Diff
Vendored
+566
-496
File diff suppressed because it is too large
Load Diff
Vendored
+603
-535
File diff suppressed because it is too large
Load Diff
Vendored
+639
-567
File diff suppressed because it is too large
Load Diff
Vendored
+566
-499
File diff suppressed because it is too large
Load Diff
Vendored
+566
-496
File diff suppressed because it is too large
Load Diff
Vendored
+566
-499
File diff suppressed because it is too large
Load Diff
Vendored
+570
-502
File diff suppressed because it is too large
Load Diff
Vendored
+566
-496
File diff suppressed because it is too large
Load Diff
Vendored
+566
-496
File diff suppressed because it is too large
Load Diff
Vendored
+566
-496
File diff suppressed because it is too large
Load Diff
Vendored
+566
-496
File diff suppressed because it is too large
Load Diff
Vendored
+564
-497
File diff suppressed because it is too large
Load Diff
Vendored
+566
-499
File diff suppressed because it is too large
Load Diff
Vendored
+566
-496
File diff suppressed because it is too large
Load Diff
Vendored
+1290
-1214
File diff suppressed because it is too large
Load Diff
Vendored
+565
-498
File diff suppressed because it is too large
Load Diff
Vendored
+566
-496
File diff suppressed because it is too large
Load Diff
Vendored
+568
-500
File diff suppressed because it is too large
Load Diff
Vendored
+566
-496
File diff suppressed because it is too large
Load Diff
Vendored
+566
-496
File diff suppressed because it is too large
Load Diff
Vendored
+574
-503
File diff suppressed because it is too large
Load Diff
Vendored
+566
-498
File diff suppressed because it is too large
Load Diff
+30
-4
@@ -4,7 +4,8 @@
|
||||
- [Arch Linux](#arch-linux)
|
||||
- [Gentoo Linux](#gentoo-linux)
|
||||
- [macOS](#macos)
|
||||
- [Solaris](#solaris)
|
||||
- [OpenIndiana](#openindiana)
|
||||
- [OmniOS](#omnios)
|
||||
- [HaikuOS](#haikuos)
|
||||
- [OpenBSD](#openbsd)
|
||||
- [FreeBSD](#freebsd)
|
||||
@@ -31,14 +32,14 @@ If you're having issues with building, always consult that ebuild.
|
||||
|
||||
macOS is largely untested. Expect crashes, significant Vulkan issues, and other fun stuff.
|
||||
|
||||
## Solaris
|
||||
## OpenIndiana
|
||||
|
||||
Always consult [the OpenIndiana package list](https://pkg.openindiana.org/hipster/en/index.shtml) to cross-verify availability.
|
||||
|
||||
Run the usual update + install of essential toolings: `sudo pkg update && sudo pkg install git cmake`.
|
||||
|
||||
- **gcc**: `sudo pkg install developer/gcc-14`.
|
||||
- **clang**: Version 20 is broken, use `sudo pkg install developer/clang-19`.
|
||||
- **gcc**: Install either `developer/gcc-14`.
|
||||
- **clang**: Version 20 is broken, install `developer/clang-19`.
|
||||
|
||||
Qt Widgets appears to be broken. For now, add `-DENABLE_QT=OFF` to your configure command. In the meantime, a Qt Quick frontend is in the works--check back later!
|
||||
|
||||
@@ -67,6 +68,31 @@ export LIBGL_ALWAYS_SOFTWARE=1
|
||||
- If using OpenIndiana, due to a bug in SDL2's CMake configuration, audio driver defaults to SunOS `<sys/audioio.h>`, which does not exist on OpenIndiana. Using external or bundled SDL2 may solve this.
|
||||
- System OpenSSL generally does not work. Instead, use `-DYUZU_USE_BUNDLED_OPENSSL=ON` to use a bundled static OpenSSL, or build a system dependency from source.
|
||||
|
||||
## OmniOS
|
||||
|
||||
Install `developer/gcc14` on OmniOS using pkgsrc.
|
||||
|
||||
Since so many dependencies are missing on `OmniOS`, you may wish to use `-DCPMUTIL_FORCE_BUNDLED=ON -DYUZU_USE_EXTERNAL_SDL2=ON`
|
||||
|
||||
For OmniOS you are required to build glslang yourself:
|
||||
```sh
|
||||
sudo pkg install python-313
|
||||
git clone --depth=1 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
|
||||
```
|
||||
|
||||
It may be tempting to specify `-t glslang`, but this will cause installation to fail. So don't.
|
||||
|
||||
Using `--parallel` on CMake incorrectly passes `dmake ... -jn` instead of `dmake ... -j n`, this is a bug with OmniOS's CMake, and as such it's recommended to not use this option until it's fixed.
|
||||
|
||||
You may also need to install `gmake` in order to properly build FFmpeg, this is provided by the `build-essential` package.
|
||||
|
||||
If it wasn't obvious already, you require a X11 server to properly run the emulator within OmniOS, [this guide](https://web.archive.org/web/20260424200928/https://geekblood.wordpress.com/2017/10/26/installing-x11-and-a-desktop-environment-on-omnios/) is a great starting point for that, the links to pkgsrc are outdated so follow [this exemplar](https://pkgsrc.smartos.org/install-on-illumos/) as well:
|
||||
|
||||
## HaikuOS
|
||||
|
||||
It's recommended to do a `pkgman full-sync` before installing. See [HaikuOS: Installing applications](https://www.haiku-os.org/guides/daily-tasks/install-applications/). Sometimes the process may be interrupted by an error like "Interrupted syscall". Simply firing the command again fixes the issue. By default `g++` is included on the default installation.
|
||||
|
||||
+27
-24
@@ -9,6 +9,7 @@ When reporting issues or finding bugs, we often need backtraces, debug logs, or
|
||||
If your bug is related to a graphical issue--e.g. mismatched colors, vertex explosions, flickering, etc.--then you are required to include graphical debugging logs in your issue reports.
|
||||
|
||||
Graphics Debugging is found in General -> Debug on desktop, and Advanced Settings -> Debug on Android. Android users are all set; however, desktop users may need to install the Vulkan Validation Layers:
|
||||
|
||||
- Windows: Install the [Vulkan SDK](https://vulkan.lunarg.com/sdk/home)
|
||||
- Linux, BSD, etc: Install `vulkan-validation-layers`, `vulkan-layers`, or similar from your package manager. It should be located in e.g. `/usr/lib64/libVkLayer_khronos_validation.so`
|
||||
|
||||
@@ -30,15 +31,16 @@ Ignoring SIGSEGV when debugging in host:
|
||||
### gdb
|
||||
|
||||
You must have GDB installed for aarch64 to debug the target. Install it through your package manager, e.g.:
|
||||
* On Arch:
|
||||
* `sudo pacman -Syu aarch64-linux-gnu-gdb`
|
||||
* On Gentoo:
|
||||
* `sudo emerge --ask crossdev`
|
||||
* `sudo crossdev -t aarch64-unknown-linux-gnu --ex-gdb`
|
||||
|
||||
Run `./build/bin/eden-cli -c <path to your config file (see logs where you run eden normally to see where it is)> -d -g <path to game>`
|
||||
Or `Enable GDB Stub` at General > Debug, then hook up an aarch64-gdb:
|
||||
* `target remote localhost:6543`
|
||||
- On Arch:
|
||||
- `sudo pacman -Syu aarch64-linux-gnu-gdb`
|
||||
- On Gentoo:
|
||||
- `sudo emerge --ask crossdev`
|
||||
- `sudo crossdev -t aarch64-unknown-linux-gnu --ex-gdb`
|
||||
|
||||
Run `./build/bin/eden-cli -c <path to your config file (see logs where you run eden normally to see where it is)> -d -g <path to game>`, or `Enable GDB Stub` at General > Debug, then hook up an aarch64-gdb:
|
||||
|
||||
- `target remote localhost:6543`
|
||||
|
||||
Type `c` (for continue) and then if it crashes just do a `bt` (backtrace) and `layout asm`
|
||||
|
||||
@@ -69,26 +71,27 @@ For more information type `info gdb` and read [the man page](https://man7.org/li
|
||||
|
||||
## Simple checklist for debugging black screens using Renderdoc
|
||||
|
||||
Renderdoc is a free, cross platform, multi-graphics API debugger. It is an invaluable tool for diagnosing issues with graphics applications, and includes support for Vulkan. Get it [here](https://renderdoc.org).
|
||||
Renderdoc is a free, cross platform, multi-graphics API debugger. It is an invaluable tool for diagnosing issues with graphics applications, and includes support for Vulkan. Get it at [renderdoc.org](https://renderdoc.org).
|
||||
|
||||
Before using renderdoc to diagnose issues, it is always good to make sure there are no validation errors. Any errors means the behavior of the application is undefined. That said, renderdoc can help debug validation errors if you do have them.
|
||||
|
||||
When debugging a black screen, there are many ways the application could have setup Vulkan wrong.
|
||||
Here is a short checklist of items to look at to make sure are appropriate:
|
||||
* Draw call counts are correct (aka not zero, or if rendering many triangles, not 3)
|
||||
* Vertex buffers are bound
|
||||
* vertex attributes are correct - Make sure the size & offset of each attribute matches what should it should be
|
||||
* Any bound push constants and descriptors have the right data - including:
|
||||
* Matrices have correct values - double check the model, view, & projection matrices are uploaded correctly
|
||||
* Pipeline state is correct
|
||||
* viewport range is correct - x,y are 0,0; width & height are screen dimensions, minDepth is 0, maxDepth is 1, NDCDepthRange is 0,1
|
||||
* Fill mode matches expected - usually solid
|
||||
* Culling mode makes sense - commonly back or none
|
||||
* The winding direction is correct - typically CCW (counter clockwise)
|
||||
* Scissor region is correct - usually same as viewport's x,y,width, &height
|
||||
* Blend state is correct
|
||||
* Depth state is correct - typically enabled with Function set to Less than or Equal
|
||||
* Swapchain images are bound when rendering to the swapchain
|
||||
* Image being rendered to is the same as the one being presented when rendering to the swapchain
|
||||
|
||||
- Draw call counts are correct (aka not zero, or if rendering many triangles, not 3)
|
||||
- Vertex buffers are bound
|
||||
- vertex attributes are correct - Make sure the size & offset of each attribute matches what should it should be
|
||||
- Any bound push constants and descriptors have the right data - including:
|
||||
- Matrices have correct values - double check the model, view, & projection matrices are uploaded correctly
|
||||
- Pipeline state is correct
|
||||
- viewport range is correct - x,y are 0,0; width & height are screen dimensions, minDepth is 0, maxDepth is 1, NDCDepthRange is 0,1
|
||||
- Fill mode matches expected - usually solid
|
||||
- Culling mode makes sense - commonly back or none
|
||||
- The winding direction is correct - typically CCW (counter clockwise)
|
||||
- Scissor region is correct - usually same as viewport's x,y,width, &height
|
||||
- Blend state is correct
|
||||
- Depth state is correct - typically enabled with Function set to Less than or Equal
|
||||
- Swapchain images are bound when rendering to the swapchain
|
||||
- Image being rendered to is the same as the one being presented when rendering to the swapchain
|
||||
|
||||
Alternatively, a [RenderDoc Extension](https://github.com/baldurk/renderdoc-contrib/tree/main/baldurk/whereismydraw) ([Archive](https://web.archive.org/web/20250000000000*/https://github.com/baldurk/renderdoc-contrib/tree/main/baldurk/whereismydraw)) exists which automates doing a lot of these manual steps.
|
||||
|
||||
+13
-3
@@ -291,13 +291,23 @@ pkg install gcc14 git cmake unzip nasm autoconf bash pkgconf ffmpeg glslang gmak
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary>Solaris / OpenIndiana</summary>
|
||||
<summary>OpenIndiana</summary>
|
||||
|
||||
```sh
|
||||
sudo pkg install qt6 boost glslang libzip library/lz4 libusb-1 nlohmann-json openssl opus sdl2 zlib compress/zstd unzip pkg-config nasm autoconf mesa library/libdrm header-drm developer/fmt
|
||||
sudo pkg install git cmake qt6 boost glslang libzip library/lz4 libusb-1 nlohmann-json openssl opus sdl2 zlib compress/zstd unzip pkg-config nasm autoconf mesa library/libdrm header-drm developer/fmt
|
||||
```
|
||||
|
||||
[Caveats](./Caveats.md#solaris).
|
||||
[Caveats](./Caveats.md#openindiana).
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary>OmniOS</summary>
|
||||
|
||||
```sh
|
||||
sudo pkgin install git cmake autoconf build-essential libusb-1 nasm gcc13
|
||||
```
|
||||
|
||||
[Caveats](./Caveats.md#omnios).
|
||||
|
||||
</details>
|
||||
<details>
|
||||
|
||||
+14
-121
@@ -1,9 +1,11 @@
|
||||
# Development guidelines
|
||||
|
||||
## License Headers
|
||||
|
||||
All commits must have proper license header accreditation.
|
||||
|
||||
You can easily add all necessary license headers by running:
|
||||
|
||||
```sh
|
||||
git fetch origin master:master
|
||||
.ci/license-header.sh -u -c
|
||||
@@ -11,6 +13,7 @@ git push
|
||||
```
|
||||
|
||||
Alternatively, you may omit `-c` and do an amend commit:
|
||||
|
||||
```sh
|
||||
git fetch origin master:master
|
||||
.ci/license-header.sh
|
||||
@@ -22,8 +25,10 @@ If the work is licensed/vendored from other people or projects, you may omit the
|
||||
For more information on the license header script, run `.ci/license-header.sh -h`.
|
||||
|
||||
## Pull Requests
|
||||
|
||||
Pull requests are only to be merged by core developers when properly tested and discussions conclude on Discord or other communication channels. Labels are recommended but not required. However, all PRs MUST be namespaced and optionally typed:
|
||||
```
|
||||
|
||||
```txt
|
||||
[cmake] refactor: CPM over submodules
|
||||
[desktop] feat: implement firmware install from ZIP
|
||||
[hle] stub fw20 functions
|
||||
@@ -34,7 +39,7 @@ Pull requests are only to be merged by core developers when properly tested and
|
||||
- The level of namespacing is generally left to the committer's choice.
|
||||
- However, we never recommend going more than two levels *except* in `hle`, in which case you may go as many as four levels depending on the specificity of your changes.
|
||||
- Ocassionally, up to two additional namespaces may be provided for more clarity.
|
||||
* Changes that affect the entire project (sans CMake changes) should be namespaced as `meta`.
|
||||
- Changes that affect the entire project (sans CMake changes) should be namespaced as `meta`.
|
||||
- Maintainers are permitted to change namespaces at will.
|
||||
- Commits within PRs are not required to be namespaced, but it is highly recommended.
|
||||
|
||||
@@ -50,6 +55,7 @@ When adding new settings, use `tr("Setting:")` if the setting is meant to be a f
|
||||
- Try to not write "slow/fast" options unless it clearly degrades/increases performance for a given case, as most options may modify behaviour that result in different metrics accross different systems. If for example the option is an "accuracy" option, writing "High" is sufficient to imply "Slow". No need to write "High (Slow)".
|
||||
|
||||
Some examples:
|
||||
|
||||
- "[...] negatively affecting image quality", "[...] degrading image quality": Same wording but with less filler.
|
||||
- "[...] this may cause some glitches or crashes in some games", "[...] this may cause soft-crashes": Crashes implies there may be glitches (as crashes are technically a form of a fatal glitch). The entire sentence is structured as "may cause [...] on some games", which is redundant, because "may cause [...] in games" has the same semantic meaning ("may" is a chance that it will occur on "some" given set).
|
||||
- "FIFO Relaxed is similar to FIFO [...]", "FIFO Relaxed [...]": The name already implies similarity.
|
||||
@@ -57,13 +63,16 @@ Some examples:
|
||||
- "[...] it can [...] in some cases", "[...] it can [...]": Implied probability.
|
||||
|
||||
Before adding a new setting, consider:
|
||||
|
||||
- Does the piece of code that the setting pertains to, make a significant difference if it's on/off?
|
||||
- Can it be auto-detected?
|
||||
|
||||
# IDE setup
|
||||
|
||||
## VSCode
|
||||
|
||||
Copy this to `.vscode/settings.json`, get CMake tools and it should be ready to build:
|
||||
|
||||
```json
|
||||
{
|
||||
"editor.tabSize": 4,
|
||||
@@ -83,6 +92,7 @@ You may additionally need the `Qt Extension Pack` extension if building Qt.
|
||||
# Build speedup
|
||||
|
||||
If you have an HDD, use ramdisk (build in RAM), approximatedly you need 4GB for a full build with debug symbols:
|
||||
|
||||
```sh
|
||||
mkdir /tmp/ramdisk
|
||||
chmod 777 /tmp/ramdisk
|
||||
@@ -96,128 +106,11 @@ umount /tmp/ramdisk
|
||||
# Assets and large files
|
||||
|
||||
A general rule of thumb, before uploading files:
|
||||
|
||||
- PNG files: Use [optipng](https://web.archive.org/web/20240325055059/https://optipng.sourceforge.net/).
|
||||
- SVG files: Use [svgo](https://github.com/svg/svgo).
|
||||
|
||||
May not be used but worth mentioning nonethless:
|
||||
|
||||
- OGG files: Use [OptiVorbis](https://github.com/OptiVorbis/OptiVorbis).
|
||||
- Video files: Use ffmpeg, preferably re-encode as AV1.
|
||||
|
||||
# Bisecting older commits
|
||||
|
||||
Since going into the past can be tricky (especially due to the dependencies from the project being lost thru time). This should "restore" the URLs for the respective submodules.
|
||||
|
||||
```sh
|
||||
#!/bin/sh -e
|
||||
cat > .gitmodules <<EOF
|
||||
[submodule "enet"]
|
||||
path = externals/enet
|
||||
url = https://github.com/lsalzman/enet.git
|
||||
[submodule "cubeb"]
|
||||
path = externals/cubeb
|
||||
url = https://github.com/mozilla/cubeb.git
|
||||
[submodule "dynarmic"]
|
||||
path = externals/dynarmic
|
||||
url = https://github.com/lioncash/dynarmic.git
|
||||
[submodule "libusb"]
|
||||
path = externals/libusb/libusb
|
||||
url = https://github.com/libusb/libusb.git
|
||||
[submodule "discord-rpc"]
|
||||
path = externals/discord-rpc
|
||||
url = https://github.com/yuzu-emu-mirror/discord-rpc.git
|
||||
[submodule "Vulkan-Headers"]
|
||||
path = externals/Vulkan-Headers
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers.git
|
||||
[submodule "sirit"]
|
||||
path = externals/sirit
|
||||
url = https://github.com/yuzu-emu-mirror/sirit.git
|
||||
[submodule "mbedtls"]
|
||||
path = externals/mbedtls
|
||||
url = https://github.com/yuzu-emu-mirror/mbedtls.git
|
||||
[submodule "xbyak"]
|
||||
path = externals/xbyak
|
||||
url = https://github.com/herumi/xbyak.git
|
||||
[submodule "opus"]
|
||||
path = externals/opus
|
||||
url = https://github.com/xiph/opus.git
|
||||
[submodule "SDL"]
|
||||
path = externals/SDL
|
||||
url = https://github.com/libsdl-org/SDL.git
|
||||
[submodule "cpp-httplib"]
|
||||
path = externals/cpp-httplib
|
||||
url = https://github.com/yhirose/cpp-httplib.git
|
||||
[submodule "ffmpeg"]
|
||||
path = externals/ffmpeg/ffmpeg
|
||||
url = https://github.com/FFmpeg/FFmpeg.git
|
||||
[submodule "vcpkg"]
|
||||
path = externals/vcpkg
|
||||
url = https://github.com/microsoft/vcpkg.git
|
||||
[submodule "cpp-jwt"]
|
||||
path = externals/cpp-jwt
|
||||
url = https://github.com/arun11299/cpp-jwt.git
|
||||
[submodule "libadrenotools"]
|
||||
path = externals/libadrenotools
|
||||
url = https://github.com/bylaws/libadrenotools.git
|
||||
[submodule "tzdb_to_nx"]
|
||||
path = externals/nx_tzdb/tzdb_to_nx
|
||||
url = https://github.com/lat9nq/tzdb_to_nx.git
|
||||
[submodule "VulkanMemoryAllocator"]
|
||||
path = externals/VulkanMemoryAllocator
|
||||
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
|
||||
[submodule "breakpad"]
|
||||
path = externals/breakpad
|
||||
url = https://github.com/yuzu-emu-mirror/breakpad.git
|
||||
[submodule "simpleini"]
|
||||
path = externals/simpleini
|
||||
url = https://github.com/brofield/simpleini.git
|
||||
[submodule "oaknut"]
|
||||
path = externals/oaknut
|
||||
url = https://github.com/merryhime/oaknut.git
|
||||
[submodule "Vulkan-Utility-Libraries"]
|
||||
path = externals/Vulkan-Utility-Libraries
|
||||
url = https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git
|
||||
[submodule "oboe"]
|
||||
path = externals/oboe
|
||||
url = https://github.com/google/oboe.git
|
||||
[submodule "externals/boost-headers"]
|
||||
path = externals/boost-headers
|
||||
url = https://github.com/boostorg/headers.git
|
||||
EOF
|
||||
git submodule sync
|
||||
update_or_checkout () {
|
||||
if [ $0 = 'externals/sirit' ] \
|
||||
|| [ $0 = 'externals/dynarmic' ] \
|
||||
|| [ $0 = 'externals/breakpad' ] \
|
||||
|| [ $0 = 'externals/discord-rpc' ] \
|
||||
|| [ $0 = 'externals/mbedtls' ]; then
|
||||
[ -f $0/CMakeLists.txt ] || git submodule update --force --remote --init -- $0
|
||||
echo $0 ':remote' && git submodule update --remote $0
|
||||
exit
|
||||
elif [ $0 = 'externals/nx_tzdb/tzdb_to_nx' ]; then
|
||||
[ -f $0/CMakeLists.txt ] || git submodule update --force --remote --init -- $0
|
||||
echo $0 ':remote' && git submodule update --remote $0
|
||||
else
|
||||
echo $0 ':update' && git submodule update --init $0 && exit
|
||||
echo $0 ':remote' && git submodule update --remote $0 && exit
|
||||
echo $0 ':failure'
|
||||
fi
|
||||
}
|
||||
export -f update_or_checkout
|
||||
grep path .gitmodules | sed 's/.*= //' | xargs -n 1 -I {} bash -c 'update_or_checkout "$@"' {}
|
||||
# Fix for LLVM builds
|
||||
sed -i 's/src\/yuzu\/main.cpp/${CMAKE_SOURCE_DIR}\/src\/yuzu\/main.cpp/g' CMakeModules/FindLLVM.cmake
|
||||
# Only after cloning and everything - fixes issues with Zydis
|
||||
cat > externals/dynarmic/src/dynarmic/common/x64_disassemble.cpp <<EOF
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
namespace Dynarmic::Common {
|
||||
void DumpDisassembledX64(const void* ptr, size_t size) {}
|
||||
std::vector<std::string> DisassembleX64(const void* ptr, size_t size) { return {}; }
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
If having issues with older artifacts, then run `rm -r externals/dynarmic/build externals/dynarmic/externals externals/nx_tzdb/tzdb_to_nx/externals externals/sirit/externals`.
|
||||
|
||||
Configuring CMake with `-DSIRIT_USE_SYSTEM_SPIRV_HEADERS=1 -DCMAKE_CXX_FLAGS="-Wno-error" -DCMAKE_C_FLAGS="-Wno-error -Wno-array-parameter -Wno-stringop-overflow"` is also recommended.
|
||||
|
||||
Vendored
-8
@@ -192,14 +192,6 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# SPIRV Tools
|
||||
AddJsonPackage(spirv-tools)
|
||||
|
||||
if (SPIRV-Tools_ADDED)
|
||||
add_library(SPIRV-Tools::SPIRV-Tools ALIAS SPIRV-Tools-static)
|
||||
target_link_libraries(SPIRV-Tools-static PRIVATE SPIRV-Tools-opt SPIRV-Tools-link)
|
||||
endif()
|
||||
|
||||
# Catch2
|
||||
if (YUZU_TESTS OR DYNARMIC_TESTS)
|
||||
AddJsonPackage(catch2)
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
|
||||
set(PLATFORM_SUN ON)
|
||||
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "OpenOrbis")
|
||||
set(PLATFORM_PS4 ON)
|
||||
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "managarm")
|
||||
set(PLATFORM_MANAGARM ON)
|
||||
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
set(PLATFORM_FREEBSD ON)
|
||||
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
|
||||
|
||||
Vendored
-14
@@ -102,20 +102,6 @@
|
||||
"git_version": "1.3.18",
|
||||
"find_args": "MODULE"
|
||||
},
|
||||
"spirv-tools": {
|
||||
"package": "SPIRV-Tools",
|
||||
"repo": "KhronosGroup/SPIRV-Tools",
|
||||
"sha": "0a7e28689a",
|
||||
"hash": "eadfcceb82f4b414528d99962335e4f806101168474028f3cf7691ac40c37f323decf2a42c525e2d5bfa6f14ff132d6c5cf9b87c151490efad01f5e13ade1520",
|
||||
"git_version": "2025.4",
|
||||
"options": [
|
||||
"SPIRV_SKIP_EXECUTABLES ON"
|
||||
],
|
||||
"patches": [
|
||||
"0001-netbsd-fix.patch",
|
||||
"0002-allow-static-only.patch"
|
||||
]
|
||||
},
|
||||
"spirv-headers": {
|
||||
"package": "SPIRV-Headers",
|
||||
"repo": "KhronosGroup/SPIRV-Headers",
|
||||
|
||||
Vendored
+118
-68
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
|
||||
@@ -11,63 +11,105 @@ set(FFmpeg_HWACCEL_FLAGS)
|
||||
set(FFmpeg_HWACCEL_INCLUDE_DIRS)
|
||||
set(FFmpeg_HWACCEL_LDFLAGS)
|
||||
|
||||
if (UNIX AND NOT ANDROID)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
if (NOT ANDROID)
|
||||
pkg_check_modules(LIBVA libva)
|
||||
pkg_check_modules(CUDA cuda)
|
||||
pkg_check_modules(FFNVCODEC ffnvcodec)
|
||||
pkg_check_modules(VDPAU vdpau)
|
||||
if (NOT YUZU_USE_BUNDLED_FFMPEG)
|
||||
set(FFmpeg_CROSS_COMPILE_FLAGS "")
|
||||
if (ANDROID)
|
||||
# TODO: Maybe use CMAKE_SYSROOT? and probably provide a toolchain file for android
|
||||
# I mean isn't that the "proper" way anyways?
|
||||
string(TOLOWER "${CMAKE_HOST_SYSTEM_NAME}" FFmpeg_HOST_SYSTEM_NAME)
|
||||
set(TOOLCHAIN "${ANDROID_NDK}/toolchains/llvm/prebuilt/${FFmpeg_HOST_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}")
|
||||
set(SYSROOT "${TOOLCHAIN}/sysroot")
|
||||
set(FFmpeg_CPU "armv8-a")
|
||||
list(APPEND FFmpeg_CROSS_COMPILE_FLAGS
|
||||
--enable-cross-compile
|
||||
--arch=arm64
|
||||
#--cpu=${FFmpeg_CPU}
|
||||
--cross-prefix="${TOOLCHAIN}/bin/aarch64-linux-android-"
|
||||
--sysroot="${SYSROOT}"
|
||||
--target-os=android
|
||||
--extra-ldflags="--ld-path=${TOOLCHAIN}/bin/ld.lld"
|
||||
--extra-ldflags="-nostdlib"
|
||||
)
|
||||
set(FFmpeg_IS_CROSS_COMPILING TRUE)
|
||||
# User attempts to do a FFmpeg cross compilation because...
|
||||
# Here we just quickly test against host/system processors not matching
|
||||
# TODO: Test for versions not matching as well?
|
||||
elseif (NOT (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES CMAKE_SYSTEM_PROCESSOR
|
||||
AND CMAKE_HOST_SYSTEM_NAME MATCHES CMAKE_SYSTEM_NAME))
|
||||
string(TOLOWER "${CMAKE_SYSTEM_NAME}" FFmpeg_SYSTEM_NAME)
|
||||
if (FFmpeg_SYSTEM_NAME STREQUAL "openorbis" OR FFmpeg_SYSTEM_NAME STREQUAL "managarm")
|
||||
set(FFmpeg_SYSTEM_NAME "none")
|
||||
endif()
|
||||
# TODO: Can we really do better? Auto-detection? Something clever?
|
||||
list(APPEND FFmpeg_CROSS_COMPILE_FLAGS
|
||||
--enable-cross-compile
|
||||
--arch="${CMAKE_SYSTEM_PROCESSOR}"
|
||||
--target-os="${FFmpeg_SYSTEM_NAME}"
|
||||
--sysroot="${CMAKE_SYSROOT}"
|
||||
)
|
||||
if (DEFINED FFmpeg_CROSS_PREFIX)
|
||||
list(APPEND FFmpeg_CROSS_COMPILE_FLAGS --cross-prefix="${FFmpeg_CROSS_PREFIX}")
|
||||
else()
|
||||
message(WARNING "Please set FFmpeg_CROSS_PREFIX to your cross toolchain prefix, for example: \${CMAKE_STAGING_PREFIX}/bin/${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}-")
|
||||
endif()
|
||||
set(FFmpeg_IS_CROSS_COMPILING TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT APPLE)
|
||||
# In Solaris needs explicit linking for ffmpeg which links to /lib/amd64/libX11.so
|
||||
if(PLATFORM_SUN)
|
||||
find_library(LIBDRM_LIB libdrm PATHS /usr/lib/64 /usr/lib/amd64 /usr/lib)
|
||||
if(LIBDRM_LIB)
|
||||
if (PLATFORM_PS4 OR PLATFORM_MANAGARM)
|
||||
# Doesn't support VA-API, don't go thru the embarrassment of trying to enable it
|
||||
list(APPEND FFmpeg_HWACCEL_FLAGS --disable-vaapi)
|
||||
elseif (UNIX AND NOT DEFINED FFmpeg_IS_CROSS_COMPILING)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LIBVA libva)
|
||||
pkg_check_modules(CUDA cuda)
|
||||
pkg_check_modules(FFNVCODEC ffnvcodec)
|
||||
pkg_check_modules(VDPAU vdpau)
|
||||
|
||||
find_package(X11)
|
||||
if(X11_FOUND)
|
||||
if (NOT APPLE)
|
||||
# In Solaris needs explicit linking for ffmpeg which links to /lib/amd64/libX11.so
|
||||
if(PLATFORM_SUN)
|
||||
list(APPEND FFmpeg_HWACCEL_LIBRARIES
|
||||
X11
|
||||
"${LIBDRM_LIB}")
|
||||
message(STATUS "Found libdrm at: ${LIBDRM_LIB}")
|
||||
"${CMAKE_SYSROOT}/usr/lib/xorg/amd64/libdrm.so")
|
||||
else()
|
||||
message(WARNING "libdrm not found, disabling libdrm support")
|
||||
list(APPEND FFmpeg_HWACCEL_FLAGS
|
||||
--disable-libdrm)
|
||||
pkg_check_modules(LIBDRM libdrm REQUIRED)
|
||||
list(APPEND FFmpeg_HWACCEL_LIBRARIES
|
||||
${LIBDRM_LIBRARIES})
|
||||
list(APPEND FFmpeg_HWACCEL_INCLUDE_DIRS
|
||||
${LIBDRM_INCLUDE_DIRS})
|
||||
endif()
|
||||
else()
|
||||
pkg_check_modules(LIBDRM libdrm REQUIRED)
|
||||
list(APPEND FFmpeg_HWACCEL_LIBRARIES
|
||||
${LIBDRM_LIBRARIES})
|
||||
list(APPEND FFmpeg_HWACCEL_INCLUDE_DIRS
|
||||
${LIBDRM_INCLUDE_DIRS})
|
||||
list(APPEND FFmpeg_HWACCEL_FLAGS
|
||||
--enable-libdrm)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(LIBVA_FOUND)
|
||||
find_package(X11 REQUIRED)
|
||||
pkg_check_modules(LIBVA-DRM libva-drm REQUIRED)
|
||||
pkg_check_modules(LIBVA-X11 libva-x11 REQUIRED)
|
||||
list(APPEND FFmpeg_HWACCEL_LIBRARIES
|
||||
${X11_LIBRARIES}
|
||||
${LIBVA-DRM_LIBRARIES}
|
||||
${LIBVA-X11_LIBRARIES}
|
||||
${LIBVA_LIBRARIES})
|
||||
list(APPEND FFmpeg_HWACCEL_FLAGS
|
||||
--enable-hwaccel=h264_vaapi
|
||||
--enable-hwaccel=vp8_vaapi
|
||||
--enable-hwaccel=vp9_vaapi)
|
||||
list(APPEND FFmpeg_HWACCEL_INCLUDE_DIRS
|
||||
${X11_INCLUDE_DIRS}
|
||||
${LIBVA-DRM_INCLUDE_DIRS}
|
||||
${LIBVA-X11_INCLUDE_DIRS}
|
||||
${LIBVA_INCLUDE_DIRS}
|
||||
)
|
||||
message(STATUS "ffmpeg: va-api libraries version ${LIBVA_VERSION} found")
|
||||
if(LIBVA_FOUND)
|
||||
pkg_check_modules(LIBVA-DRM libva-drm REQUIRED)
|
||||
pkg_check_modules(LIBVA-X11 libva-x11 REQUIRED)
|
||||
list(APPEND FFmpeg_HWACCEL_LIBRARIES
|
||||
${X11_LIBRARIES}
|
||||
${LIBVA-DRM_LIBRARIES}
|
||||
${LIBVA-X11_LIBRARIES}
|
||||
${LIBVA_LIBRARIES})
|
||||
list(APPEND FFmpeg_HWACCEL_FLAGS
|
||||
--enable-hwaccel=h264_vaapi
|
||||
--enable-hwaccel=vp8_vaapi
|
||||
--enable-hwaccel=vp9_vaapi)
|
||||
list(APPEND FFmpeg_HWACCEL_INCLUDE_DIRS
|
||||
${X11_INCLUDE_DIRS}
|
||||
${LIBVA-DRM_INCLUDE_DIRS}
|
||||
${LIBVA-X11_INCLUDE_DIRS}
|
||||
${LIBVA_INCLUDE_DIRS}
|
||||
)
|
||||
message(STATUS "ffmpeg: va-api libraries version ${LIBVA_VERSION} found")
|
||||
else()
|
||||
list(APPEND FFmpeg_HWACCEL_FLAGS --disable-vaapi)
|
||||
message(WARNING "ffmpeg: libva-dev not found, disabling Video Acceleration API (VA-API)...")
|
||||
endif()
|
||||
else()
|
||||
list(APPEND FFmpeg_HWACCEL_FLAGS --disable-vaapi)
|
||||
message(WARNING "ffmpeg: libva-dev not found, disabling Video Acceleration API (VA-API)...")
|
||||
message(WARNING "ffmpeg: X11 libraries not found, disabling VA-API...")
|
||||
endif()
|
||||
|
||||
if (FFNVCODEC_FOUND)
|
||||
@@ -111,6 +153,28 @@ if (UNIX AND NOT ANDROID)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (PLATFORM_PS4)
|
||||
list(APPEND FFmpeg_CROSS_COMPILE_LIBS
|
||||
-lkernel
|
||||
-lSceUserService
|
||||
-lSceSysmodule
|
||||
-lSceNet
|
||||
-lSceLibcInternal
|
||||
)
|
||||
list(APPEND FFmpeg_CROSS_COMPILE_FLAGS
|
||||
--disable-pthreads
|
||||
--extra-cflags=${CMAKE_SYSROOT}/usr/include
|
||||
--extra-cxxflags=${CMAKE_SYSROOT}/usr/include
|
||||
--extra-libs="${FFmpeg_CROSS_COMPILE_LIBS}"
|
||||
)
|
||||
elseif (PLATFORM_MANAGARM)
|
||||
# Required for proper stuff
|
||||
list(APPEND FFmpeg_CROSS_COMPILE_FLAGS
|
||||
--disable-pthreads
|
||||
--extra-libs="${FFmpeg_CROSS_COMPILE_LIBS}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if (YUZU_USE_BUNDLED_FFMPEG)
|
||||
AddJsonPackage(ffmpeg-ci)
|
||||
|
||||
@@ -181,24 +245,6 @@ else()
|
||||
|
||||
find_program(BASH_PROGRAM bash REQUIRED)
|
||||
|
||||
set(FFmpeg_CROSS_COMPILE_FLAGS "")
|
||||
if (ANDROID)
|
||||
string(TOLOWER "${CMAKE_HOST_SYSTEM_NAME}" FFmpeg_HOST_SYSTEM_NAME)
|
||||
set(TOOLCHAIN "${ANDROID_NDK}/toolchains/llvm/prebuilt/${FFmpeg_HOST_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}")
|
||||
set(SYSROOT "${TOOLCHAIN}/sysroot")
|
||||
set(FFmpeg_CPU "armv8-a")
|
||||
list(APPEND FFmpeg_CROSS_COMPILE_FLAGS
|
||||
--arch=arm64
|
||||
#--cpu=${FFmpeg_CPU}
|
||||
--enable-cross-compile
|
||||
--cross-prefix=${TOOLCHAIN}/bin/aarch64-linux-android-
|
||||
--sysroot=${SYSROOT}
|
||||
--target-os=android
|
||||
--extra-ldflags="--ld-path=${TOOLCHAIN}/bin/ld.lld"
|
||||
--extra-ldflags="-nostdlib"
|
||||
)
|
||||
endif()
|
||||
|
||||
# `configure` parameters builds only exactly what yuzu needs from FFmpeg
|
||||
# `--disable-vdpau` is needed to avoid linking issues
|
||||
set(FFmpeg_CC ${CMAKE_C_COMPILER_LAUNCHER} ${CMAKE_C_COMPILER})
|
||||
@@ -221,8 +267,12 @@ else()
|
||||
--enable-decoder=vp9
|
||||
--enable-filter=yadif,scale
|
||||
--enable-pic
|
||||
--cc="${FFmpeg_CC}"
|
||||
--cxx="${FFmpeg_CXX}"
|
||||
--cc=${FFmpeg_CC}
|
||||
--cxx=${FFmpeg_CXX}
|
||||
--ld=${CMAKE_LINKER}
|
||||
--extra-cflags=${CMAKE_C_FLAGS}
|
||||
--extra-cxxflags=${CMAKE_CXX_FLAGS}
|
||||
--extra-ldflags=${CMAKE_C_LINK_FLAGS}
|
||||
${FFmpeg_HWACCEL_FLAGS}
|
||||
${FFmpeg_CROSS_COMPILE_FLAGS}
|
||||
WORKING_DIRECTORY
|
||||
@@ -254,7 +304,7 @@ else()
|
||||
OUTPUT
|
||||
${FFmpeg_BUILD_LIBRARIES}
|
||||
COMMAND
|
||||
make ${FFmpeg_MAKE_ARGS}
|
||||
gmake ${FFmpeg_MAKE_ARGS}
|
||||
WORKING_DIRECTORY
|
||||
${FFmpeg_BUILD_DIR}
|
||||
)
|
||||
|
||||
@@ -25,6 +25,16 @@ if (NIGHTLY_BUILD)
|
||||
add_compile_definitions(NIGHTLY_BUILD)
|
||||
endif()
|
||||
|
||||
if (YUZU_LEGACY)
|
||||
message(WARNING "Making legacy build. Performance may suffer.")
|
||||
add_compile_definitions(YUZU_LEGACY)
|
||||
endif()
|
||||
|
||||
if (GENSHIN_SPOOF)
|
||||
message(WARNING "Making Genshin spoof build")
|
||||
add_compile_definitions(GENSHIN_SPOOF)
|
||||
endif()
|
||||
|
||||
# Set compilation flags
|
||||
if (MSVC AND NOT CXX_CLANG)
|
||||
set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE STRING "" FORCE)
|
||||
|
||||
@@ -203,6 +203,12 @@ android {
|
||||
resValue("string", "app_name_suffixed", "Eden Optimized")
|
||||
applicationId = "com.miHoYo.Yuanshen"
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments.add("-DGENSHIN_SPOOF=ON")
|
||||
}
|
||||
}
|
||||
|
||||
ndk {
|
||||
abiFilters += listOf("arm64-v8a")
|
||||
}
|
||||
|
||||
@@ -33,6 +33,19 @@ import org.yuzu.yuzu_emu.applets.web.WebBrowser
|
||||
* with the native side of the Yuzu code.
|
||||
*/
|
||||
object NativeLibrary {
|
||||
@Keep
|
||||
data class UpdateResult(
|
||||
var tag: String = "",
|
||||
var title: String = "",
|
||||
var body: String = "",
|
||||
var url: String = "",
|
||||
var assets: MutableList<String> = mutableListOf()
|
||||
) {
|
||||
fun addAsset(asset: String) {
|
||||
assets.add(asset)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmField
|
||||
var sEmulationActivity = WeakReference<EmulationActivity?>(null)
|
||||
|
||||
@@ -240,17 +253,7 @@ object NativeLibrary {
|
||||
/**
|
||||
* Checks for available updates.
|
||||
*/
|
||||
external fun checkForUpdate(): Array<String>?
|
||||
|
||||
/**
|
||||
* Return the URL to the release page
|
||||
*/
|
||||
external fun getUpdateUrl(version: String): String
|
||||
|
||||
/**
|
||||
* Return the URL to download the APK for the given version
|
||||
*/
|
||||
external fun getUpdateApkUrl(tag: String, artifact: String, packageId: String): String
|
||||
external fun checkForUpdate(): UpdateResult?
|
||||
|
||||
/**
|
||||
* Returns whether the update checker is enabled through CMAKE options.
|
||||
|
||||
+1
@@ -18,6 +18,7 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
|
||||
SKIP_CPU_INNER_INVALIDATION("skip_cpu_inner_invalidation"),
|
||||
FIX_BLOOM_EFFECTS("fix_bloom_effects"),
|
||||
EMULATE_BGR565("emulate_bgr565"),
|
||||
RESCALE_HACK("rescale_hack"),
|
||||
CPUOPT_UNSAFE_HOST_MMU("cpuopt_unsafe_host_mmu"),
|
||||
USE_DOCKED_MODE("use_docked_mode"),
|
||||
USE_AUTO_STUB("use_auto_stub"),
|
||||
|
||||
@@ -24,7 +24,6 @@ enum class IntSetting(override val key: String) : AbstractIntSetting {
|
||||
RENDERER_ANTI_ALIASING("anti_aliasing"),
|
||||
RENDERER_SCREEN_LAYOUT("screen_layout"),
|
||||
RENDERER_ASPECT_RATIO("aspect_ratio"),
|
||||
RENDERER_OPTIMIZE_SPIRV_OUTPUT("optimize_spirv_output"),
|
||||
|
||||
RENDERER_DYNA_STATE("dyna_state"),
|
||||
DMA_ACCURACY("dma_accuracy"),
|
||||
|
||||
+7
-9
@@ -643,15 +643,6 @@ abstract class SettingsItem(
|
||||
descriptionId = R.string.renderer_async_presentation_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
SingleChoiceSetting(
|
||||
IntSetting.RENDERER_OPTIMIZE_SPIRV_OUTPUT,
|
||||
titleId = R.string.renderer_optimize_spirv_output,
|
||||
descriptionId = R.string.renderer_optimize_spirv_output_description,
|
||||
choicesId = R.array.optimizeSpirvOutputEntries,
|
||||
valuesId = R.array.optimizeSpirvOutputValues
|
||||
)
|
||||
)
|
||||
put(
|
||||
SingleChoiceSetting(
|
||||
IntSetting.DMA_ACCURACY,
|
||||
@@ -756,6 +747,13 @@ abstract class SettingsItem(
|
||||
descriptionId = R.string.fix_bloom_effects_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.RESCALE_HACK,
|
||||
titleId = R.string.rescale_hack,
|
||||
descriptionId = R.string.rescale_hack_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.EMULATE_BGR565,
|
||||
|
||||
+1
-1
@@ -271,7 +271,6 @@ class SettingsFragmentPresenter(
|
||||
add(IntSetting.FSR_SHARPENING_SLIDER.key)
|
||||
}
|
||||
add(IntSetting.RENDERER_ANTI_ALIASING.key)
|
||||
add(IntSetting.RENDERER_OPTIMIZE_SPIRV_OUTPUT.key)
|
||||
|
||||
add(HeaderSetting(R.string.advanced))
|
||||
|
||||
@@ -294,6 +293,7 @@ class SettingsFragmentPresenter(
|
||||
add(BooleanSetting.SKIP_CPU_INNER_INVALIDATION.key)
|
||||
add(BooleanSetting.FIX_BLOOM_EFFECTS.key)
|
||||
add(BooleanSetting.EMULATE_BGR565.key)
|
||||
add(BooleanSetting.RESCALE_HACK.key)
|
||||
add(BooleanSetting.RENDERER_ASYNCHRONOUS_SHADERS.key)
|
||||
add(BooleanSetting.RENDERER_ASYNCHRONOUS_GPU_EMULATION.key)
|
||||
add(BooleanSetting.RENDERER_ASYNC_PRESENTATION.key)
|
||||
|
||||
@@ -175,25 +175,25 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
|
||||
val latestVersion = NativeLibrary.checkForUpdate()
|
||||
if (latestVersion != null) {
|
||||
runOnUiThread {
|
||||
val tag: String = latestVersion[0]
|
||||
val name: String = latestVersion[1]
|
||||
showUpdateDialog(tag, name)
|
||||
showUpdateDialog(latestVersion)
|
||||
}
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
|
||||
private fun showUpdateDialog(tag: String, name: String) {
|
||||
// TODO(crueter): body, "View on Forgejo" button
|
||||
private fun showUpdateDialog(release: NativeLibrary.UpdateResult) {
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setTitle(R.string.update_available)
|
||||
.setMessage(getString(R.string.update_available_description, name))
|
||||
.setMessage(getString(R.string.update_available_description, release.title))
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
var artifact = tag
|
||||
// Nightly builds have a slightly different format
|
||||
if (NativeLibrary.isNightlyBuild()) {
|
||||
artifact = tag.substringAfter('.', tag)
|
||||
val assets = release.assets
|
||||
|
||||
if (assets.isEmpty()) {
|
||||
openLink(release.url)
|
||||
} else {
|
||||
downloadAndInstallUpdate(release)
|
||||
}
|
||||
downloadAndInstallUpdate(tag, artifact)
|
||||
}
|
||||
.setNeutralButton(R.string.cancel) { dialog, _ ->
|
||||
dialog.dismiss()
|
||||
@@ -206,17 +206,23 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
|
||||
.show()
|
||||
}
|
||||
|
||||
private fun downloadAndInstallUpdate(version: String, artifact: String) {
|
||||
private fun openLink(link: String) {
|
||||
val intent = Intent(Intent.ACTION_VIEW, link.toUri())
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun downloadAndInstallUpdate(release: NativeLibrary.UpdateResult) {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
val packageId = applicationContext.packageName
|
||||
val apkUrl = NativeLibrary.getUpdateApkUrl(version, artifact, packageId)
|
||||
val asset = release.assets[0]
|
||||
val artifact = asset.split("/").last()
|
||||
val apkFile = File(cacheDir, "update-$artifact.apk")
|
||||
|
||||
withContext(Dispatchers.Main) {
|
||||
showDownloadProgressDialog()
|
||||
}
|
||||
|
||||
val downloader = APKDownloader(apkUrl, apkFile)
|
||||
val downloader = APKDownloader(asset, apkFile)
|
||||
downloader.download(
|
||||
onProgress = { progress ->
|
||||
runOnUiThread {
|
||||
@@ -248,7 +254,7 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
|
||||
} else {
|
||||
Toast.makeText(
|
||||
this@MainActivity,
|
||||
getString(R.string.update_download_failed) + "\n\nURL: $apkUrl",
|
||||
getString(R.string.update_download_failed) + "\n\nURL: $asset",
|
||||
Toast.LENGTH_LONG
|
||||
).show()
|
||||
}
|
||||
@@ -277,7 +283,7 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
|
||||
|
||||
private fun updateDownloadProgress(progress: Int) {
|
||||
progressBar?.progress = progress
|
||||
progressMessage?.text = "$progress%"
|
||||
progressMessage?.text = getString(R.string.percent, progress)
|
||||
}
|
||||
|
||||
private fun dismissDownloadProgressDialog() {
|
||||
|
||||
@@ -1699,76 +1699,76 @@ JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_isNightlyBuild(
|
||||
#ifdef ENABLE_UPDATE_CHECKER
|
||||
|
||||
|
||||
JNIEXPORT jobjectArray JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_checkForUpdate(
|
||||
JNIEXPORT jobject JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_checkForUpdate(
|
||||
JNIEnv* env,
|
||||
jobject obj) {
|
||||
std::optional<UpdateChecker::Update> release = UpdateChecker::GetUpdate();
|
||||
std::optional<Common::Net::Release> release = UpdateChecker::GetUpdate();
|
||||
if (!release) return nullptr;
|
||||
|
||||
const std::string tag = release->tag;
|
||||
const std::string name = release->name;
|
||||
const std::string title = release->title;
|
||||
const std::string body = release->body;
|
||||
const std::string url = release->html_url;
|
||||
|
||||
jobjectArray result = env->NewObjectArray(2, env->FindClass("java/lang/String"), nullptr);
|
||||
// Android *should* only ever define a single asset.
|
||||
// If not, something has gone wrong, but the Kotlin side can handle it.
|
||||
const auto assets = release->GetPlatformAssets();
|
||||
|
||||
const jstring jtag = env->NewStringUTF(tag.c_str());
|
||||
const jstring jname = env->NewStringUTF(name.c_str());
|
||||
|
||||
env->SetObjectArrayElement(result, 0, jtag);
|
||||
env->SetObjectArrayElement(result, 1, jname);
|
||||
env->DeleteLocalRef(jtag);
|
||||
env->DeleteLocalRef(jname);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_getUpdateUrl(
|
||||
JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring version) {
|
||||
const char* version_str = env->GetStringUTFChars(version, nullptr);
|
||||
const std::string url = fmt::format("{}/{}",
|
||||
std::string{Common::g_build_auto_update_api},
|
||||
version_str);
|
||||
env->ReleaseStringUTFChars(version, version_str);
|
||||
return env->NewStringUTF(url.c_str());
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_getUpdateApkUrl(
|
||||
JNIEnv* env,
|
||||
jobject obj,
|
||||
jstring tag,
|
||||
jstring artifact,
|
||||
jstring packageId) {
|
||||
const char* version_str = env->GetStringUTFChars(tag, nullptr);
|
||||
const char* artifact_str = env->GetStringUTFChars(artifact, nullptr);
|
||||
const char* package_id_str = env->GetStringUTFChars(packageId, nullptr);
|
||||
|
||||
std::string variant;
|
||||
std::string package_id(package_id_str);
|
||||
|
||||
if (package_id.find("dev.legacy.eden_emulator") != std::string::npos) {
|
||||
variant = "legacy";
|
||||
} else if (package_id.find("com.miHoYo.Yuanshen") != std::string::npos) {
|
||||
variant = "optimized";
|
||||
} else {
|
||||
#ifdef ARCHITECTURE_arm64
|
||||
variant = "standard";
|
||||
#else
|
||||
variant = "chromeos";
|
||||
#endif
|
||||
jclass updateResultClass = env->FindClass("org/yuzu/yuzu_emu/NativeLibrary$UpdateResult");
|
||||
if (!updateResultClass) {
|
||||
LOG_ERROR(Frontend, "Could not find UpdateResult class");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const std::string apk_filename = fmt::format("Eden-Android-{}-{}.apk", artifact_str, variant);
|
||||
jmethodID updateResultCtor = env->GetMethodID(updateResultClass, "<init>", "()V");
|
||||
|
||||
const std::string url = fmt::format("{}/{}/{}",
|
||||
std::string{Common::g_build_auto_update_api},
|
||||
version_str, apk_filename);
|
||||
if (!updateResultCtor) {
|
||||
LOG_ERROR(Frontend, "Could not find UpdateResult ctor");
|
||||
env->DeleteLocalRef(updateResultClass);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
env->ReleaseStringUTFChars(tag, version_str);
|
||||
env->ReleaseStringUTFChars(artifact, artifact_str);
|
||||
env->ReleaseStringUTFChars(packageId, package_id_str);
|
||||
return env->NewStringUTF(url.c_str());
|
||||
jmethodID setTag = env->GetMethodID(updateResultClass, "setTag", "(Ljava/lang/String;)V");
|
||||
jmethodID setTitle = env->GetMethodID(updateResultClass, "setTitle", "(Ljava/lang/String;)V");
|
||||
jmethodID setBody = env->GetMethodID(updateResultClass, "setBody", "(Ljava/lang/String;)V");
|
||||
jmethodID setUrl = env->GetMethodID(updateResultClass, "setUrl", "(Ljava/lang/String;)V");
|
||||
jmethodID addAsset = env->GetMethodID(updateResultClass, "addAsset", "(Ljava/lang/String;)V");
|
||||
|
||||
jobject updateResult = env->NewObject(updateResultClass, updateResultCtor);
|
||||
|
||||
LOG_DEBUG(Frontend, "Tag: {}", tag);
|
||||
LOG_DEBUG(Frontend, "Title: {}", title);
|
||||
LOG_DEBUG(Frontend, "Body: {}", body);
|
||||
LOG_DEBUG(Frontend, "Url: {}", url);
|
||||
|
||||
const auto jtag = env->NewStringUTF(tag.c_str());
|
||||
const auto jtitle = env->NewStringUTF(title.c_str());
|
||||
const auto jbody = env->NewStringUTF(body.c_str());
|
||||
const auto jurl = env->NewStringUTF(url.c_str());
|
||||
|
||||
env->CallVoidMethod(updateResult, setTag, jtag);
|
||||
env->CallVoidMethod(updateResult, setTitle, jtitle);
|
||||
env->CallVoidMethod(updateResult, setBody, jbody);
|
||||
env->CallVoidMethod(updateResult, setUrl, jurl);
|
||||
|
||||
// TODO(crueter): Handling for multiple assets?
|
||||
// Maybe another data class x(
|
||||
for (const Common::Net::Asset &a : assets) {
|
||||
const auto jaurl = env->NewStringUTF(a.path.c_str());
|
||||
env->CallVoidMethod(updateResult, addAsset, jaurl);
|
||||
env->DeleteLocalRef(jaurl);
|
||||
}
|
||||
|
||||
env->DeleteLocalRef(jtag);
|
||||
env->DeleteLocalRef(jtitle);
|
||||
env->DeleteLocalRef(jbody);
|
||||
env->DeleteLocalRef(jurl);
|
||||
|
||||
env->DeleteLocalRef(updateResultClass);
|
||||
|
||||
return updateResult;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_getBuildVersion(
|
||||
|
||||
@@ -463,8 +463,6 @@
|
||||
<string name="fsr_sharpness">حدة FSR</string>
|
||||
<string name="fsr_sharpness_description">يحدد مدى وضوح الصورة عند استخدام التباين الديناميكي لـ FSR</string>
|
||||
<string name="renderer_anti_aliasing">طريقة مضاد التعرج</string>
|
||||
<string name="renderer_optimize_spirv_output">تحسين مخرجات SPIRV</string>
|
||||
<string name="renderer_optimize_spirv_output_description">يعمل على تحسين أداء برامج التظليل المجمعة لتحسين كفاءة وحدة معالجة الرسومات، ولكنه قد يؤدي إلى زيادة وقت التحميل وإبطاء السرعة في البداية.</string>
|
||||
|
||||
|
||||
<string name="advanced">متقدم</string>
|
||||
@@ -495,7 +493,7 @@
|
||||
<string name="enable_buffer_history">تمكين سجل التخزين المؤقت</string>
|
||||
<string name="enable_buffer_history_description">يُتيح هذا الخيار الوصول إلى حالات التخزين المؤقت السابقة. وقد يُحسّن جودة العرض وثبات الأداء في بعض الألعاب.</string>
|
||||
<string name="use_optimized_vertex_buffers">مخازن الرؤوس المُحسّنة</string>
|
||||
<string name="use_optimized_vertex_buffers_description">يُتيح ربطًا مُحسَّنًا لمخازن الرؤوس لتحسين الأداء. يتطلب برامج تشغيل Turnip من Mesa 26.0 أو أحدث. قد يتعطل على برامج التشغيل الأقدم.</string>
|
||||
<string name="use_optimized_vertex_buffers_description">يتيح ربط مخزن الرؤوس المُحسّن لتحسين الأداء. يتطلب برامج تشغيل Turnip/QCOM من إصدار Mesa 26.0 أو أحدث. سيؤدي إلى تعطل النظام عند استخدام برامج تشغيل Turnip الأقدم.</string>
|
||||
|
||||
<string name="hacks">اختراقات</string>
|
||||
|
||||
@@ -504,7 +502,9 @@
|
||||
<string name="skip_cpu_inner_invalidation">تخطي إبطال صلاحية وحدة المعالجة المركزية الداخلية</string>
|
||||
<string name="skip_cpu_inner_invalidation_description">يتخطى بعض عمليات إبطال ذاكرة التخزين المؤقتة من جانب وحدة المعالجة المركزية أثناء تحديثات الذاكرة، مما يقلل من استخدام وحدة المعالجة المركزية ويحسن أداءها. قد يتسبب ذلك في حدوث أعطال أو تعطل في بعض الألعاب.</string>
|
||||
<string name="fix_bloom_effects">إصلاح تأثيرات التوهج</string>
|
||||
<string name="fix_bloom_effects_description">يقلل من ضبابية التوهج في LA/EOW (Adreno 700)، ويزيل التوهج في Burnout. تحذير: قد يسبب ظهور خلل رسومي في ألعاب أخرى.</string>
|
||||
<string name="fix_bloom_effects_description">يقلل من ضبابية التوهج في LA/EOW (Adreno A6XX - A7XX/ Turnip)، ويزيل التوهج في Burnout. تحذير: قد يسبب تشوهات رسومية في ألعاب أخرى.</string>
|
||||
<string name="emulate_bgr565">محاكاة BGR565</string>
|
||||
<string name="emulate_bgr565_description">يُصلح مشاكل انعكاس الألوان في الألعاب أو ظهور تشوهات غريبة أو ظلال غريبة.</string>
|
||||
<string name="renderer_asynchronous_shaders">استخدم تظليل غير متزامن</string>
|
||||
<string name="renderer_asynchronous_shaders_description">يقوم بتجميع التظليل بشكل غير متزامن. قد يقلل ذلك من التقطعات ولكنه قد يؤدي أيضًا إلى حدوث أخطاء.</string>
|
||||
<string name="gpu_unswizzle_settings">إعدادات إلغاء ترتيب بيانات وحدة معالجة الرسومات</string>
|
||||
@@ -1159,5 +1159,6 @@
|
||||
<string name="license_fidelityfx_fsr_description">تحسين الجودة بدرجة عالية من AMD</string>
|
||||
<string name="external_content">محتوى خارجي</string>
|
||||
<string name="add_folders">إضافة مجلد</string>
|
||||
<string name="percent">%1$d%%</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -332,7 +332,6 @@
|
||||
<string name="fsr_sharpness">تیژی FSR</string>
|
||||
<string name="fsr_sharpness_description">دیاریکردنی تیژی وێنە لە کاتی بەکارهێنانی FSR</string>
|
||||
<string name="renderer_anti_aliasing">شێوازی دژە-خاوڕۆیی</string>
|
||||
<string name="renderer_optimize_spirv_output_description">شێیدەرە کۆمپایلکراوەکان باش دەکات بۆ باشترکردنی کارایی GPU.</string>
|
||||
|
||||
|
||||
<string name="dma_accuracy">وردیی DMA</string>
|
||||
|
||||
@@ -442,8 +442,6 @@
|
||||
<string name="fsr_sharpness">Ostrost FSR</string>
|
||||
<string name="fsr_sharpness_description">Určuje jak ostře bude obraz vypadat při použití dynamického kontrastu FSR.</string>
|
||||
<string name="renderer_anti_aliasing">Metoda anti-aliasingu</string>
|
||||
<string name="renderer_optimize_spirv_output">Optimalizovat výstup SPIRV</string>
|
||||
<string name="renderer_optimize_spirv_output_description">Optimalizuje kompilované shadery pro zlepšení efektivity GPU, ale mohou se objevit delší nahrávací časy a zpomalení v úvodu.</string>
|
||||
|
||||
|
||||
<string name="advanced">Pokročilé</string>
|
||||
|
||||
@@ -442,8 +442,6 @@ Wird der Handheld-Modus verwendet, verringert es die Auflösung und erhöht die
|
||||
<string name="fsr_sharpness">FSR-Schärfe</string>
|
||||
<string name="fsr_sharpness_description">Bestimmt die Schärfe bei FSR-Nutzung.</string>
|
||||
<string name="renderer_anti_aliasing">Kantenglättung</string>
|
||||
<string name="renderer_optimize_spirv_output">Optimiere SPIRV-Ausgabe</string>
|
||||
<string name="renderer_optimize_spirv_output_description">Optimiert den kompilierten Shader, um die GPU-Effizienz zu verbessern.</string>
|
||||
|
||||
|
||||
<string name="advanced">Erweitert</string>
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
<string name="general_information">Información general</string>
|
||||
<string name="hardware">Hardware</string>
|
||||
<string name="supported_abis">ABIs soportadas</string>
|
||||
<string name="cpu_info">Información del procesador</string>
|
||||
<string name="cpu_info">Información de la CPU</string>
|
||||
<string name="gpu_information">Información de la GPU</string>
|
||||
<string name="vulkan_driver_version">Versión del controlador de Vulkan</string>
|
||||
<string name="error_getting_emulator_info">Error al obtener la información del emulador</string>
|
||||
@@ -416,8 +416,8 @@
|
||||
<string name="turbo_speed_limit_description">Cuando el modo turbo esté activado, la emulación se ejecutará a esta velocidad.</string>
|
||||
<string name="slow_speed_limit">Velocidad lenta</string>
|
||||
<string name="slow_speed_limit_description">Cuando el modo lento esté activado, la emulación se ejecutará a esta velocidad.</string>
|
||||
<string name="cpu_backend">Motor del procesador</string>
|
||||
<string name="cpu_accuracy">Precisión del procesador</string>
|
||||
<string name="cpu_backend">Motor de la CPU</string>
|
||||
<string name="cpu_accuracy">Precisión de la CPU</string>
|
||||
<string name="value_with_units">%1$s%2$s</string>
|
||||
|
||||
<!-- System settings strings -->
|
||||
@@ -433,7 +433,7 @@
|
||||
<string name="set_custom_rtc">Configurar RTC personalizado</string>
|
||||
|
||||
<!-- CPU -->
|
||||
<string name="fast_cpu_time">Overclock del procesador</string>
|
||||
<string name="fast_cpu_time">Overclock de la CPU</string>
|
||||
<string name="fast_cpu_time_description">Fuerza a la CPU emulada a ejecutarser a una velocidad de reloj más alta, lo cual reduce ciertos limitadores de fotogramas por segundo. Usa Boost (1700 MHz) para ejecutar a la velocidad de reloj nativa más alta de la Switch, o Fast (2000 MHz) para ejecutar a una velocidad doble de reloj.</string>
|
||||
<string name="custom_cpu_ticks">Ticks de CPU personalizados</string>
|
||||
<string name="custom_cpu_ticks_description">Establezca un valor personalizado de los ciclos de la CPU. Los valores más altos pueden aumentar el rendimiento, pero también pueden hacer que el juego se congele. Se recomienda un rango de 77–21000.</string>
|
||||
@@ -457,8 +457,6 @@
|
||||
<string name="fsr_sharpness">Nitidez FSR</string>
|
||||
<string name="fsr_sharpness_description">Ajusta la intensidad del filtro de enfoque al usar el contraste dinámico de FSR.</string>
|
||||
<string name="renderer_anti_aliasing">Método de suavizado de bordes</string>
|
||||
<string name="renderer_optimize_spirv_output">Optimizar la salida de SPIRV</string>
|
||||
<string name="renderer_optimize_spirv_output_description">Optimiza los sombreadores compilados para mejorar la eficiencia de la GPU.</string>
|
||||
|
||||
|
||||
<string name="advanced">Avanzado</string>
|
||||
@@ -489,7 +487,7 @@
|
||||
<string name="enable_buffer_history">Activar el historial del búfer</string>
|
||||
<string name="enable_buffer_history_description">Permite el acceso al estado del búfer anterior. Esta opción puede mejorar la calidad de renderizado y la consistencia en el rendimiento de algunos juegos.</string>
|
||||
<string name="use_optimized_vertex_buffers">Búferes de vértices optimizados</string>
|
||||
<string name="use_optimized_vertex_buffers_description">Permite la vinculación optimizada del búfer de vértices para un mejor rendimiento. Requiere controladores de Mesa 26.0+ Turnip. Se producirán fallos en controladores más antiguos.</string>
|
||||
<string name="use_optimized_vertex_buffers_description">Permite la optimización del enlace del búfer de vértices para un mejor rendimiento. Requiere controladores Mesa 26.0+ Turnip/ controladores QCOM. Causará fallos con controladores Turnip más antiguos.</string>
|
||||
|
||||
<string name="hacks">Hacks</string>
|
||||
|
||||
@@ -498,7 +496,9 @@
|
||||
<string name="skip_cpu_inner_invalidation">Omitir invalidación interna de la CPU</string>
|
||||
<string name="skip_cpu_inner_invalidation_description">Omite ciertas invalidaciones de caché de la CPU durante las actualizaciones de memoria, lo que reduce el uso de la CPU y mejora su rendimiento. Esto puede causar fallos o bloqueos en algunos juegos.</string>
|
||||
<string name="fix_bloom_effects">Arreglar los efectos de resplandor</string>
|
||||
<string name="fix_bloom_effects_description">Reduce el efecto de resplandor en LA/EOW (Adreno 700), elimina el resplandor en Burnout. Advertencia: puede causar artefactos gráficos en otros juegos.</string>
|
||||
<string name="fix_bloom_effects_description">Reduce el efecto de resplandor en LA/EOW (Adreno A6XX - A7XX/ Turnip), elimina el resplandor en Burnout. Advertencia: puede causar artefactos gráficos en otros juegos.</string>
|
||||
<string name="emulate_bgr565">Emular BGR565</string>
|
||||
<string name="emulate_bgr565_description">Soluciona problemas con colores invertidos en juegos, artefactos o sombras extrañas.</string>
|
||||
<string name="renderer_asynchronous_shaders">Usar sombreadores asíncronos</string>
|
||||
<string name="renderer_asynchronous_shaders_description">Compila los sombreadores de forma asíncrona. Esto puede reducir los tirones, pero también puede introducir errores gráficos.</string>
|
||||
<string name="gpu_unswizzle_settings">Ajustes de desentrelazado de la GPU</string>
|
||||
@@ -536,7 +536,7 @@
|
||||
<string name="warning_resolution">Escalar la resolución a 2x o más puede causar problemas y ralentizar significativamente su dispositivo.</string>
|
||||
|
||||
<!-- Debug settings strings -->
|
||||
<string name="cpu">Procesador</string>
|
||||
<string name="cpu">CPU</string>
|
||||
<string name="use_auto_stub">Usar Auto Stub</string>
|
||||
<string name="use_auto_stub_description">Rellena automáticamente servicios y funciones ausentes. Puede mejorar la compatibilidad pero puede causar cierres inesperados.</string>
|
||||
|
||||
@@ -767,7 +767,7 @@
|
||||
<string name="version">Versión</string>
|
||||
<string name="copy_details">Copiar detalles</string>
|
||||
<string name="add_ons">Complementos</string>
|
||||
<string name="add_ons_description">Activa/desactiva mods, actualizaciones y contenidos descargables</string>
|
||||
<string name="add_ons_description">Alternar mods, actualizaciones y contenido descargable</string>
|
||||
<string name="playtime">Tiempo jugado:</string>
|
||||
<string name="reset_playtime">Borrar tiempo de juego</string>
|
||||
<string name="reset_playtime_description">Restablecer el tiempo de juego actual a 0 segundos</string>
|
||||
@@ -1153,5 +1153,6 @@
|
||||
<string name="license_fidelityfx_fsr_description">Upscaling de alta calidad de AMD</string>
|
||||
<string name="external_content">Contenido externo</string>
|
||||
<string name="add_folders">Añadir carpeta</string>
|
||||
<string name="percent">%1$d%%</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -125,8 +125,6 @@
|
||||
<string name="nvdec_emulation_none">هیچکدام</string>
|
||||
|
||||
<!-- Optimize Spir-V output -->
|
||||
<string name="renderer_optimize_spirv_output">بهینهسازی خروجی Spir-V</string>
|
||||
<string name="renderer_optimize_spirv_output_description">شیدر کامپایل شده را برای بهبود کارایی GPU بهینهسازی میکند.</string>
|
||||
<string name="never">هرگز</string>
|
||||
<string name="on_load">در هنگام بارگذاری</string>
|
||||
<string name="always">همیشه</string>
|
||||
|
||||
@@ -413,7 +413,9 @@
|
||||
<string name="frame_limit_slider">Limiter le pourcentage de vitesse</string>
|
||||
<string name="frame_limit_slider_description">Spécifier le pourcentage pour limiter la vitesse d\'émulation. 100% correspond à la vitesse normale. Des valeurs plus élevées ou plus basses augmenteront ou diminueront la limite de vitesse.</string>
|
||||
<string name="turbo_speed_limit">Vitesse turbo</string>
|
||||
<string name="turbo_speed_limit_description">Lorsque le mode Turbo est activé, l\'émulation s\'exécute à cette vitesse.</string>
|
||||
<string name="slow_speed_limit">Vitesse lente</string>
|
||||
<string name="slow_speed_limit_description">Lorsque le mode Lent est activé, l\'émulation s\'exécute à cette vitesse.</string>
|
||||
<string name="cpu_backend">Backend du CPU</string>
|
||||
<string name="cpu_accuracy">Précision du CPU</string>
|
||||
<string name="value_with_units">%1$s%2$s</string>
|
||||
@@ -455,7 +457,6 @@
|
||||
<string name="fsr_sharpness">Netteté FSR</string>
|
||||
<string name="fsr_sharpness_description">Détermine à quel point l\'image sera affinée lors de l\'utilisation du contraste dynamique FSR.</string>
|
||||
<string name="renderer_anti_aliasing">Méthode d\'anticrénelage</string>
|
||||
<string name="renderer_optimize_spirv_output_description">Optimise le shader compilé pour améliorer l\'efficacité du GPU.</string>
|
||||
|
||||
|
||||
<string name="dma_accuracy">Précision DMA</string>
|
||||
|
||||
@@ -362,7 +362,6 @@
|
||||
<string name="fsr_sharpness">חדות FSR</string>
|
||||
<string name="fsr_sharpness_description">קובע את מידת החדות בעת שימוש ב-FSR.</string>
|
||||
<string name="renderer_anti_aliasing">שיטת Anti-aliasing</string>
|
||||
<string name="renderer_optimize_spirv_output_description">משפר את השאדר המהודר כדי להגביר את יעילות ה-GPU.</string>
|
||||
|
||||
|
||||
<string name="dma_accuracy">דיוק DMA</string>
|
||||
|
||||
@@ -351,7 +351,6 @@
|
||||
<string name="fsr_sharpness">FSR élesség</string>
|
||||
<string name="fsr_sharpness_description">Meghatározza, milyen éles lesz a kép az FSR dinamikus kontraszt használata közben.</string>
|
||||
<string name="renderer_anti_aliasing">Élsimítási módszer</string>
|
||||
<string name="renderer_optimize_spirv_output_description">Optimalizálja a lefordított shadert a GPU hatékonyságának javításáért.</string>
|
||||
|
||||
|
||||
<string name="dma_accuracy">DMA pontosság</string>
|
||||
|
||||
@@ -383,7 +383,6 @@
|
||||
<string name="fsr_sharpness">Ketajaman FSR</string>
|
||||
<string name="fsr_sharpness_description">Menentukan seberapa tajam gambar akan terlihat saat menggunakan kontras dinamis FSR</string>
|
||||
<string name="renderer_anti_aliasing">Metode anti-aliasing</string>
|
||||
<string name="renderer_optimize_spirv_output_description">Mengoptimalkan shader yang dikompilasi untuk meningkatkan efisiensi GPU.</string>
|
||||
|
||||
|
||||
<string name="dma_accuracy">Akurasi DMA</string>
|
||||
|
||||
@@ -390,7 +390,6 @@
|
||||
<string name="fsr_sharpness">Nitidezza FSR</string>
|
||||
<string name="fsr_sharpness_description">Determina quanto sarà nitida l\'immagine utilizzando il contrasto dinamico di FSR</string>
|
||||
<string name="renderer_anti_aliasing">Metodo di anti-aliasing</string>
|
||||
<string name="renderer_optimize_spirv_output_description">Ottimizza lo shader compilato per migliorare l\'efficienza della GPU.</string>
|
||||
|
||||
|
||||
<string name="dma_accuracy">Precisione DMA</string>
|
||||
|
||||
@@ -349,7 +349,6 @@
|
||||
<string name="renderer_vsync">垂直同期モード</string>
|
||||
<string name="renderer_scaling_filter">ウィンドウ適応フィルター</string>
|
||||
<string name="renderer_anti_aliasing">アンチエイリアス方式</string>
|
||||
<string name="renderer_optimize_spirv_output_description">コンパイル済みシェーダーを最適化し、GPUの効率を向上させます。</string>
|
||||
|
||||
|
||||
<string name="dma_accuracy">DMA精度</string>
|
||||
|
||||
@@ -349,7 +349,6 @@
|
||||
<string name="renderer_vsync">수직동기화 모드</string>
|
||||
<string name="renderer_scaling_filter">윈도우 적응 필터</string>
|
||||
<string name="renderer_anti_aliasing">안티에일리어싱 방법</string>
|
||||
<string name="renderer_optimize_spirv_output_description">컴파일된 셰이더를 최적화하여 GPU 효율성을 향상시킵니다.</string>
|
||||
|
||||
|
||||
<string name="dma_accuracy">DMA 정확도</string>
|
||||
|
||||
@@ -332,7 +332,6 @@
|
||||
<string name="fsr_sharpness">FSR-skarphet</string>
|
||||
<string name="fsr_sharpness_description">Bestemmer bildekvalitet med FSR</string>
|
||||
<string name="renderer_anti_aliasing">Anti-aliasing-metode</string>
|
||||
<string name="renderer_optimize_spirv_output_description">Optimaliserer den kompilerte shaderen for å forbedre GPU-effektiviteten.</string>
|
||||
|
||||
|
||||
<string name="dma_accuracy">DMA-nøyaktighet</string>
|
||||
|
||||
@@ -442,8 +442,6 @@
|
||||
<string name="fsr_sharpness">Ostrość FSR</string>
|
||||
<string name="fsr_sharpness_description">Kontroluje ostrość obrazu w FSR.</string>
|
||||
<string name="renderer_anti_aliasing">Metoda wygładzania krawędzi</string>
|
||||
<string name="renderer_optimize_spirv_output">Optymalizuj wyjście SPIRV</string>
|
||||
<string name="renderer_optimize_spirv_output_description">Optymalizuje skompilowany shader w celu poprawy wydajności GPU.</string>
|
||||
|
||||
|
||||
<string name="advanced">Zaawansowane</string>
|
||||
|
||||
@@ -433,7 +433,6 @@
|
||||
<string name="fsr_sharpness">Nitidez do FSR</string>
|
||||
<string name="fsr_sharpness_description">Determina a nitidez da imagem ao utilizar o contraste dinâmico do FSR</string>
|
||||
<string name="renderer_anti_aliasing">Método de Anti-aliasing</string>
|
||||
<string name="renderer_optimize_spirv_output_description">Otimiza o shader compilado para melhorar a eficiência da GPU.</string>
|
||||
|
||||
|
||||
<string name="advanced">Avançado</string>
|
||||
|
||||
@@ -355,7 +355,6 @@
|
||||
<string name="fsr_sharpness">Nitidez do FSR</string>
|
||||
<string name="fsr_sharpness_description">Determina a nitidez da imagem ao usar contraste dinâmico do FSR</string>
|
||||
<string name="renderer_anti_aliasing">Método de Anti-Serrilhado</string>
|
||||
<string name="renderer_optimize_spirv_output_description">Otimiza o shader compilado para melhorar a eficiência da GPU.</string>
|
||||
|
||||
|
||||
<string name="dma_accuracy">Precisão da DMA</string>
|
||||
|
||||
@@ -459,8 +459,6 @@
|
||||
<string name="fsr_sharpness">Резкость FSR</string>
|
||||
<string name="fsr_sharpness_description">Определяет, насколько чётким будет изображение при использовании динамического контраста FSR.</string>
|
||||
<string name="renderer_anti_aliasing">Метод сглаживания</string>
|
||||
<string name="renderer_optimize_spirv_output">Оптимизация вывода SPIRV</string>
|
||||
<string name="renderer_optimize_spirv_output_description">Оптимизирует скомпилированный шейдер для повышения эффективности ГПУ.</string>
|
||||
|
||||
|
||||
<string name="advanced">Расширенные</string>
|
||||
@@ -491,7 +489,7 @@
|
||||
<string name="enable_buffer_history">Включить историю буфера</string>
|
||||
<string name="enable_buffer_history_description">Позволяет обращаться к предыдущим состояниям буфера. Эта опция может повысить качество рендеринга и стабильность производительности в некоторых играх.</string>
|
||||
<string name="use_optimized_vertex_buffers">Оптимизированные вершинные буферы</string>
|
||||
<string name="use_optimized_vertex_buffers_description">Активирует оптимизированную привязку вершинных буферов для улучшения производительности. Требуются Mesa Turnip драйвера версией не ниже 26.0, на более старых драйверах будут происходить сбои и краши</string>
|
||||
<string name="use_optimized_vertex_buffers_description">Включает оптимизированную привязку вершинного буфера для повышения производительности. Требует Mesa Turnip 26.0+ / QCOM драйверы. Приводит к вылету на старых версиях Turnip.</string>
|
||||
|
||||
<string name="hacks">Хаки</string>
|
||||
|
||||
@@ -500,7 +498,9 @@
|
||||
<string name="skip_cpu_inner_invalidation">Пропустить внутреннюю инвалидацию ЦП</string>
|
||||
<string name="skip_cpu_inner_invalidation_description">Пропускает некоторые инвалидации кэша на стороне ЦП при обновлениях памяти, уменьшая нагрузку на процессор и повышая производительность. Может вызывать сбои в некоторых играх.</string>
|
||||
<string name="fix_bloom_effects">Исправить эффекты размытия</string>
|
||||
<string name="fix_bloom_effects_description">Частично убирает размытие в LA/EOW (Adreno 700), полностью отключает его в Burnout. Внимание: может вызывать графические артефакты в других играх.</string>
|
||||
<string name="fix_bloom_effects_description">Частично убирает размытие в LA/EOW (Adreno A6XX - A7XX/ Turnip), полностью отключает его в Burnout. Внимание: может вызывать графические артефакты в других играх.</string>
|
||||
<string name="emulate_bgr565">Эмулировать BGR565</string>
|
||||
<string name="emulate_bgr565_description">Исправляет проблемы с инвертированными цветами в играх, а также со странными артефактами или некорректными тенями.</string>
|
||||
<string name="renderer_asynchronous_shaders">Использовать асинхронные шейдеры</string>
|
||||
<string name="renderer_asynchronous_shaders_description">Компилирует шейдеры асинхронно. Это может уменьшить подтормаживания, но также может вызвать графические артефакты.</string>
|
||||
<string name="gpu_unswizzle_settings">Настройки распаковки текстур (Unswizzle)</string>
|
||||
@@ -1155,5 +1155,4 @@
|
||||
<string name="license_fidelityfx_fsr_description">Высококачественное масштабирование от AMD</string>
|
||||
<string name="external_content">Дополнительный контент</string>
|
||||
<string name="add_folders">Добавить папку</string>
|
||||
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@@ -354,7 +354,6 @@
|
||||
<string name="fsr_sharpness">ФСР оштрина</string>
|
||||
<string name="fsr_sharpness_description">Одређује колико ће се слика наоштрен трајати док користи \"ФСР\" динамички контраст</string>
|
||||
<string name="renderer_anti_aliasing">Метода против алиасирања</string>
|
||||
<string name="renderer_optimize_spirv_output_description">Оптимизира састављена схадер за побољшање ефикасности ГПУ-а.</string>
|
||||
|
||||
|
||||
<string name="dma_accuracy">DMA тачност</string>
|
||||
|
||||
@@ -459,8 +459,6 @@
|
||||
<string name="fsr_sharpness">Різкість FSR</string>
|
||||
<string name="fsr_sharpness_description">Визначає різкість зображення при використанні FSR.</string>
|
||||
<string name="renderer_anti_aliasing">Згладжування</string>
|
||||
<string name="renderer_optimize_spirv_output">Оптимізовувати виведення SPIRV</string>
|
||||
<string name="renderer_optimize_spirv_output_description">Оптимізує скомпільований шейдер для покращення ефективності GPU.</string>
|
||||
|
||||
|
||||
<string name="advanced">Додаткові</string>
|
||||
@@ -491,7 +489,7 @@
|
||||
<string name="enable_buffer_history">Увімкнути історію буфера</string>
|
||||
<string name="enable_buffer_history_description">Вмикає доступ до попередніх станів буфера. Цей параметр може покращити якість візуалізації та стабільну продуктивність у деяких іграх.</string>
|
||||
<string name="use_optimized_vertex_buffers">Оптимізовані буфери вершин</string>
|
||||
<string name="use_optimized_vertex_buffers_description">Застосовує оптимізований буфер вершин, щоб покращити продуктивність. Потребує драйверів Mesa 26.0+ Turnip. На старіших драйверах виникатиме збій.</string>
|
||||
<string name="use_optimized_vertex_buffers_description">Застосовує оптимізований буфер вершин, щоб покращити продуктивність. Потребує драйверів Mesa 26.0+ Turnip / QCOM. На старіших драйверах Turnip виникатиме збій.</string>
|
||||
|
||||
<string name="hacks">Обхідні рішення</string>
|
||||
|
||||
@@ -500,7 +498,9 @@
|
||||
<string name="skip_cpu_inner_invalidation">Пропустити внутрішнє інвалідування CPU</string>
|
||||
<string name="skip_cpu_inner_invalidation_description">Пропускає деякі інвалідації кешу на стороні CPU під час оновлення пам\'яті, зменшуючи навантаження на процесор і покращуючи продуктивність. Може спричинити збої в деяких іграх.</string>
|
||||
<string name="fix_bloom_effects">Виправити ефекти світіння</string>
|
||||
<string name="fix_bloom_effects_description">Зменшує розмиття світіння в LA/EOW (Adreno 700), прибирає світіння в Burnout. Увага: може спричинити графічні артефакти в інших іграх.</string>
|
||||
<string name="fix_bloom_effects_description">Зменшує розмиття світіння в LA/EOW (Adreno A6XX–A7XX / Turnip), прибирає світіння в Burnout. Увага: може спричинити графічні артефакти в інших іграх.</string>
|
||||
<string name="emulate_bgr565">Емулювати BGR565</string>
|
||||
<string name="emulate_bgr565_description">Виправляє проблеми з інвертованими кольорами в іграх або дивними артефактами чи тінями.</string>
|
||||
<string name="renderer_asynchronous_shaders">Асинхронні шейдери</string>
|
||||
<string name="renderer_asynchronous_shaders_description">Компілює шейдери асинхронно. Це може зменшити затримки, але також може спричинити графічні баги.</string>
|
||||
<string name="gpu_unswizzle_settings">Налаштування розпакування за допомогою ГП</string>
|
||||
@@ -1155,5 +1155,6 @@
|
||||
<string name="license_fidelityfx_fsr_description">Високоякісне масштабування від AMD</string>
|
||||
<string name="external_content">Зовнішній вміст</string>
|
||||
<string name="add_folders">Додати теку</string>
|
||||
<string name="percent">%1$d%%</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -330,7 +330,6 @@
|
||||
<string name="fsr_sharpness">Độ sắc nét FSR</string>
|
||||
<string name="fsr_sharpness_description">Độ sắc nét khi dùng FSR</string>
|
||||
<string name="renderer_anti_aliasing">Phương pháp khử răng cưa</string>
|
||||
<string name="renderer_optimize_spirv_output_description">Tối ưu hóa shader đã biên dịch để cải thiện hiệu suất GPU.</string>
|
||||
|
||||
|
||||
<string name="dma_accuracy">Độ chính xác DMA</string>
|
||||
|
||||
@@ -453,8 +453,6 @@
|
||||
<string name="fsr_sharpness">FSR 锐化度</string>
|
||||
<string name="fsr_sharpness_description">指定使用 FSR 时图像的锐化程度</string>
|
||||
<string name="renderer_anti_aliasing">抗锯齿方式</string>
|
||||
<string name="renderer_optimize_spirv_output">优化 SPIRV 输出</string>
|
||||
<string name="renderer_optimize_spirv_output_description">优化编译后的着色器以提高GPU效率。</string>
|
||||
|
||||
|
||||
<string name="advanced">高级</string>
|
||||
@@ -485,7 +483,7 @@
|
||||
<string name="enable_buffer_history">启用缓冲区历史</string>
|
||||
<string name="enable_buffer_history_description">启用对先前缓冲区状态的访问。此选项可在某些游戏中提升渲染质量并保持性能的一致性。</string>
|
||||
<string name="use_optimized_vertex_buffers">优化顶点缓冲区</string>
|
||||
<string name="use_optimized_vertex_buffers_description">启用经过优化的顶点缓冲区绑定以提升性能。需要 Mesa 26.0 及以上版本的 Turnip 驱动程序。在旧版驱动程序上会导致程序崩溃。</string>
|
||||
<string name="use_optimized_vertex_buffers_description">启用经过优化的顶点缓冲区绑定以提升性能。需要 Mesa 26.0 及以上版本的 Turnip 或 QCOM 驱动程序。若使用较旧版本的 Turnip 驱动则会导致崩溃。</string>
|
||||
|
||||
<string name="hacks">Hacks</string>
|
||||
|
||||
@@ -494,7 +492,9 @@
|
||||
<string name="skip_cpu_inner_invalidation">跳过CPU内部无效化</string>
|
||||
<string name="skip_cpu_inner_invalidation_description">在内存更新期间跳过某些CPU端缓存无效化,减少CPU使用率并提高其性能。可能会导致某些游戏出现故障或崩溃。</string>
|
||||
<string name="fix_bloom_effects">修复 Bloom 效果</string>
|
||||
<string name="fix_bloom_effects_description">减少《塞尔达传说:智慧的再现》(Adreno 700)中的 bloom 模糊,并移除《Burnout》中的 bloom 效果。警告:可能会导致在其他游戏中出现画面显示问题。</string>
|
||||
<string name="fix_bloom_effects_description">减少《塞尔达传说:智慧的再现》(Adreno A6XX - A7XX/ Turnip)中的 bloom 模糊,并移除《Burnout》中的 bloom 效果。警告:可能会导致在其他游戏中出现图形异常。</string>
|
||||
<string name="emulate_bgr565">模拟 BGR565</string>
|
||||
<string name="emulate_bgr565_description">修复了游戏中的颜色反转以及出现的异常画面瑕疵或奇怪阴影问题</string>
|
||||
<string name="renderer_asynchronous_shaders">使用异步着色器</string>
|
||||
<string name="renderer_asynchronous_shaders_description">异步编译着色器。这可能会减少卡顿,但也可能会导致图形错误。</string>
|
||||
<string name="gpu_unswizzle_settings">GPU 还原设置</string>
|
||||
@@ -1149,5 +1149,6 @@
|
||||
<string name="license_fidelityfx_fsr_description">AMD 的高品质画面增强技术</string>
|
||||
<string name="external_content">外部内容</string>
|
||||
<string name="add_folders">添加文件夹</string>
|
||||
<string name="percent">%1$d%%</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -440,7 +440,6 @@
|
||||
<string name="fsr_sharpness">FSR 銳化度</string>
|
||||
<string name="fsr_sharpness_description">使用 FSR 時圖片的銳化程度</string>
|
||||
<string name="renderer_anti_aliasing">抗鋸齒</string>
|
||||
<string name="renderer_optimize_spirv_output_description">最佳化編譯後的著色器以提高GPU效率。</string>
|
||||
|
||||
|
||||
<string name="dma_accuracy">DMA 準確度</string>
|
||||
|
||||
@@ -469,8 +469,6 @@
|
||||
<string name="fsr_sharpness">FSR sharpness</string>
|
||||
<string name="fsr_sharpness_description">Determines how sharpened the image will look while using FSR\'s dynamic contrast</string>
|
||||
<string name="renderer_anti_aliasing">Anti-aliasing method</string>
|
||||
<string name="renderer_optimize_spirv_output">Optimize SPIRV output</string>
|
||||
<string name="renderer_optimize_spirv_output_description">Optimizes compiled shaders to improve GPU efficiency, but may introduce longer loading times and initial slowdowns.</string>
|
||||
|
||||
|
||||
<string name="advanced">Advanced</string>
|
||||
@@ -513,6 +511,8 @@
|
||||
<string name="fix_bloom_effects_description">Reduces bloom blur in LA/EOW (Adreno A6XX - A7XX/ Turnip), removes bloom in Burnout. Warning: may cause graphical artifacts in other games.</string>
|
||||
<string name="emulate_bgr565">Emulate BGR565</string>
|
||||
<string name="emulate_bgr565_description">Fixes problems with inverted colors in games or strange artifacts or strange shadows.</string>
|
||||
<string name="rescale_hack">Enable Legacy Rescale Pass</string>
|
||||
<string name="rescale_hack_description">Fixes Luigi Mansion 3 artifact lines.</string>
|
||||
<string name="renderer_asynchronous_shaders">Use asynchronous shaders</string>
|
||||
<string name="renderer_asynchronous_shaders_description">Compiles shaders asynchronously. This may reduce stutters but may also introduce glitches.</string>
|
||||
<string name="gpu_unswizzle_settings">GPU Unswizzle Settings</string>
|
||||
@@ -1785,5 +1785,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
<string name="external_content">External Content</string>
|
||||
<string name="add_folders">Add Folder</string>
|
||||
<string name="percent">%1$d%%</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -147,7 +147,8 @@ add_library(
|
||||
zstd_compression.h
|
||||
fs/ryujinx_compat.h fs/ryujinx_compat.cpp
|
||||
fs/symlink.h fs/symlink.cpp
|
||||
httplib.h)
|
||||
httplib.h
|
||||
net/net.h net/net.cpp)
|
||||
|
||||
if(WIN32)
|
||||
target_sources(common PRIVATE windows/timer_resolution.cpp
|
||||
@@ -245,7 +246,7 @@ else()
|
||||
target_link_libraries(common PUBLIC Boost::headers)
|
||||
endif()
|
||||
|
||||
target_link_libraries(common PUBLIC Boost::filesystem Boost::context httplib::httplib)
|
||||
target_link_libraries(common PUBLIC Boost::filesystem Boost::context httplib::httplib nlohmann_json::nlohmann_json)
|
||||
|
||||
if (lz4_ADDED)
|
||||
target_include_directories(common PRIVATE ${lz4_SOURCE_DIR}/lib)
|
||||
|
||||
+16
-42
@@ -349,35 +349,8 @@ struct Impl {
|
||||
// Well, I mean it's the default constructor!
|
||||
explicit Impl() noexcept : filter(Level::Trace) {}
|
||||
|
||||
void StartBackendThread() noexcept {
|
||||
backend_thread = std::jthread([this](std::stop_token stop_token) {
|
||||
Common::SetCurrentThreadName("Logger");
|
||||
Entry entry;
|
||||
const auto write_logs = [this, &entry]() {
|
||||
ForEachBackend([&entry](Backend& backend) {
|
||||
backend.Write(entry);
|
||||
});
|
||||
};
|
||||
do {
|
||||
message_queue.PopWait(entry, stop_token);
|
||||
write_logs();
|
||||
} while (!stop_token.stop_requested());
|
||||
// Drain the logging queue. Only writes out up to MAX_LOGS_TO_WRITE to prevent a
|
||||
// case where a system is repeatedly spamming logs even on close.
|
||||
int max_logs_to_write = filter.IsDebug() ? INT_MAX : 100;
|
||||
while (max_logs_to_write-- && message_queue.TryPop(entry))
|
||||
write_logs();
|
||||
});
|
||||
}
|
||||
|
||||
void StopBackendThread() noexcept {
|
||||
backend_thread.request_stop();
|
||||
if (backend_thread.joinable())
|
||||
backend_thread.join();
|
||||
ForEachBackend([](Backend& backend) { backend.Flush(); });
|
||||
}
|
||||
|
||||
void ForEachBackend(auto lambda) noexcept {
|
||||
template<typename F>
|
||||
void ForEachBackend(F&& lambda) noexcept {
|
||||
lambda(static_cast<Backend&>(color_console_backend));
|
||||
#ifndef __OPENORBIS__
|
||||
if (file_backend)
|
||||
@@ -402,9 +375,7 @@ struct Impl {
|
||||
#ifdef ANDROID
|
||||
LogcatBackend lc_backend{};
|
||||
#endif
|
||||
MPSCQueue<Entry> message_queue{};
|
||||
std::chrono::steady_clock::time_point time_origin{std::chrono::steady_clock::now()};
|
||||
std::jthread backend_thread;
|
||||
};
|
||||
} // namespace
|
||||
|
||||
@@ -428,13 +399,11 @@ void Initialize() {
|
||||
}
|
||||
|
||||
void Start() {
|
||||
if (logging_instance)
|
||||
logging_instance->StartBackendThread();
|
||||
}
|
||||
|
||||
void Stop() {
|
||||
if (logging_instance)
|
||||
logging_instance->StopBackendThread();
|
||||
logging_instance->ForEachBackend([](Backend& backend) { backend.Flush(); });
|
||||
}
|
||||
|
||||
void SetGlobalFilter(const Filter& filter) {
|
||||
@@ -449,14 +418,19 @@ void SetColorConsoleBackendEnabled(bool enabled) {
|
||||
|
||||
void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename, unsigned int line_num, const char* function, fmt::string_view format, const fmt::format_args& args) {
|
||||
if (logging_instance && logging_instance->filter.CheckMessage(log_class, log_level)) {
|
||||
logging_instance->message_queue.EmplaceWait(Entry{
|
||||
.message = fmt::vformat(format, args),
|
||||
.timestamp = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - logging_instance->time_origin),
|
||||
.log_class = log_class,
|
||||
.log_level = log_level,
|
||||
.filename = TrimSourcePath(filename),
|
||||
.function = function,
|
||||
.line_num = line_num,
|
||||
auto const flush = ::Settings::values.log_flush_line.GetValue();
|
||||
logging_instance->ForEachBackend([=](Backend& backend) {
|
||||
backend.Write(Entry{
|
||||
.message = fmt::vformat(format, args),
|
||||
.timestamp = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - logging_instance->time_origin),
|
||||
.log_class = log_class,
|
||||
.log_level = log_level,
|
||||
.filename = TrimSourcePath(filename),
|
||||
.function = function,
|
||||
.line_num = line_num,
|
||||
});
|
||||
if (flush)
|
||||
backend.Flush();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
namespace Common {
|
||||
|
||||
template <typename BaseAddr>
|
||||
MultiLevelPageTable<BaseAddr>::MultiLevelPageTable(std::size_t address_space_bits_,
|
||||
std::size_t first_level_bits_,
|
||||
std::size_t page_bits_)
|
||||
: address_space_bits{address_space_bits_},
|
||||
first_level_bits{first_level_bits_}, page_bits{page_bits_} {
|
||||
MultiLevelPageTable<BaseAddr>::MultiLevelPageTable(std::size_t address_space_bits_, std::size_t first_level_bits_, std::size_t page_bits_)
|
||||
: address_space_bits{address_space_bits_}
|
||||
, first_level_bits{first_level_bits_}
|
||||
, page_bits{page_bits_}
|
||||
{
|
||||
if (page_bits == 0) {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
first_level_shift = address_space_bits - first_level_bits;
|
||||
first_level_chunk_size = (1ULL << (first_level_shift - page_bits)) * sizeof(BaseAddr);
|
||||
@@ -30,12 +30,9 @@ MultiLevelPageTable<BaseAddr>::MultiLevelPageTable(std::size_t address_space_bit
|
||||
void* base{VirtualAlloc(nullptr, alloc_size, MEM_RESERVE, PAGE_READWRITE)};
|
||||
#else
|
||||
void* base{mmap(nullptr, alloc_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)};
|
||||
|
||||
if (base == MAP_FAILED) {
|
||||
if (base == MAP_FAILED)
|
||||
base = nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
ASSERT(base);
|
||||
base_ptr = reinterpret_cast<BaseAddr*>(base);
|
||||
}
|
||||
@@ -56,29 +53,21 @@ template <typename BaseAddr>
|
||||
void MultiLevelPageTable<BaseAddr>::ReserveRange(u64 start, std::size_t size) {
|
||||
const u64 new_start = start >> first_level_shift;
|
||||
const u64 new_end = (start + size) >> first_level_shift;
|
||||
for (u64 i = new_start; i <= new_end; i++) {
|
||||
if (!first_level_map[i]) {
|
||||
for (u64 i = new_start; i <= new_end; i++)
|
||||
if (!first_level_map[i])
|
||||
AllocateLevel(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <typename BaseAddr>
|
||||
void MultiLevelPageTable<BaseAddr>::AllocateLevel(u64 level) {
|
||||
void* ptr = reinterpret_cast<char *>(base_ptr) + level * first_level_chunk_size;
|
||||
void MultiLevelPageTable<BaseAddr>::AllocateLevel(u64 index) {
|
||||
void* ptr = reinterpret_cast<char *>(base_ptr) + index * first_level_chunk_size;
|
||||
#ifdef _WIN32
|
||||
void* base{VirtualAlloc(ptr, first_level_chunk_size, MEM_COMMIT, PAGE_READWRITE)};
|
||||
#else
|
||||
void* base{mmap(ptr, first_level_chunk_size, PROT_READ | PROT_WRITE,
|
||||
MAP_ANONYMOUS | MAP_PRIVATE, -1, 0)};
|
||||
|
||||
if (base == MAP_FAILED) {
|
||||
base = nullptr;
|
||||
}
|
||||
#endif
|
||||
void* base = VirtualAlloc(ptr, first_level_chunk_size, MEM_COMMIT, PAGE_READWRITE);
|
||||
ASSERT(base);
|
||||
|
||||
first_level_map[level] = base;
|
||||
#else
|
||||
void* base = ptr;
|
||||
#endif
|
||||
first_level_map[index] = base;
|
||||
}
|
||||
|
||||
} // namespace Common
|
||||
|
||||
@@ -0,0 +1,287 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include <optional>
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include "common/scm_rev.h"
|
||||
#include "net.h"
|
||||
|
||||
#include "common/logging.h"
|
||||
|
||||
#include "common/httplib.h"
|
||||
|
||||
#ifdef YUZU_BUNDLED_OPENSSL
|
||||
#include <openssl/cert.h>
|
||||
#endif
|
||||
|
||||
#define QT_TR_NOOP(x) x
|
||||
|
||||
namespace Common::Net {
|
||||
|
||||
std::vector<Asset> Release::GetPlatformAssets() const {
|
||||
// TODO(crueter): Need better handling for this as a whole.
|
||||
#ifdef NIGHTLY_BUILD
|
||||
std::vector<std::string> result;
|
||||
boost::algorithm::split(result, tag, boost::is_any_of("."));
|
||||
if (result.size() != 2)
|
||||
return {};
|
||||
const auto ref = result.at(1);
|
||||
#else
|
||||
const auto ref = tag;
|
||||
#endif
|
||||
|
||||
std::vector<Asset> found_assets;
|
||||
|
||||
// FIXME: This is mildly inefficient.
|
||||
// Finds assets based on a hierarchy of regex search strings.
|
||||
const auto find_asset = [&found_assets, ref, this](const std::string& name,
|
||||
const std::vector<std::string>& suffixes) {
|
||||
for (const std::string& asset : assets) {
|
||||
for (const auto& suffix : suffixes) {
|
||||
if (asset.ends_with(suffix)) {
|
||||
const std::string_view asset_sv = asset;
|
||||
const size_t pos = asset_sv.find_last_of('/');
|
||||
const std::string_view filename =
|
||||
(pos != std::string_view::npos) ? asset_sv.substr(pos + 1) : asset_sv;
|
||||
|
||||
found_assets.emplace_back(Asset{
|
||||
.name = name,
|
||||
.url = host,
|
||||
.path = asset,
|
||||
.filename = std::string{filename},
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef ARCHITECTURE_x86_64
|
||||
find_asset("Standard", {"amd64-msvc-standard.exe", "amd64-msvc-standard.zip", "mingw-amd64-gcc-standard.exe", "mingw-amd64-gcc-standard.zip"});
|
||||
find_asset("PGO", {"mingw-amd64-clang-pgo.exe", "mingw-amd64-clang-pgo.zip"});
|
||||
#elif defined(ARCHITECTURE_arm64)
|
||||
find_asset("Standard", {"mingw-arm64-clang-standard.exe", "mingw-arm64-clang-standard.zip"});
|
||||
find_asset("PGO", {"mingw-arm64-clang-pgo.exe", "mingw-arm64-clang-pgo.zip"});
|
||||
#endif
|
||||
#elif defined(__APPLE__)
|
||||
#ifdef ARCHITECTURE_arm64
|
||||
find_asset("Standard", {".dmg", ".tar.gz"});
|
||||
#endif
|
||||
#elif defined(__ANDROID__)
|
||||
#ifdef ARCHITECTURE_x86_64
|
||||
find_asset("Standard", {"chromeos.apk"});
|
||||
#elif defined(ARCHITECTURE_arm64)
|
||||
#ifdef YUZU_LEGACY
|
||||
find_asset("Standard", {"legacy.apk"});
|
||||
#elif defined(GENSHIN_SPOOF)
|
||||
find_asset("Standard", {"optimized.apk"});
|
||||
#else
|
||||
find_asset("Standard", {"standard.apk"});
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
return found_assets;
|
||||
}
|
||||
|
||||
static inline u64 ParseIsoTimestamp(const std::string& iso) {
|
||||
if (iso.empty())
|
||||
return 0;
|
||||
|
||||
std::string buf = iso;
|
||||
if (buf.back() == 'Z')
|
||||
buf.pop_back();
|
||||
|
||||
std::tm tm{};
|
||||
std::istringstream ss(buf);
|
||||
ss >> std::get_time(&tm, "%Y-%m-%dT%H:%M:%S");
|
||||
if (ss.fail())
|
||||
return 0;
|
||||
|
||||
#ifdef _WIN32
|
||||
return static_cast<u64>(_mkgmtime(&tm));
|
||||
#else
|
||||
return static_cast<u64>(timegm(&tm));
|
||||
#endif
|
||||
}
|
||||
|
||||
std::optional<Release> Release::FromJson(const nlohmann::json& json, const std::string& host,
|
||||
const std::string& repo) {
|
||||
Release rel;
|
||||
if (!json.is_object())
|
||||
return std::nullopt;
|
||||
|
||||
rel.tag = json.value("tag_name", std::string{});
|
||||
if (rel.tag.empty())
|
||||
return std::nullopt;
|
||||
|
||||
rel.title = json.value("name", rel.tag);
|
||||
rel.id = json.value("id", std::hash<std::string>{}(rel.title));
|
||||
|
||||
rel.published = ParseIsoTimestamp(json.value("published_at", std::string{}));
|
||||
rel.prerelease = json.value("prerelease", false);
|
||||
|
||||
auto body = json.value("body", rel.title);
|
||||
boost::replace_all(body, "\\r", "");
|
||||
boost::replace_all(body, "\\n", "\n");
|
||||
rel.body = body;
|
||||
|
||||
rel.host = host;
|
||||
|
||||
const auto release_base =
|
||||
fmt::format("{}/{}/releases", Common::g_build_auto_update_website, repo);
|
||||
const auto fallback_html = fmt::format("{}/tag/{}", release_base, rel.tag);
|
||||
rel.html_url = json.value("html_url", fallback_html);
|
||||
|
||||
// This is our own "fake" API.
|
||||
if (json.contains("base")) {
|
||||
const auto base = json.value("base", fmt::format("https://{}", Common::g_build_auto_update_api));
|
||||
rel.base_download_url = fmt::format("{}/{}", base, rel.tag);
|
||||
|
||||
// Assets are easy :)
|
||||
rel.assets = json.value("assets", std::vector<std::string>{});
|
||||
} else {
|
||||
const auto base_download_url = fmt::format("/{}/releases/download/{}", repo, rel.tag);
|
||||
|
||||
rel.base_download_url = base_download_url;
|
||||
|
||||
// assets are a bit more complex here. :(
|
||||
std::vector<std::string> assets;
|
||||
const nlohmann::json& arr = json["assets"];
|
||||
for (const auto &obj : arr) {
|
||||
const auto url = obj.value("browser_download_url", std::string{});
|
||||
assets.emplace_back(url);
|
||||
}
|
||||
|
||||
rel.assets = assets;
|
||||
}
|
||||
|
||||
return rel;
|
||||
}
|
||||
|
||||
std::optional<Release> Release::FromJson(const std::string_view& json, const std::string& host,
|
||||
const std::string& repo) {
|
||||
try {
|
||||
return FromJson(nlohmann::json::parse(json), host, repo);
|
||||
} catch (std::exception& e) {
|
||||
LOG_WARNING(Common, "Failed to parse JSON: {}", e.what());
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<Release> Release::ListFromJson(const nlohmann::json& json, const std::string& host,
|
||||
const std::string& repo) {
|
||||
if (!json.is_array())
|
||||
return {};
|
||||
|
||||
std::vector<Release> releases;
|
||||
for (const auto& obj : json) {
|
||||
auto rel = Release::FromJson(obj, host, repo);
|
||||
if (rel)
|
||||
releases.emplace_back(rel.value());
|
||||
}
|
||||
return releases;
|
||||
}
|
||||
|
||||
std::vector<Release> Release::ListFromJson(const std::string_view& json, const std::string& host,
|
||||
const std::string& repo) {
|
||||
try {
|
||||
return ListFromJson(nlohmann::json::parse(json), host, repo);
|
||||
} catch (std::exception& e) {
|
||||
LOG_WARNING(Common, "Failed to parse JSON: {}", e.what());
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
std::optional<std::string> MakeRequest(const std::string& url, const std::string& path) {
|
||||
try {
|
||||
constexpr std::size_t timeout_seconds = 15;
|
||||
|
||||
std::unique_ptr<httplib::Client> client = std::make_unique<httplib::Client>(url);
|
||||
client->set_connection_timeout(timeout_seconds);
|
||||
client->set_read_timeout(timeout_seconds);
|
||||
client->set_write_timeout(timeout_seconds);
|
||||
|
||||
#ifdef YUZU_BUNDLED_OPENSSL
|
||||
client->load_ca_cert_store(kCert, sizeof(kCert));
|
||||
#endif
|
||||
|
||||
if (client == nullptr) {
|
||||
LOG_ERROR(Common, "Invalid URL {}{}", url, path);
|
||||
return {};
|
||||
}
|
||||
|
||||
httplib::Request request{
|
||||
.method = "GET",
|
||||
.path = path,
|
||||
};
|
||||
|
||||
client->set_follow_location(true);
|
||||
httplib::Result result = client->send(request);
|
||||
|
||||
if (!result) {
|
||||
LOG_ERROR(Common, "GET to {}{} returned null", url, path);
|
||||
return {};
|
||||
}
|
||||
|
||||
const auto& response = result.value();
|
||||
if (response.status >= 400) {
|
||||
LOG_ERROR(Common, "GET to {}{} returned error status code: {}", url, path,
|
||||
response.status);
|
||||
return {};
|
||||
}
|
||||
if (!response.headers.contains("content-type")) {
|
||||
LOG_ERROR(Common, "GET to {}{} returned no content", url, path);
|
||||
return {};
|
||||
}
|
||||
|
||||
return response.body;
|
||||
} catch (std::exception& e) {
|
||||
LOG_ERROR(Common, "GET to {}{} failed during update check: {}", url, path, e.what());
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<Release> GetReleases() {
|
||||
const auto body = GetReleasesBody();
|
||||
|
||||
if (!body) {
|
||||
LOG_WARNING(Common, "Failed to get stable releases");
|
||||
return {};
|
||||
}
|
||||
|
||||
const std::string_view body_str = body.value();
|
||||
const auto url = fmt::format("https://{}", Common::g_build_auto_update_stable_api);
|
||||
return Release::ListFromJson(body_str, url, Common::g_build_auto_update_stable_repo);
|
||||
}
|
||||
|
||||
std::optional<Release> GetLatestRelease() {
|
||||
const auto releases_path = Common::g_build_auto_update_api_path;
|
||||
const auto url = fmt::format("https://{}", Common::g_build_auto_update_api);
|
||||
|
||||
const auto body = MakeRequest(url, releases_path);
|
||||
if (!body) {
|
||||
LOG_WARNING(Common, "Failed to get latest release");
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
const std::string_view body_str = body.value();
|
||||
return Release::FromJson(body_str, url, Common::g_build_auto_update_repo);
|
||||
}
|
||||
|
||||
std::optional<std::string> GetReleasesBody() {
|
||||
const auto releases_path =
|
||||
fmt::format("/{}/{}/releases", Common::g_build_auto_update_stable_api_path,
|
||||
Common::g_build_auto_update_stable_repo);
|
||||
const auto url = fmt::format("https://{}", Common::g_build_auto_update_stable_api);
|
||||
|
||||
return MakeRequest(url, releases_path);
|
||||
}
|
||||
|
||||
} // namespace Common::Net
|
||||
@@ -0,0 +1,56 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "common/common_types.h"
|
||||
|
||||
namespace Common::Net {
|
||||
|
||||
typedef struct {
|
||||
std::string name;
|
||||
std::string url;
|
||||
std::string path;
|
||||
std::string filename;
|
||||
} Asset;
|
||||
|
||||
typedef struct Release {
|
||||
std::string title;
|
||||
std::string body;
|
||||
std::string tag;
|
||||
std::string base_download_url;
|
||||
std::string html_url;
|
||||
std::string host;
|
||||
|
||||
std::vector<std::string> assets;
|
||||
|
||||
u64 id;
|
||||
u64 published;
|
||||
bool prerelease;
|
||||
|
||||
// Get the relevant list of assets for the current platform.
|
||||
std::vector<Asset> GetPlatformAssets() const;
|
||||
|
||||
static std::optional<Release> FromJson(const nlohmann::json& json, const std::string &host, const std::string& repo);
|
||||
static std::optional<Release> FromJson(const std::string_view& json, const std::string &host, const std::string& repo);
|
||||
static std::vector<Release> ListFromJson(const nlohmann::json &json, const std::string &host, const std::string &repo);
|
||||
static std::vector<Release> ListFromJson(const std::string_view &json, const std::string &host, const std::string &repo);
|
||||
} Release;
|
||||
|
||||
// Make a request via httplib, and return the response body if applicable.
|
||||
std::optional<std::string> MakeRequest(const std::string &url, const std::string &path);
|
||||
|
||||
// Get all of the latest stable releases.
|
||||
std::vector<Release> GetReleases();
|
||||
|
||||
// Get all of the latest stable releases as text.
|
||||
std::optional<std::string> GetReleasesBody();
|
||||
|
||||
// Get the latest release of the current channel.
|
||||
std::optional<Release> GetLatestRelease();
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
||||
@@ -142,10 +142,8 @@ struct PageTable {
|
||||
VirtualBuffer<PageEntryData> entries;
|
||||
static_assert(sizeof(PageEntryData) == 32);
|
||||
|
||||
std::size_t current_address_space_width_in_bits{};
|
||||
|
||||
u8* fastmem_arena{};
|
||||
|
||||
std::size_t current_address_space_width_in_bits{};
|
||||
std::size_t page_size{};
|
||||
};
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
#define BUILD_AUTO_UPDATE_API "@BUILD_AUTO_UPDATE_API@"
|
||||
#define BUILD_AUTO_UPDATE_API_PATH "@BUILD_AUTO_UPDATE_API_PATH@"
|
||||
#define BUILD_AUTO_UPDATE_REPO "@BUILD_AUTO_UPDATE_REPO@"
|
||||
#define BUILD_AUTO_UPDATE_STABLE_API "@BUILD_AUTO_UPDATE_STABLE_API@"
|
||||
#define BUILD_AUTO_UPDATE_STABLE_API_PATH "@BUILD_AUTO_UPDATE_STABLE_API_PATH@"
|
||||
#define BUILD_AUTO_UPDATE_STABLE_REPO "@BUILD_AUTO_UPDATE_STABLE_REPO@"
|
||||
#define IS_NIGHTLY_BUILD @IS_NIGHTLY_BUILD@
|
||||
|
||||
namespace Common {
|
||||
@@ -45,5 +48,8 @@ constexpr const char g_build_auto_update_website[] = BUILD_AUTO_UPDATE_WEBSITE;
|
||||
constexpr const char g_build_auto_update_api[] = BUILD_AUTO_UPDATE_API;
|
||||
constexpr const char g_build_auto_update_api_path[] = BUILD_AUTO_UPDATE_API_PATH;
|
||||
constexpr const char g_build_auto_update_repo[] = BUILD_AUTO_UPDATE_REPO;
|
||||
constexpr const char g_build_auto_update_stable_api[] = BUILD_AUTO_UPDATE_STABLE_API;
|
||||
constexpr const char g_build_auto_update_stable_api_path[] = BUILD_AUTO_UPDATE_STABLE_API_PATH;
|
||||
constexpr const char g_build_auto_update_stable_repo[] = BUILD_AUTO_UPDATE_STABLE_REPO;
|
||||
|
||||
} // namespace Common
|
||||
|
||||
@@ -28,5 +28,8 @@ extern const char g_build_auto_update_website[];
|
||||
extern const char g_build_auto_update_api[];
|
||||
extern const char g_build_auto_update_api_path[];
|
||||
extern const char g_build_auto_update_repo[];
|
||||
extern const char g_build_auto_update_stable_api[];
|
||||
extern const char g_build_auto_update_stable_api_path[];
|
||||
extern const char g_build_auto_update_stable_repo[];
|
||||
|
||||
} // namespace Common
|
||||
|
||||
@@ -388,10 +388,6 @@ struct Values {
|
||||
true,
|
||||
true};
|
||||
|
||||
SwitchableSetting<SpirvOptimizeMode, true> optimize_spirv_output{linkage,
|
||||
SpirvOptimizeMode::Never,
|
||||
"optimize_spirv_output",
|
||||
Category::Renderer};
|
||||
SwitchableSetting<bool> use_asynchronous_gpu_emulation{
|
||||
linkage, true, "use_asynchronous_gpu_emulation", Category::Renderer};
|
||||
// *nix platforms may have issues with the borderless windowed fullscreen mode.
|
||||
|
||||
+18
-17
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 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
|
||||
|
||||
@@ -21,7 +24,9 @@ public:
|
||||
// "with the current allocator");
|
||||
|
||||
constexpr VirtualBuffer() = default;
|
||||
explicit VirtualBuffer(std::size_t count) : alloc_size{count * sizeof(T)} {
|
||||
explicit VirtualBuffer(std::size_t count) noexcept
|
||||
: alloc_size{count * sizeof(T)}
|
||||
{
|
||||
base_ptr = reinterpret_cast<T*>(AllocateMemoryPages(alloc_size));
|
||||
}
|
||||
|
||||
@@ -33,8 +38,8 @@ public:
|
||||
VirtualBuffer& operator=(const VirtualBuffer&) = delete;
|
||||
|
||||
VirtualBuffer(VirtualBuffer&& other) noexcept
|
||||
: alloc_size{std::exchange(other.alloc_size, 0)}, base_ptr{std::exchange(other.base_ptr),
|
||||
nullptr} {}
|
||||
: alloc_size{std::exchange(other.alloc_size, 0)}, base_ptr{std::exchange(other.base_ptr), nullptr}
|
||||
{}
|
||||
|
||||
VirtualBuffer& operator=(VirtualBuffer&& other) noexcept {
|
||||
alloc_size = std::exchange(other.alloc_size, 0);
|
||||
@@ -42,35 +47,31 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
void resize(std::size_t count) {
|
||||
const auto new_size = count * sizeof(T);
|
||||
if (new_size == alloc_size) {
|
||||
return;
|
||||
void resize(std::size_t count) noexcept {
|
||||
if (auto const new_size = count * sizeof(T); new_size != alloc_size) {
|
||||
FreeMemoryPages(base_ptr, alloc_size);
|
||||
alloc_size = new_size;
|
||||
base_ptr = reinterpret_cast<T*>(AllocateMemoryPages(alloc_size));
|
||||
}
|
||||
|
||||
FreeMemoryPages(base_ptr, alloc_size);
|
||||
|
||||
alloc_size = new_size;
|
||||
base_ptr = reinterpret_cast<T*>(AllocateMemoryPages(alloc_size));
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr const T& operator[](std::size_t index) const {
|
||||
[[nodiscard]] constexpr const T& operator[](std::size_t index) const noexcept {
|
||||
return base_ptr[index];
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr T& operator[](std::size_t index) {
|
||||
[[nodiscard]] constexpr T& operator[](std::size_t index) noexcept {
|
||||
return base_ptr[index];
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr T* data() {
|
||||
[[nodiscard]] constexpr T* data() noexcept {
|
||||
return base_ptr;
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr const T* data() const {
|
||||
[[nodiscard]] constexpr const T* data() const noexcept {
|
||||
return base_ptr;
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr std::size_t size() const {
|
||||
[[nodiscard]] constexpr std::size_t size() const noexcept {
|
||||
return alloc_size / sizeof(T);
|
||||
}
|
||||
|
||||
|
||||
@@ -415,7 +415,6 @@ struct System::Impl {
|
||||
cpu_manager.Shutdown();
|
||||
debugger.reset();
|
||||
kernel.Shutdown();
|
||||
device_memory.reset();
|
||||
stop_event = {};
|
||||
Network::RestartSocketOperations();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
@@ -283,7 +283,7 @@ std::string_view GDBStubA32::GetTargetXML() const {
|
||||
<reg name="r11" bitsize="32" type="uint32"/>
|
||||
<reg name="r12" bitsize="32" type="uint32"/>
|
||||
<reg name="sp" bitsize="32" type="data_ptr"/>
|
||||
<reg name="lr" bitsize="32" type="code_ptr"/>
|
||||
<reg name="lr" bitsize="32"/>
|
||||
<reg name="pc" bitsize="32" type="code_ptr"/>
|
||||
<!-- The CPSR is register 25, rather than register 16, because
|
||||
the FPA registers historically were placed between the PC
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
@@ -109,7 +109,7 @@ Result AesCtrCounterExtendedStorage::GetEntryList(Entry* out_entries, s32* out_e
|
||||
R_UNLESS(out_entries != nullptr || entry_count == 0, ResultNullptrArgument);
|
||||
|
||||
// Check that our range is valid.
|
||||
BucketTree::Offsets table_offsets;
|
||||
BucketTree::Offsets table_offsets{};
|
||||
R_TRY(m_table.GetOffsets(std::addressof(table_offsets)));
|
||||
|
||||
R_UNLESS(table_offsets.IsInclude(offset, size), ResultOutOfRange);
|
||||
@@ -167,7 +167,7 @@ size_t AesCtrCounterExtendedStorage::Read(u8* buffer, size_t size, size_t offset
|
||||
ASSERT(Common::IsAligned(offset, BlockSize));
|
||||
ASSERT(Common::IsAligned(size, BlockSize));
|
||||
|
||||
BucketTree::Offsets table_offsets;
|
||||
BucketTree::Offsets table_offsets{};
|
||||
ASSERT(R_SUCCEEDED(m_table.GetOffsets(std::addressof(table_offsets))));
|
||||
|
||||
ASSERT(table_offsets.IsInclude(offset, size));
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -89,7 +92,7 @@ public:
|
||||
virtual size_t Read(u8* buffer, size_t size, size_t offset) const override;
|
||||
|
||||
virtual size_t GetSize() const override {
|
||||
BucketTree::Offsets offsets;
|
||||
BucketTree::Offsets offsets{};
|
||||
ASSERT(R_SUCCEEDED(m_table.GetOffsets(std::addressof(offsets))));
|
||||
|
||||
return offsets.end_offset;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
@@ -270,7 +270,7 @@ Result BucketTree::Find(Visitor* visitor, s64 virtual_address) {
|
||||
R_UNLESS(virtual_address >= 0, ResultInvalidOffset);
|
||||
R_UNLESS(!this->IsEmpty(), ResultOutOfRange);
|
||||
|
||||
BucketTree::Offsets offsets;
|
||||
BucketTree::Offsets offsets{};
|
||||
R_TRY(this->GetOffsets(std::addressof(offsets)));
|
||||
|
||||
R_TRY(visitor->Initialize(this, offsets));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
@@ -125,7 +125,7 @@ private:
|
||||
}
|
||||
|
||||
// Get the table offsets.
|
||||
BucketTree::Offsets table_offsets;
|
||||
BucketTree::Offsets table_offsets{};
|
||||
R_TRY(m_table.GetOffsets(std::addressof(table_offsets)));
|
||||
|
||||
// Validate arguments.
|
||||
@@ -177,7 +177,7 @@ private:
|
||||
ASSERT(out != nullptr);
|
||||
|
||||
// Get our table offsets.
|
||||
BucketTree::Offsets offsets;
|
||||
BucketTree::Offsets offsets{};
|
||||
R_TRY(m_table.GetOffsets(std::addressof(offsets)));
|
||||
|
||||
// Set the output.
|
||||
@@ -195,7 +195,7 @@ private:
|
||||
R_SUCCEED_IF(size == 0);
|
||||
|
||||
// Get the table offsets.
|
||||
BucketTree::Offsets table_offsets;
|
||||
BucketTree::Offsets table_offsets{};
|
||||
R_TRY(m_table.GetOffsets(std::addressof(table_offsets)));
|
||||
|
||||
// Validate arguments.
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -52,7 +55,7 @@ Result IndirectStorage::GetEntryList(Entry* out_entries, s32* out_entry_count, s
|
||||
R_UNLESS(out_entries != nullptr || entry_count == 0, ResultNullptrArgument);
|
||||
|
||||
// Check that our range is valid.
|
||||
BucketTree::Offsets table_offsets;
|
||||
BucketTree::Offsets table_offsets{};
|
||||
R_TRY(m_table.GetOffsets(std::addressof(table_offsets)));
|
||||
|
||||
R_UNLESS(table_offsets.IsInclude(offset, size), ResultOutOfRange);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -164,7 +167,7 @@ Result IndirectStorage::OperatePerEntry(s64 offset, s64 size, F func) {
|
||||
R_SUCCEED_IF(size == 0);
|
||||
|
||||
// Get the table offsets.
|
||||
BucketTree::Offsets table_offsets;
|
||||
BucketTree::Offsets table_offsets{};
|
||||
R_TRY(m_table.GetOffsets(std::addressof(table_offsets)));
|
||||
|
||||
// Validate arguments.
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -18,7 +21,7 @@ size_t SparseStorage::Read(u8* buffer, size_t size, size_t offset) const {
|
||||
SparseStorage* self = const_cast<SparseStorage*>(this);
|
||||
|
||||
if (self->GetEntryTable().IsEmpty()) {
|
||||
BucketTree::Offsets table_offsets;
|
||||
BucketTree::Offsets table_offsets{};
|
||||
ASSERT(R_SUCCEEDED(self->GetEntryTable().GetOffsets(std::addressof(table_offsets))));
|
||||
ASSERT(table_offsets.IsInclude(offset, size));
|
||||
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <memory>
|
||||
#include "common/alignment.h"
|
||||
#include "common/literals.h"
|
||||
#include "core/file_sys/registered_cache.h"
|
||||
#include "core/file_sys/sdmc_factory.h"
|
||||
#include "core/file_sys/vfs/vfs.h"
|
||||
@@ -9,8 +14,6 @@
|
||||
|
||||
namespace FileSys {
|
||||
|
||||
constexpr u64 SDMC_TOTAL_SIZE = 0x10000000000; // 1 TiB
|
||||
|
||||
SDMCFactory::SDMCFactory(VirtualDir sd_dir_, VirtualDir sd_mod_dir_)
|
||||
: sd_dir(std::move(sd_dir_)), sd_mod_dir(std::move(sd_mod_dir_)),
|
||||
contents(std::make_unique<RegisteredCache>(
|
||||
@@ -56,7 +59,11 @@ u64 SDMCFactory::GetSDMCFreeSpace() const {
|
||||
}
|
||||
|
||||
u64 SDMCFactory::GetSDMCTotalSpace() const {
|
||||
return SDMC_TOTAL_SIZE;
|
||||
// Resize the SD space automatically, always leaving around 4GiB last from next chunk block
|
||||
using namespace Common::Literals;
|
||||
auto const bytes_per_sector = 512;
|
||||
auto const size_block = (sd_dir->GetSize() + 4_GiB) / 4_GiB;
|
||||
return Common::AlignUp(size_block * 4_GiB, bytes_per_sector);
|
||||
}
|
||||
|
||||
} // namespace FileSys
|
||||
|
||||
@@ -15,86 +15,76 @@
|
||||
|
||||
namespace FileSys::SystemArchive {
|
||||
|
||||
constexpr u64 SYSTEM_ARCHIVE_BASE_TITLE_ID = 0x0100000000000800;
|
||||
constexpr std::size_t SYSTEM_ARCHIVE_COUNT = 0x28;
|
||||
|
||||
using SystemArchiveSupplier = VirtualDir (*)();
|
||||
|
||||
struct SystemArchiveDescriptor {
|
||||
u64 title_id;
|
||||
const char* name;
|
||||
SystemArchiveSupplier supplier;
|
||||
VirtualDir (*supplier)();
|
||||
};
|
||||
|
||||
constexpr std::array<SystemArchiveDescriptor, SYSTEM_ARCHIVE_COUNT> SYSTEM_ARCHIVES{{
|
||||
{0x0100000000000800, "CertStore", nullptr},
|
||||
{0x0100000000000801, "ErrorMessage", nullptr},
|
||||
{0x0100000000000802, "MiiModel", &MiiModel},
|
||||
{0x0100000000000803, "BrowserDll", nullptr},
|
||||
{0x0100000000000804, "Help", nullptr},
|
||||
{0x0100000000000805, "SharedFont", nullptr},
|
||||
{0x0100000000000806, "NgWord", &NgWord1},
|
||||
{0x0100000000000807, "SsidList", nullptr},
|
||||
{0x0100000000000808, "Dictionary", nullptr},
|
||||
{0x0100000000000809, "SystemVersion", &SystemVersion},
|
||||
{0x010000000000080A, "AvatarImage", nullptr},
|
||||
{0x010000000000080B, "LocalNews", nullptr},
|
||||
{0x010000000000080C, "Eula", nullptr},
|
||||
{0x010000000000080D, "UrlBlackList", nullptr},
|
||||
{0x010000000000080E, "TimeZoneBinary", &TimeZoneBinary},
|
||||
{0x010000000000080F, "CertStoreCruiser", nullptr},
|
||||
{0x0100000000000810, "FontNintendoExtension", &FontNintendoExtension},
|
||||
{0x0100000000000811, "FontStandard", &FontStandard},
|
||||
{0x0100000000000812, "FontKorean", &FontKorean},
|
||||
{0x0100000000000813, "FontChineseTraditional", &FontChineseTraditional},
|
||||
{0x0100000000000814, "FontChineseSimple", &FontChineseSimple},
|
||||
{0x0100000000000815, "FontBfcpx", nullptr},
|
||||
{0x0100000000000816, "SystemUpdate", nullptr},
|
||||
{0x0100000000000817, "0100000000000817", nullptr},
|
||||
{0x0100000000000818, "FirmwareDebugSettings", nullptr},
|
||||
{0x0100000000000819, "BootImagePackage", nullptr},
|
||||
{0x010000000000081A, "BootImagePackageSafe", nullptr},
|
||||
{0x010000000000081B, "BootImagePackageExFat", nullptr},
|
||||
{0x010000000000081C, "BootImagePackageExFatSafe", nullptr},
|
||||
{0x010000000000081D, "FatalMessage", nullptr},
|
||||
{0x010000000000081E, "ControllerIcon", nullptr},
|
||||
{0x010000000000081F, "PlatformConfigIcosa", nullptr},
|
||||
{0x0100000000000820, "PlatformConfigCopper", nullptr},
|
||||
{0x0100000000000821, "PlatformConfigHoag", nullptr},
|
||||
{0x0100000000000822, "ControllerFirmware", nullptr},
|
||||
{0x0100000000000823, "NgWord2", &NgWord2},
|
||||
{0x0100000000000824, "PlatformConfigIcosaMariko", nullptr},
|
||||
{0x0100000000000825, "ApplicationBlackList", nullptr},
|
||||
{0x0100000000000826, "RebootlessSystemUpdateVersion", nullptr},
|
||||
{0x0100000000000827, "ContentActionTable", nullptr},
|
||||
}};
|
||||
constexpr inline SystemArchiveDescriptor GetSystemArchive(u64 title_id) {
|
||||
switch (title_id) {
|
||||
case 0x0100000000000800: return {"CertStore", nullptr};
|
||||
case 0x0100000000000801: return {"ErrorMessage", nullptr};
|
||||
case 0x0100000000000802: return {"MiiModel", &MiiModel};
|
||||
case 0x0100000000000803: return {"BrowserDll", nullptr};
|
||||
case 0x0100000000000804: return {"Help", nullptr};
|
||||
case 0x0100000000000805: return {"SharedFont", nullptr};
|
||||
case 0x0100000000000806: return {"NgWord", &NgWord1};
|
||||
case 0x0100000000000807: return {"SsidList", nullptr};
|
||||
case 0x0100000000000808: return {"Dictionary", nullptr};
|
||||
case 0x0100000000000809: return {"SystemVersion", &SystemVersion};
|
||||
case 0x010000000000080A: return {"AvatarImage", nullptr};
|
||||
case 0x010000000000080B: return {"LocalNews", nullptr};
|
||||
case 0x010000000000080C: return {"Eula", nullptr};
|
||||
case 0x010000000000080D: return {"UrlBlackList", nullptr};
|
||||
case 0x010000000000080E: return {"TimeZoneBinary", &TimeZoneBinary};
|
||||
case 0x010000000000080F: return {"CertStoreCruiser", nullptr};
|
||||
case 0x0100000000000810: return {"FontNintendoExtension", &FontNintendoExtension};
|
||||
case 0x0100000000000811: return {"FontStandard", &FontStandard};
|
||||
case 0x0100000000000812: return {"FontKorean", &FontKorean};
|
||||
case 0x0100000000000813: return {"FontChineseTraditional", &FontChineseTraditional};
|
||||
case 0x0100000000000814: return {"FontChineseSimple", &FontChineseSimple};
|
||||
case 0x0100000000000815: return {"FontBfcpx", nullptr};
|
||||
case 0x0100000000000816: return {"SystemUpdate", nullptr};
|
||||
case 0x0100000000000817: return {"0100000000000817", nullptr};
|
||||
case 0x0100000000000818: return {"FirmwareDebugSettings", nullptr};
|
||||
case 0x0100000000000819: return {"BootImagePackage", nullptr};
|
||||
case 0x010000000000081A: return {"BootImagePackageSafe", nullptr};
|
||||
case 0x010000000000081B: return {"BootImagePackageExFat", nullptr};
|
||||
case 0x010000000000081C: return {"BootImagePackageExFatSafe", nullptr};
|
||||
case 0x010000000000081D: return {"FatalMessage", nullptr};
|
||||
case 0x010000000000081E: return {"ControllerIcon", nullptr};
|
||||
case 0x010000000000081F: return {"PlatformConfigIcosa", nullptr};
|
||||
case 0x0100000000000820: return {"PlatformConfigCopper", nullptr};
|
||||
case 0x0100000000000821: return {"PlatformConfigHoag", nullptr};
|
||||
case 0x0100000000000822: return {"ControllerFirmware", nullptr};
|
||||
case 0x0100000000000823: return {"NgWord2", &NgWord2};
|
||||
case 0x0100000000000824: return {"PlatformConfigIcosaMariko", nullptr};
|
||||
case 0x0100000000000825: return {"ApplicationBlackList", nullptr};
|
||||
case 0x0100000000000826: return {"RebootlessSystemUpdateVersion", nullptr};
|
||||
case 0x0100000000000827: return {"ContentActionTable", nullptr};
|
||||
case 0x0100000000000828: return {"FunctionBlackList", nullptr};
|
||||
case 0x0100000000000829: return {"PlatformConfigCalcio", nullptr};
|
||||
case 0x0100000000000830: return {"NgWordT", nullptr};
|
||||
case 0x0100000000000831: return {"PlatformConfigAula", nullptr};
|
||||
case 0x0100000000000832: return {"CradleFirmware", nullptr};
|
||||
case 0x0100000000000835: return {"ErrorMessageUtf8", nullptr};
|
||||
case 0x0100000000000859: return {"ClientCertData", nullptr};
|
||||
case 0x010000000000085C: return {"GameCardConfigurationData", nullptr};
|
||||
default: return {nullptr, nullptr};
|
||||
}
|
||||
}
|
||||
|
||||
VirtualFile SynthesizeSystemArchive(const u64 title_id) {
|
||||
if (title_id < SYSTEM_ARCHIVES.front().title_id || title_id > SYSTEM_ARCHIVES.back().title_id) {
|
||||
return nullptr;
|
||||
auto const desc = GetSystemArchive(title_id);
|
||||
LOG_INFO(Service_FS, "Synthesizing system archive '{}' (0x{:016X}).", desc.name, title_id);
|
||||
if (desc.supplier != nullptr) {
|
||||
if (auto const dir = desc.supplier(); dir != nullptr) {
|
||||
if (auto const romfs = CreateRomFS(dir); romfs != nullptr) {
|
||||
LOG_INFO(Service_FS, " - System archive generation successful!");
|
||||
return romfs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const auto& desc = SYSTEM_ARCHIVES[title_id - SYSTEM_ARCHIVE_BASE_TITLE_ID];
|
||||
|
||||
LOG_INFO(Service_FS, "Synthesizing system archive '{}' (0x{:016X}).", desc.name, desc.title_id);
|
||||
|
||||
if (desc.supplier == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const auto dir = desc.supplier();
|
||||
|
||||
if (dir == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const auto romfs = CreateRomFS(dir);
|
||||
|
||||
if (romfs == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
LOG_INFO(Service_FS, " - System archive generation successful!");
|
||||
return romfs;
|
||||
return nullptr;
|
||||
}
|
||||
} // namespace FileSys::SystemArchive
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user