mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-06-06 01:13:45 -04:00
Compare commits
159 commits
eff026ff8d
...
3faadd71b8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3faadd71b8 | ||
|
|
8fec1104b6 | ||
|
|
8a653792fb | ||
|
|
efc7472330 | ||
|
|
aadcc24aac | ||
|
|
89199f4d27 | ||
|
|
978d9d935d | ||
|
|
ad9af25027 | ||
|
|
f729dbb3c3 | ||
|
|
ec2b9b0400 | ||
|
|
5027aecf77 | ||
|
|
f39e985434 | ||
|
|
f8f5a9b1a2 | ||
|
|
a8047d3b12 | ||
|
|
cc8451f764 | ||
|
|
27189f39d2 | ||
|
|
683e6249c3 | ||
|
|
eaece15dbd | ||
|
|
8e5419209c | ||
|
|
8fac95dcc0 | ||
|
|
706a3d0764 | ||
|
|
3d19743d95 | ||
|
|
bd2d344040 | ||
|
|
5f4a286046 | ||
|
|
b7fcec4985 | ||
|
|
0473747f94 | ||
|
|
23bb909bc9 | ||
|
|
e94ac63a5e | ||
|
|
88ff086d13 | ||
|
|
116377f6d9 | ||
|
|
7c32cf03a1 | ||
|
|
ff7bbaea7d | ||
|
|
c84d605426 | ||
|
|
def03f6589 | ||
|
|
5ea24621cf | ||
|
|
251a3470dc | ||
|
|
08f65cbd01 | ||
|
|
8fd495f906 | ||
|
|
9d55875377 | ||
|
|
8a11bec55a | ||
|
|
4a11d5db2f | ||
|
|
0d736d49d6 | ||
|
|
0c74a495f5 | ||
|
|
c6afeb2bf8 | ||
|
|
d9067d85af | ||
|
|
2aa2ac7d9a | ||
|
|
90164197dc | ||
|
|
573e06131d | ||
|
|
06c8926a2e | ||
|
|
eabd1017cc | ||
|
|
b870bd255c | ||
|
|
37b5cf6003 | ||
|
|
d761ecba8c | ||
|
|
83683440b2 | ||
|
|
9b18d0b111 | ||
|
|
46cfd9b6f3 | ||
|
|
889545e1ee | ||
|
|
24dc3834b6 | ||
|
|
2a66b40267 | ||
|
|
feb8c5f88e | ||
|
|
300a646a34 | ||
|
|
e875a3196b | ||
|
|
4eb082485d | ||
|
|
7455854528 | ||
|
|
5ab0227624 | ||
|
|
ad2e1cc554 | ||
|
|
02521882e7 | ||
|
|
9a7ca3aca4 | ||
|
|
ca6bb3ae1d | ||
|
|
50df88106e | ||
|
|
945ea630b4 | ||
|
|
5aba461cb3 | ||
|
|
8330940eca | ||
|
|
4d49341918 | ||
|
|
2f0f8a979c | ||
|
|
413c7543ba | ||
|
|
975aa4e2f2 | ||
|
|
a1f9e68f46 | ||
|
|
02dee4a20b | ||
|
|
bc9b9480fb | ||
|
|
d1ceeeca22 | ||
|
|
ee188168c1 | ||
|
|
1f558ce9b3 | ||
|
|
28a2ff1b94 | ||
|
|
d8070c74c3 | ||
|
|
b89cd6903c | ||
|
|
7e84f9ef59 | ||
|
|
609756db30 | ||
|
|
5575d77520 | ||
|
|
afe92c5bed | ||
|
|
732fee2e85 | ||
|
|
86f2f0bc36 | ||
|
|
cad9db4886 | ||
|
|
672c21829b | ||
|
|
eec460ec2e | ||
|
|
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 | ||
|
|
26ce96297c | ||
|
|
b3cc8723c1 | ||
|
|
417ed904f0 | ||
|
|
838cc926f6 | ||
|
|
860acb4faf | ||
|
|
a0bb6324c0 | ||
|
|
3a823de605 | ||
|
|
0257a8d491 | ||
|
|
6c76908ddb | ||
|
|
e6ad51e3d5 | ||
|
|
f11b69d6b7 | ||
|
|
27cadb24f3 | ||
|
|
a7ef19e028 | ||
|
|
2c1eff2e60 | ||
|
|
abb616c357 | ||
|
|
c95cb8f8ec | ||
|
|
3d0eb4b5d7 | ||
|
|
1b4a79c7ee | ||
|
|
c05d999225 | ||
|
|
71d3dd67d3 | ||
|
|
9b2fba1275 | ||
|
|
19eab4d7aa |
602 changed files with 47048 additions and 37552 deletions
|
|
@ -7,7 +7,7 @@
|
|||
EXCLUDE_FILES="CPM.cmake CPMUtil.cmake GetSCMRev.cmake renderdoc_app.h tools/cpm tools/shellcheck.sh tools/update-cpm.sh tools/windows/vcvarsall.sh externals/stb externals/glad externals/getopt externals/gamemode externals/FidelityFX-FSR externals/demangle externals/bc_decoder externals/cmake-modules"
|
||||
|
||||
# license header constants, please change when needed :))))
|
||||
YEAR=2026
|
||||
YEAR=$(date "+%Y")
|
||||
HOLDER="Eden Emulator Project"
|
||||
LICENSE="GPL-3.0-or-later"
|
||||
|
||||
|
|
@ -112,10 +112,10 @@ for file in $FILES; do
|
|||
[ "$excluded" = "true" ] && continue
|
||||
|
||||
case "$file" in
|
||||
*.cmake|*.sh|*CMakeLists.txt)
|
||||
*.cmake|*.sh|*.ps1|*.py|*.rb|*.perl|*.pl|*.nix|*CMakeLists.txt)
|
||||
begin="#"
|
||||
;;
|
||||
*.kt*|*.cpp|*.h|*.qml)
|
||||
*.kt|*.kts|*.cpp|*.h|*.qml|*.c|*.hpp|*.hxx|*.cxx|*.h.in|*.inc)
|
||||
begin="//"
|
||||
;;
|
||||
*)
|
||||
|
|
@ -185,11 +185,12 @@ if [ "$UPDATE" = "true" ]; then
|
|||
|
||||
for file in $SRC_FILES $OTHER_FILES; do
|
||||
case $(basename -- "$file") in
|
||||
*.cmake|*CMakeLists.txt)
|
||||
# Windows Powershell wont use shebangs
|
||||
*.cmake|*.ps1|*CMakeLists.txt)
|
||||
begin="#"
|
||||
shell="false"
|
||||
;;
|
||||
*.sh)
|
||||
*.sh|*.py|*.rb|*.perl|*.pl|*.nix)
|
||||
begin="#"
|
||||
shell=true
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -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,22 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# git-archive-all
|
||||
export PATH="$PATH:/home/$USER/.local/bin"
|
||||
|
||||
GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
|
||||
GITREV="`git show -s --format='%h'`"
|
||||
REV_NAME="eden-unified-source-${GITDATE}-${GITREV}"
|
||||
|
||||
COMPAT_LIST='dist/compatibility_list/compatibility_list.json'
|
||||
|
||||
mkdir artifacts
|
||||
|
||||
touch "${COMPAT_LIST}"
|
||||
git describe --abbrev=0 --always HEAD > GIT-COMMIT
|
||||
git describe --tags HEAD > GIT-TAG || echo 'unknown' > GIT-TAG
|
||||
git-archive-all --include "${COMPAT_LIST}" --include GIT-COMMIT --include GIT-TAG --force-submodules artifacts/"${REV_NAME}.tar"
|
||||
|
||||
cd artifacts/
|
||||
xz -T0 -9 "${REV_NAME}.tar"
|
||||
sha256sum "${REV_NAME}.tar.xz" > "${REV_NAME}.tar.xz.sha256sum"
|
||||
cd ..
|
||||
|
|
@ -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
|
||||
|
|
|
|||
54
.forgejo/workflows/update-deps.yml
Normal file
54
.forgejo/workflows/update-deps.yml
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
name: update-deps
|
||||
|
||||
on:
|
||||
# saturday at noon
|
||||
schedule:
|
||||
- cron: '0 12 * * 6'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
tx-update:
|
||||
runs-on: source
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Update deps
|
||||
run: |
|
||||
git config --local user.name "Eden CI"
|
||||
git config --local user.email "ci@eden-emu.dev"
|
||||
git config --local user.signingkey "D57652791BB25D2A"
|
||||
git config --local push.autoSetupRemote true
|
||||
|
||||
git remote set-url origin ci:eden-emu/eden.git
|
||||
|
||||
DATE=$(date +"%b %d")
|
||||
echo "DATE=$DATE" >> "$GITHUB_ENV"
|
||||
|
||||
git switch -c update-deps-$DATE
|
||||
tools/cpmutil.sh package update -ac
|
||||
git push
|
||||
|
||||
- name: Create PR
|
||||
run: |
|
||||
TITLE="[externals] Dependency update for $DATE"
|
||||
BODY="$(git show -s --format='%b')"
|
||||
BASE=master
|
||||
HEAD=update-deps-$DATE
|
||||
|
||||
cat << EOF > data.json
|
||||
{
|
||||
"base": "$BASE",
|
||||
"body": "$BODY",
|
||||
"head": "$HEAD",
|
||||
"title": "$TITLE"
|
||||
}
|
||||
EOF
|
||||
|
||||
curl -X 'POST' \
|
||||
'https://git.eden-emu.dev/api/v1/repos/eden-emu/eden/pulls' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Authorization: Bearer ${{ secrets.CI_FJ_TOKEN }}' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "@data.json" --fail
|
||||
214
.patch/openssl-cmake/0001-cpmutil-compat.patch
Normal file
214
.patch/openssl-cmake/0001-cpmutil-compat.patch
Normal file
|
|
@ -0,0 +1,214 @@
|
|||
From ec4c1fdf526cb9ad045abf59b29ee495bbf5023a Mon Sep 17 00:00:00 2001
|
||||
From: crueter <crueter@eden-emu.dev>
|
||||
Date: Sat, 30 May 2026 20:56:35 -0400
|
||||
Subject: [PATCH] cpmutil compat
|
||||
|
||||
---
|
||||
CMakeLists.txt | 31 ++++++++-----------
|
||||
cmake/FetchOpenSSL.cmake | 64 ----------------------------------------
|
||||
cmake/GetCPM.cmake | 5 ----
|
||||
3 files changed, 13 insertions(+), 87 deletions(-)
|
||||
delete mode 100644 cmake/FetchOpenSSL.cmake
|
||||
delete mode 100644 cmake/GetCPM.cmake
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5420ecc..9ffd5a0 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -19,9 +19,7 @@ include(FetchContent)
|
||||
include(ProcessorCount)
|
||||
include(cmake/ConfigureOpenSSL.cmake)
|
||||
include(cmake/DetectTargetPlatform.cmake)
|
||||
-include(cmake/FetchOpenSSL.cmake)
|
||||
include(cmake/FindVcvarsall.cmake)
|
||||
-include(cmake/GetCPM.cmake)
|
||||
|
||||
# Custom options
|
||||
option(OPENSSL_BUILD_VERBOSE "Enable verbose output from build" OFF)
|
||||
@@ -47,9 +45,6 @@ if("${OPENSSL_TARGET_PLATFORM}" STREQUAL "")
|
||||
detect_target_platform(OPENSSL_TARGET_PLATFORM)
|
||||
endif()
|
||||
|
||||
-# Fetch OpenSSL source
|
||||
-fetch_openssl()
|
||||
-
|
||||
# Apply patches
|
||||
foreach(patch IN LISTS OPENSSL_PATCH)
|
||||
if(EXISTS "${patch}" AND NOT IS_DIRECTORY "${patch}")
|
||||
@@ -59,13 +54,13 @@ foreach(patch IN LISTS OPENSSL_PATCH)
|
||||
|
||||
execute_process(
|
||||
COMMAND git init
|
||||
- WORKING_DIRECTORY ${openssl_SOURCE_DIR}
|
||||
+ WORKING_DIRECTORY ${OpenSSL_SOURCE_DIR}
|
||||
OUTPUT_QUIET
|
||||
ERROR_QUIET
|
||||
)
|
||||
execute_process(
|
||||
COMMAND git apply ${patch}
|
||||
- WORKING_DIRECTORY ${openssl_SOURCE_DIR}
|
||||
+ WORKING_DIRECTORY ${OpenSSL_SOURCE_DIR}
|
||||
OUTPUT_QUIET
|
||||
ERROR_QUIET
|
||||
)
|
||||
@@ -161,8 +156,8 @@ list(PREPEND OPENSSL_CONFIGURE_OPTIONS ${OPENSSL_TARGET_PLATFORM})
|
||||
# Configure OpenSSL
|
||||
configure_openssl(
|
||||
COMMAND ${VCVARSALL_COMMAND}
|
||||
- FILE ${openssl_SOURCE_DIR}/Configure
|
||||
- BUILD_DIR ${openssl_BINARY_DIR}
|
||||
+ FILE ${OpenSSL_SOURCE_DIR}/Configure
|
||||
+ BUILD_DIR ${OpenSSL_BINARY_DIR}
|
||||
OPTIONS ${OPENSSL_CONFIGURE_OPTIONS}
|
||||
)
|
||||
|
||||
@@ -203,8 +198,8 @@ endif()
|
||||
# Parse Makefile
|
||||
parse_makefile(${OPENSSL_MAKEFILE} "INSTALL_LIBS" OPENSSL_STATIC_LIBS)
|
||||
parse_makefile(${OPENSSL_MAKEFILE} "INSTALL_SHLIBS" OPENSSL_SHARED_LIBS)
|
||||
-list(TRANSFORM OPENSSL_STATIC_LIBS PREPEND "${openssl_BINARY_DIR}/")
|
||||
-list(TRANSFORM OPENSSL_SHARED_LIBS PREPEND "${openssl_BINARY_DIR}/")
|
||||
+list(TRANSFORM OPENSSL_STATIC_LIBS PREPEND "${OpenSSL_BINARY_DIR}/")
|
||||
+list(TRANSFORM OPENSSL_SHARED_LIBS PREPEND "${OpenSSL_BINARY_DIR}/")
|
||||
|
||||
foreach(LIBRARY IN LISTS OPENSSL_STATIC_LIBS)
|
||||
if(LIBRARY MATCHES "crypto")
|
||||
@@ -239,14 +234,14 @@ endif()
|
||||
|
||||
# Provide same targets and variables as FindOpenSSL module
|
||||
set(OPENSSL_FOUND ON CACHE BOOL "Override FindOpenSSL variables" FORCE)
|
||||
-set(OPENSSL_INCLUDE_DIR ${openssl_SOURCE_DIR}/include ${openssl_BINARY_DIR}/include CACHE STRING "Override FindOpenSSL variables" FORCE)
|
||||
+set(OPENSSL_INCLUDE_DIR ${OpenSSL_SOURCE_DIR}/include ${OpenSSL_BINARY_DIR}/include CACHE STRING "Override FindOpenSSL variables" FORCE)
|
||||
set(OPENSSL_CRYPTO_LIBRARY ${OPENSSL_${OPENSSL_LIBRARY_TYPE}_CRYPTO_LIBRARY} CACHE STRING "Override FindOpenSSL variables" FORCE)
|
||||
set(OPENSSL_CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_DEPENDENCIES} CACHE STRING "Override FindOpenSSL variables" FORCE)
|
||||
set(OPENSSL_SSL_LIBRARY ${OPENSSL_${OPENSSL_LIBRARY_TYPE}_SSL_LIBRARY} CACHE STRING "Override FindOpenSSL variables" FORCE)
|
||||
set(OPENSSL_SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_DEPENDENCIES} CACHE STRING "Override FindOpenSSL variables" FORCE)
|
||||
set(OPENSSL_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_SSL_LIBRARY} ${OPENSSL_DEPENDENCIES} CACHE STRING "Override FindOpenSSL variables" FORCE)
|
||||
set(OPENSSL_VERSION ${OPENSSL_CONFIGURED_VERSION} CACHE STRING "Override FindOpenSSL variables" FORCE)
|
||||
-set(OPENSSL_APPLINK_SOURCE ${openssl_SOURCE_DIR}/ms/applink.c CACHE STRING "Override FindOpenSSL variables" FORCE)
|
||||
+set(OPENSSL_APPLINK_SOURCE ${OpenSSL_SOURCE_DIR}/ms/applink.c CACHE STRING "Override FindOpenSSL variables" FORCE)
|
||||
|
||||
add_library(OpenSSL::Crypto ${OPENSSL_LIBRARY_TYPE} IMPORTED GLOBAL)
|
||||
add_library(OpenSSL::SSL ${OPENSSL_LIBRARY_TYPE} IMPORTED GLOBAL)
|
||||
@@ -308,8 +303,8 @@ if(ANDROID)
|
||||
endif()
|
||||
|
||||
file(GLOB_RECURSE OPENSSL_SOURCES
|
||||
- ${openssl_SOURCE_DIR}/*.[ch]
|
||||
- ${openssl_SOURCE_DIR}/*.[ch].in
|
||||
+ ${OpenSSL_SOURCE_DIR}/*.[ch]
|
||||
+ ${OpenSSL_SOURCE_DIR}/*.[ch].in
|
||||
)
|
||||
|
||||
set(OPENSSL_BUILD_OUTPUT
|
||||
@@ -322,7 +317,7 @@ add_custom_command(
|
||||
OUTPUT ${OPENSSL_BUILD_OUTPUT}
|
||||
COMMAND ${OPENSSL_BUILD_COMMAND}
|
||||
DEPENDS ${OPENSSL_SOURCES}
|
||||
- WORKING_DIRECTORY ${openssl_BINARY_DIR}
|
||||
+ WORKING_DIRECTORY ${OpenSSL_BINARY_DIR}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
@@ -341,7 +336,7 @@ if(OPENSSL_TEST AND NOT CMAKE_CROSSCOMPILING)
|
||||
add_test(
|
||||
NAME openssl-test
|
||||
COMMAND ${OPENSSL_BUILD_TOOL} test VERBOSE_FAILURE=yes HARNESS_JOBS=${NUMBER_OF_THREADS}
|
||||
- WORKING_DIRECTORY ${openssl_BINARY_DIR}
|
||||
+ WORKING_DIRECTORY ${OpenSSL_BINARY_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -356,7 +351,7 @@ if(OPENSSL_INSTALL)
|
||||
install(CODE
|
||||
"execute_process(
|
||||
COMMAND ${OPENSSL_INSTALL_COMMAND}
|
||||
- WORKING_DIRECTORY \"${openssl_BINARY_DIR}\"
|
||||
+ WORKING_DIRECTORY \"${OpenSSL_BINARY_DIR}\"
|
||||
)"
|
||||
)
|
||||
endif()
|
||||
diff --git a/cmake/FetchOpenSSL.cmake b/cmake/FetchOpenSSL.cmake
|
||||
deleted file mode 100644
|
||||
index a43505d..0000000
|
||||
--- a/cmake/FetchOpenSSL.cmake
|
||||
+++ /dev/null
|
||||
@@ -1,64 +0,0 @@
|
||||
-function(fetch_openssl)
|
||||
- if(EXISTS "${OPENSSL_SOURCE}" AND IS_DIRECTORY "${OPENSSL_SOURCE}")
|
||||
- # Fetch the local OpenSSL source
|
||||
- if(NOT IS_ABSOLUTE "${OPENSSL_SOURCE}")
|
||||
- string(PREPEND OPENSSL_SOURCE ${CMAKE_SOURCE_DIR}/)
|
||||
- endif()
|
||||
-
|
||||
- string(REPLACE "\\" "/" openssl-source_SOURCE_DIR "${OPENSSL_SOURCE}")
|
||||
- set(openssl-source_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/openssl-source-build)
|
||||
- else()
|
||||
- set(CPM_OPTIONS
|
||||
- NAME openssl-source
|
||||
- DOWNLOAD_ONLY ON
|
||||
- )
|
||||
-
|
||||
- if(NOT OPENSSL_CONFIGURE_VERBOSE)
|
||||
- list(APPEND CPM_OPTIONS QUIET)
|
||||
- endif()
|
||||
-
|
||||
- if("${OPENSSL_SOURCE}" MATCHES "^http")
|
||||
- # Download OpenSSL source from the internet
|
||||
- list(APPEND CPM_OPTIONS URL ${OPENSSL_SOURCE})
|
||||
- else()
|
||||
- # Download OpenSSL source from the official website
|
||||
- if("${OPENSSL_TARGET_VERSION}" STREQUAL "")
|
||||
- set(OPENSSL_TARGET_VERSION ${PROJECT_VERSION})
|
||||
- endif()
|
||||
-
|
||||
- if(OPENSSL_TARGET_VERSION VERSION_EQUAL PROJECT_VERSION)
|
||||
- list(APPEND CPM_OPTIONS URL_HASH SHA256=aaf51a1fe064384f811daeaeb4ec4dce7340ec8bd893027eee676af31e83a04f)
|
||||
- endif()
|
||||
-
|
||||
- if(OPENSSL_TARGET_VERSION MATCHES "^1\.1\.1[a-w]$")
|
||||
- string(REPLACE "." "_" OPENSSL_TAGGED_VERSION ${OPENSSL_TARGET_VERSION})
|
||||
- list(APPEND CPM_OPTIONS URL https://github.com/openssl/openssl/releases/download/OpenSSL_${OPENSSL_TAGGED_VERSION}/openssl-${OPENSSL_TARGET_VERSION}.tar.gz)
|
||||
- else()
|
||||
- list(APPEND CPM_OPTIONS URL https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_TARGET_VERSION}/openssl-${OPENSSL_TARGET_VERSION}.tar.gz)
|
||||
- endif()
|
||||
- endif()
|
||||
-
|
||||
- CPMAddPackage(${CPM_OPTIONS})
|
||||
- endif()
|
||||
-
|
||||
- # Clean build directory if source directory has changed
|
||||
- if(DEFINED CACHE{openssl-source_SOURCE_DIR_OLD} AND NOT openssl-source_SOURCE_DIR STREQUAL openssl-source_SOURCE_DIR_OLD)
|
||||
- set(openssl-source_SOURCE_DIR_OLD ${openssl-source_SOURCE_DIR} CACHE INTERNAL "Previously fetched OpenSSL source")
|
||||
-
|
||||
- if(IS_DIRECTORY ${openssl-source_BINARY_DIR})
|
||||
- file(REMOVE_RECURSE ${openssl-source_BINARY_DIR})
|
||||
- file(MAKE_DIRECTORY ${openssl-source_BINARY_DIR})
|
||||
- endif()
|
||||
- endif()
|
||||
-
|
||||
- # Override the FindOpenSSL module
|
||||
- FetchContent_Declare(
|
||||
- OpenSSL
|
||||
- SOURCE_DIR ${openssl-source_SOURCE_DIR}
|
||||
- BINARY_DIR ${openssl-source_BINARY_DIR}
|
||||
- OVERRIDE_FIND_PACKAGE
|
||||
- )
|
||||
- FetchContent_MakeAvailable(OpenSSL)
|
||||
-
|
||||
- return(PROPAGATE openssl_SOURCE_DIR openssl_BINARY_DIR)
|
||||
-endfunction()
|
||||
diff --git a/cmake/GetCPM.cmake b/cmake/GetCPM.cmake
|
||||
deleted file mode 100644
|
||||
index bfc50f5..0000000
|
||||
--- a/cmake/GetCPM.cmake
|
||||
+++ /dev/null
|
||||
@@ -1,5 +0,0 @@
|
||||
-file(
|
||||
- DOWNLOAD https://github.com/cpm-cmake/CPM.cmake/releases/latest/download/get_cpm.cmake
|
||||
- ${CMAKE_CURRENT_BINARY_DIR}/get_cpm.cmake
|
||||
-)
|
||||
-include(${CMAKE_CURRENT_BINARY_DIR}/get_cpm.cmake)
|
||||
--
|
||||
2.54.0
|
||||
|
||||
54
.patch/openssl-cmake/0002-use-ccache.patch
Normal file
54
.patch/openssl-cmake/0002-use-ccache.patch
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
From d46675fbb61eb6d51e478023ce4075e545ad4cfd Mon Sep 17 00:00:00 2001
|
||||
From: crueter <crueter@eden-emu.dev>
|
||||
Date: Sat, 30 May 2026 21:11:55 -0400
|
||||
Subject: [PATCH] use ccache
|
||||
|
||||
---
|
||||
CMakeLists.txt | 1 -
|
||||
cmake/ConfigureOpenSSL.cmake | 12 +++---------
|
||||
2 files changed, 3 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9ffd5a0..9ff14c8 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -28,7 +28,6 @@ option(OPENSSL_ENABLE_PARALLEL "Build and test in parallel if possible" ON)
|
||||
option(OPENSSL_INSTALL "Install OpenSSL components to the <prefix> directory" OFF)
|
||||
option(OPENSSL_INSTALL_CERT "Install cert.pem to the <openssldir> directory" OFF)
|
||||
option(OPENSSL_TEST "Enable testing and build OpenSSL self tests" OFF)
|
||||
-option(OPENSSL_USE_CCACHE "Use ccache if available" ON)
|
||||
|
||||
if("${OPENSSL_BUILD_TARGET}" STREQUAL "")
|
||||
# Makefile target for build
|
||||
diff --git a/cmake/ConfigureOpenSSL.cmake b/cmake/ConfigureOpenSSL.cmake
|
||||
index 211c18b..3d8cbed 100644
|
||||
--- a/cmake/ConfigureOpenSSL.cmake
|
||||
+++ b/cmake/ConfigureOpenSSL.cmake
|
||||
@@ -69,15 +69,9 @@ function(apply_ccache FILE)
|
||||
message(FATAL_ERROR "Couldn't find Makefile")
|
||||
endif()
|
||||
|
||||
- if(OPENSSL_USE_CCACHE)
|
||||
- find_program(CCACHE ccache)
|
||||
-
|
||||
- if(NOT CCACHE)
|
||||
- return()
|
||||
- endif()
|
||||
-
|
||||
+ if(USE_CCACHE)
|
||||
file(READ ${FILE} MAKEFILE)
|
||||
- string(REPLACE "\nCC=" "\nCC=ccache " MAKEFILE "${MAKEFILE}")
|
||||
+ string(REPLACE "\nCC=" "\nCC=${CCACHE_BINARY} " MAKEFILE "${MAKEFILE}")
|
||||
|
||||
if(MSVC)
|
||||
string(REPLACE "/Zi /Fdossl_static.pdb " "" MAKEFILE "${MAKEFILE}")
|
||||
@@ -171,4 +165,4 @@ function(configure_openssl)
|
||||
string(REPLACE "/W3" "/W0" MAKEFILE "${MAKEFILE}")
|
||||
file(WRITE ${OPENSSL_MAKEFILE} "${MAKEFILE}")
|
||||
endif()
|
||||
-endfunction()
|
||||
\ No newline at end of file
|
||||
+endfunction()
|
||||
--
|
||||
2.54.0
|
||||
|
||||
28
.patch/openssl-cmake/0003-use-cmake-compiler-flags.patch
Normal file
28
.patch/openssl-cmake/0003-use-cmake-compiler-flags.patch
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
From 4a3cc92a7abad403529ed1cb4255ca63d9252de4 Mon Sep 17 00:00:00 2001
|
||||
From: crueter <crueter@eden-emu.dev>
|
||||
Date: Sat, 30 May 2026 21:48:42 -0400
|
||||
Subject: [PATCH 2/2] use cmake compiler flags
|
||||
|
||||
---
|
||||
cmake/ConfigureOpenSSL.cmake | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cmake/ConfigureOpenSSL.cmake b/cmake/ConfigureOpenSSL.cmake
|
||||
index 3d8cbed..3012e05 100644
|
||||
--- a/cmake/ConfigureOpenSSL.cmake
|
||||
+++ b/cmake/ConfigureOpenSSL.cmake
|
||||
@@ -135,7 +135,10 @@ function(configure_openssl)
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
- COMMAND ${CONFIGURE_COMMAND}
|
||||
+ COMMAND ${CMAKE_COMMAND} -E env
|
||||
+ "CFLAGS=${CMAKE_C_FLAGS}"
|
||||
+ "CXXFLAGS=${CMAKE_CXX_FLAGS}"
|
||||
+ ${CONFIGURE_COMMAND}
|
||||
WORKING_DIRECTORY ${CONFIGURE_BUILD_DIR}
|
||||
${VERBOSE_OPTION}
|
||||
COMMAND_ERROR_IS_FATAL ANY
|
||||
--
|
||||
2.54.0
|
||||
|
||||
39
.patch/openssl-cmake/0004-use-shell-wrapper.patch
Normal file
39
.patch/openssl-cmake/0004-use-shell-wrapper.patch
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
--- a/CMakeLists.txt 2026-06-01 23:53:16.498043856 -0400
|
||||
+++ b/CMakeLists.txt 2026-06-01 23:53:23.910543615 -0400
|
||||
@@ -312,13 +312,29 @@
|
||||
${OPENSSL_SHARED_CRYPTO_LIBRARY}
|
||||
${OPENSSL_SHARED_SSL_LIBRARY}
|
||||
)
|
||||
-add_custom_command(
|
||||
- OUTPUT ${OPENSSL_BUILD_OUTPUT}
|
||||
- COMMAND ${OPENSSL_BUILD_COMMAND}
|
||||
- DEPENDS ${OPENSSL_SOURCES}
|
||||
- WORKING_DIRECTORY ${OpenSSL_BINARY_DIR}
|
||||
- VERBATIM
|
||||
-)
|
||||
+if (WIN32)
|
||||
+ add_custom_command(
|
||||
+ OUTPUT ${OPENSSL_BUILD_OUTPUT}
|
||||
+ COMMAND ${OPENSSL_BUILD_COMMAND}
|
||||
+ DEPENDS ${OPENSSL_SOURCES}
|
||||
+ WORKING_DIRECTORY ${OpenSSL_BINARY_DIR}
|
||||
+ VERBATIM)
|
||||
+else()
|
||||
+ set(_openssl_build_script "${CMAKE_CURRENT_BINARY_DIR}/BuildOpenSSL.cmake")
|
||||
+ file(WRITE ${_openssl_build_script}
|
||||
+ "execute_process(\n"
|
||||
+ " COMMAND ${OPENSSL_BUILD_COMMAND}\n"
|
||||
+ " WORKING_DIRECTORY ${OpenSSL_BINARY_DIR}\n"
|
||||
+ " RESULT_VARIABLE _r)\n"
|
||||
+ "if(_r)\n"
|
||||
+ " message(FATAL_ERROR \"OpenSSL build failed: \${_r}\")\n"
|
||||
+ "endif()\n")
|
||||
+ add_custom_command(
|
||||
+ OUTPUT ${OPENSSL_BUILD_OUTPUT}
|
||||
+ COMMAND ${CMAKE_COMMAND} -P ${_openssl_build_script}
|
||||
+ DEPENDS ${OPENSSL_SOURCES}
|
||||
+ VERBATIM)
|
||||
+endif()
|
||||
|
||||
if(PROJECT_IS_TOP_LEVEL)
|
||||
add_custom_target(openssl-build ALL DEPENDS ${OPENSSL_BUILD_OUTPUT})
|
||||
3665
.patch/openssl/0001-add-bundled-cert.patch
Normal file
3665
.patch/openssl/0001-add-bundled-cert.patch
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -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
|
||||
141
CMakeLists.txt
141
CMakeLists.txt
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
cmake_minimum_required(VERSION 3.31)
|
||||
|
||||
project(yuzu)
|
||||
|
||||
|
|
@ -75,6 +75,8 @@ cmake_dependent_option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet im
|
|||
set(YUZU_QT_MIRROR "" CACHE STRING "What mirror to use for downloading the bundled Qt libraries")
|
||||
cmake_dependent_option(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF)
|
||||
|
||||
option(ENABLE_DEBUG_TOOLS "Enable debugging tools (maxwell disassembler, SPIRV translator, etc)" OFF)
|
||||
|
||||
# non-linux bundled qt are static
|
||||
if (YUZU_USE_BUNDLED_QT AND (APPLE OR NOT UNIX))
|
||||
set(YUZU_STATIC_BUILD ON)
|
||||
|
|
@ -119,18 +121,17 @@ if (YUZU_STATIC_BUILD)
|
|||
set(QuaZip-Qt6_FORCE_BUNDLED ON)
|
||||
|
||||
set(YUZU_USE_BUNDLED_FFMPEG ON)
|
||||
set(YUZU_USE_BUNDLED_SDL2 ON)
|
||||
set(YUZU_USE_BUNDLED_SDL3 ON)
|
||||
set(YUZU_USE_BUNDLED_OPENSSL ON)
|
||||
|
||||
set(HTTPLIB_USE_BROTLI_IF_AVAILABLE OFF)
|
||||
elseif(APPLE)
|
||||
set(YUZU_USE_BUNDLED_FFMPEG ON)
|
||||
set(YUZU_USE_BUNDLED_SDL2 ON)
|
||||
set(YUZU_USE_BUNDLED_SDL3 ON)
|
||||
set(YUZU_USE_BUNDLED_OPENSSL ON)
|
||||
|
||||
# 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()
|
||||
|
|
@ -170,9 +171,32 @@ if (MSVC AND NOT CXX_CLANG)
|
|||
set(CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT} /W3 /WX-")
|
||||
endif()
|
||||
|
||||
# Set runtime library to MD/MDd for all configurations
|
||||
if(MSVC)
|
||||
if (YUZU_USE_BUNDLED_QT AND ARCHITECTURE_arm64)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
set(libflag MT)
|
||||
else()
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
set(libflag MD)
|
||||
endif()
|
||||
|
||||
# Force all projects (including external dependencies) to use the same runtime
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /${libflag}")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /${libflag}d")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /${libflag}")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /${libflag}d")
|
||||
|
||||
# Add this to ensure Cubeb uses the same runtime
|
||||
add_compile_options(
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:$<$<CONFIG:Debug>:/${libflag}d>>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:$<$<CONFIG:Release>:/${libflag}>>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:$<$<CONFIG:RelWithDebInfo>:/${libflag}>>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:$<$<CONFIG:MinSizeRel>:/${libflag}>>)
|
||||
endif()
|
||||
|
||||
# TODO(crueter): Cleanup, each dep that has a bundled option should allow to choose between bundled, external, system
|
||||
cmake_dependent_option(YUZU_USE_EXTERNAL_SDL2 "Build SDL2 from external source" OFF "NOT MSVC;NOT ANDROID" OFF)
|
||||
cmake_dependent_option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MSVC}" "NOT ANDROID" OFF)
|
||||
cmake_dependent_option(YUZU_USE_BUNDLED_SDL3 "Download bundled SDL3 build" "${MSVC}" "NOT ANDROID" OFF)
|
||||
|
||||
option(ENABLE_CUBEB "Enables the cubeb audio backend" ON)
|
||||
|
||||
|
|
@ -206,6 +230,10 @@ cmake_dependent_option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF
|
|||
|
||||
option(YUZU_TESTS "Compile tests" "${BUILD_TESTING}")
|
||||
|
||||
# Install udev rules on Linux (mainly for gyros)
|
||||
# Only acts on joysticks and nothing else.
|
||||
cmake_dependent_option(YUZU_INSTALL_UDEV_RULES "Install udev rules for gyro access" OFF "PLATFORM_LINUX" OFF)
|
||||
|
||||
option(YUZU_DOWNLOAD_ANDROID_VVL "Download validation layer binary for android" ON)
|
||||
|
||||
option(YUZU_LEGACY "Apply patches that improve compatibility with older GPUs (e.g. Snapdragon 865) at the cost of performance" OFF)
|
||||
|
|
@ -269,11 +297,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)
|
||||
|
|
@ -283,7 +306,7 @@ if (YUZU_ROOM)
|
|||
add_compile_definitions(YUZU_ROOM)
|
||||
endif()
|
||||
|
||||
if ((ANDROID OR APPLE OR UNIX) AND (NOT PLATFORM_LINUX OR ANDROID) AND NOT WIN32)
|
||||
if (UNIX AND NOT (PLATFORM_LINUX OR WIN32))
|
||||
if(CXX_APPLE OR CXX_CLANG)
|
||||
# libc++ has stop_token and jthread as experimental
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexperimental-library")
|
||||
|
|
@ -339,10 +362,6 @@ if (CXX_GCC OR CXX_CLANG)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# Other presets, e.g. steamdeck
|
||||
# TODO(crueter): Just have every Linux/Windows use old sdl2
|
||||
set(YUZU_SYSTEM_PROFILE "generic" CACHE STRING "CMake and Externals profile to use. One of: generic, steamdeck")
|
||||
|
||||
# Configure C++ standard
|
||||
# ===========================
|
||||
|
||||
|
|
@ -364,13 +383,20 @@ find_package(RenderDoc MODULE)
|
|||
# openssl funniness
|
||||
if (YUZU_USE_BUNDLED_OPENSSL)
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
AddJsonPackage(openssl-ci)
|
||||
else()
|
||||
AddJsonPackage(openssl)
|
||||
set(OPENSSL_BUILD_VERBOSE ON)
|
||||
set(OPENSSL_CONFIGURE_VERBOSE ON)
|
||||
|
||||
if (OpenSSL_ADDED)
|
||||
add_compile_definitions(YUZU_BUNDLED_OPENSSL)
|
||||
AddJsonPackage(openssl-cmake)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(OpenSSL 3 REQUIRED)
|
||||
if (OpenSSL_ADDED)
|
||||
add_compile_definitions(YUZU_BUNDLED_OPENSSL)
|
||||
endif()
|
||||
|
||||
message(STATUS "Fetching needed dependencies with CPM")
|
||||
|
||||
|
|
@ -425,10 +451,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 +512,7 @@ endfunction()
|
|||
# =============================================
|
||||
|
||||
if (APPLE)
|
||||
foreach(fw Carbon Metal Cocoa IOKit CoreVideo CoreMedia)
|
||||
foreach(fw Carbon Metal Cocoa IOKit CoreVideo CoreMedia Security UniformTypeIdentifiers)
|
||||
find_library(${fw}_LIBRARY ${fw} REQUIRED)
|
||||
list(APPEND PLATFORM_LIBRARIES ${${fw}_LIBRARY})
|
||||
endforeach()
|
||||
|
|
@ -498,6 +524,8 @@ elseif (WIN32)
|
|||
# PSAPI is the Process Status API
|
||||
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} psapi imm32 version crypt32 rpcrt4 gdi32 wldap32 mswsock)
|
||||
endif()
|
||||
elseif (PLATFORM_MANAGARM)
|
||||
set(PLATFORM_LIBRARIES iconv intl)
|
||||
elseif (PLATFORM_HAIKU)
|
||||
# Haiku is so special :)
|
||||
set(PLATFORM_LIBRARIES bsd /boot/system/lib/libnetwork.so)
|
||||
|
|
@ -523,7 +551,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)
|
||||
|
|
@ -541,7 +568,7 @@ if (NOT YUZU_STATIC_ROOM)
|
|||
endif()
|
||||
|
||||
if (NOT ANDROID)
|
||||
find_package(SDL2)
|
||||
find_package(SDL3)
|
||||
endif()
|
||||
|
||||
if (USE_DISCORD_PRESENCE)
|
||||
|
|
@ -566,8 +593,6 @@ if (ENABLE_QT)
|
|||
else()
|
||||
AddQt(6.9.3)
|
||||
endif()
|
||||
|
||||
set(YUZU_STATIC_BUILD ON)
|
||||
else()
|
||||
message(STATUS "Using system Qt")
|
||||
if (NOT Qt6_DIR)
|
||||
|
|
@ -576,23 +601,7 @@ if (ENABLE_QT)
|
|||
list(APPEND CMAKE_PREFIX_PATH "${Qt6_DIR}")
|
||||
endif()
|
||||
|
||||
find_package(Qt6 CONFIG REQUIRED COMPONENTS Widgets Charts Concurrent)
|
||||
|
||||
if (YUZU_USE_QT_MULTIMEDIA)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Multimedia)
|
||||
endif()
|
||||
|
||||
if (PLATFORM_LINUX OR PLATFORM_FREEBSD)
|
||||
# yes Qt, we get it
|
||||
set(QT_NO_PRIVATE_MODULE_WARNING ON)
|
||||
find_package(Qt6 REQUIRED COMPONENTS DBus OPTIONAL_COMPONENTS GuiPrivate)
|
||||
elseif (UNIX AND NOT APPLE)
|
||||
find_package(Qt6 REQUIRED COMPONENTS DBus Gui)
|
||||
endif()
|
||||
|
||||
if (ENABLE_QT_TRANSLATION)
|
||||
find_package(Qt6 REQUIRED COMPONENTS LinguistTools)
|
||||
endif()
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core)
|
||||
|
||||
if (NOT DEFINED QT_TARGET_PATH)
|
||||
get_target_property(qtcore_path Qt6::Core LOCATION_Release)
|
||||
|
|
@ -615,21 +624,27 @@ if (ENABLE_QT)
|
|||
## Components ##
|
||||
|
||||
# Best practice is to ask for all components at once, so they are from the same version
|
||||
set(YUZU_QT_COMPONENTS Core Widgets Charts Concurrent)
|
||||
if (PLATFORM_LINUX)
|
||||
set(YUZU_QT_COMPONENTS Core Widgets Charts Concurrent Gui)
|
||||
if (PLATFORM_LINUX OR PLATFORM_FREEBSD)
|
||||
list(APPEND YUZU_QT_COMPONENTS DBus)
|
||||
# yes Qt, we get it
|
||||
set(QT_NO_PRIVATE_MODULE_WARNING ON)
|
||||
list(APPEND YUZU_QT_OPTIONAL GuiPrivate)
|
||||
endif()
|
||||
|
||||
if (YUZU_USE_QT_MULTIMEDIA)
|
||||
list(APPEND YUZU_QT_COMPONENTS Multimedia)
|
||||
endif()
|
||||
|
||||
if (YUZU_USE_QT_WEB_ENGINE)
|
||||
list(APPEND YUZU_QT_COMPONENTS WebEngineCore WebEngineWidgets)
|
||||
endif()
|
||||
|
||||
if (ENABLE_QT_TRANSLATION)
|
||||
list(APPEND YUZU_QT_COMPONENTS LinguistTools)
|
||||
endif()
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS ${YUZU_QT_COMPONENTS})
|
||||
find_package(Qt6 REQUIRED COMPONENTS ${YUZU_QT_COMPONENTS} OPTIONAL_COMPONENTS ${YUZU_QT_OPTIONAL})
|
||||
set(QT_MAJOR_VERSION 6)
|
||||
# Qt6 sets cxx_std_17 and we need to undo that
|
||||
set_target_properties(Qt6::Platform PROPERTIES INTERFACE_COMPILE_FEATURES "")
|
||||
|
|
@ -695,27 +710,14 @@ if (MSVC AND CXX_CLANG)
|
|||
link_libraries(llvm-mingw-runtime)
|
||||
endif()
|
||||
|
||||
# Set runtime library to MD/MDd for all configurations
|
||||
if(MSVC)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
|
||||
# Force all projects (including external dependencies) to use the same runtime
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MD")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MDd")
|
||||
|
||||
# Add this to ensure Cubeb uses the same runtime
|
||||
add_compile_options(
|
||||
$<$<CONFIG:Debug>:/MDd>
|
||||
$<$<CONFIG:Release>:/MD>
|
||||
$<$<CONFIG:RelWithDebInfo>:/MD>
|
||||
$<$<CONFIG:MinSizeRel>:/MD>
|
||||
)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
if (ENABLE_DEBUG_TOOLS)
|
||||
add_subdirectory(tools/maxwell-disas)
|
||||
add_subdirectory(tools/maxwell-spirv)
|
||||
add_subdirectory(tools/maxwell-ir)
|
||||
endif()
|
||||
|
||||
# Set yuzu project or yuzu-cmd project as default StartUp Project in Visual Studio depending on whether QT is enabled or not
|
||||
if(ENABLE_QT)
|
||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT yuzu)
|
||||
|
|
@ -731,6 +733,8 @@ endif()
|
|||
# https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
|
||||
# https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
|
||||
# https://www.freedesktop.org/software/appstream/docs/
|
||||
|
||||
# TODO: Icon/install handling n such should be put into dist/CMakeLists.txt
|
||||
if(ENABLE_QT AND UNIX AND NOT APPLE)
|
||||
install(FILES "dist/dev.eden_emu.eden.desktop"
|
||||
DESTINATION "share/applications")
|
||||
|
|
@ -743,3 +747,10 @@ if(ENABLE_QT AND UNIX AND NOT APPLE)
|
|||
install(FILES "dist/dev.eden_emu.eden.metainfo.xml"
|
||||
DESTINATION "share/metainfo")
|
||||
endif()
|
||||
|
||||
if (YUZU_INSTALL_UDEV_RULES)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
install(FILES "dist/72-eden-input.rules"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/udev/rules.d")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -715,8 +715,8 @@ function(AddCIPackage)
|
|||
"${${ARTIFACT_PACKAGE}_SOURCE_DIR}" PARENT_SCOPE)
|
||||
|
||||
if (PKG_ARGS_MODULE)
|
||||
list(APPEND CMAKE_PREFIX_PATH "${${ARTIFACT_PACKAGE}_SOURCE_DIR}")
|
||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
|
||||
list(PREPEND CMAKE_PREFIX_PATH "${${ARTIFACT_PACKAGE}_SOURCE_DIR}")
|
||||
Propagate(CMAKE_PREFIX_PATH)
|
||||
endif()
|
||||
else()
|
||||
find_package(${ARTIFACT_PACKAGE} ${ARTIFACT_MIN_VERSION} REQUIRED)
|
||||
|
|
@ -730,7 +730,7 @@ function(AddQt version)
|
|||
endif()
|
||||
|
||||
AddCIPackage(
|
||||
NAME Qt
|
||||
NAME qt
|
||||
PACKAGE Qt6
|
||||
VERSION ${version}
|
||||
MIN_VERSION 6
|
||||
|
|
@ -740,5 +740,8 @@ function(AddQt version)
|
|||
freebsd-amd64 solaris-amd64 openbsd-amd64
|
||||
MODULE)
|
||||
|
||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
|
||||
find_package(Qt6 REQUIRED PATHS ${Qt6_SOURCE_DIR} NO_DEFAULT_PATH)
|
||||
|
||||
Propagate(CMAKE_PREFIX_PATH)
|
||||
Propagate(Qt6_SOURCE_DIR)
|
||||
endfunction()
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# SPDX-FileCopyrightText: 2023 Alexandre Bouvier <contact@amb.tf>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
|
@ -13,7 +16,8 @@ endif()
|
|||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LLVM HANDLE_COMPONENTS CONFIG_MODE)
|
||||
|
||||
if (LLVM_FOUND AND LLVM_Demangle_FOUND AND NOT TARGET LLVM::Demangle)
|
||||
# Demangle only for Windows targets
|
||||
if (WIN32 AND LLVM_FOUND AND LLVM_Demangle_FOUND AND NOT TARGET LLVM::Demangle)
|
||||
add_library(LLVM::Demangle INTERFACE IMPORTED)
|
||||
target_compile_definitions(LLVM::Demangle INTERFACE ${LLVM_DEFINITIONS})
|
||||
target_include_directories(LLVM::Demangle INTERFACE ${LLVM_INCLUDE_DIRS})
|
||||
|
|
|
|||
|
|
@ -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,19 +33,21 @@ 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 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)
|
||||
set(BUILD_AUTO_UPDATE_WEBSITE "https://git.eden-emu.dev")
|
||||
set(BUILD_AUTO_UPDATE_API "git.eden-emu.dev")
|
||||
set(BUILD_AUTO_UPDATE_API_PATH "/api/v1/repos/")
|
||||
set(BUILD_AUTO_UPDATE_API "nightly.eden-emu.dev")
|
||||
set(BUILD_AUTO_UPDATE_REPO "eden-ci/nightly")
|
||||
set(REPO_NAME "Eden Nightly")
|
||||
else()
|
||||
set(BUILD_AUTO_UPDATE_WEBSITE "https://git.eden-emu.dev")
|
||||
set(BUILD_AUTO_UPDATE_API "git.eden-emu.dev")
|
||||
set(BUILD_AUTO_UPDATE_API_PATH "/api/v1/repos/")
|
||||
set(BUILD_AUTO_UPDATE_API "stable.eden-emu.dev")
|
||||
set(BUILD_AUTO_UPDATE_REPO "eden-emu/eden")
|
||||
set(REPO_NAME "Eden")
|
||||
endif()
|
||||
|
|
|
|||
33
cpmfile.json
33
cpmfile.json
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"openssl": {
|
||||
"openssl-ci": {
|
||||
"ci": true,
|
||||
"package": "OpenSSL",
|
||||
"name": "openssl",
|
||||
|
|
@ -7,6 +7,34 @@
|
|||
"version": "3.6.0-1cb0d36b39",
|
||||
"min_version": "3"
|
||||
},
|
||||
"openssl-cmake": {
|
||||
"repo": "jimmy-park/openssl-cmake",
|
||||
"hash": "2cc185c924fd70e7d886257ca0caa42b3b8f7f712f2052b4f94dde74759e27022de76178460e18c9bdfc57c366583999e198fbb6052d4e7d91c099d15a0ca63e",
|
||||
"git_version": "3.6.2",
|
||||
"tag": "%VERSION%",
|
||||
"bundled": true,
|
||||
"options": [
|
||||
"OPENSSL_CONFIGURE_OPTIONS threads"
|
||||
],
|
||||
"patches": [
|
||||
"0001-cpmutil-compat.patch",
|
||||
"0002-use-ccache.patch",
|
||||
"0003-use-cmake-compiler-flags.patch",
|
||||
"0004-use-shell-wrapper.patch"
|
||||
]
|
||||
},
|
||||
"openssl": {
|
||||
"repo": "openssl/openssl",
|
||||
"package": "OpenSSL",
|
||||
"min_version": "3",
|
||||
"version": "3",
|
||||
"hash": "29002ce50cb95a4f4f1d0e9d3f684401fbd4eac34203dc2eef3b6334af5d44aa46bf788b63a6f5c139c383eafb7269ae87a58a9a3ad5912903b9773e545ccc0a",
|
||||
"git_version": "3.6.2",
|
||||
"tag": "openssl-%VERSION%",
|
||||
"patches": [
|
||||
"0001-add-bundled-cert.patch"
|
||||
]
|
||||
},
|
||||
"boost": {
|
||||
"package": "Boost",
|
||||
"repo": "boostorg/boost",
|
||||
|
|
@ -112,7 +140,8 @@
|
|||
"options": [
|
||||
"QUAZIP_QT_MAJOR_VERSION 6",
|
||||
"QUAZIP_INSTALL OFF",
|
||||
"QUAZIP_ENABLE_QTEXTCODEC OFF"
|
||||
"QUAZIP_ENABLE_QTEXTCODEC OFF",
|
||||
"QUAZIP_BZIP2 OFF"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
8
dist/72-eden-input.rules
vendored
Normal file
8
dist/72-eden-input.rules
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Allow systemd-logind to manage user access to hidraw with this file
|
||||
# On most systems, this file should be installed to /etc/udev/rules.d/72-eden-input.rules
|
||||
# Consult your distro if this is not the case
|
||||
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ENV{ID_INPUT_JOYSTICK}=="1", MODE="0660", TAG+="uaccess"
|
||||
19
dist/72-yuzu-input.rules
vendored
19
dist/72-yuzu-input.rules
vendored
|
|
@ -1,19 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Allow systemd-logind to manage user access to hidraw with this file
|
||||
# On most systems, this file should be installed to /etc/udev/rules.d/72-yuzu-input.rules
|
||||
# Consult your distro if this is not the case
|
||||
|
||||
# Switch Pro Controller (USB/Bluetooth)
|
||||
KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="2009", MODE="0660", TAG+="uaccess"
|
||||
KERNEL=="hidraw*", KERNELS=="*057e:2009*", MODE="0660", TAG+="uaccess"
|
||||
|
||||
# Joy-Con L (Bluetooth)
|
||||
KERNEL=="hidraw*", KERNELS=="*057e:2006*", MODE="0660", TAG+="uaccess"
|
||||
|
||||
# Joy-Con R (Bluetooth)
|
||||
KERNEL=="hidraw*", KERNELS=="*057e:2007*", MODE="0660", TAG+="uaccess"
|
||||
|
||||
# Joy-Con Charging Grip (USB)
|
||||
KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="200e", MODE="0660", TAG+="uaccess"
|
||||
289
dist/icon_variations/1an.svg
vendored
Normal file
289
dist/icon_variations/1an.svg
vendored
Normal file
|
|
@ -0,0 +1,289 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="512"
|
||||
height="512"
|
||||
fill="none"
|
||||
viewBox="0 0 512 512"
|
||||
version="1.1"
|
||||
id="svg7"
|
||||
sodipodi:docname="1stanni.svg"
|
||||
inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
|
||||
inkscape:export-filename="base.svg.2026_01_12_14_43_47.0.svg"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs7">
|
||||
<linearGradient
|
||||
id="linearGradient34"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
style="stop-color:#ffd700;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop34" />
|
||||
<stop
|
||||
style="stop-color:#ffd700;stop-opacity:0.48031053;"
|
||||
offset="1"
|
||||
id="stop35" />
|
||||
</linearGradient>
|
||||
<rect
|
||||
x="20.999999"
|
||||
y="287.30493"
|
||||
width="487.07235"
|
||||
height="134.69506"
|
||||
id="rect22" />
|
||||
<linearGradient
|
||||
id="linearGradient21"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
style="stop-color:#3a0057;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop21" />
|
||||
<stop
|
||||
style="stop-color:#830091;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop22" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="swatch37"
|
||||
inkscape:swatch="solid">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop37" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="swatch28"
|
||||
inkscape:swatch="solid">
|
||||
<stop
|
||||
style="stop-color:#252525;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop28" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="swatch27"
|
||||
inkscape:swatch="solid">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop27" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="swatch15"
|
||||
inkscape:swatch="solid">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop16" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient14"
|
||||
inkscape:swatch="gradient">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop14" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop15" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="swatch9"
|
||||
inkscape:swatch="solid">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop10" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="swatch8"
|
||||
inkscape:swatch="solid">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop9" />
|
||||
</linearGradient>
|
||||
<rect
|
||||
x="22.627417"
|
||||
y="402.76802"
|
||||
width="521.34025"
|
||||
height="248.94868"
|
||||
id="rect24" />
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath18">
|
||||
<circle
|
||||
style="opacity:1;mix-blend-mode:normal;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10.8382;stroke-opacity:0.566238;paint-order:stroke fill markers"
|
||||
id="circle18"
|
||||
cx="-246.8315"
|
||||
cy="246.8338"
|
||||
inkscape:label="Circle"
|
||||
r="191.89999" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath22">
|
||||
<circle
|
||||
style="opacity:1;mix-blend-mode:normal;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10.8382;stroke-opacity:0.566238;paint-order:stroke fill markers"
|
||||
id="circle22"
|
||||
cx="256"
|
||||
cy="256"
|
||||
inkscape:label="Circle"
|
||||
r="191.89999" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath128">
|
||||
<circle
|
||||
style="fill:none;fill-opacity:1;stroke:#03ffff;stroke-width:0;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="circle128"
|
||||
cx="256"
|
||||
cy="256"
|
||||
r="192" />
|
||||
</clipPath>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient21"
|
||||
id="linearGradient22"
|
||||
x1="256"
|
||||
y1="0"
|
||||
x2="256"
|
||||
y2="512"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient34"
|
||||
id="linearGradient35"
|
||||
x1="256"
|
||||
y1="-0.048701428"
|
||||
x2="256"
|
||||
y2="512.04932"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<filter
|
||||
inkscape:label="Glowing Bubble"
|
||||
inkscape:menu="Ridges"
|
||||
inkscape:menu-tooltip="Bubble effect with refraction and glow"
|
||||
x="-0.19420711"
|
||||
y="-0.11239541"
|
||||
width="1.3884142"
|
||||
height="1.2247908"
|
||||
style="color-interpolation-filters:sRGB;"
|
||||
id="filter61">
|
||||
<feGaussianBlur
|
||||
stdDeviation="1"
|
||||
result="result1"
|
||||
id="feGaussianBlur56" />
|
||||
<feGaussianBlur
|
||||
stdDeviation="10"
|
||||
result="result6"
|
||||
in="result1"
|
||||
id="feGaussianBlur57" />
|
||||
<feComposite
|
||||
operator="atop"
|
||||
in="result6"
|
||||
in2="result1"
|
||||
result="result8"
|
||||
id="feComposite57" />
|
||||
<feComposite
|
||||
operator="xor"
|
||||
result="fbSourceGraphic"
|
||||
in="result6"
|
||||
in2="result8"
|
||||
id="feComposite58" />
|
||||
<feColorMatrix
|
||||
result="fbSourceGraphicAlpha"
|
||||
in="fbSourceGraphic"
|
||||
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 2 0 "
|
||||
id="feColorMatrix58" />
|
||||
<feGaussianBlur
|
||||
result="result0"
|
||||
in="fbSourceGraphicAlpha"
|
||||
stdDeviation="1"
|
||||
id="feGaussianBlur58" />
|
||||
<feSpecularLighting
|
||||
specularExponent="35"
|
||||
specularConstant="1.5"
|
||||
surfaceScale="-2"
|
||||
lighting-color="rgb(255,255,255)"
|
||||
result="result1"
|
||||
in="result0"
|
||||
id="feSpecularLighting58">
|
||||
<feDistantLight
|
||||
azimuth="230"
|
||||
elevation="60"
|
||||
id="feDistantLight58" />
|
||||
</feSpecularLighting>
|
||||
<feComposite
|
||||
operator="in"
|
||||
result="result2"
|
||||
in="result1"
|
||||
in2="fbSourceGraphicAlpha"
|
||||
id="feComposite59" />
|
||||
<feComposite
|
||||
k3="1.2"
|
||||
k2="1.1"
|
||||
operator="arithmetic"
|
||||
result="result4"
|
||||
in="fbSourceGraphic"
|
||||
in2="result2"
|
||||
id="feComposite60" />
|
||||
<feGaussianBlur
|
||||
result="result80"
|
||||
in="result4"
|
||||
stdDeviation="0.5"
|
||||
id="feGaussianBlur60" />
|
||||
<feComposite
|
||||
operator="atop"
|
||||
in="result9"
|
||||
in2="result80"
|
||||
result="result91"
|
||||
id="feComposite61" />
|
||||
<feBlend
|
||||
mode="multiply"
|
||||
in2="result91"
|
||||
id="feBlend61" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="213.49999"
|
||||
inkscape:cy="248.99999"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="849"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg7" />
|
||||
<circle
|
||||
style="fill:url(#linearGradient22);fill-opacity:1;stroke:none;stroke-width:8"
|
||||
id="path21"
|
||||
cx="256"
|
||||
cy="256"
|
||||
r="256" />
|
||||
<path
|
||||
id="path8-7"
|
||||
style="display:inline;mix-blend-mode:normal;fill:url(#linearGradient35);fill-opacity:1;fill-rule:nonzero;stroke:#320081;stroke-width:4.067;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
|
||||
inkscape:label="Circle"
|
||||
d="M 256,2.2792898 A 254.0155,253.71401 0 0 0 150.68475,25.115202 c 19.54414,1.070775 38.74692,5.250294 51.56848,11.647658 14.14361,7.056691 28.63804,19.185961 39.4212,29.347551 h 40.60981 c 1.03847,-0.68139 2.10297,-1.36938 3.1938,-2.05957 5.45602,-15.78533 14.79164,-43.183497 19.49612,-57.0097682 A 254.0155,253.71401 0 0 0 256,2.2792898 Z m 61.57106,7.567234 -18.26098,46.1544672 c 7.79702,-4.13918 16.35655,-7.87447 25.20671,-10.87081 23.1229,-7.828433 43.96931,-10.170904 54.94058,-10.868226 A 254.0155,253.71401 0 0 0 317.57106,9.8465238 Z m 65.39277,26.4001532 c -9.68256,4.806644 -33.05532,16.642034 -55.68217,29.863734 H 424.4677 A 254.0155,253.71401 0 0 0 382.96383,36.246677 Z M 113.90698,45.690231 A 254.0155,253.71401 0 0 0 87.532302,66.110411 H 194.2739 c -1.47402,-0.80231 -2.35141,-1.25949 -2.35141,-1.25949 l 10.4496,-11.83348 -38.40568,7.01234 c 0,1e-5 -12.21537,-4.60266 -40.17313,-12.27223 -3.45336,-0.94731 -6.75329,-1.61824 -9.8863,-2.06732 z m -36.803618,30.18635 a 254.0155,253.71401 0 0 0 -34.88372,43.090929 h 59.976738 c 18.11461,-12.04145 40.14252,-22.882149 62.31266,-24.534159 52.93006,-3.9444 70.16538,1.86342 70.16538,1.86342 0,0 -4.612,-4.8206 -14.51938,-13.36656 -2.72366,-2.34942 -6.0844,-4.77373 -9.52455,-7.05363 z m 174.472868,0 c 4.57322,4.7186 7.29716,7.83565 7.29716,7.83565 0,0 3.53501,-3.18484 9.62532,-7.83565 z m 60.27649,0 c -21.56573,15.45339 -25.4703,27.979669 -25.4703,27.979669 0,0 54.83326,-19.215729 100.70543,-0.31228 11.63986,4.79661 21.58481,10.13159 29.94832,15.42354 h 52.74419 A 254.0155,253.71401 0 0 0 434.89664,75.876581 Z M 36.250648,128.73367 A 254.0155,253.71401 0 0 0 16.372095,171.82459 H 147.45478 c 1.45695,-2.5815 3.06539,-5.08648 4.83979,-7.48982 14.23694,-19.28301 27.92088,-30.0088 36.86047,-35.6011 h -30.25323 c -5.87346,0.93472 -12.04945,1.99094 -18.28166,3.16937 -30.12936,5.69727 -81.157618,22.78945 -81.157618,22.78945 0,0 11.47125,-12.39249 29.11369,-25.95882 z m 265.630492,0 c 33.48676,11.2434 52.42799,26.78443 62.7752,43.09092 h 130.97157 a 254.0155,253.71401 0 0 0 -19.87856,-43.09092 h -44.81136 c 14.85233,11.5863 21.59948,20.9854 21.59948,20.9854 0,0 -33.5226,-12.37087 -66.0646,-20.9854 z m -45.96641,16.27007 c -1.00419,0.0106 -10.12705,0.72026 -44.98966,20.64729 -3.12132,1.78406 -6.25434,3.86182 -9.37468,6.17356 h 41.81911 c 7.17181,-17.34774 12.64083,-26.82085 12.64083,-26.82085 0,0 -0.0287,-7.1e-4 -0.0957,0 z m 14.18088,0.0465 c 0,0 -3.31228,9.32762 -7.30492,26.77438 h 51.78554 C 287.6577,146.14158 270.09561,145.0502 270.09561,145.0502 Z M 13.152456,181.59075 A 254.0155,253.71401 0 0 0 3.927651,224.68167 H 134.1447 c 0.56161,-12.72411 2.67825,-28.50188 8.61499,-43.09092 z m 176.661504,0 c -14.27121,13.10564 -27.60733,29.58761 -37.56073,43.09092 h 73.3721 c 4.47018,-16.79061 9.35068,-31.26371 13.86562,-43.09092 z m 70.85787,0 c -2.41384,11.76417 -4.9032,26.20707 -6.94831,43.09092 H 360.4832 c -8.32133,-10.88917 -20.66988,-26.17008 -36.35141,-43.09092 z m 109.17313,0 c 6.63611,15.24089 6.92441,30.5373 5.57882,43.09092 h 132.64857 a 254.0155,253.71401 0 0 0 -9.22481,-43.09092 z M 2.90181,234.44783 A 254.0155,253.71401 0 0 0 1.984498,255.9933 254.0155,253.71401 0 0 0 2.90181,277.53876 h 211.89923 c 2.25762,-15.52555 5.14325,-29.93448 8.3385,-43.09093 h -77.8863 c -6.46396,9.27617 -10.33076,15.56549 -10.33076,15.56549 0,0 -0.82623,-6.14945 -0.9354,-15.56549 z m 249.72093,0 c -1.3692,13.09684 -2.4456,27.49209 -3.02068,43.09093 h 259.49613 a 254.0155,253.71401 0 0 0 0.91731,-21.54546 254.0155,253.71401 0 0 0 -0.91731,-21.54547 H 374.02584 c -0.445,2.5469 -0.90878,4.89768 -1.32817,7.01751 0,0 -1.69726,-2.53821 -4.94056,-7.01751 z M 3.927651,287.30493 a 254.0155,253.71401 0 0 0 9.224805,43.09091 H 214.04393 c -1.29238,-15.40742 -1.57503,-30.04388 -0.41861,-43.09091 z m 245.385009,0 c -0.30355,13.54349 -0.22032,27.92598 0.36951,43.09091 h 249.16537 a 254.0155,253.71401 0 0 0 9.22481,-43.09091 z M 16.369511,340.16201 a 254.0155,253.71401 0 0 0 19.878554,43.09091 H 221.4677 c -2.69781,-14.4523 -4.96108,-29.01285 -6.4832,-43.09091 z m 233.842379,0 c 1.15864,15.47765 3.81286,29.83979 7.51679,43.09091 h 218.02325 a 254.0155,253.71401 0 0 0 19.87856,-43.09091 z M 42.217052,393.01909 a 254.0155,253.71401 0 0 0 34.88372,43.09093 H 233.09561 c -3.40902,-13.67281 -6.76794,-28.2531 -9.73902,-43.09093 z m 218.490958,0 c 5.34985,16.15926 12.22007,30.51982 19.68733,43.09093 h 154.50389 a 254.0155,253.71401 0 0 0 34.88371,-43.09093 z M 87.529722,445.87618 a 254.0155,253.71401 0 0 0 166.229968,63.8208 c -3.67805,-12.0825 -10.85464,-35.49828 -18.18088,-63.8208 z m 199.010328,0 c 17.5887,26.43772 36.99259,43.60598 47.33592,51.61309 a 254.0155,253.71401 0 0 0 90.59431,-51.61309 z" />
|
||||
<path
|
||||
id="path27"
|
||||
style="display:inline;mix-blend-mode:multiply;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linejoin:round;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers"
|
||||
d="m 318.98012,441.7375 c -9.87518,-6.73978 -64.39137,-49.0272 -67.68975,-127.81978 -3.69298,-88.21893 15.36468,-141.91029 15.36468,-141.91029 0,0 16.00378,0.99513 39.80316,26.53195 23.79939,25.53753 37.74965,46.43102 37.74965,46.43102 3.91262,-19.79992 12.84563,-66.32402 -60.72865,-87.55523 0,0 12.82326,-5.38883 39.3925,-3.81382 26.56907,1.57572 81.6822,21.93799 81.6822,21.93799 0,0 -14.79766,-20.63773 -49.47063,-34.94295 -34.67291,-14.30533 -76.1182,0.23644 -76.1182,0.23644 0,0 3.86959,-12.43127 27.22669,-26.38478 23.35718,-13.9537 49.27409,-26.501533 49.27409,-26.501533 0,0 -21.97854,-0.26548 -47.67725,8.44535 -6.68948,2.267506 -13.15863,5.094213 -19.05208,8.226563 l 16.05803,-40.634103 -4.4617,-1.89059 -5.1305,-0.95965 c 0,0 -11.24072,33.12428 -16.92051,49.576513 -12.13137,7.68489 -20.11005,14.87735 -20.11005,14.87735 0,0 -21.90573,-25.09227 -42.79668,-35.527803 -26.03412,-13.00525 -86.88249,-13.90359 -94.0044,10.401173 0,0 13.56804,-7.884703 34.70032,-2.080917 21.13214,5.803997 30.3644,9.287307 30.3644,9.287307 l 29.02989,-5.30681 -7.89811,8.95527 c 0,0 13.8496,7.21324 21.33822,13.68063 7.48859,6.46722 10.9757,10.11472 10.9757,10.11472 0,0 -13.02739,-4.39388 -53.03507,-1.40893 -40.00771,2.98473 -79.40016,45.60209 -79.40016,45.60209 0,0 38.57037,-12.93531 61.34393,-17.24677 22.77354,-4.31126 44.52166,-6.46757 44.52166,-6.46757 0,0 -17.23298,5.97003 -35.69792,31.00932 -18.46522,25.03987 -13.13146,64.83866 -13.13146,64.83866 0,0 29.33874,-47.7577 57.44675,-63.84249 28.10798,-16.08527 34.0799,-15.6238 34.0799,-15.6238 0,0 -22.56785,39.13486 -31.39017,101.98268 -8.03005,57.2039 26.77689,163.75449 31.1572,178.89699"
|
||||
sodipodi:nodetypes="cscsccscscscsccccccscscccscscscscscsc"
|
||||
inkscape:label="MainOutline"
|
||||
clip-path="url(#clipPath128)"
|
||||
transform="matrix(1.3229974,0,0,1.3214002,-82.687282,-82.278451)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 14 KiB |
1
dist/icon_variations/1an_bgcolor
vendored
Normal file
1
dist/icon_variations/1an_bgcolor
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
#ffd700
|
||||
1925
dist/languages/ar.ts
vendored
1925
dist/languages/ar.ts
vendored
File diff suppressed because it is too large
Load diff
1837
dist/languages/ca.ts
vendored
1837
dist/languages/ca.ts
vendored
File diff suppressed because it is too large
Load diff
1829
dist/languages/cs.ts
vendored
1829
dist/languages/cs.ts
vendored
File diff suppressed because it is too large
Load diff
1829
dist/languages/da.ts
vendored
1829
dist/languages/da.ts
vendored
File diff suppressed because it is too large
Load diff
1835
dist/languages/de.ts
vendored
1835
dist/languages/de.ts
vendored
File diff suppressed because it is too large
Load diff
1829
dist/languages/el.ts
vendored
1829
dist/languages/el.ts
vendored
File diff suppressed because it is too large
Load diff
2071
dist/languages/es.ts
vendored
2071
dist/languages/es.ts
vendored
File diff suppressed because it is too large
Load diff
1971
dist/languages/fi.ts
vendored
1971
dist/languages/fi.ts
vendored
File diff suppressed because it is too large
Load diff
1840
dist/languages/fr.ts
vendored
1840
dist/languages/fr.ts
vendored
File diff suppressed because it is too large
Load diff
1829
dist/languages/hu.ts
vendored
1829
dist/languages/hu.ts
vendored
File diff suppressed because it is too large
Load diff
1955
dist/languages/id.ts
vendored
1955
dist/languages/id.ts
vendored
File diff suppressed because it is too large
Load diff
2161
dist/languages/it.ts
vendored
2161
dist/languages/it.ts
vendored
File diff suppressed because it is too large
Load diff
1829
dist/languages/ja_JP.ts
vendored
1829
dist/languages/ja_JP.ts
vendored
File diff suppressed because it is too large
Load diff
3595
dist/languages/ko_KR.ts
vendored
3595
dist/languages/ko_KR.ts
vendored
File diff suppressed because it is too large
Load diff
1847
dist/languages/nb.ts
vendored
1847
dist/languages/nb.ts
vendored
File diff suppressed because it is too large
Load diff
1829
dist/languages/nl.ts
vendored
1829
dist/languages/nl.ts
vendored
File diff suppressed because it is too large
Load diff
1842
dist/languages/pl.ts
vendored
1842
dist/languages/pl.ts
vendored
File diff suppressed because it is too large
Load diff
2511
dist/languages/pt_BR.ts
vendored
2511
dist/languages/pt_BR.ts
vendored
File diff suppressed because it is too large
Load diff
1829
dist/languages/pt_PT.ts
vendored
1829
dist/languages/pt_PT.ts
vendored
File diff suppressed because it is too large
Load diff
3201
dist/languages/ru_RU.ts
vendored
3201
dist/languages/ru_RU.ts
vendored
File diff suppressed because it is too large
Load diff
1845
dist/languages/sv.ts
vendored
1845
dist/languages/sv.ts
vendored
File diff suppressed because it is too large
Load diff
1849
dist/languages/tr_TR.ts
vendored
1849
dist/languages/tr_TR.ts
vendored
File diff suppressed because it is too large
Load diff
1851
dist/languages/uk.ts
vendored
1851
dist/languages/uk.ts
vendored
File diff suppressed because it is too large
Load diff
1829
dist/languages/vi.ts
vendored
1829
dist/languages/vi.ts
vendored
File diff suppressed because it is too large
Load diff
1830
dist/languages/vi_VN.ts
vendored
1830
dist/languages/vi_VN.ts
vendored
File diff suppressed because it is too large
Load diff
1847
dist/languages/zh_CN.ts
vendored
1847
dist/languages/zh_CN.ts
vendored
File diff suppressed because it is too large
Load diff
1835
dist/languages/zh_TW.ts
vendored
1835
dist/languages/zh_TW.ts
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -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,21 +32,21 @@ 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!
|
||||
|
||||
This is needed for some dependencies that call cc directly (tz):
|
||||
|
||||
```sh
|
||||
echo '#!/bin/sh' >cc
|
||||
echo '#!/bin/sh -e' >cc
|
||||
echo 'gcc $@' >>cc
|
||||
chmod +x cc
|
||||
export PATH="$PATH:$PWD"
|
||||
|
|
@ -64,9 +65,33 @@ export LIBGL_ALWAYS_SOFTWARE=1
|
|||
```
|
||||
|
||||
- Modify the generated ffmpeg.make (in build dir) if using multiple threads (base system `make` doesn't use `-j4`, so change for `gmake`).
|
||||
- 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`
|
||||
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -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`
|
||||
|
||||
|
|
@ -67,28 +69,6 @@ Expressions can be `variable_names` or `1234` (numbers) or `*var` (dereference o
|
|||
|
||||
For more information type `info gdb` and read [the man page](https://man7.org/linux/man-pages/man1/gdb.1.html).
|
||||
|
||||
## Simple checklist for debugging black screens using Renderdoc
|
||||
# RenderDoc (Graphic Debugging Tool)
|
||||
|
||||
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).
|
||||
|
||||
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
|
||||
|
||||
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.
|
||||
Guidelines for graphical debugging using RenderDoc: **[RenderDoc usage](./RenderDoc.md)**
|
||||
66
docs/Deps.md
66
docs/Deps.md
|
|
@ -16,7 +16,7 @@ To build Eden, you MUST have a C++ compiler.
|
|||
|
||||
The following additional tools are also required:
|
||||
|
||||
* **[CMake](https://www.cmake.org/)** 3.22+ - already included with the Android SDK
|
||||
* **[CMake](https://www.cmake.org/)** 3.31+ - already included with the Android SDK
|
||||
* **[Git](https://git-scm.com/)** for version control
|
||||
* **[Windows installer](https://gitforwindows.org)**
|
||||
* **[Python3](https://www.python.org/downloads/)** 3.10+ - necessary to download external repositories
|
||||
|
|
@ -35,6 +35,11 @@ If you are on desktop and plan to use the Qt frontend, you *must* install Qt 6,
|
|||
|
||||
* For help setting up Qt Creator, run `./install.sh -h qtcreator`
|
||||
|
||||
* If you're using clang-cl and want to still use MSVC
|
||||
* Check the option to add "C++ clang compiler for Windows" on Visual Studio installer and uncheck "x64/x86 build tool for MSVC" while selecting "C++ desktop developement tools" and change Visual Studio to 2026, from 2022.
|
||||
* At qt creator section generator tab change Visual Studio 17 2022 to 2026.
|
||||
* Finally, to use clang-cl: `cmake -S . -B build -G "Visual Studio 17 2026" -T ClangCL`
|
||||
|
||||
If you are on **Windows** and building with **MSVC** or **clang-cl**, you may go [back home](Build.md) and continue.
|
||||
|
||||
## Externals
|
||||
|
|
@ -42,7 +47,7 @@ If you are on **Windows** and building with **MSVC** or **clang-cl**, you may go
|
|||
The following are handled by Eden's externals:
|
||||
|
||||
* [FFmpeg](https://ffmpeg.org/) (should use `-DYUZU_USE_EXTERNAL_FFMPEG=ON`)
|
||||
* [SDL2](https://www.libsdl.org/download-2.0.php) 2.0.18+ (should use `-DYUZU_USE_EXTERNAL_SDL2=ON` OR `-DYUZU_USE_BUNDLED_SDL2=ON` to reduce compile time)
|
||||
* [SDL3](https://www.libsdl.org/download-2.0.php) 3.2.10+ (Use `-DYUZU_USE_BUNDLED_SDL2=ON` to reduce compile time)
|
||||
|
||||
All other dependencies will be downloaded and built by [CPM](https://github.com/cpm-cmake/CPM.cmake/) if `YUZU_USE_CPM` is on, but will always use system dependencies if available (UNIX-like only):
|
||||
|
||||
|
|
@ -118,7 +123,7 @@ sudo emerge -a \
|
|||
dev-util/spirv-tools dev-util/spirv-headers dev-util/vulkan-headers \
|
||||
dev-util/vulkan-utility-libraries dev-util/glslang \
|
||||
media-gfx/renderdoc media-libs/libva media-libs/opus media-video/ffmpeg \
|
||||
media-libs/VulkanMemoryAllocator media-libs/libsdl2 media-libs/cubeb \
|
||||
media-libs/VulkanMemoryAllocator media-libs/libsdl3 media-libs/cubeb \
|
||||
net-libs/enet \
|
||||
sys-libs/zlib \
|
||||
dev-cpp/nlohmann_json dev-cpp/simpleini dev-cpp/cpp-httplib dev-cpp/cpp-jwt \
|
||||
|
|
@ -137,7 +142,8 @@ Required USE flags:
|
|||
|
||||
* `dev-qt/qtbase network concurrent dbus gui widgets`
|
||||
* `dev-libs/quazip qt6`
|
||||
* `media-libs/libsdl2 haptic joystick sound video`
|
||||
* `media-libs/libsdl3 haptic joystick sound video`
|
||||
* Adding `X vulkan udev opengl` is recommended but not required
|
||||
* `dev-cpp/cpp-httplib ssl`
|
||||
|
||||
[Caveats](./Caveats.md#gentoo-linux)
|
||||
|
|
@ -148,7 +154,7 @@ Required USE flags:
|
|||
<summary>Arch Linux</summary>
|
||||
|
||||
```sh
|
||||
sudo pacman -Syu --needed base-devel boost catch2 cmake enet ffmpeg fmt git glslang libzip lz4 ninja nlohmann-json openssl opus qt6-base qt6-multimedia qt6-charts sdl2 zlib zstd zip unzip vulkan-headers vulkan-utility-libraries libusb spirv-tools spirv-headers
|
||||
sudo pacman -Syu --needed base-devel boost catch2 cmake enet ffmpeg fmt git glslang libzip lz4 ninja nlohmann-json openssl opus qt6-base qt6-multimedia qt6-charts sdl3 zlib zstd zip unzip vulkan-headers vulkan-utility-libraries libusb spirv-tools spirv-headers
|
||||
```
|
||||
|
||||
* Building with QT Web Engine requires `qt6-webengine` as well.
|
||||
|
|
@ -161,10 +167,10 @@ sudo pacman -Syu --needed base-devel boost catch2 cmake enet ffmpeg fmt git glsl
|
|||
<summary>Ubuntu, Debian, Mint Linux</summary>
|
||||
|
||||
```sh
|
||||
sudo apt-get install autoconf cmake g++ gcc git glslang-tools libglu1-mesa-dev libhidapi-dev libpulse-dev libtool libudev-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxext-dev libxkbcommon-x11-0 mesa-common-dev nasm ninja-build qt6-base-private-dev catch2 libfmt-dev liblz4-dev nlohmann-json3-dev libzstd-dev libssl-dev libavfilter-dev libavcodec-dev libswscale-dev pkg-config zlib1g-dev libva-dev libvdpau-dev qt6-tools-dev qt6-charts-dev libvulkan-dev spirv-tools spirv-headers libusb-1.0-0-dev libxbyak-dev libboost-dev libboost-fiber-dev libboost-context-dev libsdl2-dev libopus-dev libasound2t64 vulkan-utility-libraries-dev
|
||||
sudo apt-get install autoconf cmake g++ gcc git glslang-tools libglu1-mesa-dev libhidapi-dev libpulse-dev libtool libudev-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxext-dev libxkbcommon-x11-0 mesa-common-dev nasm ninja-build qt6-base-private-dev catch2 libfmt-dev liblz4-dev nlohmann-json3-dev libzstd-dev libssl-dev libavfilter-dev libavcodec-dev libswscale-dev pkg-config zlib1g-dev libva-dev libvdpau-dev qt6-tools-dev qt6-charts-dev libvulkan-dev spirv-tools spirv-headers libusb-1.0-0-dev libxbyak-dev libboost-dev libboost-fiber-dev libboost-context-dev libsdl3-dev libopus-dev libasound2t64 vulkan-utility-libraries-dev
|
||||
```
|
||||
|
||||
* Ubuntu 22.04, Linux Mint 20, or Debian 12 or later is required.
|
||||
* Ubuntu 26.04, Linux Mint 22.3, or Debian 13 or later is required.
|
||||
* To enable QT Web Engine, add `-DYUZU_USE_QT_WEB_ENGINE=ON` when running CMake.
|
||||
|
||||
</details>
|
||||
|
|
@ -185,13 +191,13 @@ AlmaLinux (use `YUZU_USE_CPM=ON`):
|
|||
sudo dnf install epel-release dnf-utils
|
||||
# (run rpmfusion installation afterwards)
|
||||
# vvv - This will work for most systems
|
||||
sudo dnf install autoconf cmake libtool libudev cmake gcc gcc-c++ qt6-qtbase-devel zlib-devel openssl-devel boost SDL2 ffmpeg-devel libdrm glslang jq patch
|
||||
sudo dnf install autoconf cmake libtool libudev cmake gcc gcc-c++ qt6-qtbase-devel zlib-devel openssl-devel boost SDL3 ffmpeg-devel libdrm glslang jq patch
|
||||
# Qt6 private GUI must be taken from CRB repos
|
||||
sudo dnf config-manager --enable crb
|
||||
sudo dnf install qt6-qtbase-private-devel
|
||||
```
|
||||
|
||||
For systems like OpenEuler or derivates, don't forget to also install: `SDL2-devel pkg-config fmt-dev nlohmann-json-dev`.
|
||||
For systems like OpenEuler or derivates, don't forget to also install: `SDL3-devel pkg-config fmt-dev nlohmann-json-dev`.
|
||||
|
||||
* [RPM Fusion](https://rpmfusion.org/Configuration) is required for `ffmpeg-devel`
|
||||
* Fedora 32 or later is required.
|
||||
|
|
@ -208,7 +214,7 @@ First, enable the community repository; [see here](https://wiki.alpinelinux.org/
|
|||
# Enable the community repository
|
||||
setup-apkrepos -c
|
||||
# Install
|
||||
apk add g++ git cmake make mesa-dev qt6-qtbase-dev qt6-qtbase-private-dev libquazip1-qt6 ffmpeg-dev qt6-charts-dev libusb-dev libtool boost-dev sdl2-dev zstd-dev vulkan-utility-libraries spirv-tools-dev openssl-dev nlohmann-json lz4-dev opus-dev jq patch
|
||||
apk add g++ git cmake make mesa-dev qt6-qtbase-dev qt6-qtbase-private-dev libquazip1-qt6 ffmpeg-dev qt6-charts-dev libusb-dev libtool boost-dev sdl3-dev zstd-dev vulkan-utility-libraries spirv-tools-dev openssl-dev nlohmann-json lz4-dev opus-dev jq patch
|
||||
```
|
||||
|
||||
</details>
|
||||
|
|
@ -216,7 +222,7 @@ apk add g++ git cmake make mesa-dev qt6-qtbase-dev qt6-qtbase-private-dev libqua
|
|||
<summary>Void Linux</summary>
|
||||
|
||||
```sh
|
||||
xbps-install -Su git make cmake clang pkg-config patch SPIRV-Tools-devel SPIRV-Headers lz4 liblz4-devel boost-devel ffmpeg6-devel catch2 Vulkan-Utility-Libraries Vulkan-Headers glslang openssl-devel SDL2-devel quazip-qt6-devel qt6-base-devel qt6-qt5compat-devel qt6-charts-devel fmt-devel json-c++ libenet-devel libusb-devel
|
||||
xbps-install -Su git make cmake clang pkg-config patch SPIRV-Tools-devel SPIRV-Headers lz4 liblz4-devel boost-devel ffmpeg6-devel catch2 Vulkan-Utility-Libraries Vulkan-Headers glslang openssl-devel SDL3-devel quazip-qt6-devel qt6-base-devel qt6-qt5compat-devel qt6-charts-devel fmt-devel json-c++ libenet-devel libusb-devel
|
||||
```
|
||||
|
||||
Yes, `nlohmann-json` is just named `json-c++`. Why?
|
||||
|
|
@ -237,7 +243,7 @@ If you're going for a pure build (i.e no downloaded deps), use `-DYUZU_USE_CPM=O
|
|||
Install dependencies from **[Homebrew](https://brew.sh/)**
|
||||
|
||||
```sh
|
||||
brew install autoconf automake boost ffmpeg fmt glslang hidapi libtool libusb lz4 ninja nlohmann-json openssl pkg-config qt@6 sdl2 speexdsp zlib zstd cmake Catch2 molten-vk vulkan-loader spirv-tools
|
||||
brew install autoconf automake boost ffmpeg fmt glslang hidapi libtool libusb lz4 ninja nlohmann-json openssl pkg-config qt@6 sdl3 speexdsp zlib zstd cmake Catch2 molten-vk vulkan-loader spirv-tools
|
||||
```
|
||||
|
||||
If you are compiling on Intel Mac, or are using a Rosetta Homebrew installation, you must replace all references of `/opt/homebrew` with `/usr/local`.
|
||||
|
|
@ -254,7 +260,7 @@ brew install molten-vk
|
|||
<details>
|
||||
<summary>FreeBSD</summary>
|
||||
|
||||
As root run: `pkg install devel/cmake devel/sdl20 devel/boost-libs devel/catch2 devel/libfmt devel/nlohmann-json devel/ninja devel/nasm devel/autoconf devel/pkgconf devel/qt6-base devel/qt6-charts devel/simpleini net/enet multimedia/ffnvcodec-headers multimedia/ffmpeg audio/opus archivers/liblz4 lang/gcc12 graphics/glslang graphics/vulkan-utility-libraries graphics/spirv-tools www/cpp-httplib devel/unordered-dense vulkan-headers quazip-qt6`
|
||||
As root run: `pkg install devel/cmake sdl3 devel/boost-libs devel/catch2 devel/libfmt devel/nlohmann-json devel/ninja devel/nasm devel/autoconf devel/pkgconf devel/qt6-base devel/qt6-charts devel/simpleini net/enet multimedia/ffnvcodec-headers multimedia/ffmpeg audio/opus archivers/liblz4 lang/gcc12 graphics/glslang graphics/vulkan-utility-libraries graphics/spirv-tools www/cpp-httplib devel/unordered-dense vulkan-headers quazip-qt6`
|
||||
|
||||
If using FreeBSD 12 or prior, use `devel/pkg-config` instead.
|
||||
|
||||
|
|
@ -264,7 +270,11 @@ If using FreeBSD 12 or prior, use `devel/pkg-config` instead.
|
|||
<details>
|
||||
<summary>NetBSD</summary>
|
||||
|
||||
For NetBSD +10.1: `pkgin install git cmake boost fmtlib SDL2 catch2 libjwt spirv-headers spirv-tools ffmpeg7 libva nlohmann-json jq libopus qt6 cpp-httplib lz4 vulkan-headers nasm autoconf enet pkg-config libusb1 libcxx`.
|
||||
For NetBSD +10.1:
|
||||
|
||||
```sh
|
||||
pkgin install git cmake boost fmtlib SDL3 catch2 libjwt spirv-headers spirv-tools ffmpeg7 libva nlohmann-json jq libopus qt6 cpp-httplib lz4 vulkan-headers nasm autoconf enet pkg-config libusb1 libcxx frozen
|
||||
```
|
||||
|
||||
[Caveats](./Caveats.md#netbsd).
|
||||
|
||||
|
|
@ -274,7 +284,7 @@ For NetBSD +10.1: `pkgin install git cmake boost fmtlib SDL2 catch2 libjwt spirv
|
|||
|
||||
```sh
|
||||
pkg_add -u
|
||||
pkg_add cmake nasm git boost unzip--iconv autoconf-2.72p0 bash ffmpeg glslang gmake qt6 jq fmt nlohmann-json enet boost vulkan-utility-libraries vulkan-headers spirv-headers spirv-tools catch2 sdl2 libusb1-1.0.29
|
||||
pkg_add cmake nasm git boost unzip--iconv autoconf-2.72p0 bash ffmpeg glslang gmake qt6 jq fmt nlohmann-json enet boost vulkan-utility-libraries vulkan-headers spirv-headers spirv-tools catch2 sdl3 libusb1-1.0.29 quazip-qt6
|
||||
```
|
||||
|
||||
[Caveats](./Caveats.md#openbsd).
|
||||
|
|
@ -284,20 +294,30 @@ pkg_add cmake nasm git boost unzip--iconv autoconf-2.72p0 bash ffmpeg glslang gm
|
|||
<summary>DragonFlyBSD</summary>
|
||||
|
||||
```sh
|
||||
pkg install gcc14 git cmake unzip nasm autoconf bash pkgconf ffmpeg glslang gmake jq nlohmann-json enet spirv-tools sdl2 vulkan-utility-libraries vulkan-headers catch2 libfmt openssl liblz4 boost-libs cpp-httplib qt6-base qt6-charts quazip-qt6 unordered-dense libva-vdpau-driver libva-utils libva-intel-driver
|
||||
pkg install gcc14 git cmake unzip nasm autoconf bash pkgconf ffmpeg glslang gmake jq nlohmann-json enet spirv-tools sdl3 vulkan-utility-libraries vulkan-headers catch2 libfmt openssl liblz4 boost-libs cpp-httplib qt6-base qt6-charts quazip-qt6 unordered-dense libva-vdpau-driver libva-utils libva-intel-driver
|
||||
```
|
||||
|
||||
[Caveats](./Caveats.md#dragonflybsd).
|
||||
|
||||
</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 sdl3 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>
|
||||
|
|
@ -308,7 +328,7 @@ sudo pkg install qt6 boost glslang libzip library/lz4 libusb-1 nlohmann-json ope
|
|||
|
||||
```sh
|
||||
BASE="git make autoconf libtool automake-wrapper jq patch"
|
||||
MINGW="qt6-base qt6-charts qt6-tools qt6-translations qt6-svg cmake toolchain clang python-pip openssl vulkan-memory-allocator vulkan-devel glslang boost fmt lz4 nlohmann-json zlib zstd enet opus libusb unordered_dense openssl SDL2"
|
||||
MINGW="qt6-base qt6-charts qt6-tools qt6-translations qt6-svg cmake toolchain clang python-pip openssl vulkan-memory-allocator vulkan-devel glslang boost fmt lz4 nlohmann-json zlib zstd enet opus libusb unordered_dense openssl SDL3"
|
||||
# Either x86_64 or clang-aarch64 (Windows on ARM)
|
||||
packages="$BASE"
|
||||
for pkg in $MINGW; do
|
||||
|
|
@ -334,7 +354,7 @@ pacman -Syuu --needed --noconfirm $packages
|
|||
<summary>HaikuOS</summary>
|
||||
|
||||
```sh
|
||||
pkgman install git cmake patch libfmt_devel nlohmann_json lz4_devel opus_devel boost1.90_devel vulkan_devel qt6_base_devel qt6_declarative_devel libsdl2_devel ffmpeg7_devel libx11_devel enet_devel catch2_devel quazip1_qt5_devel qt6_5compat_devel glslang qt6_devel qt6_charts_devel
|
||||
pkgman install git cmake patch libfmt_devel nlohmann_json lz4_devel opus_devel boost1.90_devel vulkan_devel qt6_base_devel qt6_declarative_devel libsdl3_devel ffmpeg7_devel libx11_devel enet_devel catch2_devel quazip1_qt5_devel qt6_5compat_devel glslang qt6_devel qt6_charts_devel cubeb_devel simpleini quazip_qt6_devel
|
||||
```
|
||||
|
||||
[Caveats](./Caveats.md#haikuos).
|
||||
|
|
@ -345,9 +365,11 @@ pkgman install git cmake patch libfmt_devel nlohmann_json lz4_devel opus_devel b
|
|||
|
||||
```sh
|
||||
sudo pkg update
|
||||
sudo pkg install git cmake ffmpeg6 sdl2 zlib llvm18
|
||||
sudo pkg install git cmake ffmpeg6 zlib llvm18
|
||||
```
|
||||
|
||||
RedoxOS currently does not support SDL3. You will have to compile it yourself and pray.
|
||||
|
||||
[Caveats](./Caveats.md#redoxos).
|
||||
|
||||
</details>
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
31
docs/HosKernel.md
Normal file
31
docs/HosKernel.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# HOS Kernel
|
||||
|
||||
In brief, the HOS kernel is a microkernel, some services and programs run in userspace, the primary way to do communication between these is via `HIPC` (not covered here); otherwise most of the primitives reside in the forms of syscalls invoked via `svc #imm`. The kernel supports both 32-bit and 64-bit programs, and has the capacity to use 32, 36 and 39 bits of address space for spawned processes. Most of the networking stack is based off FreeBSD's network stack.
|
||||
|
||||
The emulator implements the majority of the syscalls pertaining to the HOS kernel itself. When we talk about the HOS Kernel (in the context of the emulator) we are strictly speaking about the mechanisms from which syscalls are handled (and it's subsequent side effects, such as the page table book-keeping). The emulator at it's current state is unable to load a custom low-level kernel and do supervisor-level emulation.
|
||||
|
||||
Most programs in NX eventually invoke an `svc`, which, depending on it's immediate value, will go on to be dispatched into one of the specific syscall handlers.
|
||||
|
||||
These can be seen in [svc.cpp](/src/core/hle/kernel/svc.cpp). All of these correspond to syscalls which userspace programs may perform.
|
||||
|
||||
In turn, these syscalls create the mechanisms that allows programs to use CMIF/TIPC as their primary IPC form to contact other services/processes running on the system, the details of which will not be covered here, but you can consult the relevant [SwitchBrew article: 'HIPC'](https://switchbrew.org/wiki/HIPC).
|
||||
|
||||
From the point of view of the programs, no special devices (such as PCIE, Realtek drivers, Bluetooth or USB) has to be handled by the emulator; this is because most of the fun occurs in specialized services such as `usb:u` or `pcie` services. Which aren't emulated (yet).
|
||||
|
||||
Due to the nature of syscalls, many of them interact with memory. The emulated kernel has an internal tree-like structure, borrowed from FreeBSD's intrusive red-black tree; this is used to track and find mappings added or removed. Thus most of the process space is emulated in this way.
|
||||
|
||||
The kernel keeps it's own separate pagetable, in a traditional sense, each process has it's own pagetable, this is true for HOS as well.
|
||||
|
||||
Every process keeps it's own tracking of the following structures:
|
||||
- Name (13 characters)
|
||||
- 64-bit ID
|
||||
- A handle table
|
||||
- Exclusive monitor
|
||||
- Threads
|
||||
- Held locks
|
||||
- Thread local pages
|
||||
- A page table for each process
|
||||
|
||||
The emulator willingly restricts itself to only use 4 threads (to emulate 4 cores), this is because most existing applications do not benefit greatly from the added core count, and in fact can be detrimental due to extra contention. This translates equitatively to about 4 `ArmInterface` slots for each process, these are then redirected to whatever is the last `pc` of the last thread running on the core is meant to be; proceed to run it, then when returning (due to halt or interruption), proceed to reschedule the thread.
|
||||
|
||||
The scheduler as-is isn't 100% faithful to the original, and has great timing variance (especially due to the fact the emulator can run in systems with wildly different timings).
|
||||
|
|
@ -853,6 +853,8 @@ Texture Query.
|
|||
|
||||
Vote Across SIMD Thread Group
|
||||
|
||||
`VOTE_vtg` is a kepler leftover.
|
||||
|
||||
# VSET
|
||||
`0100 000- ---- ----`
|
||||
|
||||
|
|
|
|||
|
|
@ -29,8 +29,7 @@ These options control dependencies.
|
|||
- `YUZU_TZDB_PATH` (string) Path to a pre-downloaded timezone database (useful for nixOS and Gentoo)
|
||||
- `YUZU_USE_BUNDLED_MOLTENVK` (ON, macOS only) Download bundled MoltenVK lib
|
||||
- `YUZU_USE_BUNDLED_OPENSSL` (ON for MSVC, Android, Solaris, and OpenBSD) Download bundled OpenSSL build
|
||||
- `YUZU_USE_EXTERNAL_SDL2` (OFF) Compiles SDL2 from source
|
||||
- `YUZU_USE_BUNDLED_SDL2` (ON for MSVC) Download a prebuilt SDL2
|
||||
- `YUZU_USE_BUNDLED_SDL3` (ON for MSVC) Download a prebuilt SDL3
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
|
|
@ -44,6 +43,9 @@ These options control dependencies.
|
|||
- UNIX may be better off appending `-flto=thin` to compiler args
|
||||
- `USE_FASTER_LINKER` (OFF) Check if a faster linker is available
|
||||
- Not recommended outside of Linux
|
||||
- `YUZU_INSTALL_UDEV_RULES` (OFF) Install udev rules to enable hidraw access
|
||||
- Needed for gyroscopes
|
||||
- Only available on Linux
|
||||
|
||||
### Flavors
|
||||
|
||||
|
|
@ -60,7 +62,7 @@ These options control executables and build flavors.
|
|||
|
||||
**Desktop only**:
|
||||
|
||||
- `YUZU_CMD` (ON) Compile the SDL2 frontend (eden-cli)
|
||||
- `YUZU_CMD` (ON) Compile the SDL-based frontend (eden-cli)
|
||||
- `YUZU_ROOM` (OFF) Compile dedicated room functionality into the main executable
|
||||
- `YUZU_ROOM_STANDALONE` (OFF) Compile a separate executable for room functionality
|
||||
- `YUZU_STATIC_ROOM` (OFF) Compile the room executable *only* as a static, portable executable
|
||||
|
|
@ -96,5 +98,6 @@ The following options were a part of Eden at one point, but have since been reti
|
|||
- `ENABLE_SDL2` - While technically possible to *not* use SDL2 on desktop, this is **NOT** a supported configuration under any means, and adding this matrix to our build system was not worth the effort.
|
||||
- `YUZU_USE_CPM` - This option once had a purpose, but that purpose has long since passed us by. *All* builds use CPMUtil to manage dependencies now.
|
||||
- If you want to *force* the usage of system dependencies, use `-DCPMUTIL_FORCE_SYSTEM=ON`.
|
||||
- `YUZU_USE_EXTERNAL_SDL` - This is now handled automatically. It was included even after CPM for purposes that have not applied for a very long time.
|
||||
|
||||
See `src/dynarmic/CMakeLists.txt` for additional options--usually, these don't need changed
|
||||
|
|
|
|||
|
|
@ -2,21 +2,27 @@
|
|||
|
||||
Are you just a casual user? Take a look at our [User Handbook](./user) then!
|
||||
|
||||
If you want to register/signup as a contributor, take a gander at the [signup guide](./SIGNUP.md).
|
||||
|
||||
This contains documentation created by developers. This contains build instructions, guidelines, instructions/layouts for [cool stuff we made](./CPMUtil), and more.
|
||||
|
||||
- **[General Build Instructions](Build.md)**
|
||||
- **[CMake Options](Options.md)**
|
||||
- **[Cross Compiling](CrossCompile.md)**
|
||||
- **[Development Guidelines](Development.md)**
|
||||
- **[Dependencies](Deps.md)**
|
||||
- **[General Build Instructions](./Build.md)**
|
||||
- **[CMake Options](./Options.md)**
|
||||
- **[Cross Compiling](./CrossCompile.md)**
|
||||
- **[Development Guidelines](./Development.md)**
|
||||
- **[Dependencies](./Deps.md)**
|
||||
- **[Debug Guidelines](./Debug.md)**
|
||||
- **[RenderDoc usage](./RenderDoc.md)**
|
||||
- **[CPM - CMake Package Manager](./CPMUtil)**
|
||||
- **[Platform-Specific Caveats](Caveats.md)**
|
||||
- **[Platform-Specific Caveats](./Caveats.md)**
|
||||
- **[The NVIDIA SM86 (Maxwell) GPU](./NvidiaGpu.md)**
|
||||
- **[Dynarmic](./dynarmic)**
|
||||
- **[Cross compilation](./CrossCompile.md)**
|
||||
- **[Driver Bugs](./DriverBugs.md)**
|
||||
- **[Building Older Commits](./build/OlderCommits.md)**
|
||||
- Subsystems:
|
||||
- **[Dynarmic](./dynarmic/README.md)**
|
||||
- **[HOS Kernel](./HosKernel.md)**
|
||||
- **[Settings](./Settings.md)**
|
||||
|
||||
## Policies
|
||||
|
||||
|
|
@ -25,3 +31,12 @@ Policies and information on development.
|
|||
- **[AI and LLM Usage](./policies/AI.md)**
|
||||
- **[Release Policy](./policies/Release.md)**
|
||||
- **[Coding guidelines](./policies/Coding.md)**
|
||||
- **[Coding Style guidelines](./policies/CodingStyle.md)**
|
||||
|
||||
## Externals
|
||||
|
||||
Other useful resources in general, take a quick read if you need.
|
||||
|
||||
- **[SwitchBrew](https://switchbrew.org/wiki/Main_Page)**
|
||||
- **[IPS file format](https://zerosoft.zophar.net/ips.php)**
|
||||
- **[IPSwitch file format](https://github.com/3096/ipswitch)**
|
||||
|
|
|
|||
52
docs/RenderDoc.md
Normal file
52
docs/RenderDoc.md
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# 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 at [renderdoc.org](https://renderdoc.org).
|
||||
|
||||
RenderDoc can capture Eden's Vulkan output when its Vulkan layer is loaded before Eden creates the Vulkan device. 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.
|
||||
|
||||
## Usage on Windows
|
||||
|
||||
You can either use RenderDoc UI to launch eden, or you can make eden attach it internally:
|
||||
|
||||
On Windows PowerShell:
|
||||
```powershell
|
||||
$env:ENABLE_VULKAN_RENDERDOC_CAPTURE='1'
|
||||
.\eden.exe
|
||||
```
|
||||
When RenderDoc is attached, Eden logs the default Windows capture folder:
|
||||
```text
|
||||
%LOCALAPPDATA%\Temp\RenderDoc
|
||||
```
|
||||
|
||||
Press RenderDoc's capture hotkey, usually `F12`, to capture a frame. To stop using RenderDoc, close Eden and launch it again without `ENABLE_VULKAN_RENDERDOC_CAPTURE`.
|
||||
|
||||
## Eden Hotkey
|
||||
|
||||
Eden also has a separate `Toggle Renderdoc Capture` hotkey behind the debug setting `renderdoc_hotkey`.
|
||||
That hotkey does not load or unload RenderDoc. It only toggles Eden's own manual capture through RenderDoc's API:
|
||||
|
||||
- first press: starts a capture
|
||||
- second press: ends that capture
|
||||
|
||||
## Simple checklist for debugging black screens using Renderdoc
|
||||
|
||||
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
|
||||
|
||||
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.
|
||||
327
docs/Settings.md
Normal file
327
docs/Settings.md
Normal file
|
|
@ -0,0 +1,327 @@
|
|||
# Settings
|
||||
|
||||
> [!WARNING]
|
||||
> This guide is intended for developers ONLY. If you're looking for configuring the emulator itself, please read **[the user handbook](./user/README.md)**.
|
||||
|
||||
Settings on the emulator are very important, toggles and such can be used to guard and/or add branches to paths where some games may crash while others won't, and viceversa.
|
||||
|
||||
However, this process can be tedious for those unfamiliar; this document serves as a outline/documentation for the settings subsystem.
|
||||
|
||||
## Index
|
||||
|
||||
* [Adding Debug Knobs](#adding-debug-knobs)
|
||||
* [Advantages](#advantages)
|
||||
* [Usage](#usage)
|
||||
* [Accessing Debug Knobs (dev side)](#accessing-debug-knobs-dev-side)
|
||||
* [Setting Debug Knobs (user side)](#setting-debug-knobs-user-side)
|
||||
* [Bit Manipulation Examples](#bit-manipulation-examples)
|
||||
* [Terminology and user communication](#terminology-and-user-communication)
|
||||
* [Examples](#examples)
|
||||
* [Example 1: Conditional Debug Logging](#example-1-conditional-debug-logging)
|
||||
* [Example 2: Performance Tuning](#example-2-performance-tuning)
|
||||
* [Example 3: Feature Gating](#example-3-feature-gating)
|
||||
* [Best Practices](#best-practices)
|
||||
* [Adding Boolean Settings Toggles](#adding-boolean-settings-toggles)
|
||||
* [Step 1 - Common Setting](#step-1-common-setting)
|
||||
* [Step 2 - Qt Toggle](#step-2-qt-toggle)
|
||||
* [Step 3 - Kotlin (Android)](#step-3-kotlin-android)
|
||||
* [Step 3.1 - BooleanSetting.kt](#step-3-1-booleansetting-kt)
|
||||
* [Step 3.2 - SettingsItem.kt](#step-3-2-settingsitem-kt)
|
||||
* [Step 3.3 - SettingsFragmentPresenter.kt](#step-3-3-settingsfragmentpresenter-kt)
|
||||
* [Step 3.4 - Localization](#step-3-4-localization)
|
||||
* [Step 4 - Use Your Toggle](#step-4-use-your-toggle)
|
||||
* [Best Practices](#best-practices)
|
||||
|
||||
## Adding Boolean Settings Toggles
|
||||
|
||||
This guide will walk you through adding a new boolean toggle setting to Eden's configuration across both Qt's (PC) and Kotlin's (Android) UIs.
|
||||
|
||||
---
|
||||
|
||||
### Step 1 - Common Setting
|
||||
|
||||
Firstly add your desired toggle:
|
||||
|
||||
Example: `src/common/setting.h`
|
||||
```cpp
|
||||
SwitchableSetting<bool> your_setting_name{linkage, false, "your_setting_name", Category::RendererExtensions};
|
||||
```
|
||||
|
||||
Remember to add your toggle to the appropriate category, for example:
|
||||
|
||||
Common Categories:
|
||||
|
||||
* Category::Renderer
|
||||
* Category::RendererAdvanced
|
||||
* Category::RendererExtensions
|
||||
* Category::System
|
||||
* Category::Core
|
||||
|
||||
> [!WARNING]
|
||||
> If you wish for your toggle to be `on by default` then change `false` to `true` after `linkage,`.
|
||||
|
||||
---
|
||||
|
||||
### Step 2 - Qt Toggle
|
||||
|
||||
Add the toggle to the Qt UI, where you wish for it to appear and place it there.
|
||||
|
||||
Example: `src/qt_common/config/shared_translation.cpp`
|
||||
```cpp
|
||||
INSERT(Settings,
|
||||
your_setting_name,
|
||||
tr("Your Setting Display Name"),
|
||||
tr("Detailed description of what this setting does.\n"
|
||||
"You can use multiple lines.\n"
|
||||
"Explain any caveats or requirements."));
|
||||
```
|
||||
|
||||
#### Make sure to:
|
||||
|
||||
* Keep display naming consistant
|
||||
* Put detailed info in the description
|
||||
* Use `\n` for line breaks in descriptions
|
||||
|
||||
---
|
||||
|
||||
### Step 3 - Kotlin (Android)
|
||||
|
||||
#### Step 3.1 - BooleanSetting.kt
|
||||
|
||||
Add where it should be in the settings.
|
||||
|
||||
Example: `src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt`
|
||||
```kts
|
||||
RENDERER_YOUR_SETTING_NAME("your_setting_name"),
|
||||
```
|
||||
|
||||
#### Make sure to:
|
||||
|
||||
* Ensure the prefix naming matches the intended category.
|
||||
|
||||
---
|
||||
|
||||
#### Step 3.2 - SettingsItem.kt
|
||||
|
||||
Add the toggle to the Kotlin (Android) UI
|
||||
|
||||
Example: `src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt`
|
||||
```kts
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.RENDERER_YOUR_SETTING_NAME,
|
||||
titleId = R.string.your_setting_name,
|
||||
descriptionId = R.string.your_setting_name_description
|
||||
)
|
||||
)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
#### Step 3.3 - SettingsFragmentPresenter.kt
|
||||
|
||||
Add your setting within the right category.
|
||||
|
||||
Example: `src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt`
|
||||
```kts
|
||||
add(BooleanSetting.RENDERER_YOUR_SETTING_NAME.key)
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
> Remember, placing matters! Settings appear in the order of where you add them.
|
||||
|
||||
---
|
||||
|
||||
#### Step 3.4 - Localization
|
||||
|
||||
Add your setting and description in the appropriate place.
|
||||
|
||||
Example: `src/android/app/src/main/res/values/strings.xml`
|
||||
```xml
|
||||
<string name="your_setting_name">Your Setting Display Name</string>
|
||||
<string name="your_setting_name_description">Detailed description of what this setting does. Explain any caveats, requirements, or warnings here.</string>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Step 4 - Use Your Toggle!
|
||||
|
||||
Now the UI part is done find a place in the code for the toggle,
|
||||
And use it to your heart's desire!
|
||||
|
||||
Example:
|
||||
```cpp
|
||||
const bool your_value = Settings::values.your_setting_name.GetValue();
|
||||
|
||||
if (your_value) {
|
||||
// Do something when enabled
|
||||
}
|
||||
```
|
||||
|
||||
If you wish to do something only when the toggle is disabled,
|
||||
Use `if (!your_value) {` instead of `if (your_value) {`.
|
||||
|
||||
---
|
||||
|
||||
### Best Practices
|
||||
|
||||
* Naming - Use clear, descriptive names. Something for both the devs and the users.
|
||||
* Defaults - Choose safe default values (usually false for new features).
|
||||
* Documentation - Write clear descriptions explaining when and why to use the setting.
|
||||
* Categories - Put settings in the appropriate category.
|
||||
* Order - Place related settings near each other.
|
||||
* Testing - Always test on both PC and Android before committing when possible.
|
||||
|
||||
Thank you for reading, I hope this guide helped you making your toggle!
|
||||
|
||||
## Adding Debug Knobs
|
||||
|
||||
Debug Knobs is a 16-bit integer setting (`debug_knobs`) in the Eden Emulator that serves as a bitmask for gating various testing and debugging features. This allows developers and advanced users to enable or disable specific debug behaviors without requiring deploying of complete but temporary toggles.
|
||||
|
||||
The setting ranges from 0 to 65535 (0x0000 to 0xFFFF), where each bit represents a different debug feature flag.
|
||||
|
||||
---
|
||||
|
||||
### Advantages
|
||||
|
||||
The main advantage is to avoid deploying new disposable toggles (those made only for testing stage, and are disposed once new feature gets good to merge). This empowers devs to be free of all frontend burocracy and hassle of new toggles.
|
||||
|
||||
Common advantages recap:
|
||||
|
||||
* **Fine-Grained Control**: Enable or disable up to 16 individual debug features independently using bit manipulation on a single build
|
||||
* **Runtime Configuration**: Change debug behavior at runtime the same way as new toggles would do
|
||||
* **Safe incremental development**: New debug features can be added while impact can be isolated from previous deployments
|
||||
|
||||
### Usage
|
||||
|
||||
#### Accessing Debug Knobs (dev side)
|
||||
|
||||
Use the `Settings::getDebugKnobAt(u8 i)` function to check if a specific bit is set:
|
||||
|
||||
```cpp
|
||||
//cpp side
|
||||
#include "common/settings.h"
|
||||
|
||||
// Check if bit 0 is set
|
||||
bool feature_enabled = Settings::getDebugKnobAt(0);
|
||||
|
||||
// Check if bit 15 is set
|
||||
bool another_feature = Settings::getDebugKnobAt(15);
|
||||
```
|
||||
|
||||
```kts
|
||||
//kotlin side
|
||||
import org.yuzu.yuzu_emu.features.settings.model.Settings
|
||||
|
||||
// Check if bit x is set
|
||||
bool feature_enabled = Settings.getDebugKnobAt(x); //x as integer from 0 to 15
|
||||
```
|
||||
|
||||
The function returns `true` if the specified bit (0-15) is set in the `debug_knobs` value, `false` otherwise.
|
||||
|
||||
#### Setting Debug Knobs (user side)
|
||||
|
||||
Developers must inform which knobs are tied to each functionality to be tested.
|
||||
|
||||
The debug knobs value can be set through:
|
||||
|
||||
1. **Desktop UI**: In the Debug configuration tab, there's a spinbox for "Debug knobs" (0-65535)
|
||||
2. **Android UI**: Available as an integer setting in the Debug section
|
||||
3. **Configuration Files**: Set the `debug_knobs` value in the emulator's configuration
|
||||
|
||||
#### Bit Manipulation Examples
|
||||
|
||||
To enable specific features, calculate the decimal value by setting the appropriate bits:
|
||||
|
||||
* **Enable only bit 0**: Value = 1 (2^0)
|
||||
* **Enable only bit 1**: Value = 2 (2^1)
|
||||
* **Enable bits 0 and 1**: Value = 3 (2^0 + 2^1)
|
||||
* **Enable bit 15**: Value = 32768 (2^15)
|
||||
|
||||
### Terminology and user communication
|
||||
|
||||
There are two main confusions when talking about knobs:
|
||||
|
||||
#### Whether it's zero-based or one-based
|
||||
|
||||
Sometimes when an user reports: knobs 1 and 2 gets better performance, dev may get confuse whether he means the knobs 1 and 2 literally, or the 1st and 2nd knobs (knobs 0 and 1).
|
||||
|
||||
Debug knobs are **zero-based**, which means:
|
||||
* The first knob is the knob(0) (or knob0 henceforth), and the last one is the 15 (knob15, likewise)
|
||||
* You can talk: "knob0 is enabled/disabled", "In this video i was using only knobs 0 and 2", etc.
|
||||
|
||||
#### Whether one is talking about the knob itself or about the entire parameter value (which represents all knobs)
|
||||
|
||||
Sometimes when an user reports: knob 3 results, it's unclear whether he's referring to knob setting with value 3 (which means both knob 0 and 1 are enabled), or to knob(3) specifically.
|
||||
Whenever you're instructing tests or reporting results, be precise about whether one you're talking to avoid confusion:
|
||||
|
||||
#### Setting based terminology
|
||||
|
||||
ALWAYS use the word in PLURAL (knobs), without mentioning which one, to refer to the setting, aka multiple knobs at once:
|
||||
Examples:
|
||||
- **knobs=0**: no knobs enabled
|
||||
- **knobs=1**: knob0 enabled, others disabled
|
||||
- **knobs=2**: knob1 enabled, others disabled
|
||||
- **knobs=3**: knobs 0 and 1 enabled, others disabled
|
||||
|
||||
...
|
||||
|
||||
#### Knob based terminology
|
||||
|
||||
Use the word in SINGULAR (knob), or in plural but referring which ones, when meaning multiple knobs at once:
|
||||
Examples:
|
||||
- **knob0**: knob 0 enabled, others disabled
|
||||
- **knob1**: knob 1 enabled, others disabled
|
||||
- **knobs 0 and 1**: knobs 0 and 1 enabled, others disabled
|
||||
|
||||
...
|
||||
|
||||
### Examples
|
||||
|
||||
#### Example 1: Conditional Debug Logging
|
||||
|
||||
```cpp
|
||||
void SomeFunction() {
|
||||
if (Settings::getDebugKnobAt(0)) {
|
||||
LOG_DEBUG(Common, "Debug feature 0 is enabled");
|
||||
// Additional debug code here
|
||||
}
|
||||
|
||||
if (Settings::getDebugKnobAt(1)) {
|
||||
LOG_DEBUG(Common, "Debug feature 1 is enabled");
|
||||
// Different debug behavior
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Example 2: Performance Tuning
|
||||
|
||||
```cpp
|
||||
bool UseOptimizedPath() {
|
||||
// Skip optimization if debug bit 2 is set for testing
|
||||
return !Settings::getDebugKnobAt(2);
|
||||
}
|
||||
```
|
||||
|
||||
#### Example 3: Feature Gating
|
||||
|
||||
```cpp
|
||||
void ExperimentalFeature() {
|
||||
static constexpr u8 EXPERIMENTAL_FEATURE_BIT = 3;
|
||||
|
||||
if (!Settings::getDebugKnobAt(EXPERIMENTAL_FEATURE_BIT)) {
|
||||
// Fallback to stable implementation
|
||||
StableImplementation();
|
||||
return;
|
||||
}
|
||||
|
||||
// Experimental implementation
|
||||
ExperimentalImplementation();
|
||||
}
|
||||
```
|
||||
|
||||
### Best Practices
|
||||
|
||||
* This setting is intended for development and testing purposes only
|
||||
* Knobs must be unwired before PR creation
|
||||
* The setting is per-game configurable, allowing different debug setups for different titles
|
||||
|
|
@ -1,126 +1,70 @@
|
|||
# Coding guidelines
|
||||
|
||||
These are mostly "suggestions", if you feel like your code is readable, comprehensible to others; and most importantly doesn't result in unreadable spaghetti you're fine to go.
|
||||
These are **not** stylistic guidelines, they're, for the most part, suggestions on how to architecture new systems or improve upon the existing codebase.
|
||||
|
||||
But for new developers you may find that following these guidelines will make everything x10 easier.
|
||||
# Foreword
|
||||
|
||||
## Naming conventions
|
||||
Don't try to micro-optimize out of the get go, while yes, most of the code is pretty, subpar, most of these are aftertoughts and details that can be glossed over **generally**.
|
||||
|
||||
Simply put, types/classes are named as `PascalCase`, same for methods and functions like `AddElement`. Variables are named `like_this_snake_case` and constants are `IN_SCREAMING_CASE`.
|
||||
Architectural issues are more important, for example an API returning a `std::string` is not as efficient as one that operates on `std::string_view` directly (cost of constructing an `std::string` w/o small-string optimization and all of that).
|
||||
|
||||
Except for Qt MOC where `functionName` is preferred.
|
||||
Regardless of the details, try to keep things simple. As a general rule of thumb.
|
||||
|
||||
Template typenames prefer short names like `T`, `I`, `U`, if a longer name is required either `Iterator` or `perform_action` are fine as well. Do not use names like `SS` as systems like solaris define it for registers, in general do not use any of the following for short names:
|
||||
# C++ guidelines
|
||||
|
||||
- `SS`, `DS`, `GS`, `FS`: Segment registers, defined by Solaris `<ucontext.h>`
|
||||
- `EAX`, `EBX`, `ECX`, `EDX`, `ESI`, `EDI`, `ESP`, `EBP`, `EIP`: Registers, defined by Solaris.
|
||||
- `X`: Defined by some utility headers, avoid.
|
||||
- `_`: Defined by gettext, avoid.
|
||||
- `N`, `M`, `S`: Preferably don't use this for types, use it for numeric constants.
|
||||
- `TR`: Used by some weird `<ucontext.h>` whom define the Task Register as a logical register to provide to the user... (Need to remember which OS in specific).
|
||||
Everyone has their own way of viewing good/bad C++ practices, my general outline:
|
||||
|
||||
Macros must always be in `SCREAMING_CASE`. Do not use short letter macros as systems like Solaris will conflict with them; a good rule of thumb is >5 characters per macro - i.e `THIS_MACRO_IS_GOOD`, `AND_ALSO_THIS_ONE`.
|
||||
- At your disposal you may use `boost::container::static_vector<>` (beware it has a ctor/initialization cost which goes up the more elements you add).
|
||||
- Or you may use `boost::container::small_vector<>` (which has an initialization cost as well, and will use extra book-keeping for heap, try to keep a balance).
|
||||
- Don't use `[[likely]]` or `[[unlikely]]`; PGO builds exist for that.
|
||||
- Don't use inline assembly to try to outsmart the compiler unless you're 100% sure the assembly you're writing is actually good.
|
||||
- And if so, try to restructure your C++ code so the compiler vectorizes it/makes it better, right?
|
||||
- Or if that fails, use intrinsics instead of raw `asm volatile`.
|
||||
- Use `std::optional<>` instead of `std::unique_ptr<>` if possible.
|
||||
- `std::unique_ptr<>` carries indirection cost due to it being memory allocated on the heap.
|
||||
- It isn't often that objects that contain `std::unique_ptr<>`, are allocated on the heap themselves, allocating even more things on the heap seems redundant.
|
||||
- Avoid `std::recursive_mutex` at all costs.
|
||||
- It's basically implemented as a linked list most of the time and has HEAVY performance penalties.
|
||||
- Exploit the fact `std::atomic<uint32_t>/std::atomic<int32_t>` is basically free on most arches that matter.
|
||||
- In x86_64, an atomic `uint32_t` is basically `mov [m32], r32`, which is essentially free/cheap.
|
||||
- Avoid template parameters unless you really need them.
|
||||
- For small inlineable functions this is fine, for more complex ones, please consider the generated assembly.
|
||||
- Dont make your own memcpy/memset/strcpy/strncpy/etc.
|
||||
- Seriously DON'T DO THIS. You will NOT beat the compiler.
|
||||
- Nor 30 years of writing optimized `mem*`.
|
||||
- If your code is slow, don't blame `mem*`, blame your code.
|
||||
- Try to avoid using `virtual` since vtable indirection has a cost
|
||||
- Avoid `dynamic_cast` and `typeid` at all costs.
|
||||
- The reason is because the project has `-fno-rtti` disabled by default, due to the costs of dynamic polymorphism.
|
||||
- Always copy-on-value for objects with `sizeof(void *) >= sizeof(T) * 2`, i.e objects sized as 2 pointers or less, for bigger objects you can use ref/pointer as usual.
|
||||
- Try using move semantics instead of references, whenever possible.
|
||||
- Remember function parameters are extremelly cheap as fuck, don't be afraid to place upto 8 parameters on a given function.
|
||||
- Don't save a reference in structures of a parent object, i.e:
|
||||
```c++
|
||||
struct Child {
|
||||
Parent& parent;
|
||||
void Mehod() {
|
||||
parent.Something();
|
||||
}
|
||||
};
|
||||
```
|
||||
- Instead you can do the following:
|
||||
```c++
|
||||
struct Child {
|
||||
void Mehod(Parent& parent) {
|
||||
parent.Something();
|
||||
}
|
||||
};
|
||||
```
|
||||
- This reduces the amount of pointers you have lying around, and also works better because of the aforementioned cheapness of parameter functions.
|
||||
|
||||
Try not using hungarian notation, if you're able.
|
||||
# Engineering guidelines
|
||||
|
||||
## Formatting
|
||||
Coding isn't also writing stuff but architecturing stuff, consider the following:
|
||||
|
||||
Formatting is extremelly lax, the general rule of thumb is: Don't add new lines just to increase line count. The less lines we have to look at, the better. This means also packing densely your code while not making it a clusterfuck. Strike a balance of "this is a short and comprehensible piece of code" and "my eyes are actually happy to see this!". Don't just drop the entire thing in a single line and call it "dense code", that's just spaghetti posing as code. In general, be mindful of what other devs need to look at.
|
||||
|
||||
Do not put if/while/etc braces after lines:
|
||||
|
||||
```c++
|
||||
// no dont do this
|
||||
// this is more lines of code for no good reason (why braces need their separate lines?)
|
||||
// and those take space in someone's screen, cumulatively
|
||||
if (thing)
|
||||
{ //<--
|
||||
some(); // ...
|
||||
} //<-- 2 lines of code for basically "opening" and "closing" an statment
|
||||
|
||||
// do this
|
||||
if (thing) { //<-- [...] and with your brain you can deduce it's this piece of code
|
||||
// that's being closed
|
||||
some(); // ...
|
||||
} //<-- only one line, and it's clearer since you know its closing something [...]
|
||||
|
||||
// or this, albeit the extra line isn't needed (at your discretion of course)
|
||||
if (thing)
|
||||
some(); // ...
|
||||
|
||||
// this is also ok, keeps things in one line and makes it extremely clear
|
||||
if (thing) some();
|
||||
|
||||
// NOT ok, don't be "clever" and use the comma operator to stash a bunch of statments
|
||||
// in a single line, doing this will definitely ruin someone's day - just do the thing below
|
||||
// vvv
|
||||
if (thing) some(), thing(), a2(a1(), y1(), j1()), do_complex_shit(wa(), wo(), ploo());
|
||||
// ... and in general don't use the comma operator for "multiple statments", EXCEPT if you think
|
||||
// that it makes the code more readable (the situation may be rare however)
|
||||
|
||||
// Wow so much clearer! Now I can actually see what each statment is meant to do!
|
||||
if (thing) {
|
||||
some();
|
||||
thing();
|
||||
a2(a1(), y1(), j1());
|
||||
do_complex_shit(wa(), wo(), ploo());
|
||||
}
|
||||
```
|
||||
|
||||
Brace rules are lax, if you can get the point across, do it:
|
||||
|
||||
```c++
|
||||
// this is fine
|
||||
do {
|
||||
if (thing) {
|
||||
return 0;
|
||||
}
|
||||
} while (other);
|
||||
|
||||
// this is also ok --- albeit a bit more dense
|
||||
do if (thing) return 0; while (other);
|
||||
|
||||
// ok as well
|
||||
do {
|
||||
if (thing) return 0;
|
||||
} while (other);
|
||||
```
|
||||
|
||||
There is no 80-column limit but preferably be mindful of other developer's readability (like don't just put everything onto one line).
|
||||
|
||||
```c++
|
||||
// someone is going to be mad due to this
|
||||
SDL_AudioSpec obtained;
|
||||
device_name.empty() ? device = SDL_OpenAudioDevice(nullptr, capture, &spec, &obtained, false) : device = SDL_OpenAudioDevice(device_name.c_str(), capture, &spec, &obtained, false);
|
||||
|
||||
// maybe consider this
|
||||
SDL_AudioSpec obtained;
|
||||
if (device_name.empty()) {
|
||||
device = SDL_OpenAudioDevice(nullptr, capture, &spec, &obtained, false);
|
||||
} else {
|
||||
device = SDL_OpenAudioDevice(device_name.c_str(), capture, &spec, &obtained, false);
|
||||
}
|
||||
|
||||
// or this is fine as well
|
||||
SDL_AudioSpec obtained;
|
||||
device = SDL_OpenAudioDevice(device_name.empty() ? nullptr : device_name.c_str(), capture, &spec, &obtained, false);
|
||||
```
|
||||
|
||||
A note about operators: Use them sparingly, yes, the language is lax on them, but some usages can be... tripping to say the least.
|
||||
|
||||
```c++
|
||||
a, b, c; //<-- NOT OK multiple statments with comma operator is definitely a recipe for disaster
|
||||
return c ? a : b; //<-- OK ternaries at end of return statments are clear and fine
|
||||
return a, b; //<-- NOT OK return will take value of `b` but also evaluate `a`, just use a separate statment
|
||||
void f(int a[]) //<-- OK? if you intend to use the pointer as an array, otherwise just mark it as *
|
||||
```
|
||||
|
||||
And about templates, use them sparingly, don't just do meta-templating for the sake of it, do it when you actually need it. This isn't a competition to see who can make the most complicated and robust meta-templating system. Just use what works, and preferably stick to the standard libary instead of reinventing the wheel. Additionally:
|
||||
|
||||
```c++
|
||||
// NOT OK This will create (T * N * C * P) versions of the same function. DO. NOT. DO. THIS.
|
||||
template<typename T, size_t N, size_t C, size_t P> inline void what() const noexcept;
|
||||
|
||||
// OK use parameters like a normal person, don't be afraid to use them :)
|
||||
template<typename T> inline void what(size_t n, size_t c, size_t p) const noexcept;
|
||||
```
|
||||
- Try to reduce dependency on... dependencies
|
||||
- While some dependencies are useful `boost::container` and `fmt` to name a few, remember each dependency added incurs a cost.
|
||||
- It may also be subpar with a hand rolled implementation, biggest exemplar of this is `spirv-tools` providing subpar SPIRV optimizations in comparison to the in-house optimizer.
|
||||
- Try to rely less on indirection for architecturing systems
|
||||
- If the underlying HLE kernel emulation requires it, try making a solution that keeps things local
|
||||
- For example, there isn't a need for file descriptors to each be a pointer, when they could be a fixed table size with elements that may be emplaced at will.
|
||||
|
|
|
|||
126
docs/policies/CodingStyle.md
Normal file
126
docs/policies/CodingStyle.md
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
# Coding Style guidelines
|
||||
|
||||
These are mostly "suggestions", if you feel like your code is readable, comprehensible to others; and most importantly doesn't result in unreadable spaghetti you're fine to go.
|
||||
|
||||
But for new developers you may find that following these guidelines will make everything x10 easier.
|
||||
|
||||
## Naming conventions
|
||||
|
||||
Simply put, types/classes are named as `PascalCase`, same for methods and functions like `AddElement`. Variables are named `like_this_snake_case` and constants are `IN_SCREAMING_CASE`.
|
||||
|
||||
Except for Qt MOC where `functionName` is preferred.
|
||||
|
||||
Template typenames prefer short names like `T`, `I`, `U`, if a longer name is required either `Iterator` or `perform_action` are fine as well. Do not use names like `SS` as systems like solaris define it for registers, in general do not use any of the following for short names:
|
||||
|
||||
- `SS`, `DS`, `GS`, `FS`: Segment registers, defined by Solaris `<ucontext.h>`
|
||||
- `EAX`, `EBX`, `ECX`, `EDX`, `ESI`, `EDI`, `ESP`, `EBP`, `EIP`: Registers, defined by Solaris.
|
||||
- `X`: Defined by some utility headers, avoid.
|
||||
- `_`: Defined by gettext, avoid.
|
||||
- `N`, `M`, `S`: Preferably don't use this for types, use it for numeric constants.
|
||||
- `TR`: Used by some weird `<ucontext.h>` whom define the Task Register as a logical register to provide to the user... (Need to remember which OS in specific).
|
||||
|
||||
Macros must always be in `SCREAMING_CASE`. Do not use short letter macros as systems like Solaris will conflict with them; a good rule of thumb is >5 characters per macro - i.e `THIS_MACRO_IS_GOOD`, `AND_ALSO_THIS_ONE`.
|
||||
|
||||
Try not using hungarian notation, if you're able.
|
||||
|
||||
## Formatting
|
||||
|
||||
Formatting is extremelly lax, the general rule of thumb is: Don't add new lines just to increase line count. The less lines we have to look at, the better. This means also packing densely your code while not making it a clusterfuck. Strike a balance of "this is a short and comprehensible piece of code" and "my eyes are actually happy to see this!". Don't just drop the entire thing in a single line and call it "dense code", that's just spaghetti posing as code. In general, be mindful of what other devs need to look at.
|
||||
|
||||
Do not put if/while/etc braces after lines:
|
||||
|
||||
```c++
|
||||
// no dont do this
|
||||
// this is more lines of code for no good reason (why braces need their separate lines?)
|
||||
// and those take space in someone's screen, cumulatively
|
||||
if (thing)
|
||||
{ //<--
|
||||
some(); // ...
|
||||
} //<-- 2 lines of code for basically "opening" and "closing" an statment
|
||||
|
||||
// do this
|
||||
if (thing) { //<-- [...] and with your brain you can deduce it's this piece of code
|
||||
// that's being closed
|
||||
some(); // ...
|
||||
} //<-- only one line, and it's clearer since you know its closing something [...]
|
||||
|
||||
// or this, albeit the extra line isn't needed (at your discretion of course)
|
||||
if (thing)
|
||||
some(); // ...
|
||||
|
||||
// this is also ok, keeps things in one line and makes it extremely clear
|
||||
if (thing) some();
|
||||
|
||||
// NOT ok, don't be "clever" and use the comma operator to stash a bunch of statments
|
||||
// in a single line, doing this will definitely ruin someone's day - just do the thing below
|
||||
// vvv
|
||||
if (thing) some(), thing(), a2(a1(), y1(), j1()), do_complex_shit(wa(), wo(), ploo());
|
||||
// ... and in general don't use the comma operator for "multiple statments", EXCEPT if you think
|
||||
// that it makes the code more readable (the situation may be rare however)
|
||||
|
||||
// Wow so much clearer! Now I can actually see what each statment is meant to do!
|
||||
if (thing) {
|
||||
some();
|
||||
thing();
|
||||
a2(a1(), y1(), j1());
|
||||
do_complex_shit(wa(), wo(), ploo());
|
||||
}
|
||||
```
|
||||
|
||||
Brace rules are lax, if you can get the point across, do it:
|
||||
|
||||
```c++
|
||||
// this is fine
|
||||
do {
|
||||
if (thing) {
|
||||
return 0;
|
||||
}
|
||||
} while (other);
|
||||
|
||||
// this is also ok --- albeit a bit more dense
|
||||
do if (thing) return 0; while (other);
|
||||
|
||||
// ok as well
|
||||
do {
|
||||
if (thing) return 0;
|
||||
} while (other);
|
||||
```
|
||||
|
||||
There is no 80-column limit but preferably be mindful of other developer's readability (like don't just put everything onto one line).
|
||||
|
||||
```c++
|
||||
// someone is going to be mad due to this
|
||||
SDL_AudioSpec obtained;
|
||||
device_name.empty() ? device = SDL_OpenAudioDevice(nullptr, capture, &spec, &obtained, false) : device = SDL_OpenAudioDevice(device_name.c_str(), capture, &spec, &obtained, false);
|
||||
|
||||
// maybe consider this
|
||||
SDL_AudioSpec obtained;
|
||||
if (device_name.empty()) {
|
||||
device = SDL_OpenAudioDevice(nullptr, capture, &spec, &obtained, false);
|
||||
} else {
|
||||
device = SDL_OpenAudioDevice(device_name.c_str(), capture, &spec, &obtained, false);
|
||||
}
|
||||
|
||||
// or this is fine as well
|
||||
SDL_AudioSpec obtained;
|
||||
device = SDL_OpenAudioDevice(device_name.empty() ? nullptr : device_name.c_str(), capture, &spec, &obtained, false);
|
||||
```
|
||||
|
||||
A note about operators: Use them sparingly, yes, the language is lax on them, but some usages can be... tripping to say the least.
|
||||
|
||||
```c++
|
||||
a, b, c; //<-- NOT OK multiple statments with comma operator is definitely a recipe for disaster
|
||||
return c ? a : b; //<-- OK ternaries at end of return statments are clear and fine
|
||||
return a, b; //<-- NOT OK return will take value of `b` but also evaluate `a`, just use a separate statment
|
||||
void f(int a[]) //<-- OK? if you intend to use the pointer as an array, otherwise just mark it as *
|
||||
```
|
||||
|
||||
And about templates, use them sparingly, don't just do meta-templating for the sake of it, do it when you actually need it. This isn't a competition to see who can make the most complicated and robust meta-templating system. Just use what works, and preferably stick to the standard libary instead of reinventing the wheel. Additionally:
|
||||
|
||||
```c++
|
||||
// NOT OK This will create (T * N * C * P) versions of the same function. DO. NOT. DO. THIS.
|
||||
template<typename T, size_t N, size_t C, size_t P> inline void what() const noexcept;
|
||||
|
||||
// OK use parameters like a normal person, don't be afraid to use them :)
|
||||
template<typename T> inline void what(size_t n, size_t c, size_t p) const noexcept;
|
||||
```
|
||||
|
|
@ -1,159 +0,0 @@
|
|||
# User Handbook - Adding Boolean Settings Toggles
|
||||
|
||||
> [!WARNING]
|
||||
> This guide is intended for developers ONLY. If you are not a developer, this likely irrelevant to yourself.
|
||||
>
|
||||
> If you want to add temporary toggles, please refer to **[Adding Debug Knobs](AddingDebugKnobs.md)**
|
||||
|
||||
This guide will walk you through adding a new boolean toggle setting to Eden's configuration across both Qt's (PC) and Kotlin's (Android) UIs.
|
||||
|
||||
## Index
|
||||
|
||||
1. [Step 1 - Common Setting](#step-1-common-setting)
|
||||
2. [Step 2 - Qt Toggle](#step-2-qt-toggle)
|
||||
3. [Step 3 - Kotlin (Android)](#step-3-kotlin-android)
|
||||
|
||||
* [Step 3.1 - BooleanSetting.kt](#step-3-1-booleansetting-kt)
|
||||
* [Step 3.2 - SettingsItem.kt](#step-3-2-settingsitem-kt)
|
||||
* [Step 3.3 - SettingsFragmentPresenter.kt](#step-3-3-settingsfragmentpresenter-kt)
|
||||
* [Step 3.4 - Localization](#step-3-4-localization)
|
||||
4. [Step 4 - Use Your Toggle](#step-4-use-your-toggle)
|
||||
5. [Best Practices](#best-practices)
|
||||
|
||||
---
|
||||
|
||||
## Step 1 - Common Setting
|
||||
|
||||
Firstly add your desired toggle:
|
||||
|
||||
Example: `src/common/setting.h`
|
||||
```cpp
|
||||
SwitchableSetting<bool> your_setting_name{linkage, false, "your_setting_name", Category::RendererExtensions};
|
||||
```
|
||||
|
||||
### Remember to add your toggle to the appropriate category, for example:
|
||||
|
||||
Common Categories:
|
||||
|
||||
* Category::Renderer
|
||||
* Category::RendererAdvanced
|
||||
* Category::RendererExtensions
|
||||
* Category::System
|
||||
* Category::Core
|
||||
|
||||
> [!WARNING]
|
||||
> If you wish for your toggle to be `on by default` then change `false` to `true` after `linkage,`.
|
||||
|
||||
---
|
||||
|
||||
## Step 2 - Qt Toggle
|
||||
|
||||
Add the toggle to the Qt UI, where you wish for it to appear and place it there.
|
||||
|
||||
Example: `src/qt_common/config/shared_translation.cpp`
|
||||
```cpp
|
||||
INSERT(Settings,
|
||||
your_setting_name,
|
||||
tr("Your Setting Display Name"),
|
||||
tr("Detailed description of what this setting does.\n"
|
||||
"You can use multiple lines.\n"
|
||||
"Explain any caveats or requirements."));
|
||||
```
|
||||
|
||||
### Make sure to:
|
||||
|
||||
* Keep display naming consistant
|
||||
* Put detailed info in the description
|
||||
* Use `\n` for line breaks in descriptions
|
||||
|
||||
---
|
||||
|
||||
## Step 3 - Kotlin (Android)
|
||||
|
||||
### Step 3.1 - BooleanSetting.kt
|
||||
|
||||
Add where it should be in the settings.
|
||||
|
||||
Example: `src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt`
|
||||
```kts
|
||||
RENDERER_YOUR_SETTING_NAME("your_setting_name"),
|
||||
```
|
||||
|
||||
### Make sure to:
|
||||
|
||||
* Ensure the prefix naming matches the intended category.
|
||||
|
||||
---
|
||||
|
||||
### Step 3.2 - SettingsItem.kt
|
||||
|
||||
Add the toggle to the Kotlin (Android) UI
|
||||
|
||||
Example: `src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt`
|
||||
```kts
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.RENDERER_YOUR_SETTING_NAME,
|
||||
titleId = R.string.your_setting_name,
|
||||
descriptionId = R.string.your_setting_name_description
|
||||
)
|
||||
)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Step 3.3 - SettingsFragmentPresenter.kt
|
||||
|
||||
Add your setting within the right category.
|
||||
|
||||
Example: `src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt`
|
||||
```kts
|
||||
add(BooleanSetting.RENDERER_YOUR_SETTING_NAME.key)
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
> Remember, placing matters! Settings appear in the order of where you add them.
|
||||
|
||||
---
|
||||
|
||||
### Step 3.4 - Localization
|
||||
|
||||
Add your setting and description in the appropriate place.
|
||||
|
||||
Example: `src/android/app/src/main/res/values/strings.xml`
|
||||
```xml
|
||||
<string name="your_setting_name">Your Setting Display Name</string>
|
||||
<string name="your_setting_name_description">Detailed description of what this setting does. Explain any caveats, requirements, or warnings here.</string>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Step 4 - Use Your Toggle!
|
||||
|
||||
Now the UI part is done find a place in the code for the toggle,
|
||||
And use it to your heart's desire!
|
||||
|
||||
Example:
|
||||
```cpp
|
||||
const bool your_value = Settings::values.your_setting_name.GetValue();
|
||||
|
||||
if (your_value) {
|
||||
// Do something when enabled
|
||||
}
|
||||
```
|
||||
|
||||
If you wish to do something only when the toggle is disabled,
|
||||
Use `if (!your_value) {` instead of `if (your_value) {`.
|
||||
|
||||
---
|
||||
|
||||
## Best Practices
|
||||
|
||||
* Naming - Use clear, descriptive names. Something for both the devs and the users.
|
||||
* Defaults - Choose safe default values (usually false for new features).
|
||||
* Documentation - Write clear descriptions explaining when and why to use the setting.
|
||||
* Categories - Put settings in the appropriate category.
|
||||
* Order - Place related settings near each other.
|
||||
* Testing - Always test on both PC and Android before committing when possible.
|
||||
|
||||
### Thank you for reading, I hope this guide helped you making your toggle!
|
||||
|
|
@ -1,167 +0,0 @@
|
|||
# User Handbook - Adding Debug Knobs
|
||||
|
||||
Debug Knobs is a 16-bit integer setting (`debug_knobs`) in the Eden Emulator that serves as a bitmask for gating various testing and debugging features. This allows developers and advanced users to enable or disable specific debug behaviors without requiring deploying of complete but temporary toggles.
|
||||
|
||||
The setting ranges from 0 to 65535 (0x0000 to 0xFFFF), where each bit represents a different debug feature flag.
|
||||
|
||||
## Index
|
||||
|
||||
1. [Advantages](#advantages)
|
||||
2. [Usage](#usage)
|
||||
|
||||
* [Accessing Debug Knobs (dev side)](#accessing-debug-knobs-dev-side)
|
||||
* [Setting Debug Knobs (user side)](#setting-debug-knobs-user-side)
|
||||
* [Bit Manipulation Examples](#bit-manipulation-examples)
|
||||
3. [Terminology and user communication](#terminology-and-user-communication)
|
||||
4. [Examples](#examples)
|
||||
|
||||
* [Example 1: Conditional Debug Logging](#example-1-conditional-debug-logging)
|
||||
* [Example 2: Performance Tuning](#example-2-performance-tuning)
|
||||
* [Example 3: Feature Gating](#example-3-feature-gating)
|
||||
5. [Best Practices](#best-practices)
|
||||
|
||||
---
|
||||
|
||||
## Advantages
|
||||
|
||||
The main advantage is to avoid deploying new disposable toggles (those made only for testing stage, and are disposed once new feature gets good to merge). This empowers devs to be free of all frontend burocracy and hassle of new toggles.
|
||||
|
||||
Common advantages recap:
|
||||
|
||||
* **Fine-Grained Control**: Enable or disable up to 16 individual debug features independently using bit manipulation on a single build
|
||||
* **Runtime Configuration**: Change debug behavior at runtime the same way as new toggles would do
|
||||
* **Safe incremental development**: New debug features can be added while impact can be isolated from previous deployments
|
||||
|
||||
## Usage
|
||||
|
||||
### Accessing Debug Knobs (dev side)
|
||||
|
||||
Use the `Settings::getDebugKnobAt(u8 i)` function to check if a specific bit is set:
|
||||
|
||||
```cpp
|
||||
//cpp side
|
||||
#include "common/settings.h"
|
||||
|
||||
// Check if bit 0 is set
|
||||
bool feature_enabled = Settings::getDebugKnobAt(0);
|
||||
|
||||
// Check if bit 15 is set
|
||||
bool another_feature = Settings::getDebugKnobAt(15);
|
||||
```
|
||||
|
||||
```kts
|
||||
//kotlin side
|
||||
import org.yuzu.yuzu_emu.features.settings.model.Settings
|
||||
|
||||
// Check if bit x is set
|
||||
bool feature_enabled = Settings.getDebugKnobAt(x); //x as integer from 0 to 15
|
||||
```
|
||||
|
||||
The function returns `true` if the specified bit (0-15) is set in the `debug_knobs` value, `false` otherwise.
|
||||
|
||||
### Setting Debug Knobs (user side)
|
||||
|
||||
Developers must inform which knobs are tied to each functionality to be tested.
|
||||
|
||||
The debug knobs value can be set through:
|
||||
|
||||
1. **Desktop UI**: In the Debug configuration tab, there's a spinbox for "Debug knobs" (0-65535)
|
||||
2. **Android UI**: Available as an integer setting in the Debug section
|
||||
3. **Configuration Files**: Set the `debug_knobs` value in the emulator's configuration
|
||||
|
||||
### Bit Manipulation Examples
|
||||
|
||||
To enable specific features, calculate the decimal value by setting the appropriate bits:
|
||||
|
||||
* **Enable only bit 0**: Value = 1 (2^0)
|
||||
* **Enable only bit 1**: Value = 2 (2^1)
|
||||
* **Enable bits 0 and 1**: Value = 3 (2^0 + 2^1)
|
||||
* **Enable bit 15**: Value = 32768 (2^15)
|
||||
|
||||
## Terminology and user communication
|
||||
|
||||
There are two main confusions when talking about knobs:
|
||||
|
||||
### Whether it's zero-based or one-based
|
||||
|
||||
Sometimes when an user reports: knobs 1 and 2 gets better performance, dev may get confuse whether he means the knobs 1 and 2 literally, or the 1st and 2nd knobs (knobs 0 and 1).
|
||||
|
||||
Debug knobs are **zero-based**, which means:
|
||||
* The first knob is the knob(0) (or knob0 henceforth), and the last one is the 15 (knob15, likewise)
|
||||
* You can talk: "knob0 is enabled/disabled", "In this video i was using only knobs 0 and 2", etc.
|
||||
|
||||
### Whether one is talking about the knob itself or about the entire parameter value (which represents all knobs)
|
||||
|
||||
Sometimes when an user reports: knob 3 results, it's unclear whether he's referring to knob setting with value 3 (which means both knob 0 and 1 are enabled), or to knob(3) specifically.
|
||||
Whenever you're instructing tests or reporting results, be precise about whether one you're talking to avoid confusion:
|
||||
|
||||
### Setting based terminology
|
||||
|
||||
ALWAYS use the word in PLURAL (knobs), without mentioning which one, to refer to the setting, aka multiple knobs at once:
|
||||
Examples:
|
||||
- **knobs=0**: no knobs enabled
|
||||
- **knobs=1**: knob0 enabled, others disabled
|
||||
- **knobs=2**: knob1 enabled, others disabled
|
||||
- **knobs=3**: knobs 0 and 1 enabled, others disabled
|
||||
|
||||
...
|
||||
|
||||
### Knob based terminology
|
||||
|
||||
Use the word in SINGULAR (knob), or in plural but referring which ones, when meaning multiple knobs at once:
|
||||
Examples:
|
||||
- **knob0**: knob 0 enabled, others disabled
|
||||
- **knob1**: knob 1 enabled, others disabled
|
||||
- **knobs 0 and 1**: knobs 0 and 1 enabled, others disabled
|
||||
|
||||
...
|
||||
|
||||
## Examples
|
||||
|
||||
### Example 1: Conditional Debug Logging
|
||||
|
||||
```cpp
|
||||
void SomeFunction() {
|
||||
if (Settings::getDebugKnobAt(0)) {
|
||||
LOG_DEBUG(Common, "Debug feature 0 is enabled");
|
||||
// Additional debug code here
|
||||
}
|
||||
|
||||
if (Settings::getDebugKnobAt(1)) {
|
||||
LOG_DEBUG(Common, "Debug feature 1 is enabled");
|
||||
// Different debug behavior
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Example 2: Performance Tuning
|
||||
|
||||
```cpp
|
||||
bool UseOptimizedPath() {
|
||||
// Skip optimization if debug bit 2 is set for testing
|
||||
return !Settings::getDebugKnobAt(2);
|
||||
}
|
||||
```
|
||||
|
||||
### Example 3: Feature Gating
|
||||
|
||||
```cpp
|
||||
void ExperimentalFeature() {
|
||||
static constexpr u8 EXPERIMENTAL_FEATURE_BIT = 3;
|
||||
|
||||
if (!Settings::getDebugKnobAt(EXPERIMENTAL_FEATURE_BIT)) {
|
||||
// Fallback to stable implementation
|
||||
StableImplementation();
|
||||
return;
|
||||
}
|
||||
|
||||
// Experimental implementation
|
||||
ExperimentalImplementation();
|
||||
}
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
* This setting is intended for development and testing purposes only
|
||||
* Knobs must be unwired before PR creation
|
||||
* The setting is per-game configurable, allowing different debug setups for different titles
|
||||
|
|
@ -40,7 +40,7 @@ Windows/riscv64 doesn't exist, and may never (until corporate greed no longer co
|
|||
|
||||
Android/riscv64 is interesting. While support for it may be added if and when RISC-V phones/handhelds ever go mainstream, arm64 devices will always be preferred due to NCE.
|
||||
|
||||
Only Fedora/riscv64 has been tested, but in theory, every riscv64 distribution that has *at least* the standard build tools, Qt, FFmpeg, and SDL2 should work.
|
||||
Only Fedora/riscv64 has been tested, but in theory, every riscv64 distribution that has *at least* the standard build tools, Qt, FFmpeg, and SDL3 should work.
|
||||
|
||||
## Other
|
||||
|
||||
|
|
|
|||
|
|
@ -9,3 +9,11 @@ At the moment of writing, we do not support CFW such as Atmosphere, due to:
|
|||
We do however, maintain HLE compatibility with the former mentioned CFW, applications that require Atmosphere to run will run fine in the emulator without any adjustments.
|
||||
|
||||
If they don't run - then that's a bug!
|
||||
|
||||
## Atmosphere
|
||||
|
||||
Fusee Galee, the bootloader and other low-level mechanisms are not emulated at the moment.
|
||||
|
||||
Having OFW is recommended, but may not be required (untested).
|
||||
|
||||
Extract the contents of Atmosphere into `sdmc`. Then to launch simply use `-hlaunch` instead (orthogonal to `-qlaunch`).
|
||||
|
|
|
|||
|
|
@ -1,17 +1,22 @@
|
|||
# User Handbook - Command Line
|
||||
|
||||
There are two main applications, an SDL2 based app (`eden-cli`) and a Qt based app (`eden`); both accept command line arguments.
|
||||
There are two main applications, an SDL-based app (`eden-cli`) and a Qt based app (`eden`); both accept command line arguments.
|
||||
|
||||
## eden
|
||||
|
||||
- `./eden <path>`: Running with a single argument and nothing else, will make the emulator look for the given file and load it, this behaviour is similar to `eden-cli`; allows dragging and dropping games into the application.
|
||||
- `-g <path>`: Alternate way to specify what to load, overrides. However let it be noted that arguments that use `-` will be treated as options/ignored, if your game, for some reason, starts with `-`, in order to safely handle it you may need to specify it as an argument.
|
||||
- `-f`: Use fullscreen.
|
||||
- `-u <number>`: Select the index of the user to load as.
|
||||
- `-input-profile <name>`: Specifies input profile name to use (for player #0 only).
|
||||
- `-qlaunch`: Launch QLaunch.
|
||||
- `-hlaunch`: Launch homebrew launcher `nx-hbloader`.
|
||||
- Requires a copy of Atmosphere to be extracted onto `sdmc`.
|
||||
- This is a shorthand for `<eden folder>/sdmc/atmosphere/hbl.nsp`.
|
||||
- `-setup`: Launch setup applet.
|
||||
|
||||
## eden-cli
|
||||
|
||||
- `--debug/-d`: Enter debug mode, allow gdb stub at port `1234`
|
||||
- `--config/-c`: Specify alternate configuration file.
|
||||
- `--fullscreen/-f`: Set fullscreen.
|
||||
|
|
|
|||
|
|
@ -44,6 +44,10 @@ Various graphical filters exist - each of them aimed at a specific target/image
|
|||
- **MMPX**: Nearest-neighbour filter aimed at providing higher pixel-art quality.
|
||||
- **Pros**: Offers decent pixel-art upscaling.
|
||||
- **Cons**: Only works for pixel-art.
|
||||
- **SGSR**: Uses Snapdragon Studios Game Super Resolution to enhance image quality (similar to FSR, but for Adreno devices).
|
||||
- **Pros**: Optimized for Adreno devices.
|
||||
- **Cons**: Doesn't play nicely with non-Adreno devices.
|
||||
- **SGSR Edge**: Almost the same pipeline as SGSR, but with improved edge detection.
|
||||
|
||||
### Anisotropy values
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Multiplayer
|
||||
# User Handbook - Multiplayer
|
||||
Use this guide to answer questions regarding and to start using the multiplayer functionality of Eden.
|
||||
|
||||
## Multiplayer FAQ
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@ A copy of this handbook is [available online](https://git.eden-emu.dev/eden-emu/
|
|||
- **[Importing Saves](./ImportingSaves.md)**
|
||||
- **[Installing Atmosphere Mods](./InstallingAtmosphereMods.md)**
|
||||
- **[Installing Updates & DLCs](./InstallingUpdatesDLC.md)**
|
||||
- **[Alter Date & Time](./AlterDateTime.md)**
|
||||
- **[Multiplayer](./Multiplayer.md)**
|
||||
|
||||
## 3rd-party Integration
|
||||
|
||||
- **[Configuring Steam ROM Manager](./SteamROM.md)**
|
||||
- **[Server hosting](ServerHosting.md)**
|
||||
- **[Server hosting](./ServerHosting.md)**
|
||||
- **[Syncthing Guide](./SyncthingGuide.md)**
|
||||
- **[Third Party](./ThirdParty.md)**
|
||||
- **[Obtainium](./ThirdParty.md#configuring-obtainium)**
|
||||
|
|
@ -40,12 +40,13 @@ A copy of this handbook is [available online](https://git.eden-emu.dev/eden-emu/
|
|||
|
||||
## Advanced
|
||||
|
||||
- **[Command Line](./CommandLine.md)**
|
||||
- **[Custom Firmware](./CFW.md)**
|
||||
- **[Alter Date & Time](./AlterDateTime.md)**
|
||||
- **[How To Access Logs](./HowToAccessLogs.md)**
|
||||
- **[Gyro Controls](./GyroControls.md)**
|
||||
- **[Platforms and Architectures](Architectures.md)**
|
||||
- **[Command Line](CommandLine.md)**
|
||||
- **[Native Application Development](Native.md)**
|
||||
- **[Adding Boolean Settings Toggles](AddingBooleanToggles.md)**
|
||||
- **[Platforms and Architectures](./Architectures.md)**
|
||||
- **[Native Application Development](./Native.md)**
|
||||
- **[Adding Boolean Settings Toggles](./AddingBooleanToggles.md)**
|
||||
- **[Adding Debug Knobs](./AddingDebugKnobs.md)**
|
||||
- **[Testing](Testing.md)**
|
||||
- **[Testing](./Testing.md)**
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ EmuDeck will automatically create an *Emulators - Emulators* parser for ***Steam
|
|||
4. Paste the following code into the contents of the file, save and close the file.
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
#!/bin/sh -e
|
||||
emuName="eden" #parameterize me
|
||||
|
||||
. "$HOME/.config/EmuDeck/backend/functions/all.sh"
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ The main origin repository is always at https://git.eden-emu.dev/eden-emu/eden.
|
|||
|
||||
- https://github.com/eden-emulator/mirror
|
||||
- https://git.crueter.xyz/mirror/eden
|
||||
- https://codeberg.org/eden-emu/eden
|
||||
- https://collective.taymaerz.de/eden/eden
|
||||
|
||||
Other mirrors obviously exist on the internet, but we can't guarantee their reliability and/or availability.
|
||||
|
|
|
|||
45
externals/CMakeLists.txt
vendored
45
externals/CMakeLists.txt
vendored
|
|
@ -49,8 +49,8 @@ if (NOT TARGET stb::headers)
|
|||
add_library(stb::headers ALIAS stb)
|
||||
endif()
|
||||
|
||||
# ItaniumDemangle
|
||||
if (NOT TARGET LLVM::Demangle)
|
||||
# ItaniumDemangle (Windows only)
|
||||
if (WIN32 AND NOT TARGET LLVM::Demangle)
|
||||
add_library(demangle demangle/ItaniumDemangle.cpp)
|
||||
target_include_directories(demangle PUBLIC ./demangle)
|
||||
if (NOT MSVC)
|
||||
|
|
@ -82,6 +82,11 @@ if (ARCHITECTURE_riscv64)
|
|||
AddJsonPackage(biscuit)
|
||||
endif()
|
||||
|
||||
# Lagoon
|
||||
if (ARCHITECTURE_loongarch64)
|
||||
AddJsonPackage(lagoon)
|
||||
endif()
|
||||
|
||||
# Vulkan stuff
|
||||
AddDependentPackages(vulkan-headers vulkan-utility-libraries)
|
||||
|
||||
|
|
@ -136,8 +141,7 @@ if(ENABLE_CUBEB)
|
|||
endif()
|
||||
|
||||
if (NOT ANDROID)
|
||||
if (YUZU_USE_EXTERNAL_SDL2)
|
||||
message(STATUS "Using SDL2 from externals.")
|
||||
if (NOT YUZU_USE_BUNDLED_SDL3)
|
||||
if (NOT WIN32)
|
||||
# Yuzu itself needs: Atomic Audio Events Joystick Haptic Sensor Threads Timers
|
||||
# Since 2.0.18 Atomic+Threads required for HIDAPI/libusb (see https://github.com/libsdl-org/SDL/issues/5095)
|
||||
|
|
@ -158,21 +162,26 @@ if (NOT ANDROID)
|
|||
set(SDL_FILE ON)
|
||||
endif()
|
||||
|
||||
if ("${YUZU_SYSTEM_PROFILE}" STREQUAL "steamdeck")
|
||||
set(SDL_PIPEWIRE OFF) # build errors out with this on
|
||||
AddJsonPackage("sdl2_steamdeck")
|
||||
else()
|
||||
AddJsonPackage("sdl2_generic")
|
||||
endif()
|
||||
elseif (YUZU_USE_BUNDLED_SDL2)
|
||||
message(STATUS "Using bundled SDL2")
|
||||
AddJsonPackage(sdl3)
|
||||
else()
|
||||
message(STATUS "Using bundled SDL3")
|
||||
if (PLATFORM_FREEBSD)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif()
|
||||
AddJsonPackage(sdl2)
|
||||
AddJsonPackage(sdl3-ci)
|
||||
endif()
|
||||
|
||||
find_package(SDL2 2.26.4 REQUIRED)
|
||||
# Normalize SDL3 link target across package variants.
|
||||
# Some SDL3 packages export only SDL3::SDL3-shared or SDL3::SDL3-static.
|
||||
if (NOT TARGET SDL3::SDL3)
|
||||
if (TARGET SDL3::SDL3-shared)
|
||||
add_library(SDL3::SDL3 ALIAS SDL3::SDL3-shared)
|
||||
elseif (TARGET SDL3::SDL3-static)
|
||||
add_library(SDL3::SDL3 ALIAS SDL3::SDL3-static)
|
||||
else()
|
||||
message(FATAL_ERROR "SDL3 package found, but no usable SDL3 target was exported")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
|
|
@ -192,14 +201,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)
|
||||
|
|
|
|||
4
externals/cmake-modules/DetectPlatform.cmake
vendored
4
externals/cmake-modules/DetectPlatform.cmake
vendored
|
|
@ -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")
|
||||
|
|
|
|||
52
externals/cpmfile.json
vendored
52
externals/cpmfile.json
vendored
|
|
@ -30,7 +30,6 @@
|
|||
"tag": "v%VERSION%",
|
||||
"hash": "5efa8140aadffe105dcf39935b732476e95755f6c7473ada3d0b64df2bc02c557633ae3948a25b45e1cf67e89a3ff6329fb30362e4ac033b9a1d1e453aa2eded",
|
||||
"git_version": "0.37.0",
|
||||
"version": "0.18.7",
|
||||
"find_args": "MODULE GLOBAL",
|
||||
"patches": [
|
||||
"0001-mingw.patch",
|
||||
|
|
@ -68,6 +67,12 @@
|
|||
"tag": "v%VERSION%",
|
||||
"hash": "9697e80a7d5d9bcb3ce51051a9a24962fb90ca79d215f1f03ae6b58da8ba13a63b5dda1b4dde3d26ac6445029696b8ef2883f4e5a777b342bba01283ed293856"
|
||||
},
|
||||
"lagoon": {
|
||||
"repo": "loongson-community/lagoon",
|
||||
"tag": "%VERSION%",
|
||||
"version": "1.0.0",
|
||||
"hash": "b9380f99c6effaeccc6d8f81d4942e852c11ad28613df637e155451556ae5826f93765bee57a5c87a9740d2bd1db463ad0f55a947772fe9d57eeabae3efa373e"
|
||||
},
|
||||
"libadrenotools": {
|
||||
"repo": "eden-emulator/libadrenotools",
|
||||
"sha": "8ba23b42d7",
|
||||
|
|
@ -102,20 +107,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",
|
||||
|
|
@ -137,13 +128,13 @@
|
|||
"BUNDLE_SPEEX ON"
|
||||
]
|
||||
},
|
||||
"sdl2": {
|
||||
"sdl3-ci": {
|
||||
"ci": true,
|
||||
"package": "SDL2",
|
||||
"name": "SDL2",
|
||||
"repo": "crueter-ci/SDL2",
|
||||
"version": "2.32.10-3c28e8ecc0",
|
||||
"min_version": "2.26.4"
|
||||
"package": "SDL3",
|
||||
"name": "SDL3",
|
||||
"repo": "crueter-ci/SDL3",
|
||||
"version": "3.4.8-d57c3b685c",
|
||||
"min_version": "3.2.10"
|
||||
},
|
||||
"catch2": {
|
||||
"package": "Catch2",
|
||||
|
|
@ -171,22 +162,13 @@
|
|||
"find_args": "MODULE",
|
||||
"git_version": "4.25"
|
||||
},
|
||||
"sdl2_generic": {
|
||||
"package": "SDL2",
|
||||
"sdl3": {
|
||||
"package": "SDL3",
|
||||
"repo": "libsdl-org/SDL",
|
||||
"tag": "release-%VERSION%",
|
||||
"hash": "d5622d6bb7266f7942a7b8ad43e8a22524893bf0c2ea1af91204838d9b78d32768843f6faa248757427b8404b8c6443776d4afa6b672cd8571a4e0c03a829383",
|
||||
"bundled": true,
|
||||
"git_version": "2.32.10",
|
||||
"skip_updates": true
|
||||
},
|
||||
"sdl2_steamdeck": {
|
||||
"package": "SDL2",
|
||||
"repo": "libsdl-org/SDL",
|
||||
"sha": "cc016b0046",
|
||||
"hash": "b8d9873446cdb922387471df9968e078714683046674ef0d0edddf8e25da65a539a3bae83d635496b970237f90b07b36a69f8d7855d450de59311d6d6e8c3dbc",
|
||||
"bundled": true,
|
||||
"skip_updates": "true"
|
||||
"hash": "df5a323af7ac366661a3c0e887969c72584d232f3cc211419d59b0487b620b6b2859d4549c9e8df002ee489290062e466fcfddf7edc0872a37b1f2845e81c0f3",
|
||||
"git_version": "3.4.8",
|
||||
"version": "3.2.10"
|
||||
},
|
||||
"moltenvk": {
|
||||
"repo": "V380-Ori/Ryujinx.MoltenVK",
|
||||
|
|
|
|||
|
|
@ -1259,7 +1259,7 @@ class ParameterPack final : public Node {
|
|||
// Setup OutputBuffer for a pack expansion, unless we're already expanding
|
||||
// one.
|
||||
void initializePackExpansion(OutputBuffer &OB) const {
|
||||
if (OB.CurrentPackMax == std::numeric_limits<unsigned>::max()) {
|
||||
if (OB.CurrentPackMax == (std::numeric_limits<unsigned>::max)()) {
|
||||
OB.CurrentPackMax = static_cast<unsigned>(Data.size());
|
||||
OB.CurrentPackIndex = 0;
|
||||
}
|
||||
|
|
@ -1353,7 +1353,7 @@ public:
|
|||
const Node *getChild() const { return Child; }
|
||||
|
||||
void printLeft(OutputBuffer &OB) const override {
|
||||
constexpr unsigned Max = std::numeric_limits<unsigned>::max();
|
||||
constexpr unsigned Max = (std::numeric_limits<unsigned>::max)();
|
||||
ScopedOverride<unsigned> SavePackIdx(OB.CurrentPackIndex, Max);
|
||||
ScopedOverride<unsigned> SavePackMax(OB.CurrentPackMax, Max);
|
||||
size_t StreamPos = OB.getCurrentPosition();
|
||||
|
|
|
|||
4
externals/demangle/llvm/Demangle/Utility.h
vendored
4
externals/demangle/llvm/Demangle/Utility.h
vendored
|
|
@ -88,8 +88,8 @@ public:
|
|||
|
||||
/// If a ParameterPackExpansion (or similar type) is encountered, the offset
|
||||
/// into the pack that we're currently printing.
|
||||
unsigned CurrentPackIndex = std::numeric_limits<unsigned>::max();
|
||||
unsigned CurrentPackMax = std::numeric_limits<unsigned>::max();
|
||||
unsigned CurrentPackIndex = (std::numeric_limits<unsigned>::max)();
|
||||
unsigned CurrentPackMax = (std::numeric_limits<unsigned>::max)();
|
||||
|
||||
/// When zero, we're printing template args and '>' needs to be parenthesized.
|
||||
/// Use a counter so we can simply increment inside parentheses.
|
||||
|
|
|
|||
186
externals/ffmpeg/CMakeLists.txt
vendored
186
externals/ffmpeg/CMakeLists.txt
vendored
|
|
@ -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}
|
||||
)
|
||||
|
|
|
|||
27
externals/nx_tzdb/NxTzdbCreateHeader.cmake
vendored
27
externals/nx_tzdb/NxTzdbCreateHeader.cmake
vendored
|
|
@ -1,3 +1,6 @@
|
|||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
|
@ -16,15 +19,24 @@ if (NOT FILE_LIST)
|
|||
endif()
|
||||
|
||||
set(DIRECTORY_NAME ${HEADER_NAME})
|
||||
|
||||
set(FILE_DATA "")
|
||||
|
||||
string(APPEND FILE_DATA "[[nodiscard]] static inline std::vector<FileSys::VirtualFile> CollectFiles_${DIRECTORY_NAME}() {\n")
|
||||
string(APPEND FILE_DATA [[
|
||||
std::vector<FileSys::VirtualFile> vfs_files;
|
||||
auto const fn = [&](std::string_view name, std::span<const u8> data) {
|
||||
vfs_files.push_back(std::make_shared<FileSys::VectorVfsFile>(
|
||||
std::vector<u8>(data.begin(), data.end()),
|
||||
std::string{name}
|
||||
));
|
||||
};
|
||||
]])
|
||||
foreach(ZONE_FILE ${FILE_LIST})
|
||||
if (ZONE_FILE STREQUAL "\n")
|
||||
continue()
|
||||
endif()
|
||||
|
||||
string(APPEND FILE_DATA "{\"${ZONE_FILE}\",\n{")
|
||||
|
||||
string(APPEND FILE_DATA " {\n")
|
||||
string(APPEND FILE_DATA " constexpr uint8_t tzdb_data[] = {\n")
|
||||
file(READ ${ZONE_PATH}/${ZONE_FILE} ZONE_DATA HEX)
|
||||
string(LENGTH "${ZONE_DATA}" ZONE_DATA_LEN)
|
||||
foreach(I RANGE 0 ${ZONE_DATA_LEN} 2)
|
||||
|
|
@ -42,9 +54,12 @@ foreach(ZONE_FILE ${FILE_LIST})
|
|||
string(APPEND FILE_DATA " ")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
string(APPEND FILE_DATA "}},\n")
|
||||
string(APPEND FILE_DATA " };\n")
|
||||
string(APPEND FILE_DATA " fn(\"${ZONE_FILE}\", tzdb_data);\n")
|
||||
string(APPEND FILE_DATA " }\n")
|
||||
endforeach()
|
||||
string(APPEND FILE_DATA " return vfs_files;\n")
|
||||
string(APPEND FILE_DATA "}\n")
|
||||
|
||||
file(READ ${NX_TZDB_SOURCE_DIR}/tzdb_template.h.in NX_TZDB_TEMPLATE_H_IN)
|
||||
file(CONFIGURE OUTPUT ${NX_TZDB_INCLUDE_DIR}/nx_tzdb/${HEADER_NAME}.h CONTENT "${NX_TZDB_TEMPLATE_H_IN}")
|
||||
|
|
|
|||
9
externals/nx_tzdb/tzdb_template.h.in
vendored
9
externals/nx_tzdb/tzdb_template.h.in
vendored
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
|
@ -9,10 +12,10 @@
|
|||
|
||||
namespace NxTzdb {
|
||||
|
||||
// @DIRECTORY_NAME@
|
||||
|
||||
// clang-format off
|
||||
const static std::map<const char*, const std::vector<uint8_t>> @DIRECTORY_NAME@ =
|
||||
{
|
||||
@FILE_DATA@};
|
||||
@FILE_DATA@
|
||||
// clang-format on
|
||||
|
||||
} // namespace NxTzdb
|
||||
|
|
|
|||
11
externals/tz/tz/tz.cpp
vendored
11
externals/tz/tz/tz.cpp
vendored
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 1996 Arthur David Olson
|
||||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
|
|
@ -466,8 +469,8 @@ CalendarTimeInternal* timesub(const time_t* timep, s64 offset, const Rule* sp,
|
|||
int signed_y = static_cast<s32>(y);
|
||||
tmp->tm_year = signed_y - TM_YEAR_BASE;
|
||||
}
|
||||
else if ((!std::is_signed_v<time_t> || std::numeric_limits<s32>::min() + TM_YEAR_BASE <= y) &&
|
||||
y - TM_YEAR_BASE <= std::numeric_limits<s32>::max()) {
|
||||
else if ((!std::is_signed_v<time_t> || (std::numeric_limits<s32>::min)() + TM_YEAR_BASE <= y) &&
|
||||
y - TM_YEAR_BASE <= (std::numeric_limits<s32>::max)()) {
|
||||
tmp->tm_year = static_cast<s32>(y - TM_YEAR_BASE);
|
||||
}
|
||||
else {
|
||||
|
|
@ -558,8 +561,8 @@ CalendarTimeInternal* localsub(Rule const* sp, time_t const* timep, s64 setname,
|
|||
else {
|
||||
newy += years;
|
||||
}
|
||||
if (!(std::numeric_limits<s32>::min() <= newy &&
|
||||
newy <= std::numeric_limits<s32>::max())) {
|
||||
if (!((std::numeric_limits<s32>::min)() <= newy &&
|
||||
newy <= (std::numeric_limits<s32>::max)())) {
|
||||
return nullptr;
|
||||
}
|
||||
result->tm_year = static_cast<s32>(newy);
|
||||
|
|
|
|||
11
externals/tz/tz/tz.h
vendored
11
externals/tz/tz/tz.h
vendored
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: 1996 Arthur David Olson
|
||||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
|
|
@ -26,10 +29,10 @@ constexpr size_t TZ_MAX_CHARS = 50;
|
|||
constexpr size_t MY_TZNAME_MAX = 255;
|
||||
constexpr size_t TZNAME_MAXIMUM = 255;
|
||||
constexpr size_t TZ_MAX_LEAPS = 50;
|
||||
constexpr s64 TIME_T_MAX = std::numeric_limits<s64>::max();
|
||||
constexpr s64 TIME_T_MIN = std::numeric_limits<s64>::min();
|
||||
constexpr s64 TIME_T_MAX = (std::numeric_limits<s64>::max)();
|
||||
constexpr s64 TIME_T_MIN = (std::numeric_limits<s64>::min)();
|
||||
constexpr size_t CHARS_EXTRA = 3;
|
||||
constexpr size_t MAX_ZONE_CHARS = std::max(TZ_MAX_CHARS + CHARS_EXTRA, sizeof("UTC"));
|
||||
constexpr size_t MAX_ZONE_CHARS = (std::max)(TZ_MAX_CHARS + CHARS_EXTRA, sizeof("UTC"));
|
||||
constexpr size_t MAX_TZNAME_CHARS = 2 * (MY_TZNAME_MAX + 1);
|
||||
|
||||
struct ttinfo {
|
||||
|
|
@ -51,7 +54,7 @@ struct Rule {
|
|||
std::array<s64, TZ_MAX_TIMES> ats;
|
||||
std::array<u8, TZ_MAX_TIMES> types;
|
||||
std::array<ttinfo, TZ_MAX_TYPES> ttis;
|
||||
std::array<char, std::max(MAX_ZONE_CHARS, MAX_TZNAME_CHARS)> chars;
|
||||
std::array<char, (std::max)(MAX_ZONE_CHARS, MAX_TZNAME_CHARS)> chars;
|
||||
s32 defaulttype;
|
||||
std::array <u8, 0x12C4> padding1;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh
|
||||
#!/bin/sh -e
|
||||
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# SPDX-FileCopyrightText: 2015 Citra Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
|
@ -10,20 +12,19 @@ paths_to_check="src/ CMakeLists.txt"
|
|||
|
||||
# If there are whitespace errors, print the offending file names and fail.
|
||||
if ! git diff --cached --check -- $paths_to_check ; then
|
||||
cat<<END
|
||||
|
||||
cat<<EOF
|
||||
Error: This commit would contain trailing spaces or tabs, which is against this repo's policy.
|
||||
Please correct those issues before committing. (Use 'git diff --check' for more details)
|
||||
If you know what you are doing, you can try 'git commit --no-verify' to bypass the check
|
||||
END
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for tabs, since tab-in-indent catches only those at the beginning of a line
|
||||
if git diff --cached -- $paths_to_check | egrep '^\+.* '; then
|
||||
cat<<END
|
||||
cat<<EOF
|
||||
Error: This commit would contain a tab, which is against this repo's policy.
|
||||
If you know what you are doing, you can try 'git commit --no-verify' to bypass the check.
|
||||
END
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
6
shell.nix
Normal file → Executable file
6
shell.nix
Normal file → Executable file
|
|
@ -1,3 +1,7 @@
|
|||
#!/usr/bin/nix-shell
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
let
|
||||
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05";
|
||||
pkgs = import nixpkgs { config = {}; overlays = []; };
|
||||
|
|
@ -16,7 +20,7 @@ pkgs.mkShellNoCC {
|
|||
qt6.qtbase qt6.qtmultimedia qt6.qtwayland qt6.qttools
|
||||
qt6.qtwebengine qt6.qt5compat
|
||||
# eden-cli
|
||||
SDL2
|
||||
SDL3
|
||||
# optional components
|
||||
discord-rpc gamemode
|
||||
];
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
include_directories(.)
|
||||
|
||||
# Dynarmic
|
||||
if ((ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64 OR ARCHITECTURE_riscv64) AND NOT YUZU_STATIC_ROOM)
|
||||
if ((ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64 OR ARCHITECTURE_riscv64 OR ARCHITECTURE_loongarch64) AND NOT YUZU_STATIC_ROOM)
|
||||
add_subdirectory(dynarmic)
|
||||
add_library(dynarmic::dynarmic ALIAS dynarmic)
|
||||
endif()
|
||||
|
|
@ -21,10 +21,41 @@ if (YUZU_STATIC_BUILD)
|
|||
add_compile_definitions(QT_STATICPLUGIN)
|
||||
endif()
|
||||
|
||||
# Build identifiers
|
||||
if (NIGHTLY_BUILD)
|
||||
add_compile_definitions(NIGHTLY_BUILD)
|
||||
endif()
|
||||
|
||||
# Legacy (android only)
|
||||
if (YUZU_LEGACY)
|
||||
message(WARNING "Making legacy build. Performance may suffer.")
|
||||
add_compile_definitions(YUZU_LEGACY)
|
||||
endif()
|
||||
|
||||
# Genshin Spoof (android only)
|
||||
if (GENSHIN_SPOOF)
|
||||
message(WARNING "Making Genshin spoof build")
|
||||
add_compile_definitions(GENSHIN_SPOOF)
|
||||
endif()
|
||||
|
||||
# Build ID (mingw only right now)
|
||||
# Pretty much just refers to the CI "target" for this build
|
||||
if (NOT BUILD_ID)
|
||||
if (ARCHITECTURE_x86_64)
|
||||
set(BUILD_ID amd64)
|
||||
elseif(ARCHITECTURE_arm64)
|
||||
if (WIN32)
|
||||
set(BUILD_ID arm64)
|
||||
else()
|
||||
set(BUILD_ID aarch64)
|
||||
endif()
|
||||
else()
|
||||
set(BUILD_ID "${ARCHITECTURE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_compile_definitions(BUILD_ID="${BUILD_ID}")
|
||||
|
||||
# Set compilation flags
|
||||
if (MSVC AND NOT CXX_CLANG)
|
||||
set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE STRING "" FORCE)
|
||||
|
|
@ -149,7 +180,10 @@ else()
|
|||
endif()
|
||||
|
||||
if (ARCHITECTURE_x86_64)
|
||||
add_compile_options(-mcx16)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-mcx16>)
|
||||
if (PLATFORM_LINUX OR PLATFORM_FREEBSD)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-mtls-dialect=gnu2>)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (APPLE AND CXX_CLANG)
|
||||
|
|
@ -175,7 +209,7 @@ else()
|
|||
add_compile_definitions(_FILE_OFFSET_BITS=64)
|
||||
endif()
|
||||
|
||||
if (YUZU_STATIC_BUILD AND NOT APPLE)
|
||||
if (YUZU_STATIC_BUILD AND NOT APPLE AND NOT MSVC)
|
||||
add_compile_options(-static)
|
||||
|
||||
# yuzu-cmd requires us to explicitly link libpthread, libgcc, and libstdc++ as static
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
}
|
||||
|
|
@ -250,7 +256,7 @@ android {
|
|||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
version = "3.22.1"
|
||||
version = "3.31.6"
|
||||
path = file("${edenDir}/CMakeLists.txt")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -125,6 +125,8 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener, InputManager
|
|||
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
NativeConfig.reloadGlobalConfig()
|
||||
|
||||
InputHandler.updateControllerData()
|
||||
val players = NativeConfig.getInputSettings(true)
|
||||
var hasConfiguredControllers = false
|
||||
|
|
@ -246,6 +248,7 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener, InputManager
|
|||
nfcReader.startScanning()
|
||||
startMotionSensorListener()
|
||||
InputHandler.updateControllerData()
|
||||
notifyPhysicalControllerState()
|
||||
|
||||
buildPictureInPictureParams()
|
||||
}
|
||||
|
|
@ -403,8 +406,7 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener, InputManager
|
|||
val isPhysicalKeyboard = event.source and InputDevice.SOURCE_KEYBOARD == InputDevice.SOURCE_KEYBOARD &&
|
||||
event.device?.isVirtual == false
|
||||
|
||||
val isControllerInput = event.source and InputDevice.SOURCE_JOYSTICK == InputDevice.SOURCE_JOYSTICK ||
|
||||
event.source and InputDevice.SOURCE_GAMEPAD == InputDevice.SOURCE_GAMEPAD
|
||||
val isControllerInput = InputHandler.isPhysicalGameController(event.device)
|
||||
|
||||
if (!isControllerInput &&
|
||||
event.source and InputDevice.SOURCE_MOUSE != InputDevice.SOURCE_MOUSE &&
|
||||
|
|
@ -425,8 +427,7 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener, InputManager
|
|||
}
|
||||
|
||||
override fun dispatchGenericMotionEvent(event: MotionEvent): Boolean {
|
||||
val isControllerInput = event.source and InputDevice.SOURCE_JOYSTICK == InputDevice.SOURCE_JOYSTICK ||
|
||||
event.source and InputDevice.SOURCE_GAMEPAD == InputDevice.SOURCE_GAMEPAD
|
||||
val isControllerInput = InputHandler.isPhysicalGameController(event.device)
|
||||
|
||||
if (!isControllerInput &&
|
||||
event.source and InputDevice.SOURCE_KEYBOARD != InputDevice.SOURCE_KEYBOARD &&
|
||||
|
|
@ -460,38 +461,36 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener, InputManager
|
|||
}
|
||||
|
||||
private fun isGameController(deviceId: Int): Boolean {
|
||||
val device = InputDevice.getDevice(deviceId) ?: return false
|
||||
val sources = device.sources
|
||||
return sources and InputDevice.SOURCE_GAMEPAD == InputDevice.SOURCE_GAMEPAD ||
|
||||
sources and InputDevice.SOURCE_JOYSTICK == InputDevice.SOURCE_JOYSTICK
|
||||
return InputHandler.isPhysicalGameController(InputDevice.getDevice(deviceId))
|
||||
}
|
||||
|
||||
override fun onInputDeviceAdded(deviceId: Int) {
|
||||
if (isGameController(deviceId)) {
|
||||
InputHandler.updateControllerData()
|
||||
val navHostFragment =
|
||||
supportFragmentManager.findFragmentById(R.id.fragment_container) as? NavHostFragment
|
||||
val emulationFragment =
|
||||
navHostFragment?.childFragmentManager?.fragments?.firstOrNull() as? org.yuzu.yuzu_emu.fragments.EmulationFragment
|
||||
emulationFragment?.onControllerConnected()
|
||||
notifyPhysicalControllerState()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onInputDeviceRemoved(deviceId: Int) {
|
||||
InputHandler.updateControllerData()
|
||||
val navHostFragment =
|
||||
supportFragmentManager.findFragmentById(R.id.fragment_container) as? NavHostFragment
|
||||
val emulationFragment =
|
||||
navHostFragment?.childFragmentManager?.fragments?.firstOrNull() as? org.yuzu.yuzu_emu.fragments.EmulationFragment
|
||||
emulationFragment?.onControllerDisconnected()
|
||||
notifyPhysicalControllerState()
|
||||
}
|
||||
|
||||
override fun onInputDeviceChanged(deviceId: Int) {
|
||||
if (isGameController(deviceId)) {
|
||||
InputHandler.updateControllerData()
|
||||
notifyPhysicalControllerState()
|
||||
}
|
||||
}
|
||||
|
||||
private fun notifyPhysicalControllerState() {
|
||||
val navHostFragment =
|
||||
supportFragmentManager.findFragmentById(R.id.fragment_container) as? NavHostFragment
|
||||
val emulationFragment =
|
||||
navHostFragment?.childFragmentManager?.fragments?.firstOrNull() as? org.yuzu.yuzu_emu.fragments.EmulationFragment
|
||||
emulationFragment?.onPhysicalControllerStateChanged(InputHandler.androidControllers.isNotEmpty())
|
||||
}
|
||||
|
||||
override fun onSensorChanged(event: SensorEvent) {
|
||||
if (!NativeLibrary.isRunning() || NativeLibrary.isPaused()) {
|
||||
return
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
|
||||
// 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
|
||||
|
||||
|
|
@ -33,8 +37,10 @@ object SoftwareKeyboard {
|
|||
val emulationActivity = NativeLibrary.sEmulationActivity.get()
|
||||
|
||||
val overlayView = emulationActivity!!.findViewById<View>(R.id.surface_input_overlay)
|
||||
overlayView.requestFocus()
|
||||
val im =
|
||||
overlayView.context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
im.restartInput(overlayView)
|
||||
im.showSoftInput(overlayView, InputMethodManager.SHOW_FORCED)
|
||||
|
||||
// There isn't a good way to know that the IMM is dismissed, so poll every 500ms to submit inline keyboard result.
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ class QuickSettings(val emulationFragment: EmulationFragment) {
|
|||
container: ViewGroup,
|
||||
setting: IntSetting,
|
||||
namesArrayId: Int,
|
||||
valuesArrayId: Int
|
||||
valuesArrayId: Int,
|
||||
onValueChanged: ((Int) -> Unit)? = null
|
||||
) {
|
||||
val inflater = LayoutInflater.from(emulationFragment.requireContext())
|
||||
val itemView = inflater.inflate(R.layout.item_quick_settings_menu, container, false)
|
||||
|
|
@ -89,6 +90,7 @@ class QuickSettings(val emulationFragment: EmulationFragment) {
|
|||
setting.setInt(values[index])
|
||||
saveSettings()
|
||||
valueView.text = name
|
||||
onValueChanged?.invoke(values[index])
|
||||
}
|
||||
}
|
||||
radioGroup.addView(radioButton)
|
||||
|
|
|
|||
|
|
@ -16,12 +16,17 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
|
|||
RENDERER_USE_SPEED_LIMIT("use_speed_limit"),
|
||||
USE_CUSTOM_CPU_TICKS("use_custom_cpu_ticks"),
|
||||
SKIP_CPU_INNER_INVALIDATION("skip_cpu_inner_invalidation"),
|
||||
ANTIFLICKER("antiflicker"),
|
||||
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"),
|
||||
RENDERER_USE_DISK_SHADER_CACHE("use_disk_shader_cache"),
|
||||
RENDERER_FORCE_MAX_CLOCK("force_max_clock"),
|
||||
RENDERER_ASYNCHRONOUS_GPU_EMULATION("use_asynchronous_gpu_emulation"),
|
||||
RENDERER_ASYNC_PRESENTATION("async_presentation"),
|
||||
RENDERER_ASYNCHRONOUS_SHADERS("use_asynchronous_shaders"),
|
||||
RENDERER_REACTIVE_FLUSHING("use_reactive_flushing"),
|
||||
ENABLE_BUFFER_HISTORY("enable_buffer_history"),
|
||||
|
|
@ -31,8 +36,6 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
|
|||
RENDERER_DEBUG("debug"),
|
||||
RENDERER_PATCH_OLD_QCOM_DRIVERS("patch_old_qcom_drivers"),
|
||||
RENDERER_VERTEX_INPUT_DYNAMIC_STATE("vertex_input_dynamic_state"),
|
||||
RENDERER_PROVOKING_VERTEX("provoking_vertex"),
|
||||
RENDERER_DESCRIPTOR_INDEXING("descriptor_indexing"),
|
||||
RENDERER_SAMPLE_SHADING("sample_shading"),
|
||||
GPU_UNSWIZZLE_ENABLED("gpu_unswizzle_enabled"),
|
||||
PICTURE_IN_PICTURE("picture_in_picture"),
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ enum class IntSetting(override val key: String) : AbstractIntSetting {
|
|||
RENDERER_VRAM_USAGE_MODE("vram_usage_mode"),
|
||||
RENDERER_NVDEC_EMULATION("nvdec_emulation"),
|
||||
RENDERER_ASTC_DECODE_METHOD("accelerate_astc"),
|
||||
RENDERER_ASTC_RECOMPRESSION("astc_recompression"),
|
||||
RENDERER_ACCURACY("gpu_accuracy"),
|
||||
RENDERER_RESOLUTION("resolution_setup"),
|
||||
RENDERER_VSYNC("use_vsync"),
|
||||
|
|
@ -25,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"),
|
||||
|
|
@ -69,7 +67,8 @@ enum class IntSetting(override val key: String) : AbstractIntSetting {
|
|||
MY_PAGE_APPLET("my_page_applet_mode"),
|
||||
INPUT_OVERLAY_AUTO_HIDE("input_overlay_auto_hide"),
|
||||
OVERLAY_GRID_SIZE("overlay_grid_size"),
|
||||
GPU_LOG_RING_BUFFER_SIZE("gpu_log_ring_buffer_size")
|
||||
GPU_LOG_RING_BUFFER_SIZE("gpu_log_ring_buffer_size"),
|
||||
ANDROID_PIPELINE_WORKERS("pipeline_worker_count")
|
||||
;
|
||||
|
||||
override fun getInt(needsGlobal: Boolean): Int = NativeConfig.getInt(key, needsGlobal)
|
||||
|
|
|
|||
|
|
@ -141,13 +141,6 @@ abstract class SettingsItem(
|
|||
valuesId = R.array.dynaStateValues
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.RENDERER_PROVOKING_VERTEX,
|
||||
titleId = R.string.provoking_vertex,
|
||||
descriptionId = R.string.provoking_vertex_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.RENDERER_VERTEX_INPUT_DYNAMIC_STATE,
|
||||
|
|
@ -155,13 +148,6 @@ abstract class SettingsItem(
|
|||
descriptionId = R.string.vertex_input_dynamic_state_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.RENDERER_DESCRIPTOR_INDEXING,
|
||||
titleId = R.string.descriptor_indexing,
|
||||
descriptionId = R.string.descriptor_indexing_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
SliderSetting(
|
||||
IntSetting.RENDERER_SAMPLE_SHADING,
|
||||
|
|
@ -349,15 +335,6 @@ abstract class SettingsItem(
|
|||
valuesId = R.array.astcDecodingMethodValues
|
||||
)
|
||||
)
|
||||
put(
|
||||
SingleChoiceSetting(
|
||||
IntSetting.RENDERER_ASTC_RECOMPRESSION,
|
||||
titleId = R.string.astc_recompression,
|
||||
descriptionId = R.string.astc_recompression_description,
|
||||
choicesId = R.array.astcRecompressionMethodNames,
|
||||
valuesId = R.array.astcRecompressionMethodValues
|
||||
)
|
||||
)
|
||||
put(
|
||||
SingleChoiceSetting(
|
||||
IntSetting.RENDERER_VRAM_USAGE_MODE,
|
||||
|
|
@ -605,6 +582,16 @@ abstract class SettingsItem(
|
|||
units = "%"
|
||||
)
|
||||
)
|
||||
put(
|
||||
SliderSetting(
|
||||
IntSetting.ANDROID_PIPELINE_WORKERS,
|
||||
titleId = R.string.pipeline_worker_cores,
|
||||
descriptionId = R.string.pipeline_worker_cores_description,
|
||||
min = 4,
|
||||
max = 8,
|
||||
units = "cores"
|
||||
)
|
||||
)
|
||||
put(
|
||||
SingleChoiceSetting(
|
||||
IntSetting.RENDERER_ANTI_ALIASING,
|
||||
|
|
@ -653,12 +640,17 @@ abstract class SettingsItem(
|
|||
)
|
||||
)
|
||||
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
|
||||
SwitchSetting(
|
||||
BooleanSetting.RENDERER_ASYNCHRONOUS_GPU_EMULATION,
|
||||
titleId = R.string.renderer_asynchronous_gpu_emulation,
|
||||
descriptionId = R.string.renderer_asynchronous_gpu_emulation_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.RENDERER_ASYNC_PRESENTATION,
|
||||
titleId = R.string.renderer_async_presentation,
|
||||
descriptionId = R.string.renderer_async_presentation_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
|
|
@ -758,6 +750,13 @@ abstract class SettingsItem(
|
|||
descriptionId = R.string.skip_cpu_inner_invalidation_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.ANTIFLICKER,
|
||||
titleId = R.string.antiflicker,
|
||||
descriptionId = R.string.antiflicker_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.FIX_BLOOM_EFFECTS,
|
||||
|
|
@ -765,6 +764,20 @@ 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,
|
||||
titleId = R.string.emulate_bgr565,
|
||||
descriptionId = R.string.emulate_bgr565_description
|
||||
)
|
||||
)
|
||||
put(
|
||||
SwitchSetting(
|
||||
BooleanSetting.CPUOPT_UNSAFE_HOST_MMU,
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import org.yuzu.yuzu_emu.databinding.DialogSliderBinding
|
|||
import org.yuzu.yuzu_emu.databinding.DialogSpinboxBinding
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.features.input.model.AnalogDirection
|
||||
import org.yuzu.yuzu_emu.features.settings.model.IntSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.AnalogInputSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.ButtonInputSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.view.IntSingleChoiceSetting
|
||||
|
|
@ -381,6 +382,10 @@ class SettingsDialogFragment : DialogFragment(), DialogInterface.OnClickListener
|
|||
}
|
||||
scSetting.setSelectedValue(value)
|
||||
|
||||
if (scSetting.setting.key == IntSetting.RENDERER_SCALING_FILTER.key) {
|
||||
settingsViewModel.setShouldReloadSettingsList(true)
|
||||
}
|
||||
|
||||
if (scSetting.setting.key == "app_language") {
|
||||
settingsViewModel.setShouldRecreateForLanguageChange(true)
|
||||
// recreate page apply language change instantly
|
||||
|
|
|
|||
|
|
@ -58,19 +58,45 @@ class SettingsFragmentPresenter(
|
|||
val pairedSettingKey = item.setting.pairedSettingKey
|
||||
|
||||
if (pairedSettingKey.isNotEmpty()) {
|
||||
val needsGlobal = getNeedsGlobalForKey(pairedSettingKey)
|
||||
val pairedSettingValue = NativeConfig.getBoolean(
|
||||
pairedSettingKey,
|
||||
if (NativeLibrary.isRunning() && !NativeConfig.isPerGameConfigLoaded()) {
|
||||
!NativeConfig.usingGlobal(pairedSettingKey)
|
||||
} else {
|
||||
NativeConfig.usingGlobal(pairedSettingKey)
|
||||
}
|
||||
needsGlobal
|
||||
)
|
||||
if (!pairedSettingValue) return
|
||||
}
|
||||
add(item)
|
||||
}
|
||||
|
||||
private fun getNeedsGlobalForKey(key: String): Boolean {
|
||||
return if (NativeLibrary.isRunning() && !NativeConfig.isPerGameConfigLoaded()) {
|
||||
!NativeConfig.usingGlobal(key)
|
||||
} else {
|
||||
NativeConfig.usingGlobal(key)
|
||||
}
|
||||
}
|
||||
|
||||
private fun isSharpnessScalingFilterSelected(): Boolean {
|
||||
val needsGlobal = getNeedsGlobalForKey(IntSetting.RENDERER_SCALING_FILTER.key)
|
||||
val selectedFilter = IntSetting.RENDERER_SCALING_FILTER.getInt(needsGlobal)
|
||||
return selectedFilter in resolveSharpnessScalingFilterValues()
|
||||
}
|
||||
|
||||
private fun resolveSharpnessScalingFilterValues(): Set<Int> {
|
||||
val names = context.resources.getStringArray(R.array.rendererScalingFilterNames)
|
||||
val values = context.resources.getIntArray(R.array.rendererScalingFilterValues)
|
||||
val sharpnessFilterNames = setOf(
|
||||
context.getString(R.string.scaling_filter_fsr),
|
||||
context.getString(R.string.scaling_filter_sgsr),
|
||||
context.getString(R.string.scaling_filter_sgsr_edge),
|
||||
)
|
||||
return names.asSequence()
|
||||
.mapIndexedNotNull { index, name ->
|
||||
if (name in sharpnessFilterNames && index in values.indices) values[index] else null
|
||||
}
|
||||
.toSet()
|
||||
}
|
||||
|
||||
// Allows you to show/hide abstract settings based on the paired setting key
|
||||
private fun ArrayList<SettingsItem>.addAbstract(item: SettingsItem) {
|
||||
val pairedSettingKey = item.setting.pairedSettingKey
|
||||
|
|
@ -248,9 +274,10 @@ class SettingsFragmentPresenter(
|
|||
add(IntSetting.RENDERER_RESOLUTION.key)
|
||||
add(IntSetting.RENDERER_VSYNC.key)
|
||||
add(IntSetting.RENDERER_SCALING_FILTER.key)
|
||||
add(IntSetting.FSR_SHARPENING_SLIDER.key)
|
||||
if (isSharpnessScalingFilterSelected()) {
|
||||
add(IntSetting.FSR_SHARPENING_SLIDER.key)
|
||||
}
|
||||
add(IntSetting.RENDERER_ANTI_ALIASING.key)
|
||||
add(IntSetting.RENDERER_OPTIMIZE_SPIRV_OUTPUT.key)
|
||||
|
||||
add(HeaderSetting(R.string.advanced))
|
||||
|
||||
|
|
@ -259,7 +286,6 @@ class SettingsFragmentPresenter(
|
|||
add(IntSetting.MAX_ANISOTROPY.key)
|
||||
add(IntSetting.RENDERER_VRAM_USAGE_MODE.key)
|
||||
add(IntSetting.RENDERER_ASTC_DECODE_METHOD.key)
|
||||
add(IntSetting.RENDERER_ASTC_RECOMPRESSION.key)
|
||||
|
||||
add(BooleanSetting.SYNC_MEMORY_OPERATIONS.key)
|
||||
add(BooleanSetting.RENDERER_USE_DISK_SHADER_CACHE.key)
|
||||
|
|
@ -272,16 +298,20 @@ class SettingsFragmentPresenter(
|
|||
|
||||
add(IntSetting.FAST_GPU_TIME.key)
|
||||
add(BooleanSetting.SKIP_CPU_INNER_INVALIDATION.key)
|
||||
add(BooleanSetting.ANTIFLICKER.key)
|
||||
add(BooleanSetting.FIX_BLOOM_EFFECTS.key)
|
||||
add(BooleanSetting.EMULATE_BGR565.key)
|
||||
add(BooleanSetting.RESCALE_HACK.key)
|
||||
add(BooleanSetting.RENDERER_ASYNCHRONOUS_SHADERS.key)
|
||||
add(IntSetting.ANDROID_PIPELINE_WORKERS.key)
|
||||
add(BooleanSetting.RENDERER_ASYNCHRONOUS_GPU_EMULATION.key)
|
||||
add(BooleanSetting.RENDERER_ASYNC_PRESENTATION.key)
|
||||
add(SettingsItem.GPU_UNSWIZZLE_COMBINED)
|
||||
|
||||
add(HeaderSetting(R.string.extensions))
|
||||
|
||||
add(IntSetting.RENDERER_DYNA_STATE.key)
|
||||
add(BooleanSetting.RENDERER_VERTEX_INPUT_DYNAMIC_STATE.key)
|
||||
add(BooleanSetting.RENDERER_PROVOKING_VERTEX.key)
|
||||
add(BooleanSetting.RENDERER_DESCRIPTOR_INDEXING.key)
|
||||
add(IntSetting.RENDERER_SAMPLE_SHADING.key)
|
||||
|
||||
add(HeaderSetting(R.string.display))
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ import org.yuzu.yuzu_emu.utils.FileUtil
|
|||
import org.yuzu.yuzu_emu.utils.GameHelper
|
||||
import org.yuzu.yuzu_emu.utils.GameIconUtils
|
||||
import org.yuzu.yuzu_emu.utils.GpuDriverHelper
|
||||
import org.yuzu.yuzu_emu.utils.InputHandler
|
||||
import org.yuzu.yuzu_emu.utils.Log
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.yuzu.yuzu_emu.utils.NativeFreedrenoConfig
|
||||
|
|
@ -114,6 +115,8 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||
val handler = Handler(Looper.getMainLooper())
|
||||
|
||||
private var controllerInputReceived = false
|
||||
private var hasPhysicalControllerConnected = false
|
||||
private var overlayHiddenByPhysicalController = false
|
||||
|
||||
private var _binding: FragmentEmulationBinding? = null
|
||||
|
||||
|
|
@ -288,13 +291,23 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||
// Game launched via intent (check for existing custom config)
|
||||
intentGame != null -> {
|
||||
game?.let { gameInstance ->
|
||||
runCatching { GameHelper.restoreContentForGame(gameInstance) }
|
||||
.onFailure {
|
||||
Log.warning(
|
||||
"[EmulationFragment] Failed to restore content for intent launch: ${it.message}"
|
||||
)
|
||||
}
|
||||
|
||||
val customConfigFile = SettingsFile.getCustomSettingsFile(gameInstance)
|
||||
if (customConfigFile.exists()) {
|
||||
shouldUseCustom = true
|
||||
Log.info(
|
||||
"[EmulationFragment] Found existing custom settings for ${gameInstance.title}, loading them"
|
||||
)
|
||||
SettingsFile.loadCustomConfig(gameInstance)
|
||||
NativeConfig.unloadPerGameConfig()
|
||||
} else {
|
||||
shouldUseCustom = false
|
||||
Log.info(
|
||||
"[EmulationFragment] No custom settings found for ${gameInstance.title}, using global settings"
|
||||
)
|
||||
|
|
@ -666,6 +679,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||
driverInUse = driverViewModel.selectedDriverVersion.value
|
||||
|
||||
updateQuickOverlayMenuEntry(BooleanSetting.SHOW_INPUT_OVERLAY.getBoolean())
|
||||
onPhysicalControllerStateChanged(InputHandler.androidControllers.isNotEmpty())
|
||||
|
||||
binding.surfaceEmulation.holder.addCallback(this)
|
||||
binding.doneControlConfig.setOnClickListener { stopConfiguringControls() }
|
||||
|
|
@ -760,11 +774,8 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||
|
||||
R.id.menu_quick_overlay -> {
|
||||
val newState = !BooleanSetting.SHOW_INPUT_OVERLAY.getBoolean()
|
||||
BooleanSetting.SHOW_INPUT_OVERLAY.setBoolean(newState)
|
||||
updateQuickOverlayMenuEntry(newState)
|
||||
binding.surfaceInputOverlay.refreshControls()
|
||||
// Sync view visibility with the setting
|
||||
toggleOverlay(newState)
|
||||
updateQuickOverlayMenuEntry(BooleanSetting.SHOW_INPUT_OVERLAY.getBoolean())
|
||||
NativeConfig.saveGlobalConfig()
|
||||
true
|
||||
}
|
||||
|
|
@ -870,7 +881,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||
if (drawerView == binding.quickSettingsSheet) {
|
||||
isQuickSettingsMenuOpen = true
|
||||
if (shouldUseCustom) {
|
||||
SettingsFile.loadCustomConfig(args.game!!)
|
||||
SettingsFile.loadCustomConfig(game!!)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1053,7 +1064,8 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||
val shouldShowOverlay = if (args.overlayGamelessEditMode) {
|
||||
true
|
||||
} else {
|
||||
showInputOverlay && emulationViewModel.emulationStarted.value
|
||||
showInputOverlay && emulationViewModel.emulationStarted.value &&
|
||||
!hasPhysicalControllerConnected
|
||||
}
|
||||
b.surfaceInputOverlay.setVisible(shouldShowOverlay)
|
||||
if (!isInFoldableLayout) {
|
||||
|
|
@ -1078,6 +1090,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||
private fun addQuickSettings() {
|
||||
binding.quickSettingsSheet.apply {
|
||||
val container = binding.quickSettingsSheet.findViewById<ViewGroup>(R.id.quick_settings_container)
|
||||
val isSharpnessFilterSelected = isSharpnessScalingFilterSelected()
|
||||
|
||||
container.removeAllViews()
|
||||
|
||||
|
|
@ -1159,16 +1172,20 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||
IntSetting.RENDERER_SCALING_FILTER,
|
||||
R.array.rendererScalingFilterNames,
|
||||
R.array.rendererScalingFilterValues
|
||||
)
|
||||
) {
|
||||
addQuickSettings()
|
||||
}
|
||||
|
||||
quickSettings.addSliderSetting(
|
||||
R.string.fsr_sharpness,
|
||||
container,
|
||||
IntSetting.FSR_SHARPENING_SLIDER,
|
||||
minValue = 0,
|
||||
maxValue = 100,
|
||||
units = "%"
|
||||
)
|
||||
if (isSharpnessFilterSelected) {
|
||||
quickSettings.addSliderSetting(
|
||||
R.string.fsr_sharpness,
|
||||
container,
|
||||
IntSetting.FSR_SHARPENING_SLIDER,
|
||||
minValue = 0,
|
||||
maxValue = 100,
|
||||
units = "%"
|
||||
)
|
||||
}
|
||||
|
||||
quickSettings.addIntSetting(
|
||||
R.string.renderer_anti_aliasing,
|
||||
|
|
@ -1180,6 +1197,26 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||
}
|
||||
}
|
||||
|
||||
private fun isSharpnessScalingFilterSelected(): Boolean {
|
||||
val selectedFilter = IntSetting.RENDERER_SCALING_FILTER.getInt(needsGlobal = false)
|
||||
return selectedFilter in resolveSharpnessScalingFilterValues()
|
||||
}
|
||||
|
||||
private fun resolveSharpnessScalingFilterValues(): Set<Int> {
|
||||
val names = resources.getStringArray(R.array.rendererScalingFilterNames)
|
||||
val values = resources.getIntArray(R.array.rendererScalingFilterValues)
|
||||
val sharpnessFilterNames = setOf(
|
||||
getString(R.string.scaling_filter_fsr),
|
||||
getString(R.string.scaling_filter_sgsr),
|
||||
getString(R.string.scaling_filter_sgsr_edge),
|
||||
)
|
||||
return names.asSequence()
|
||||
.mapIndexedNotNull { index, name ->
|
||||
if (name in sharpnessFilterNames && index in values.indices) values[index] else null
|
||||
}
|
||||
.toSet()
|
||||
}
|
||||
|
||||
private fun openQuickSettingsMenu() {
|
||||
binding.drawerLayout.closeDrawer(binding.inGameMenu)
|
||||
binding.drawerLayout.openDrawer(binding.quickSettingsSheet)
|
||||
|
|
@ -2502,13 +2539,31 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||
}
|
||||
|
||||
fun onControllerConnected() {
|
||||
controllerInputReceived = false
|
||||
onPhysicalControllerStateChanged(InputHandler.androidControllers.isNotEmpty())
|
||||
}
|
||||
|
||||
fun onControllerDisconnected() {
|
||||
if (!BooleanSetting.HIDE_OVERLAY_ON_CONTROLLER_INPUT.getBoolean()) return
|
||||
if (!BooleanSetting.SHOW_INPUT_OVERLAY.getBoolean()) return
|
||||
onPhysicalControllerStateChanged(InputHandler.androidControllers.isNotEmpty())
|
||||
}
|
||||
|
||||
fun onPhysicalControllerStateChanged(hasConnectedControllers: Boolean) {
|
||||
hasPhysicalControllerConnected = hasConnectedControllers
|
||||
controllerInputReceived = false
|
||||
toggleOverlay(true)
|
||||
if (!isAdded || _binding == null) return
|
||||
if (binding.surfaceInputOverlay.isGamelessMode()) return
|
||||
|
||||
if (hasConnectedControllers) {
|
||||
if (BooleanSetting.SHOW_INPUT_OVERLAY.getBoolean() &&
|
||||
BooleanSetting.HIDE_OVERLAY_ON_CONTROLLER_INPUT.getBoolean()) {
|
||||
overlayHiddenByPhysicalController = true
|
||||
toggleOverlay(false)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if (overlayHiddenByPhysicalController) {
|
||||
overlayHiddenByPhysicalController = false
|
||||
toggleOverlay(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ class DriverViewModel : ViewModel() {
|
|||
private val driversToDelete = mutableListOf<String>()
|
||||
|
||||
private var previousDriverPath: String = ""
|
||||
private var activeGame: Game? = null
|
||||
|
||||
private val _shouldShowDriverShaderDialog = MutableStateFlow(false)
|
||||
val shouldShowDriverShaderDialog: StateFlow<Boolean> get() = _shouldShowDriverShaderDialog
|
||||
|
|
@ -98,6 +99,7 @@ class DriverViewModel : ViewModel() {
|
|||
}
|
||||
|
||||
fun onOpenDriverManager(game: Game?) {
|
||||
activeGame = game
|
||||
if (game != null) {
|
||||
SettingsFile.loadCustomConfig(game)
|
||||
}
|
||||
|
|
@ -116,10 +118,12 @@ class DriverViewModel : ViewModel() {
|
|||
}
|
||||
|
||||
if (!skipShaderWipe && newDriverPath != previousDriverPath) {
|
||||
wipeAllShaders()
|
||||
activeGame?.let {
|
||||
wipeGameShaders(it)
|
||||
|
||||
if (!BooleanSetting.DONT_SHOW_DRIVER_SHADER_WARNING.getBoolean(needsGlobal = true)) {
|
||||
_shouldShowDriverShaderDialog.value = true
|
||||
if (!BooleanSetting.DONT_SHOW_DRIVER_SHADER_WARNING.getBoolean(needsGlobal = true)) {
|
||||
_shouldShowDriverShaderDialog.value = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -139,12 +143,14 @@ class DriverViewModel : ViewModel() {
|
|||
_shouldShowDriverShaderDialog.value = false
|
||||
}
|
||||
|
||||
private fun wipeAllShaders() {
|
||||
private fun wipeGameShaders(game: Game) {
|
||||
viewModelScope.launch {
|
||||
withContext(Dispatchers.IO) {
|
||||
val externalFilesDir = YuzuApplication.appContext.getExternalFilesDir(null)
|
||||
?: return@withContext
|
||||
val shaderDir = File(
|
||||
YuzuApplication.appContext.getExternalFilesDir(null)?.canonicalPath +
|
||||
"/shader/"
|
||||
externalFilesDir.absolutePath +
|
||||
"/shader/" + game.settingsName.lowercase()
|
||||
)
|
||||
if (shaderDir.exists()) {
|
||||
shaderDir.deleteRecursively()
|
||||
|
|
@ -202,6 +208,7 @@ class DriverViewModel : ViewModel() {
|
|||
}
|
||||
driversToDelete.clear()
|
||||
} finally {
|
||||
activeGame = null
|
||||
_isDeletingDrivers.value = false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue