Compare commits
45 commits
dcf491fded
...
2d94767f96
Author | SHA1 | Date | |
---|---|---|---|
2d94767f96 | |||
c65f075638 | |||
4356e80e50 | |||
c45d9a71e8 | |||
fd7711aa5d | |||
c6a2d2acad | |||
ca349ad7b0 | |||
75f18095e0 | |||
092e645296 | |||
49670ebb0f | |||
115d0484a6 | |||
886b649a0d | |||
195bd7005e | |||
ae62ee3d27 | |||
cb5719ec0e | |||
3508208473 | |||
7a0712af1f | |||
11db0f0dbf | |||
28d26b0d76 | |||
ad6045d9a4 | |||
3fbfd64722 | |||
13ecc1e481 | |||
2502352180 | |||
9d2681ecc9 | |||
428f136a75 | |||
ecc99ce9ab | |||
2f82b63e6a | |||
43c41e4db5 | |||
10dd003d0f | |||
37e0b80766 | |||
718891d11f | |||
bbcd8aded6 | |||
2bc792e211 | |||
e7560183fa | |||
84fadd1506 | |||
be7a3e1e86 | |||
6aa8be1da8 | |||
![]() |
e28b0d2590 | ||
![]() |
6fcfe7f4f3 | ||
e60fd4b68b | |||
10c76568b8 | |||
8dba6a2cb4 | |||
4b5a8e0621 | |||
39e27bc954 | |||
21c77bdcac |
403 changed files with 3839 additions and 2814 deletions
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
HEADER="$(cat "$PWD/.ci/license/header.txt")"
|
HEADER="$(cat "$PWD/.ci/license/header.txt")"
|
||||||
|
HEADER_HASH="$(cat "$PWD/.ci/license/header-hash.txt")"
|
||||||
|
|
||||||
echo "Getting branch changes"
|
echo "Getting branch changes"
|
||||||
|
|
||||||
|
@ -17,41 +18,86 @@ FILES=`git diff --name-only $BASE`
|
||||||
echo $FILES
|
echo $FILES
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
|
check_header() {
|
||||||
|
CONTENT="`head -n3 < $1`"
|
||||||
|
case "$CONTENT" in
|
||||||
|
"$HEADER"*) ;;
|
||||||
|
*) BAD_FILES="$BAD_FILES $1" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
check_cmake_header() {
|
||||||
|
CONTENT="`head -n3 < $1`"
|
||||||
|
|
||||||
|
case "$CONTENT" in
|
||||||
|
"$HEADER_HASH"*) ;;
|
||||||
|
*)
|
||||||
|
BAD_CMAKE="$BAD_CMAKE $1" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
for file in $FILES; do
|
for file in $FILES; do
|
||||||
[ -f "$file" ] || continue
|
[ -f "$file" ] || continue
|
||||||
|
|
||||||
|
if [ `basename -- "$file"` = "CMakeLists.txt" ]; then
|
||||||
|
check_cmake_header "$file"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
EXTENSION="${file##*.}"
|
EXTENSION="${file##*.}"
|
||||||
case "$EXTENSION" in
|
case "$EXTENSION" in
|
||||||
kts|kt|cpp|h)
|
kts|kt|cpp|h)
|
||||||
CONTENT="`cat $file`"
|
check_header "$file"
|
||||||
case "$CONTENT" in
|
;;
|
||||||
"$HEADER"*) ;;
|
cmake)
|
||||||
*) BAD_FILES="$BAD_FILES $file" ;;
|
check_cmake_header "$file"
|
||||||
esac
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$BAD_FILES" = "" ]; then
|
if [ "$BAD_FILES" = "" ] && [ "$BAD_CMAKE" = "" ]; then
|
||||||
echo
|
echo
|
||||||
echo "All good."
|
echo "All good."
|
||||||
|
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "The following files have incorrect license headers:"
|
if [ "$BAD_FILES" != "" ]; then
|
||||||
echo
|
echo "The following source files have incorrect license headers:"
|
||||||
|
echo
|
||||||
|
|
||||||
for file in $BAD_FILES; do echo $file; done
|
for file in $BAD_FILES; do echo $file; done
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
The following license header should be added to the start of all offending files:
|
The following license header should be added to the start of all offending SOURCE files:
|
||||||
|
|
||||||
=== BEGIN ===
|
=== BEGIN ===
|
||||||
$HEADER
|
$HEADER
|
||||||
=== END ===
|
=== END ===
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BAD_CMAKE" != "" ]; then
|
||||||
|
echo "The following CMake files have incorrect license headers:"
|
||||||
|
echo
|
||||||
|
|
||||||
|
for file in $BAD_CMAKE; do echo $file; done
|
||||||
|
|
||||||
|
cat << EOF
|
||||||
|
|
||||||
|
The following license header should be added to the start of all offending CMake files:
|
||||||
|
|
||||||
|
=== BEGIN ===
|
||||||
|
$HEADER_HASH
|
||||||
|
=== END ===
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat << EOF
|
||||||
If some of the code in this PR is not being contributed by the original author,
|
If some of the code in this PR is not being contributed by the original author,
|
||||||
the files which have been exclusively changed by that code can be ignored.
|
the files which have been exclusively changed by that code can be ignored.
|
||||||
If this happens, this PR requirement can be bypassed once all other files are addressed.
|
If this happens, this PR requirement can be bypassed once all other files are addressed.
|
||||||
|
@ -74,6 +120,17 @@ if [ "$FIX" = "true" ]; then
|
||||||
git add $file
|
git add $file
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for file in $BAD_CMAKE; do
|
||||||
|
cat $file > $file.bak
|
||||||
|
|
||||||
|
cat .ci/license/header-hash.txt > $file
|
||||||
|
echo >> $file
|
||||||
|
cat $file.bak >> $file
|
||||||
|
|
||||||
|
rm $file.bak
|
||||||
|
|
||||||
|
git add $file
|
||||||
|
done
|
||||||
echo "License headers fixed."
|
echo "License headers fixed."
|
||||||
|
|
||||||
if [ "$COMMIT" = "true" ]; then
|
if [ "$COMMIT" = "true" ]; then
|
||||||
|
|
2
.ci/license/header-hash.txt
Normal file
2
.ci/license/header-hash.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
@ -104,6 +104,7 @@ cmake .. -G Ninja \
|
||||||
-DYUZU_USE_QT_WEB_ENGINE=$WEBENGINE \
|
-DYUZU_USE_QT_WEB_ENGINE=$WEBENGINE \
|
||||||
-DYUZU_USE_FASTER_LD=ON \
|
-DYUZU_USE_FASTER_LD=ON \
|
||||||
-DYUZU_ENABLE_LTO=ON \
|
-DYUZU_ENABLE_LTO=ON \
|
||||||
|
-DDYNARMIC_ENABLE_LTO=ON \
|
||||||
"${EXTRA_CMAKE_FLAGS[@]}"
|
"${EXTRA_CMAKE_FLAGS[@]}"
|
||||||
|
|
||||||
ninja -j${NPROC}
|
ninja -j${NPROC}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
AppRun
|
AppRun
|
||||||
eden.desktop
|
eden.desktop
|
||||||
org.eden_emu.eden.desktop
|
dev.eden_emu.eden.desktop
|
||||||
shared/bin/eden
|
shared/bin/eden
|
||||||
shared/lib/lib.path
|
shared/lib/lib.path
|
||||||
shared/lib/ld-linux-x86-64.so.2
|
shared/lib/ld-linux-x86-64.so.2
|
||||||
|
|
|
@ -59,15 +59,15 @@ VERSION="$(echo "$EDEN_TAG")"
|
||||||
mkdir -p ./AppDir
|
mkdir -p ./AppDir
|
||||||
cd ./AppDir
|
cd ./AppDir
|
||||||
|
|
||||||
cp ../dist/org.eden_emu.eden.desktop .
|
cp ../dist/dev.eden_emu.eden.desktop .
|
||||||
cp ../dist/org.eden_emu.eden.svg .
|
cp ../dist/dev.eden_emu.eden.svg .
|
||||||
|
|
||||||
ln -sf ./org.eden_emu.eden.svg ./.DirIcon
|
ln -sf ./dev.eden_emu.eden.svg ./.DirIcon
|
||||||
|
|
||||||
UPINFO='gh-releases-zsync|eden-emulator|Releases|latest|*.AppImage.zsync'
|
UPINFO='gh-releases-zsync|eden-emulator|Releases|latest|*.AppImage.zsync'
|
||||||
|
|
||||||
if [ "$DEVEL" = 'true' ]; then
|
if [ "$DEVEL" = 'true' ]; then
|
||||||
sed -i 's|Name=Eden|Name=Eden Nightly|' ./org.eden_emu.eden.desktop
|
sed -i 's|Name=Eden|Name=Eden Nightly|' ./dev.eden_emu.eden.desktop
|
||||||
UPINFO="$(echo "$UPINFO" | sed 's|Releases|nightly|')"
|
UPINFO="$(echo "$UPINFO" | sed 's|Releases|nightly|')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
which png2icns || [ which yay && yay libicns ] || exit
|
which png2icns || [ which yay && yay libicns ] || exit
|
||||||
which magick || exit
|
which magick || exit
|
||||||
|
|
||||||
export EDEN_SVG_ICO="dist/org.eden_emu.eden.svg"
|
export EDEN_SVG_ICO="dist/dev.eden_emu.eden.svg"
|
||||||
svgo --multipass $EDEN_SVG_ICO
|
svgo --multipass $EDEN_SVG_ICO
|
||||||
|
|
||||||
magick -density 256x256 -background transparent $EDEN_SVG_ICO \
|
magick -density 256x256 -background transparent $EDEN_SVG_ICO \
|
||||||
|
|
|
@ -1,58 +1,45 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -ex
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2025 eden Emulator Project
|
# SPDX-FileCopyrightText: 2025 Eden Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
if [ "$DEVEL" != "true" ]; then
|
if [ "$COMPILER" == "clang" ]
|
||||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DENABLE_QT_UPDATE_CHECKER=ON)
|
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
|
fi
|
||||||
|
|
||||||
if [ "$CCACHE" = "true" ]; then
|
[ -z "$WINDEPLOYQT" ] && { echo "WINDEPLOYQT environment variable required."; exit 1; }
|
||||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DUSE_CCACHE=ON)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$BUNDLE_QT" = "true" ]; then
|
echo $EXTRA_CMAKE_FLAGS
|
||||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DYUZU_USE_BUNDLED_QT=ON)
|
|
||||||
else
|
|
||||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DYUZU_USE_BUNDLED_QT=OFF)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$BUILD_TYPE" ]; then
|
|
||||||
export BUILD_TYPE="Release"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$WINDEPLOYQT" == "" ]; then
|
|
||||||
echo "You must supply the WINDEPLOYQT environment variable."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$USE_WEBENGINE" = "true" ]; then
|
|
||||||
WEBENGINE=ON
|
|
||||||
else
|
|
||||||
WEBENGINE=OFF
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$USE_MULTIMEDIA" = "false" ]; then
|
|
||||||
MULTIMEDIA=OFF
|
|
||||||
else
|
|
||||||
MULTIMEDIA=ON
|
|
||||||
fi
|
|
||||||
|
|
||||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" $@)
|
|
||||||
|
|
||||||
mkdir -p build && cd build
|
mkdir -p build && cd build
|
||||||
cmake .. -G Ninja \
|
cmake .. -G Ninja \
|
||||||
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
-DCMAKE_BUILD_TYPE="${BUILD_TYPE:-Release}" \
|
||||||
-DENABLE_QT_TRANSLATION=ON \
|
-DENABLE_QT_TRANSLATION=ON \
|
||||||
-DUSE_DISCORD_PRESENCE=ON \
|
-DUSE_DISCORD_PRESENCE=ON \
|
||||||
-DYUZU_USE_BUNDLED_SDL2=ON \
|
-DYUZU_USE_BUNDLED_SDL2=ON \
|
||||||
|
-DBUILD_TESTING=OFF \
|
||||||
-DYUZU_TESTS=OFF \
|
-DYUZU_TESTS=OFF \
|
||||||
|
-DDYNARMIC_TESTS=OFF \
|
||||||
-DYUZU_CMD=OFF \
|
-DYUZU_CMD=OFF \
|
||||||
-DYUZU_ROOM_STANDALONE=OFF \
|
-DYUZU_ROOM_STANDALONE=OFF \
|
||||||
-DYUZU_USE_QT_MULTIMEDIA=$MULTIMEDIA \
|
-DYUZU_USE_QT_MULTIMEDIA=${USE_MULTIMEDIA:-false} \
|
||||||
-DYUZU_USE_QT_WEB_ENGINE=$WEBENGINE \
|
-DYUZU_USE_QT_WEB_ENGINE=${USE_WEBENGINE:-false} \
|
||||||
-DYUZU_ENABLE_LTO=ON \
|
-DYUZU_ENABLE_LTO=ON \
|
||||||
"${EXTRA_CMAKE_FLAGS[@]}"
|
-DCMAKE_EXE_LINKER_FLAGS=" /LTCG" \
|
||||||
|
-DDYNARMIC_ENABLE_LTO=ON \
|
||||||
|
-DYUZU_USE_BUNDLED_QT=${BUNDLE_QT:-false} \
|
||||||
|
-DUSE_CCACHE=${CCACHE:-false} \
|
||||||
|
-DENABLE_QT_UPDATE_CHECKER=${DEVEL:-true} \
|
||||||
|
"${EXTRA_CMAKE_FLAGS[@]}" \
|
||||||
|
"$@"
|
||||||
|
|
||||||
ninja
|
ninja
|
||||||
|
|
||||||
|
@ -61,4 +48,5 @@ rm -f bin/*.pdb
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
$WINDEPLOYQT --release --no-compiler-runtime --no-opengl-sw --no-system-dxc-compiler --no-system-d3d-compiler --dir pkg bin/eden.exe
|
$WINDEPLOYQT --release --no-compiler-runtime --no-opengl-sw --no-system-dxc-compiler --no-system-d3d-compiler --dir pkg bin/eden.exe
|
||||||
|
|
||||||
cp bin/* pkg
|
cp bin/* pkg
|
||||||
|
|
42
.ci/windows/install-msvc.ps1
Executable file
42
.ci/windows/install-msvc.ps1
Executable file
|
@ -0,0 +1,42 @@
|
||||||
|
# SPDX-FileCopyrightText: 2025 Eden Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
# Check if running as administrator
|
||||||
|
if (-not ([bool](net session 2>$null))) {
|
||||||
|
Write-Host "This script must be run with administrator privileges!"
|
||||||
|
Exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$VSVer = "17"
|
||||||
|
$ExeFile = "vs_BuildTools.exe"
|
||||||
|
$Uri = "https://aka.ms/vs/$VSVer/release/$ExeFile"
|
||||||
|
$Destination = "./$ExeFile"
|
||||||
|
|
||||||
|
Write-Host "Downloading Visual Studio Build Tools from $Uri"
|
||||||
|
$WebClient = New-Object System.Net.WebClient
|
||||||
|
$WebClient.DownloadFile($Uri, $Destination)
|
||||||
|
Write-Host "Finished downloading $ExeFile"
|
||||||
|
|
||||||
|
$VSROOT = "C:/VSBuildTools/$VSVer"
|
||||||
|
$Arguments = @(
|
||||||
|
"--installPath `"$VSROOT`"", # set custom installation path
|
||||||
|
"--quiet", # suppress UI
|
||||||
|
"--wait", # wait for installation to complete
|
||||||
|
"--norestart", # prevent automatic restart
|
||||||
|
"--add Microsoft.VisualStudio.Workload.VCTools", # add C++ build tools workload
|
||||||
|
"--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64", # add core x86/x64 C++ tools
|
||||||
|
"--add Microsoft.VisualStudio.Component.Windows10SDK.19041" # add specific Windows SDK
|
||||||
|
)
|
||||||
|
|
||||||
|
Write-Host "Installing Visual Studio Build Tools"
|
||||||
|
$InstallProcess = Start-Process -FilePath $Destination -NoNewWindow -PassThru -Wait -ArgumentList $Arguments
|
||||||
|
$ExitCode = $InstallProcess.ExitCode
|
||||||
|
|
||||||
|
if ($ExitCode -ne 0) {
|
||||||
|
Write-Host "Error installing Visual Studio Build Tools (Error: $ExitCode)"
|
||||||
|
Exit $ExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Finished installing Visual Studio Build Tools"
|
|
@ -3,6 +3,12 @@
|
||||||
|
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
# Check if running as administrator
|
||||||
|
if (-not ([bool](net session 2>$null))) {
|
||||||
|
Write-Host "This script must be run with administrator privileges!"
|
||||||
|
Exit 1
|
||||||
|
}
|
||||||
|
|
||||||
$VulkanSDKVer = "1.4.321.1"
|
$VulkanSDKVer = "1.4.321.1"
|
||||||
$ExeFile = "vulkansdk-windows-X64-$VulkanSDKVer.exe"
|
$ExeFile = "vulkansdk-windows-X64-$VulkanSDKVer.exe"
|
||||||
$Uri = "https://sdk.lunarg.com/sdk/download/$VulkanSDKVer/windows/$ExeFile"
|
$Uri = "https://sdk.lunarg.com/sdk/download/$VulkanSDKVer/windows/$ExeFile"
|
||||||
|
|
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -1,6 +0,0 @@
|
||||||
# SPDX-FileCopyrightText: 2014 Citra Emulator Project
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
[submodule "libusb"]
|
|
||||||
path = externals/libusb/libusb
|
|
||||||
url = https://github.com/libusb/libusb.git
|
|
13
.patch/boost/0001-clang-cl.patch
Normal file
13
.patch/boost/0001-clang-cl.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/libs/cobalt/include/boost/cobalt/concepts.hpp b/libs/cobalt/include/boost/cobalt/concepts.hpp
|
||||||
|
index d49f2ec..a9bdb80 100644
|
||||||
|
--- a/libs/cobalt/include/boost/cobalt/concepts.hpp
|
||||||
|
+++ b/libs/cobalt/include/boost/cobalt/concepts.hpp
|
||||||
|
@@ -62,7 +62,7 @@ struct enable_awaitables
|
||||||
|
template <typename T>
|
||||||
|
concept with_get_executor = requires (T& t)
|
||||||
|
{
|
||||||
|
- {t.get_executor()} -> asio::execution::executor;
|
||||||
|
+ t.get_executor();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
11
.patch/boost/0002-use-marmasm.patch
Normal file
11
.patch/boost/0002-use-marmasm.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/libs/context/CMakeLists.txt 2025-09-08 00:42:31.303651800 -0400
|
||||||
|
+++ b/libs/context/CMakeLists.txt 2025-09-08 00:42:40.592184300 -0400
|
||||||
|
@@ -146,7 +146,7 @@
|
||||||
|
set(ASM_LANGUAGE ASM)
|
||||||
|
endif()
|
||||||
|
elseif(BOOST_CONTEXT_ASSEMBLER STREQUAL armasm)
|
||||||
|
- set(ASM_LANGUAGE ASM_ARMASM)
|
||||||
|
+ set(ASM_LANGUAGE ASM_MARMASM)
|
||||||
|
else()
|
||||||
|
set(ASM_LANGUAGE ASM_MASM)
|
||||||
|
endif()
|
14
.patch/boost/0003-armasm-options.patch
Normal file
14
.patch/boost/0003-armasm-options.patch
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
diff --git a/libs/context/CMakeLists.txt b/libs/context/CMakeLists.txt
|
||||||
|
index 8210f65..0e59dd7 100644
|
||||||
|
--- a/libs/context/CMakeLists.txt
|
||||||
|
+++ b/libs/context/CMakeLists.txt
|
||||||
|
@@ -186,7 +186,8 @@ if(BOOST_CONTEXT_IMPLEMENTATION STREQUAL "fcontext")
|
||||||
|
set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "/safeseh")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
- else() # masm
|
||||||
|
+ # armasm doesn't support most of these options
|
||||||
|
+ elseif(NOT BOOST_CONTEXT_ASSEMBLER STREQUAL armasm) # masm
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
|
set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "-x" "assembler-with-cpp")
|
||||||
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|
@ -1,47 +0,0 @@
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 8c1761f..52c4ca4 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -69,42 +69,3 @@ endif()
|
|
||||||
if(CPP_JWT_BUILD_EXAMPLES)
|
|
||||||
add_subdirectory(examples)
|
|
||||||
endif()
|
|
||||||
-
|
|
||||||
-# ##############################################################################
|
|
||||||
-# INSTALL
|
|
||||||
-# ##############################################################################
|
|
||||||
-
|
|
||||||
-include(GNUInstallDirs)
|
|
||||||
-include(CMakePackageConfigHelpers)
|
|
||||||
-set(CPP_JWT_CONFIG_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/cmake/${PROJECT_NAME})
|
|
||||||
-
|
|
||||||
-install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets)
|
|
||||||
-install(
|
|
||||||
- EXPORT ${PROJECT_NAME}Targets
|
|
||||||
- DESTINATION ${CPP_JWT_CONFIG_INSTALL_DIR}
|
|
||||||
- NAMESPACE ${PROJECT_NAME}::
|
|
||||||
- COMPONENT dev)
|
|
||||||
-configure_package_config_file(cmake/Config.cmake.in ${PROJECT_NAME}Config.cmake
|
|
||||||
- INSTALL_DESTINATION ${CPP_JWT_CONFIG_INSTALL_DIR}
|
|
||||||
- NO_SET_AND_CHECK_MACRO)
|
|
||||||
-write_basic_package_version_file(${PROJECT_NAME}ConfigVersion.cmake
|
|
||||||
- COMPATIBILITY SameMajorVersion
|
|
||||||
- ARCH_INDEPENDENT)
|
|
||||||
-install(
|
|
||||||
- FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
|
|
||||||
- ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
|
|
||||||
- DESTINATION ${CPP_JWT_CONFIG_INSTALL_DIR}
|
|
||||||
- COMPONENT dev)
|
|
||||||
-
|
|
||||||
-if(NOT CPP_JWT_USE_VENDORED_NLOHMANN_JSON)
|
|
||||||
- set(CPP_JWT_VENDORED_NLOHMANN_JSON_INSTALL_PATTERN PATTERN "json" EXCLUDE)
|
|
||||||
-endif()
|
|
||||||
-install(
|
|
||||||
- DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/jwt/
|
|
||||||
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/jwt
|
|
||||||
- COMPONENT dev
|
|
||||||
- FILES_MATCHING
|
|
||||||
- PATTERN "*.hpp"
|
|
||||||
- PATTERN "*.ipp"
|
|
||||||
- PATTERN "test" EXCLUDE
|
|
||||||
- ${CPP_JWT_VENDORED_NLOHMANN_JSON_INSTALL_PATTERN})
|
|
|
@ -1,13 +0,0 @@
|
||||||
diff --git a/include/jwt/algorithm.hpp b/include/jwt/algorithm.hpp
|
|
||||||
index 0e3b843..1156e6a 100644
|
|
||||||
--- a/include/jwt/algorithm.hpp
|
|
||||||
+++ b/include/jwt/algorithm.hpp
|
|
||||||
@@ -64,6 +64,8 @@ using verify_func_t = verify_result_t (*) (const jwt::string_view key,
|
|
||||||
const jwt::string_view head,
|
|
||||||
const jwt::string_view jwt_sign);
|
|
||||||
|
|
||||||
+verify_result_t is_secret_a_public_key(const jwt::string_view secret);
|
|
||||||
+
|
|
||||||
namespace algo {
|
|
||||||
|
|
||||||
//Me: TODO: All these can be done using code generaion.
|
|
|
@ -1,10 +0,0 @@
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 5dad9e9..760a1b2 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-cmake_minimum_required (VERSION 3.2.0)
|
|
||||||
+cmake_minimum_required (VERSION 3.10)
|
|
||||||
project (DiscordRPC)
|
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
|
|
@ -1,40 +0,0 @@
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 760a1b2..540d643 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -12,20 +12,6 @@ file(GLOB_RECURSE ALL_SOURCE_FILES
|
|
||||||
src/*.cpp src/*.h src/*.c
|
|
||||||
)
|
|
||||||
|
|
||||||
-# Set CLANG_FORMAT_SUFFIX if you are using custom clang-format, e.g. clang-format-5.0
|
|
||||||
-find_program(CLANG_FORMAT_CMD clang-format${CLANG_FORMAT_SUFFIX})
|
|
||||||
-
|
|
||||||
-if (CLANG_FORMAT_CMD)
|
|
||||||
- add_custom_target(
|
|
||||||
- clangformat
|
|
||||||
- COMMAND ${CLANG_FORMAT_CMD}
|
|
||||||
- -i -style=file -fallback-style=none
|
|
||||||
- ${ALL_SOURCE_FILES}
|
|
||||||
- DEPENDS
|
|
||||||
- ${ALL_SOURCE_FILES}
|
|
||||||
- )
|
|
||||||
-endif(CLANG_FORMAT_CMD)
|
|
||||||
-
|
|
||||||
# thirdparty stuff
|
|
||||||
execute_process(
|
|
||||||
COMMAND mkdir ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty
|
|
||||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
||||||
index 290d761..cd2cc92 100644
|
|
||||||
--- a/src/CMakeLists.txt
|
|
||||||
+++ b/src/CMakeLists.txt
|
|
||||||
@@ -120,10 +120,6 @@ if (${BUILD_SHARED_LIBS})
|
|
||||||
target_compile_definitions(discord-rpc PRIVATE -DDISCORD_BUILDING_SDK)
|
|
||||||
endif(${BUILD_SHARED_LIBS})
|
|
||||||
|
|
||||||
-if (CLANG_FORMAT_CMD)
|
|
||||||
- add_dependencies(discord-rpc clangformat)
|
|
||||||
-endif(CLANG_FORMAT_CMD)
|
|
||||||
-
|
|
||||||
# install
|
|
||||||
|
|
||||||
install(
|
|
|
@ -1,31 +0,0 @@
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 540d643..5d12f3d 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -17,12 +17,14 @@ execute_process(
|
|
||||||
COMMAND mkdir ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty
|
|
||||||
ERROR_QUIET
|
|
||||||
)
|
|
||||||
+# new commit that fixes c++17
|
|
||||||
+set(RAPIDJSON_SHA 3b2441b87f99ab65f37b141a7b548ebadb607b96)
|
|
||||||
|
|
||||||
-find_file(RAPIDJSONTEST NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
|
|
||||||
+find_file(RAPIDJSONTEST NAMES rapidjson rapidjson-${RAPIDJSON_SHA} PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
|
|
||||||
if (NOT RAPIDJSONTEST)
|
|
||||||
message("no rapidjson, download")
|
|
||||||
- set(RJ_TAR_FILE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/v1.1.0.tar.gz)
|
|
||||||
- file(DOWNLOAD https://github.com/miloyip/rapidjson/archive/v1.1.0.tar.gz ${RJ_TAR_FILE})
|
|
||||||
+ set(RJ_TAR_FILE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/${RAPIDJSON_SHA}.tar.gz)
|
|
||||||
+ file(DOWNLOAD https://github.com/miloyip/rapidjson/archive/${RAPIDJSON_SHA}.tar.gz ${RJ_TAR_FILE})
|
|
||||||
execute_process(
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E tar xzf ${RJ_TAR_FILE}
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty
|
|
||||||
@@ -30,7 +32,7 @@ if (NOT RAPIDJSONTEST)
|
|
||||||
file(REMOVE ${RJ_TAR_FILE})
|
|
||||||
endif(NOT RAPIDJSONTEST)
|
|
||||||
|
|
||||||
-find_file(RAPIDJSON NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
|
|
||||||
+find_file(RAPIDJSON NAMES rapidjson rapidjson-${RAPIDJSON_SHA} PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
|
|
||||||
|
|
||||||
add_library(rapidjson STATIC IMPORTED ${RAPIDJSON})
|
|
||||||
|
|
278
CMakeLists.txt
278
CMakeLists.txt
|
@ -15,6 +15,21 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
set(PLATFORM_LINUX ON)
|
set(PLATFORM_LINUX ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
set(CXX_CLANG ON)
|
||||||
|
if (MSVC)
|
||||||
|
set(CXX_CLANG_CL ON)
|
||||||
|
endif()
|
||||||
|
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
|
set(CXX_GCC ON)
|
||||||
|
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
|
set(CXX_CL ON)
|
||||||
|
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
|
||||||
|
set(CXX_ICC ON)
|
||||||
|
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
|
set(CXX_APPLE ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules")
|
||||||
if (PLATFORM_SUN)
|
if (PLATFORM_SUN)
|
||||||
|
@ -29,6 +44,77 @@ if (PLATFORM_SUN)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Detect current compilation architecture and create standard definitions
|
||||||
|
# =======================================================================
|
||||||
|
|
||||||
|
include(CheckSymbolExists)
|
||||||
|
function(detect_architecture symbol arch)
|
||||||
|
if (NOT DEFINED ARCHITECTURE)
|
||||||
|
set(CMAKE_REQUIRED_QUIET 1)
|
||||||
|
check_symbol_exists("${symbol}" "" ARCHITECTURE_${arch})
|
||||||
|
unset(CMAKE_REQUIRED_QUIET)
|
||||||
|
|
||||||
|
# The output variable needs to be unique across invocations otherwise
|
||||||
|
# CMake's crazy scope rules will keep it defined
|
||||||
|
if (ARCHITECTURE_${arch})
|
||||||
|
set(ARCHITECTURE "${arch}" PARENT_SCOPE)
|
||||||
|
set(ARCHITECTURE_${arch} 1 PARENT_SCOPE)
|
||||||
|
add_definitions(-DARCHITECTURE_${arch}=1)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
if (NOT ENABLE_GENERIC)
|
||||||
|
if (MSVC)
|
||||||
|
detect_architecture("_M_AMD64" x86_64)
|
||||||
|
detect_architecture("_M_IX86" x86)
|
||||||
|
detect_architecture("_M_ARM" arm)
|
||||||
|
detect_architecture("_M_ARM64" arm64)
|
||||||
|
else()
|
||||||
|
detect_architecture("__x86_64__" x86_64)
|
||||||
|
detect_architecture("__i386__" x86)
|
||||||
|
detect_architecture("__arm__" arm)
|
||||||
|
detect_architecture("__aarch64__" arm64)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT DEFINED ARCHITECTURE)
|
||||||
|
set(ARCHITECTURE "GENERIC")
|
||||||
|
set(ARCHITECTURE_GENERIC 1)
|
||||||
|
add_definitions(-DARCHITECTURE_GENERIC=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "Target architecture: ${ARCHITECTURE}")
|
||||||
|
|
||||||
|
if (MSVC AND ARCHITECTURE_x86)
|
||||||
|
message(FATAL_ERROR "Attempting to build with the x86 environment is not supported. \
|
||||||
|
This can typically happen if you used the Developer Command Prompt from the start menu;\
|
||||||
|
instead, run vcvars64.bat directly, located at C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvars64.bat")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (CXX_CLANG_CL)
|
||||||
|
add_compile_options(
|
||||||
|
# clang-cl prints literally 10000+ warnings without this
|
||||||
|
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-unused-command-line-argument>
|
||||||
|
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-unsafe-buffer-usage>
|
||||||
|
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-unused-value>
|
||||||
|
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-extra-semi-stmt>
|
||||||
|
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-sign-conversion>
|
||||||
|
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-reserved-identifier>
|
||||||
|
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-deprecated-declarations>
|
||||||
|
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-cast-function-type-mismatch>
|
||||||
|
$<$<COMPILE_LANGUAGE:C,CXX>:/EHsc> # thanks microsoft
|
||||||
|
)
|
||||||
|
|
||||||
|
if (ARCHITECTURE_x86_64)
|
||||||
|
add_compile_options(
|
||||||
|
# Required CPU features for amd64
|
||||||
|
$<$<COMPILE_LANGUAGE:C,CXX>:-msse4.1>
|
||||||
|
$<$<COMPILE_LANGUAGE:C,CXX>:-mcx16>
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/.cache/cpm)
|
set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/.cache/cpm)
|
||||||
|
|
||||||
include(DownloadExternals)
|
include(DownloadExternals)
|
||||||
|
@ -36,7 +122,7 @@ include(CMakeDependentOption)
|
||||||
include(CTest)
|
include(CTest)
|
||||||
|
|
||||||
# Disable Warnings as Errors for MSVC
|
# Disable Warnings as Errors for MSVC
|
||||||
if (MSVC)
|
if (CXX_CL)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /WX-")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /WX-")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -48,17 +134,17 @@ endif()
|
||||||
# On Linux system SDL2 is likely to be lacking HIDAPI support which have drawbacks but is needed for SDL motion
|
# On Linux system SDL2 is likely to be lacking HIDAPI support which have drawbacks but is needed for SDL motion
|
||||||
CMAKE_DEPENDENT_OPTION(ENABLE_SDL2 "Enable the SDL2 frontend" ON "NOT ANDROID" OFF)
|
CMAKE_DEPENDENT_OPTION(ENABLE_SDL2 "Enable the SDL2 frontend" ON "NOT ANDROID" OFF)
|
||||||
|
|
||||||
set(EXT_DEFAULT ON)
|
set(EXT_DEFAULT OFF)
|
||||||
|
|
||||||
if (PLATFORM_FREEBSD)
|
if (MSVC OR ANDROID)
|
||||||
set(EXT_DEFAULT OFF)
|
set(EXT_DEFAULT ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ${EXT_DEFAULT} "ENABLE_SDL2;NOT MSVC" OFF)
|
CMAKE_DEPENDENT_OPTION(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" ${EXT_DEFAULT} "ENABLE_SDL2;NOT MSVC" OFF)
|
||||||
|
|
||||||
cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID" OFF)
|
cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID" OFF)
|
||||||
|
|
||||||
option(ENABLE_OPENGL "Enable OpenGL" ON)
|
cmake_dependent_option(ENABLE_OPENGL "Enable OpenGL" ON "NOT WIN32 OR NOT ARCHITECTURE_arm64" OFF)
|
||||||
mark_as_advanced(FORCE ENABLE_OPENGL)
|
mark_as_advanced(FORCE ENABLE_OPENGL)
|
||||||
|
|
||||||
option(ENABLE_QT "Enable the Qt frontend" ON)
|
option(ENABLE_QT "Enable the Qt frontend" ON)
|
||||||
|
@ -67,14 +153,13 @@ option(ENABLE_QT_UPDATE_CHECKER "Enable update checker for the Qt frontend" OFF)
|
||||||
|
|
||||||
CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF)
|
CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF)
|
||||||
|
|
||||||
option(YUZU_USE_CPM "Use CPM to fetch Eden dependencies if needed" ON)
|
option(YUZU_USE_CPM "Use CPM to fetch system dependencies (fmt, boost, etc) if needed. Externals will still be fetched." ${EXT_DEFAULT})
|
||||||
|
|
||||||
option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
|
option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
|
||||||
option(ENABLE_WIFI_SCAN "Enable WiFi scanning" OFF)
|
option(ENABLE_WIFI_SCAN "Enable WiFi scanning" OFF)
|
||||||
|
|
||||||
option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" ${EXT_DEFAULT})
|
option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" ${EXT_DEFAULT})
|
||||||
option(YUZU_USE_EXTERNAL_VULKAN_HEADERS "Use Vulkan-Headers from externals" ${EXT_DEFAULT})
|
option(YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES "Use Vulkan Utility Headers from externals" ${EXT_DEFAULT})
|
||||||
option(YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES "Use Vulkan-Utility-Libraries from externals" ${EXT_DEFAULT})
|
|
||||||
option(YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS "Use SPIRV-Tools from externals" ${EXT_DEFAULT})
|
option(YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS "Use SPIRV-Tools from externals" ${EXT_DEFAULT})
|
||||||
|
|
||||||
option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF)
|
option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF)
|
||||||
|
@ -93,10 +178,12 @@ option(YUZU_TESTS "Compile tests" "${BUILD_TESTING}")
|
||||||
|
|
||||||
option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ${EXT_DEFAULT})
|
option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ${EXT_DEFAULT})
|
||||||
|
|
||||||
|
# TODO(crueter): CI this?
|
||||||
option(YUZU_DOWNLOAD_ANDROID_VVL "Download validation layer binary for android" ON)
|
option(YUZU_DOWNLOAD_ANDROID_VVL "Download validation layer binary for android" ON)
|
||||||
|
|
||||||
option(FORCE_DOWNLOAD_WIN_BUNDLES "Forcefully download bundled Windows dependencies (useful for CI)" OFF)
|
option(FORCE_DOWNLOAD_WIN_BUNDLES "Forcefully download bundled Windows dependencies (useful for CI)" OFF)
|
||||||
|
|
||||||
|
# TODO(crueter): Cleanup, each dep that has a bundled option should allow to choose between bundled, external, system
|
||||||
if (YUZU_USE_CPM AND ENABLE_SDL2)
|
if (YUZU_USE_CPM AND ENABLE_SDL2)
|
||||||
option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MSVC}")
|
option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MSVC}")
|
||||||
endif()
|
endif()
|
||||||
|
@ -105,22 +192,20 @@ CMAKE_DEPENDENT_OPTION(YUZU_ROOM "Enable dedicated room functionality" ON "NOT A
|
||||||
|
|
||||||
CMAKE_DEPENDENT_OPTION(YUZU_ROOM_STANDALONE "Enable standalone room executable" ON "YUZU_ROOM" OFF)
|
CMAKE_DEPENDENT_OPTION(YUZU_ROOM_STANDALONE "Enable standalone room executable" ON "YUZU_ROOM" OFF)
|
||||||
|
|
||||||
CMAKE_DEPENDENT_OPTION(YUZU_CMD "Compile the eden-cli executable" ON "NOT ANDROID" OFF)
|
CMAKE_DEPENDENT_OPTION(YUZU_CMD "Compile the eden-cli executable" ON "ENABLE_SDL2;NOT ANDROID" OFF)
|
||||||
|
|
||||||
CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile crash dump (Minidump) support" OFF "WIN32 OR LINUX" OFF)
|
CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile crash dump (Minidump) support" OFF "WIN32 OR LINUX" OFF)
|
||||||
|
|
||||||
option(YUZU_CHECK_SUBMODULES "Check if submodules are present" ${EXT_DEFAULT})
|
|
||||||
|
|
||||||
option(YUZU_ENABLE_LTO "Enable link-time optimization" OFF)
|
option(YUZU_ENABLE_LTO "Enable link-time optimization" OFF)
|
||||||
|
|
||||||
option(YUZU_DOWNLOAD_TIME_ZONE_DATA "Always download time zone binaries" ON)
|
option(YUZU_DOWNLOAD_TIME_ZONE_DATA "Always download time zone binaries" ON)
|
||||||
|
|
||||||
option(YUZU_ENABLE_PORTABLE "Allow yuzu to enable portable mode if a user folder is found in the CWD" ON)
|
|
||||||
|
|
||||||
CMAKE_DEPENDENT_OPTION(YUZU_USE_FASTER_LD "Check if a faster linker is available" ON "NOT WIN32" OFF)
|
CMAKE_DEPENDENT_OPTION(YUZU_USE_FASTER_LD "Check if a faster linker is available" ON "NOT WIN32" OFF)
|
||||||
|
|
||||||
CMAKE_DEPENDENT_OPTION(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead of the bundled one)" OFF "APPLE" OFF)
|
CMAKE_DEPENDENT_OPTION(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead of the bundled one)" OFF "APPLE" OFF)
|
||||||
|
|
||||||
|
set(YUZU_TZDB_PATH "" CACHE STRING "Path to a pre-downloaded timezone database")
|
||||||
|
|
||||||
set(DEFAULT_ENABLE_OPENSSL ON)
|
set(DEFAULT_ENABLE_OPENSSL ON)
|
||||||
if (ANDROID OR WIN32 OR APPLE OR PLATFORM_SUN)
|
if (ANDROID OR WIN32 OR APPLE OR PLATFORM_SUN)
|
||||||
# - Windows defaults to the Schannel backend.
|
# - Windows defaults to the Schannel backend.
|
||||||
|
@ -194,53 +279,6 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/hooks/pre-commit AND NOT EXISTS ${PROJECT_SOURCE
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Sanity check : Check that all submodules are present
|
|
||||||
# =======================================================================
|
|
||||||
|
|
||||||
function(check_submodules_present)
|
|
||||||
file(READ "${PROJECT_SOURCE_DIR}/.gitmodules" gitmodules)
|
|
||||||
string(REGEX MATCHALL "path *= *[^ \t\r\n]*" gitmodules ${gitmodules})
|
|
||||||
foreach(module ${gitmodules})
|
|
||||||
string(REGEX REPLACE "path *= *" "" module ${module})
|
|
||||||
|
|
||||||
file(GLOB RESULT "${PROJECT_SOURCE_DIR}/${module}/*")
|
|
||||||
list(LENGTH RESULT RES_LEN)
|
|
||||||
if(RES_LEN EQUAL 0)
|
|
||||||
message(FATAL_ERROR "Git submodule ${module} not found. "
|
|
||||||
"Please run: \ngit submodule update --init --recursive")
|
|
||||||
endif()
|
|
||||||
if (EXISTS "${PROJECT_SOURCE_DIR}/${module}/.git")
|
|
||||||
set(SUBMODULE_DIR "${PROJECT_SOURCE_DIR}/${module}")
|
|
||||||
|
|
||||||
execute_process(
|
|
||||||
COMMAND git rev-parse --short=10 HEAD
|
|
||||||
WORKING_DIRECTORY ${SUBMODULE_DIR}
|
|
||||||
OUTPUT_VARIABLE SUBMODULE_SHA
|
|
||||||
)
|
|
||||||
|
|
||||||
# would probably be better to do string parsing, but whatever
|
|
||||||
execute_process(
|
|
||||||
COMMAND git remote get-url origin
|
|
||||||
WORKING_DIRECTORY ${SUBMODULE_DIR}
|
|
||||||
OUTPUT_VARIABLE SUBMODULE_URL
|
|
||||||
)
|
|
||||||
|
|
||||||
string(REGEX REPLACE "\n|\r" "" SUBMODULE_SHA ${SUBMODULE_SHA})
|
|
||||||
string(REGEX REPLACE "\n|\r|\\.git" "" SUBMODULE_URL ${SUBMODULE_URL})
|
|
||||||
|
|
||||||
get_filename_component(SUBMODULE_NAME ${SUBMODULE_DIR} NAME)
|
|
||||||
|
|
||||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_NAMES ${SUBMODULE_NAME})
|
|
||||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS ${SUBMODULE_SHA})
|
|
||||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_URLS ${SUBMODULE_URL})
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
if(EXISTS ${PROJECT_SOURCE_DIR}/.gitmodules AND YUZU_CHECK_SUBMODULES)
|
|
||||||
check_submodules_present()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
configure_file(${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.qrc
|
configure_file(${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.qrc
|
||||||
${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc
|
${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc
|
||||||
COPYONLY)
|
COPYONLY)
|
||||||
|
@ -262,69 +300,21 @@ if (NOT EXISTS ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.
|
||||||
file(WRITE ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json "")
|
file(WRITE ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json "")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Detect current compilation architecture and create standard definitions
|
|
||||||
# =======================================================================
|
|
||||||
|
|
||||||
include(CheckSymbolExists)
|
|
||||||
function(detect_architecture symbol arch)
|
|
||||||
if (NOT DEFINED ARCHITECTURE)
|
|
||||||
set(CMAKE_REQUIRED_QUIET 1)
|
|
||||||
check_symbol_exists("${symbol}" "" ARCHITECTURE_${arch})
|
|
||||||
unset(CMAKE_REQUIRED_QUIET)
|
|
||||||
|
|
||||||
# The output variable needs to be unique across invocations otherwise
|
|
||||||
# CMake's crazy scope rules will keep it defined
|
|
||||||
if (ARCHITECTURE_${arch})
|
|
||||||
set(ARCHITECTURE "${arch}" PARENT_SCOPE)
|
|
||||||
set(ARCHITECTURE_${arch} 1 PARENT_SCOPE)
|
|
||||||
add_definitions(-DARCHITECTURE_${arch}=1)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
if (NOT ENABLE_GENERIC)
|
|
||||||
if (MSVC)
|
|
||||||
detect_architecture("_M_AMD64" x86_64)
|
|
||||||
detect_architecture("_M_IX86" x86)
|
|
||||||
detect_architecture("_M_ARM" arm)
|
|
||||||
detect_architecture("_M_ARM64" arm64)
|
|
||||||
else()
|
|
||||||
detect_architecture("__x86_64__" x86_64)
|
|
||||||
detect_architecture("__i386__" x86)
|
|
||||||
detect_architecture("__arm__" arm)
|
|
||||||
detect_architecture("__aarch64__" arm64)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT DEFINED ARCHITECTURE)
|
|
||||||
set(ARCHITECTURE "GENERIC")
|
|
||||||
set(ARCHITECTURE_GENERIC 1)
|
|
||||||
add_definitions(-DARCHITECTURE_GENERIC=1)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
message(STATUS "Target architecture: ${ARCHITECTURE}")
|
|
||||||
|
|
||||||
if (MSVC AND ARCHITECTURE_x86)
|
|
||||||
message(FATAL_ERROR "Attempting to build with the x86 environment is not supported. \
|
|
||||||
This can typically happen if you used the Developer Command Prompt from the start menu;\
|
|
||||||
instead, run vcvars64.bat directly, located at C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvars64.bat")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
add_definitions(-DYUZU_UNIX=1)
|
add_compile_definitions(YUZU_UNIX=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ARCHITECTURE_arm64 AND (ANDROID OR PLATFORM_LINUX))
|
if (ARCHITECTURE_arm64 AND (ANDROID OR PLATFORM_LINUX))
|
||||||
set(HAS_NCE 1)
|
set(HAS_NCE 1)
|
||||||
add_definitions(-DHAS_NCE=1)
|
add_compile_definitions(HAS_NCE=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (YUZU_ROOM)
|
if (YUZU_ROOM)
|
||||||
add_definitions(-DYUZU_ROOM)
|
add_compile_definitions(YUZU_ROOM)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Build/optimization presets
|
# Build/optimization presets
|
||||||
if (PLATFORM_LINUX)
|
if (PLATFORM_LINUX OR CXX_CLANG)
|
||||||
if (ARCHITECTURE_x86_64)
|
if (ARCHITECTURE_x86_64)
|
||||||
set(YUZU_BUILD_PRESET "custom" CACHE STRING "Build preset to use. One of: custom, generic, v3, zen2, zen4, native")
|
set(YUZU_BUILD_PRESET "custom" CACHE STRING "Build preset to use. One of: custom, generic, v3, zen2, zen4, native")
|
||||||
if (${YUZU_BUILD_PRESET} STREQUAL "generic")
|
if (${YUZU_BUILD_PRESET} STREQUAL "generic")
|
||||||
|
@ -391,6 +381,7 @@ if (YUZU_USE_CPM)
|
||||||
|
|
||||||
# boost
|
# boost
|
||||||
set(BOOST_INCLUDE_LIBRARIES algorithm icl pool container heap asio headers process filesystem crc variant)
|
set(BOOST_INCLUDE_LIBRARIES algorithm icl pool container heap asio headers process filesystem crc variant)
|
||||||
|
|
||||||
AddJsonPackage(boost)
|
AddJsonPackage(boost)
|
||||||
|
|
||||||
# really annoying thing where boost::headers doesn't work with cpm
|
# really annoying thing where boost::headers doesn't work with cpm
|
||||||
|
@ -400,13 +391,10 @@ if (YUZU_USE_CPM)
|
||||||
if (Boost_ADDED)
|
if (Boost_ADDED)
|
||||||
if (MSVC OR ANDROID)
|
if (MSVC OR ANDROID)
|
||||||
add_compile_definitions(YUZU_BOOST_v1)
|
add_compile_definitions(YUZU_BOOST_v1)
|
||||||
else()
|
|
||||||
message(WARNING "Using bundled Boost on a non-MSVC or Android system is not recommended. You are strongly encouraged to install Boost through your system's package manager.")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT MSVC)
|
if (NOT MSVC OR CXX_CLANG)
|
||||||
# boost sucks
|
# boost sucks
|
||||||
# Solaris (and probably other NIXes) need explicit pthread definition
|
|
||||||
if (PLATFORM_SUN)
|
if (PLATFORM_SUN)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthreads")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthreads")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthreads")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthreads")
|
||||||
|
@ -459,6 +447,14 @@ if (YUZU_USE_CPM)
|
||||||
|
|
||||||
# Opus
|
# Opus
|
||||||
AddJsonPackage(opus)
|
AddJsonPackage(opus)
|
||||||
|
|
||||||
|
if (Opus_ADDED)
|
||||||
|
if (MSVC AND CXX_CLANG)
|
||||||
|
target_compile_options(opus PRIVATE
|
||||||
|
-Wno-implicit-function-declaration
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
# Enforce the search mode of non-required packages for better and shorter failure messages
|
# Enforce the search mode of non-required packages for better and shorter failure messages
|
||||||
find_package(fmt 8 REQUIRED)
|
find_package(fmt 8 REQUIRED)
|
||||||
|
@ -471,6 +467,7 @@ else()
|
||||||
find_package(Opus 1.3 MODULE REQUIRED)
|
find_package(Opus 1.3 MODULE REQUIRED)
|
||||||
find_package(ZLIB 1.2 REQUIRED)
|
find_package(ZLIB 1.2 REQUIRED)
|
||||||
find_package(zstd 1.5 REQUIRED MODULE)
|
find_package(zstd 1.5 REQUIRED MODULE)
|
||||||
|
find_package(Boost 1.79.0 REQUIRED headers context system fiber)
|
||||||
|
|
||||||
if (YUZU_TESTS)
|
if (YUZU_TESTS)
|
||||||
find_package(Catch2 3.0.1 REQUIRED)
|
find_package(Catch2 3.0.1 REQUIRED)
|
||||||
|
@ -489,16 +486,12 @@ if(NOT TARGET Boost::headers)
|
||||||
AddJsonPackage(boost_headers)
|
AddJsonPackage(boost_headers)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_LIBUSB)
|
|
||||||
if (PLATFORM_FREEBSD)
|
|
||||||
find_package(libusb MODULE)
|
|
||||||
else()
|
|
||||||
find_package(libusb 1.0.24 MODULE)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# DiscordRPC
|
# DiscordRPC
|
||||||
if (USE_DISCORD_PRESENCE)
|
if (USE_DISCORD_PRESENCE)
|
||||||
|
if (ARCHITECTURE_arm64)
|
||||||
|
add_compile_definitions(RAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN)
|
||||||
|
endif()
|
||||||
|
|
||||||
AddJsonPackage(discord-rpc)
|
AddJsonPackage(discord-rpc)
|
||||||
|
|
||||||
target_include_directories(discord-rpc INTERFACE ${discord-rpc_SOURCE_DIR}/include)
|
target_include_directories(discord-rpc INTERFACE ${discord-rpc_SOURCE_DIR}/include)
|
||||||
|
@ -601,11 +594,15 @@ endfunction()
|
||||||
add_subdirectory(externals)
|
add_subdirectory(externals)
|
||||||
|
|
||||||
# pass targets from externals
|
# pass targets from externals
|
||||||
find_package(VulkanHeaders)
|
|
||||||
find_package(VulkanUtilityLibraries)
|
find_package(VulkanUtilityLibraries)
|
||||||
|
find_package(libusb)
|
||||||
find_package(VulkanMemoryAllocator)
|
find_package(VulkanMemoryAllocator)
|
||||||
find_package(SPIRV-Tools)
|
find_package(SPIRV-Tools)
|
||||||
|
|
||||||
|
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
|
||||||
|
find_package(xbyak)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (ENABLE_WEB_SERVICE)
|
if (ENABLE_WEB_SERVICE)
|
||||||
find_package(httplib)
|
find_package(httplib)
|
||||||
endif()
|
endif()
|
||||||
|
@ -736,7 +733,7 @@ if (APPLE)
|
||||||
list(APPEND PLATFORM_LIBRARIES ${ICONV_LIBRARY})
|
list(APPEND PLATFORM_LIBRARIES ${ICONV_LIBRARY})
|
||||||
elseif (WIN32)
|
elseif (WIN32)
|
||||||
# Target Windows 10
|
# Target Windows 10
|
||||||
add_definitions(-D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00)
|
add_compile_definitions(_WIN32_WINNT=0x0A00 WINVER=0x0A00)
|
||||||
set(PLATFORM_LIBRARIES winmm ws2_32 iphlpapi)
|
set(PLATFORM_LIBRARIES winmm ws2_32 iphlpapi)
|
||||||
if (MINGW)
|
if (MINGW)
|
||||||
# PSAPI is the Process Status API
|
# PSAPI is the Process Status API
|
||||||
|
@ -806,6 +803,27 @@ if (MSVC AND CMAKE_GENERATOR STREQUAL "Ninja")
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Adjustments for clang-cl
|
||||||
|
if (MSVC AND CXX_CLANG)
|
||||||
|
if (ARCHITECTURE_x86_64)
|
||||||
|
set(FILE_ARCH x86_64)
|
||||||
|
elseif (ARCHITECTURE_arm64)
|
||||||
|
set(FILE_ARCH aarch64)
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "clang-cl: Unsupported architecture ${ARCHITECTURE}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
AddJsonPackage(llvm-mingw)
|
||||||
|
set(LIB_PATH "${llvm-mingw_SOURCE_DIR}/libclang_rt.builtins-${FILE_ARCH}.a")
|
||||||
|
|
||||||
|
add_library(llvm-mingw-runtime STATIC IMPORTED)
|
||||||
|
set_target_properties(llvm-mingw-runtime PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${LIB_PATH}"
|
||||||
|
)
|
||||||
|
|
||||||
|
link_libraries(llvm-mingw-runtime)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (YUZU_USE_FASTER_LD AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if (YUZU_USE_FASTER_LD AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
# We will assume that if the compiler is GCC, it will attempt to use ld.bfd by default.
|
# We will assume that if the compiler is GCC, it will attempt to use ld.bfd by default.
|
||||||
# Try to pick a faster linker.
|
# Try to pick a faster linker.
|
||||||
|
@ -858,14 +876,14 @@ endif()
|
||||||
# https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
|
# https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
|
||||||
# https://www.freedesktop.org/software/appstream/docs/
|
# https://www.freedesktop.org/software/appstream/docs/
|
||||||
if(ENABLE_QT AND UNIX AND NOT APPLE)
|
if(ENABLE_QT AND UNIX AND NOT APPLE)
|
||||||
install(FILES "dist/org.eden_emu.eden.desktop"
|
install(FILES "dist/dev.eden_emu.eden.desktop"
|
||||||
DESTINATION "share/applications")
|
DESTINATION "share/applications")
|
||||||
install(FILES "dist/org.eden_emu.eden.svg"
|
install(FILES "dist/dev.eden_emu.eden.svg"
|
||||||
DESTINATION "share/icons/hicolor/scalable/apps")
|
DESTINATION "share/icons/hicolor/scalable/apps")
|
||||||
|
|
||||||
# TODO: these files need to be updated.
|
# TODO: these files need to be updated.
|
||||||
install(FILES "dist/org.eden_emu.eden.xml"
|
install(FILES "dist/dev.eden_emu.eden.xml"
|
||||||
DESTINATION "share/mime/packages")
|
DESTINATION "share/mime/packages")
|
||||||
install(FILES "dist/org.eden_emu.eden.metainfo.xml"
|
install(FILES "dist/dev.eden_emu.eden.metainfo.xml"
|
||||||
DESTINATION "share/metainfo")
|
DESTINATION "share/metainfo")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -11,10 +11,11 @@
|
||||||
# Future crueter: Wow this was a lie and a half, at this point I might as well make my own CPN
|
# Future crueter: Wow this was a lie and a half, at this point I might as well make my own CPN
|
||||||
# haha just kidding... unless?
|
# haha just kidding... unless?
|
||||||
|
|
||||||
|
# TODO(crueter): Remember to get more than 6 hours of sleep whenever making giant cmake changes
|
||||||
if (MSVC OR ANDROID)
|
if (MSVC OR ANDROID)
|
||||||
set(BUNDLED_DEFAULT OFF)
|
|
||||||
else()
|
|
||||||
set(BUNDLED_DEFAULT ON)
|
set(BUNDLED_DEFAULT ON)
|
||||||
|
else()
|
||||||
|
set(BUNDLED_DEFAULT OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(CPMUTIL_FORCE_BUNDLED
|
option(CPMUTIL_FORCE_BUNDLED
|
||||||
|
@ -26,8 +27,7 @@ option(CPMUTIL_FORCE_SYSTEM
|
||||||
cmake_minimum_required(VERSION 3.22)
|
cmake_minimum_required(VERSION 3.22)
|
||||||
include(CPM)
|
include(CPM)
|
||||||
|
|
||||||
# TODO(crueter): Better solution for separate cpmfiles e.g. per-directory
|
set(CPMUTIL_JSON_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cpmfile.json")
|
||||||
set(CPMUTIL_JSON_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cpmfile.json" CACHE STRING "Location of cpmfile.json")
|
|
||||||
|
|
||||||
if (EXISTS ${CPMUTIL_JSON_FILE})
|
if (EXISTS ${CPMUTIL_JSON_FILE})
|
||||||
file(READ ${CPMUTIL_JSON_FILE} CPMFILE_CONTENT)
|
file(READ ${CPMUTIL_JSON_FILE} CPMFILE_CONTENT)
|
||||||
|
@ -148,11 +148,32 @@ function(AddJsonPackage)
|
||||||
get_json_element("${object}" tag tag "")
|
get_json_element("${object}" tag tag "")
|
||||||
get_json_element("${object}" artifact artifact "")
|
get_json_element("${object}" artifact artifact "")
|
||||||
get_json_element("${object}" git_version git_version "")
|
get_json_element("${object}" git_version git_version "")
|
||||||
|
get_json_element("${object}" git_host git_host "")
|
||||||
get_json_element("${object}" source_subdir source_subdir "")
|
get_json_element("${object}" source_subdir source_subdir "")
|
||||||
get_json_element("${object}" bundled bundled "unset")
|
get_json_element("${object}" bundled bundled "unset")
|
||||||
get_json_element("${object}" find_args find_args "")
|
get_json_element("${object}" find_args find_args "")
|
||||||
get_json_element("${object}" raw_patches patches "")
|
get_json_element("${object}" raw_patches patches "")
|
||||||
|
|
||||||
|
# okay here comes the fun part: REPLACEMENTS!
|
||||||
|
# first: tag gets %VERSION% replaced if applicable, with either git_version (preferred) or version
|
||||||
|
# second: artifact gets %VERSION% and %TAG% replaced accordingly (same rules for VERSION)
|
||||||
|
|
||||||
|
if (git_version)
|
||||||
|
set(version_replace ${git_version})
|
||||||
|
else()
|
||||||
|
set(version_replace ${version})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# TODO(crueter): fmt module for cmake
|
||||||
|
if (tag)
|
||||||
|
string(REPLACE "%VERSION%" "${version_replace}" tag ${tag})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (artifact)
|
||||||
|
string(REPLACE "%VERSION%" "${version_replace}" artifact ${artifact})
|
||||||
|
string(REPLACE "%TAG%" "${tag}" artifact ${artifact})
|
||||||
|
endif()
|
||||||
|
|
||||||
# format patchdir
|
# format patchdir
|
||||||
if (raw_patches)
|
if (raw_patches)
|
||||||
math(EXPR range "${raw_patches_LENGTH} - 1")
|
math(EXPR range "${raw_patches_LENGTH} - 1")
|
||||||
|
@ -184,8 +205,6 @@ function(AddJsonPackage)
|
||||||
# system/bundled
|
# system/bundled
|
||||||
if (bundled STREQUAL "unset" AND DEFINED JSON_BUNDLED_PACKAGE)
|
if (bundled STREQUAL "unset" AND DEFINED JSON_BUNDLED_PACKAGE)
|
||||||
set(bundled ${JSON_BUNDLED_PACKAGE})
|
set(bundled ${JSON_BUNDLED_PACKAGE})
|
||||||
else()
|
|
||||||
set(bundled ON)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
AddPackage(
|
AddPackage(
|
||||||
|
@ -203,6 +222,8 @@ function(AddJsonPackage)
|
||||||
SOURCE_SUBDIR "${source_subdir}"
|
SOURCE_SUBDIR "${source_subdir}"
|
||||||
|
|
||||||
GIT_VERSION ${git_version}
|
GIT_VERSION ${git_version}
|
||||||
|
GIT_HOST ${git_host}
|
||||||
|
|
||||||
ARTIFACT ${artifact}
|
ARTIFACT ${artifact}
|
||||||
TAG ${tag}
|
TAG ${tag}
|
||||||
)
|
)
|
||||||
|
@ -242,6 +263,7 @@ function(AddPackage)
|
||||||
NAME
|
NAME
|
||||||
VERSION
|
VERSION
|
||||||
GIT_VERSION
|
GIT_VERSION
|
||||||
|
GIT_HOST
|
||||||
|
|
||||||
REPO
|
REPO
|
||||||
TAG
|
TAG
|
||||||
|
@ -259,6 +281,7 @@ function(AddPackage)
|
||||||
|
|
||||||
KEY
|
KEY
|
||||||
BUNDLED_PACKAGE
|
BUNDLED_PACKAGE
|
||||||
|
FIND_PACKAGE_ARGUMENTS
|
||||||
)
|
)
|
||||||
|
|
||||||
set(multiValueArgs OPTIONS PATCHES)
|
set(multiValueArgs OPTIONS PATCHES)
|
||||||
|
@ -273,11 +296,17 @@ function(AddPackage)
|
||||||
option(${PKG_ARGS_NAME}_FORCE_SYSTEM "Force the system package for ${PKG_ARGS_NAME}")
|
option(${PKG_ARGS_NAME}_FORCE_SYSTEM "Force the system package for ${PKG_ARGS_NAME}")
|
||||||
option(${PKG_ARGS_NAME}_FORCE_BUNDLED "Force the bundled package for ${PKG_ARGS_NAME}")
|
option(${PKG_ARGS_NAME}_FORCE_BUNDLED "Force the bundled package for ${PKG_ARGS_NAME}")
|
||||||
|
|
||||||
|
if (NOT DEFINED PKG_ARGS_GIT_HOST)
|
||||||
|
set(git_host github.com)
|
||||||
|
else()
|
||||||
|
set(git_host ${PKG_ARGS_GIT_HOST})
|
||||||
|
endif()
|
||||||
|
|
||||||
if (DEFINED PKG_ARGS_URL)
|
if (DEFINED PKG_ARGS_URL)
|
||||||
set(pkg_url ${PKG_ARGS_URL})
|
set(pkg_url ${PKG_ARGS_URL})
|
||||||
|
|
||||||
if (DEFINED PKG_ARGS_REPO)
|
if (DEFINED PKG_ARGS_REPO)
|
||||||
set(pkg_git_url https://github.com/${PKG_ARGS_REPO})
|
set(pkg_git_url https://${git_host}/${PKG_ARGS_REPO})
|
||||||
else()
|
else()
|
||||||
if (DEFINED PKG_ARGS_GIT_URL)
|
if (DEFINED PKG_ARGS_GIT_URL)
|
||||||
set(pkg_git_url ${PKG_ARGS_GIT_URL})
|
set(pkg_git_url ${PKG_ARGS_GIT_URL})
|
||||||
|
@ -286,7 +315,7 @@ function(AddPackage)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
elseif (DEFINED PKG_ARGS_REPO)
|
elseif (DEFINED PKG_ARGS_REPO)
|
||||||
set(pkg_git_url https://github.com/${PKG_ARGS_REPO})
|
set(pkg_git_url https://${git_host}/${PKG_ARGS_REPO})
|
||||||
|
|
||||||
if (DEFINED PKG_ARGS_TAG)
|
if (DEFINED PKG_ARGS_TAG)
|
||||||
set(pkg_key ${PKG_ARGS_TAG})
|
set(pkg_key ${PKG_ARGS_TAG})
|
||||||
|
@ -317,25 +346,23 @@ function(AddPackage)
|
||||||
|
|
||||||
cpm_utils_message(STATUS ${PKG_ARGS_NAME} "Download URL is ${pkg_url}")
|
cpm_utils_message(STATUS ${PKG_ARGS_NAME} "Download URL is ${pkg_url}")
|
||||||
|
|
||||||
if (DEFINED PKG_ARGS_GIT_VERSION)
|
|
||||||
set(git_version ${PKG_ARGS_GIT_VERSION})
|
|
||||||
elseif(DEFINED PKG_ARGS_VERSION)
|
|
||||||
set(git_version ${PKG_ARGS_VERSION})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT DEFINED PKG_ARGS_KEY)
|
if (NOT DEFINED PKG_ARGS_KEY)
|
||||||
if (DEFINED PKG_ARGS_SHA)
|
if (DEFINED PKG_ARGS_SHA)
|
||||||
string(SUBSTRING ${PKG_ARGS_SHA} 0 4 pkg_key)
|
string(SUBSTRING ${PKG_ARGS_SHA} 0 4 pkg_key)
|
||||||
cpm_utils_message(DEBUG ${PKG_ARGS_NAME}
|
cpm_utils_message(DEBUG ${PKG_ARGS_NAME}
|
||||||
"No custom key defined, using ${pkg_key} from sha")
|
"No custom key defined, using ${pkg_key} from sha")
|
||||||
elseif (DEFINED git_version)
|
elseif(DEFINED PKG_ARGS_GIT_VERSION)
|
||||||
set(pkg_key ${git_version})
|
set(pkg_key ${PKG_ARGS_GIT_VERSION})
|
||||||
cpm_utils_message(DEBUG ${PKG_ARGS_NAME}
|
cpm_utils_message(DEBUG ${PKG_ARGS_NAME}
|
||||||
"No custom key defined, using ${pkg_key}")
|
"No custom key defined, using ${pkg_key}")
|
||||||
elseif (DEFINED PKG_ARGS_TAG)
|
elseif (DEFINED PKG_ARGS_TAG)
|
||||||
set(pkg_key ${PKG_ARGS_TAG})
|
set(pkg_key ${PKG_ARGS_TAG})
|
||||||
cpm_utils_message(DEBUG ${PKG_ARGS_NAME}
|
cpm_utils_message(DEBUG ${PKG_ARGS_NAME}
|
||||||
"No custom key defined, using ${pkg_key}")
|
"No custom key defined, using ${pkg_key}")
|
||||||
|
elseif (DEFINED PKG_ARGS_VERSION)
|
||||||
|
set(pkg_key ${PKG_ARGS_VERSION})
|
||||||
|
cpm_utils_message(DEBUG ${PKG_ARGS_NAME}
|
||||||
|
"No custom key defined, using ${pkg_key}")
|
||||||
else()
|
else()
|
||||||
cpm_utils_message(WARNING ${PKG_ARGS_NAME}
|
cpm_utils_message(WARNING ${PKG_ARGS_NAME}
|
||||||
"Could not determine cache key, using CPM defaults")
|
"Could not determine cache key, using CPM defaults")
|
||||||
|
@ -409,9 +436,9 @@ function(AddPackage)
|
||||||
set_precedence(OFF OFF)
|
set_precedence(OFF OFF)
|
||||||
elseif (CPMUTIL_FORCE_SYSTEM)
|
elseif (CPMUTIL_FORCE_SYSTEM)
|
||||||
set_precedence(ON ON)
|
set_precedence(ON ON)
|
||||||
elseif(NOT CPMUTIL_FORCE_BUNDLED)
|
elseif(CPMUTIL_FORCE_BUNDLED)
|
||||||
set_precedence(OFF OFF)
|
set_precedence(OFF OFF)
|
||||||
elseif (DEFINED PKG_ARGS_BUNDLED_PACKAGE)
|
elseif (DEFINED PKG_ARGS_BUNDLED_PACKAGE AND NOT PKG_ARGS_BUNDLED_PACKAGE STREQUAL "unset")
|
||||||
if (PKG_ARGS_BUNDLED_PACKAGE)
|
if (PKG_ARGS_BUNDLED_PACKAGE)
|
||||||
set(local OFF)
|
set(local OFF)
|
||||||
else()
|
else()
|
||||||
|
@ -446,12 +473,15 @@ function(AddPackage)
|
||||||
if (DEFINED PKG_ARGS_SHA)
|
if (DEFINED PKG_ARGS_SHA)
|
||||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS
|
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS
|
||||||
${PKG_ARGS_SHA})
|
${PKG_ARGS_SHA})
|
||||||
elseif(DEFINED git_version)
|
elseif (DEFINED PKG_ARGS_GIT_VERSION)
|
||||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS
|
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS
|
||||||
${git_version})
|
${PKG_ARGS_GIT_VERSION})
|
||||||
elseif (DEFINED PKG_ARGS_TAG)
|
elseif (DEFINED PKG_ARGS_TAG)
|
||||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS
|
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS
|
||||||
${PKG_ARGS_TAG})
|
${PKG_ARGS_TAG})
|
||||||
|
elseif(DEFINED PKG_ARGS_VERSION)
|
||||||
|
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS
|
||||||
|
${PKG_ARGS_VERSION})
|
||||||
else()
|
else()
|
||||||
cpm_utils_message(WARNING ${PKG_ARGS_NAME}
|
cpm_utils_message(WARNING ${PKG_ARGS_NAME}
|
||||||
"Package has no specified sha, tag, or version")
|
"Package has no specified sha, tag, or version")
|
||||||
|
@ -496,6 +526,7 @@ function(add_ci_package key)
|
||||||
set(ARTIFACT_DIR ${${ARTIFACT_PACKAGE}_SOURCE_DIR} PARENT_SCOPE)
|
set(ARTIFACT_DIR ${${ARTIFACT_PACKAGE}_SOURCE_DIR} PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
# TODO(crueter): we could do an AddMultiArchPackage, multiplatformpackage?
|
||||||
# name is the artifact name, package is for find_package override
|
# name is the artifact name, package is for find_package override
|
||||||
function(AddCIPackage)
|
function(AddCIPackage)
|
||||||
set(oneValueArgs
|
set(oneValueArgs
|
||||||
|
|
|
@ -11,10 +11,17 @@ function(download_bundled_external remote_path lib_name cpm_key prefix_var versi
|
||||||
set(package_repo "no_platform")
|
set(package_repo "no_platform")
|
||||||
set(package_extension "no_platform")
|
set(package_extension "no_platform")
|
||||||
|
|
||||||
|
# TODO(crueter): Need to convert ffmpeg to a CI.
|
||||||
if (WIN32 OR FORCE_WIN_ARCHIVES)
|
if (WIN32 OR FORCE_WIN_ARCHIVES)
|
||||||
set(CACHE_KEY "windows")
|
if (ARCHITECTURE_arm64)
|
||||||
set(package_repo "ext-windows-bin/raw/master/")
|
set(CACHE_KEY "windows")
|
||||||
set(package_extension ".7z")
|
set(package_repo "ext-windows-arm64-bin/raw/master/")
|
||||||
|
set(package_extension ".zip")
|
||||||
|
elseif(ARCHITECTURE_x86_64)
|
||||||
|
set(CACHE_KEY "windows")
|
||||||
|
set(package_repo "ext-windows-bin/raw/master/")
|
||||||
|
set(package_extension ".7z")
|
||||||
|
endif()
|
||||||
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
set(CACHE_KEY "linux")
|
set(CACHE_KEY "linux")
|
||||||
set(package_repo "ext-linux-bin/raw/master/")
|
set(package_repo "ext-linux-bin/raw/master/")
|
||||||
|
|
17
CMakeModules/Findmbedtls.cmake
Normal file
17
CMakeModules/Findmbedtls.cmake
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# SPDX-FileCopyrightText: 2025 Eden Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(mbedtls QUIET IMPORTED_TARGET mbedtls)
|
||||||
|
find_package_handle_standard_args(mbedtls
|
||||||
|
REQUIRED_VARS mbedtls_LINK_LIBRARIES
|
||||||
|
VERSION_VAR mbedtls_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_search_module(mbedcrypto QUIET IMPORTED_TARGET mbedcrypto)
|
||||||
|
find_package_handle_standard_args(mbedcrypto
|
||||||
|
REQUIRED_VARS mbedcrypto_LINK_LIBRARIES
|
||||||
|
VERSION_VAR mbedcrypto_VERSION
|
||||||
|
)
|
11
CMakeModules/Findsirit.cmake
Normal file
11
CMakeModules/Findsirit.cmake
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# SPDX-FileCopyrightText: 2025 Eden Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(sirit QUIET IMPORTED_TARGET sirit)
|
||||||
|
find_package_handle_standard_args(sirit
|
||||||
|
REQUIRED_VARS sirit_LINK_LIBRARIES
|
||||||
|
VERSION_VAR sirit_VERSION
|
||||||
|
)
|
|
@ -35,4 +35,6 @@ set(REPO_NAME "Eden")
|
||||||
set(BUILD_ID ${GIT_BRANCH})
|
set(BUILD_ID ${GIT_BRANCH})
|
||||||
set(BUILD_FULLNAME "${REPO_NAME} ${BUILD_VERSION} ")
|
set(BUILD_FULLNAME "${REPO_NAME} ${BUILD_VERSION} ")
|
||||||
|
|
||||||
|
set(CXX_COMPILER "${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
|
||||||
|
|
||||||
configure_file(scm_rev.cpp.in scm_rev.cpp @ONLY)
|
configure_file(scm_rev.cpp.in scm_rev.cpp @ONLY)
|
||||||
|
|
|
@ -12,16 +12,25 @@ set(__windows_copy_files YES)
|
||||||
|
|
||||||
# Any number of files to copy from SOURCE_DIR to DEST_DIR can be specified after DEST_DIR.
|
# Any number of files to copy from SOURCE_DIR to DEST_DIR can be specified after DEST_DIR.
|
||||||
# This copying happens post-build.
|
# This copying happens post-build.
|
||||||
function(windows_copy_files TARGET SOURCE_DIR DEST_DIR)
|
if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
|
||||||
# windows commandline expects the / to be \ so switch them
|
function(windows_copy_files TARGET SOURCE_DIR DEST_DIR)
|
||||||
string(REPLACE "/" "\\\\" SOURCE_DIR ${SOURCE_DIR})
|
# windows commandline expects the / to be \ so switch them
|
||||||
string(REPLACE "/" "\\\\" DEST_DIR ${DEST_DIR})
|
string(REPLACE "/" "\\\\" SOURCE_DIR ${SOURCE_DIR})
|
||||||
|
string(REPLACE "/" "\\\\" DEST_DIR ${DEST_DIR})
|
||||||
|
|
||||||
# /NJH /NJS /NDL /NFL /NC /NS /NP - Silence any output
|
# /NJH /NJS /NDL /NFL /NC /NS /NP - Silence any output
|
||||||
# cmake adds an extra check for command success which doesn't work too well with robocopy
|
# cmake adds an extra check for command success which doesn't work too well with robocopy
|
||||||
# so trick it into thinking the command was successful with the || cmd /c "exit /b 0"
|
# so trick it into thinking the command was successful with the || cmd /c "exit /b 0"
|
||||||
add_custom_command(TARGET ${TARGET} POST_BUILD
|
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEST_DIR}
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEST_DIR}
|
||||||
COMMAND robocopy ${SOURCE_DIR} ${DEST_DIR} ${ARGN} /NJH /NJS /NDL /NFL /NC /NS /NP || cmd /c "exit /b 0"
|
COMMAND robocopy ${SOURCE_DIR} ${DEST_DIR} ${ARGN} /NJH /NJS /NDL /NFL /NC /NS /NP || cmd /c "exit /b 0"
|
||||||
)
|
)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
else()
|
||||||
|
function(windows_copy_files TARGET SOURCE_DIR DEST_DIR)
|
||||||
|
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEST_DIR}
|
||||||
|
COMMAND cp -ra ${SOURCE_DIR}/. ${DEST_DIR}
|
||||||
|
)
|
||||||
|
endfunction()
|
||||||
|
endif()
|
||||||
|
|
|
@ -63,6 +63,7 @@ If you would like to contribute, we are open to new developers and pull requests
|
||||||
* **Solaris**: [Solaris Building Guide](./docs/build/Solaris.md)
|
* **Solaris**: [Solaris Building Guide](./docs/build/Solaris.md)
|
||||||
* **FreeBSD**: [FreeBSD Building Guide](./docs/build/FreeBSD.md)
|
* **FreeBSD**: [FreeBSD Building Guide](./docs/build/FreeBSD.md)
|
||||||
* **macOS**: [macOS Building Guide](./docs/build/macOS.md)
|
* **macOS**: [macOS Building Guide](./docs/build/macOS.md)
|
||||||
|
* **OpenBSD**: [OpenBSD Building Guide](./docs/build/OpenBSD.md)
|
||||||
|
|
||||||
## Download
|
## Download
|
||||||
|
|
||||||
|
|
38
cpmfile.json
38
cpmfile.json
|
@ -10,11 +10,16 @@
|
||||||
"boost": {
|
"boost": {
|
||||||
"package": "Boost",
|
"package": "Boost",
|
||||||
"repo": "boostorg/boost",
|
"repo": "boostorg/boost",
|
||||||
"tag": "boost-1.88.0",
|
"tag": "boost-%VERSION%",
|
||||||
"artifact": "boost-1.88.0-cmake.7z",
|
"artifact": "%TAG%-cmake.tar.xz",
|
||||||
"hash": "e5b049e5b61964480ca816395f63f95621e66cb9bcf616a8b10e441e0e69f129e22443acb11e77bc1e8170f8e4171b9b7719891efc43699782bfcd4b3a365f01",
|
"hash": "4fb7f6fde92762305aad8754d7643cd918dd1f3f67e104e9ab385b18c73178d72a17321354eb203b790b6702f2cf6d725a5d6e2dfbc63b1e35f9eb59fb42ece9",
|
||||||
"git_version": "1.88.0",
|
"git_version": "1.89.0",
|
||||||
"version": "1.57"
|
"version": "1.57",
|
||||||
|
"patches": [
|
||||||
|
"0001-clang-cl.patch",
|
||||||
|
"0002-use-marmasm.patch",
|
||||||
|
"0003-armasm-options.patch"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"fmt": {
|
"fmt": {
|
||||||
"repo": "fmtlib/fmt",
|
"repo": "fmtlib/fmt",
|
||||||
|
@ -77,16 +82,13 @@
|
||||||
},
|
},
|
||||||
"opus": {
|
"opus": {
|
||||||
"package": "Opus",
|
"package": "Opus",
|
||||||
"repo": "xiph/opus",
|
"repo": "crueter/opus",
|
||||||
"sha": "5ded705cf4",
|
"sha": "ab19c44fad",
|
||||||
"hash": "0dc89e58ddda1f3bc6a7037963994770c5806c10e66f5cc55c59286fc76d0544fe4eca7626772b888fd719f434bc8a92f792bdb350c807968b2ac14cfc04b203",
|
"hash": "79d0d015b19e74ce6076197fc32b86fe91d724a0b5a79e86adfc4bdcb946ece384e252adbbf742b74d03040913b70bb0e9556eafa59ef20e42d2f3f4d6f2859a",
|
||||||
"version": "1.3",
|
"version": "1.3",
|
||||||
"find_args": "MODULE",
|
"find_args": "MODULE",
|
||||||
"options": [
|
"options": [
|
||||||
"OPUS_BUILD_TESTING OFF",
|
"OPUS_PRESUME_NEON ON"
|
||||||
"OPUS_BUILD_PROGRAMS OFF",
|
|
||||||
"OPUS_INSTALL_PKG_CONFIG_MODULE OFF",
|
|
||||||
"OPUS_INSTALL_CMAKE_CONFIG_MODULE OFF"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"cubeb": {
|
"cubeb": {
|
||||||
|
@ -103,8 +105,8 @@
|
||||||
},
|
},
|
||||||
"boost_headers": {
|
"boost_headers": {
|
||||||
"repo": "boostorg/headers",
|
"repo": "boostorg/headers",
|
||||||
"sha": "0456900fad",
|
"sha": "95930ca8f5",
|
||||||
"hash": "50cd75dcdfc5f082225cdace058f47b4fb114a47585f7aee1d22236a910a80b667186254c214fa2fcebac67ae6d37ba4b6e695e1faea8affd6fd42a03cf996e3",
|
"hash": "d1dece16f3b209109de02123c537bfe1adf07a62b16c166367e7e5d62e0f7c323bf804c89b3192dd6871bc58a9d879d25a1cc3f7b9da0e497cf266f165816e2a",
|
||||||
"bundled": true
|
"bundled": true
|
||||||
},
|
},
|
||||||
"discord-rpc": {
|
"discord-rpc": {
|
||||||
|
@ -143,5 +145,13 @@
|
||||||
"version": "2.32.8",
|
"version": "2.32.8",
|
||||||
"min_version": "2.26.4",
|
"min_version": "2.26.4",
|
||||||
"cmake_filename": "sdl2"
|
"cmake_filename": "sdl2"
|
||||||
|
},
|
||||||
|
"llvm-mingw": {
|
||||||
|
"repo": "misc/llvm-mingw",
|
||||||
|
"git_host": "git.crueter.xyz",
|
||||||
|
"tag": "20250828",
|
||||||
|
"version": "20250828",
|
||||||
|
"artifact": "clang-rt-builtins.tar.zst",
|
||||||
|
"hash": "d902392caf94e84f223766e2cc51ca5fab6cae36ab8dc6ef9ef6a683ab1c483bfcfe291ef0bd38ab16a4ecc4078344fa8af72da2f225ab4c378dee23f6186181"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ Type=Application
|
||||||
Name=Eden
|
Name=Eden
|
||||||
GenericName=Switch Emulator
|
GenericName=Switch Emulator
|
||||||
Comment=Nintendo Switch video game console emulator
|
Comment=Nintendo Switch video game console emulator
|
||||||
Icon=org.eden_emu.eden
|
Icon=dev.eden_emu.eden
|
||||||
TryExec=eden
|
TryExec=eden
|
||||||
Exec=eden %f
|
Exec=eden %f
|
||||||
Categories=Game;Emulator;Qt;
|
Categories=Game;Emulator;Qt;
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
12
docs/CPM.md
12
docs/CPM.md
|
@ -23,7 +23,7 @@ CPMUtil is a wrapper around CPM that aims to reduce boilerplate and add useful u
|
||||||
|
|
||||||
- `NAME` (required): The package name (must be the same as the `find_package` name if applicable)
|
- `NAME` (required): The package name (must be the same as the `find_package` name if applicable)
|
||||||
- `VERSION`: The minimum version of this package that can be used on the system
|
- `VERSION`: The minimum version of this package that can be used on the system
|
||||||
- `GIT_VERSION`: The version found within git, only used for identification
|
- `GIT_VERSION`: The "version" found within git
|
||||||
- `URL`: The URL to fetch.
|
- `URL`: The URL to fetch.
|
||||||
- `REPO`: The GitHub repo to use (`owner/repo`).
|
- `REPO`: The GitHub repo to use (`owner/repo`).
|
||||||
* Only GitHub is supported for now, though other platforms will see support at some point
|
* Only GitHub is supported for now, though other platforms will see support at some point
|
||||||
|
@ -71,8 +71,9 @@ Hashing strategies, descending order of precedence:
|
||||||
- `KEY`: Custom cache key to use (stored as `.cache/cpm/${packagename_lower}/${key}`)
|
- `KEY`: Custom cache key to use (stored as `.cache/cpm/${packagename_lower}/${key}`)
|
||||||
* Default is based on, in descending order of precedence:
|
* Default is based on, in descending order of precedence:
|
||||||
- First 4 characters of the sha
|
- First 4 characters of the sha
|
||||||
- `GIT_VERSION`, or `VERSION` if not specified
|
- `GIT_VERSION`
|
||||||
- Tag
|
- Tag
|
||||||
|
- `VERSION`
|
||||||
- Otherwise, CPM defaults will be used. This is not recommended as it doesn't produce reproducible caches
|
- Otherwise, CPM defaults will be used. This is not recommended as it doesn't produce reproducible caches
|
||||||
- `DOWNLOAD_ONLY`: Whether or not to configure the downloaded package via CMake
|
- `DOWNLOAD_ONLY`: Whether or not to configure the downloaded package via CMake
|
||||||
* Useful to turn `OFF` if the project doesn't use CMake
|
* Useful to turn `OFF` if the project doesn't use CMake
|
||||||
|
@ -232,12 +233,9 @@ In order: OpenSSL CI, Boost (tag + artifact), discord-rpc (sha + options + patch
|
||||||
To include CPMUtil:
|
To include CPMUtil:
|
||||||
|
|
||||||
```cmake
|
```cmake
|
||||||
set(CPMUTIL_JSON_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cpmfile.json)
|
|
||||||
include(CPMUtil)
|
include(CPMUtil)
|
||||||
```
|
```
|
||||||
|
|
||||||
You may omit the first line if you are not utilizing cpmfile.
|
|
||||||
|
|
||||||
## Prefetching
|
## Prefetching
|
||||||
|
|
||||||
- To prefetch a CPM dependency (requires cpmfile):
|
- To prefetch a CPM dependency (requires cpmfile):
|
||||||
|
@ -245,8 +243,8 @@ You may omit the first line if you are not utilizing cpmfile.
|
||||||
- To prefetch all CPM dependencies:
|
- To prefetch all CPM dependencies:
|
||||||
* `tools/cpm-fetch-all.sh`
|
* `tools/cpm-fetch-all.sh`
|
||||||
|
|
||||||
Currently, `cpm-fetch.sh` defines the following directories for cpmfiles:
|
Currently, `cpm-fetch.sh` defines the following directories for cpmfiles (max depth of 2, so subdirs are caught as well):
|
||||||
|
|
||||||
`externals src/yuzu/externals externals/ffmpeg src/dynarmic/externals externals/nx_tzdb`
|
`externals src/yuzu src/dynarmic .`
|
||||||
|
|
||||||
Whenever you add a new cpmfile, update the script accordingly
|
Whenever you add a new cpmfile, update the script accordingly
|
|
@ -6,6 +6,7 @@
|
||||||
* **Solaris**: [Solaris Building Guide](./build/Solaris.md)
|
* **Solaris**: [Solaris Building Guide](./build/Solaris.md)
|
||||||
* **FreeBSD**: [FreeBSD Building Guide](./build/FreeBSD.md)
|
* **FreeBSD**: [FreeBSD Building Guide](./build/FreeBSD.md)
|
||||||
* **macOS**: [macOS Building Guide](./build/macOS.md)
|
* **macOS**: [macOS Building Guide](./build/macOS.md)
|
||||||
|
* **OpenBSD**: [OpenBSD Building Guide](./build/OpenBSD.md)
|
||||||
|
|
||||||
# CPM
|
# CPM
|
||||||
|
|
||||||
|
|
11
docs/User.md
Normal file
11
docs/User.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# User configuration
|
||||||
|
|
||||||
|
## Configuration directories
|
||||||
|
|
||||||
|
Eden will store configuration in the following directories:
|
||||||
|
|
||||||
|
- **Windows**: `%AppData%\Roaming`.
|
||||||
|
- **Android**: Data is stored internally.
|
||||||
|
- **Linux, macOS, FreeBSD, Solaris, OpenBSD**: `$XDG_DATA_HOME`, `$XDG_CACHE_HOME`, `$XDG_CONFIG_HOME`.
|
||||||
|
|
||||||
|
If a `user` directory is present in the current working directory, that will override all global configuration directories and the emulator will use that instead.
|
84
docs/build/Android.md
vendored
84
docs/build/Android.md
vendored
|
@ -1,42 +1,42 @@
|
||||||
# Note: These build instructions are a work-in-progress.
|
# Note: These build instructions are a work-in-progress.
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
* [Android Studio](https://developer.android.com/studio)
|
* [Android Studio](https://developer.android.com/studio)
|
||||||
* [NDK 25.2.9519653 and CMake 3.22.1](https://developer.android.com/studio/projects/install-ndk#default-version)
|
* [NDK 25.2.9519653 and CMake 3.22.1](https://developer.android.com/studio/projects/install-ndk#default-version)
|
||||||
* [Git](https://git-scm.com/download)
|
* [Git](https://git-scm.com/download)
|
||||||
|
|
||||||
### WINDOWS ONLY - Additional Dependencies
|
### WINDOWS ONLY - Additional Dependencies
|
||||||
* **[Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/)** - **Make sure to select "Desktop development with C++" support in the installer. Make sure to update to the latest version if already installed.**
|
* **[Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/)** - **Make sure to select "Desktop development with C++" support in the installer. Make sure to update to the latest version if already installed.**
|
||||||
* **[Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows)** - **Make sure to select Latest SDK.**
|
* **[Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows)** - **Make sure to select Latest SDK.**
|
||||||
- A convenience script to install the latest SDK is provided in `.ci\windows\install-vulkan-sdk.ps1`.
|
- A convenience script to install the latest SDK is provided in `.ci\windows\install-vulkan-sdk.ps1`.
|
||||||
|
|
||||||
## Cloning Eden with Git
|
## Cloning Eden with Git
|
||||||
```
|
```
|
||||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden.git
|
git clone --recursive https://git.eden-emu.dev/eden-emu/eden.git
|
||||||
```
|
```
|
||||||
Eden by default will be cloned into -
|
Eden by default will be cloned into -
|
||||||
* `C:\Users\<user-name>\eden` on Windows
|
* `C:\Users\<user-name>\eden` on Windows
|
||||||
* `~/eden` on Linux
|
* `~/eden` on Linux
|
||||||
* And wherever on macOS
|
* And wherever on macOS
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
1. Start Android Studio, on the startup dialog select `Open`.
|
1. Start Android Studio, on the startup dialog select `Open`.
|
||||||
2. Navigate to the `eden/src/android` directory and click on `OK`.
|
2. Navigate to the `eden/src/android` directory and click on `OK`.
|
||||||
3. In `Build > Select Build Variant`, select `release` or `relWithDebInfo` as the "Active build variant".
|
3. In `Build > Select Build Variant`, select `release` or `relWithDebInfo` as the "Active build variant".
|
||||||
4. Build the project with `Build > Make Project` or run it on an Android device with `Run > Run 'app'`.
|
4. Build the project with `Build > Make Project` or run it on an Android device with `Run > Run 'app'`.
|
||||||
|
|
||||||
## Building with Terminal
|
## Building with Terminal
|
||||||
1. Download the SDK and NDK from Android Studio.
|
1. Download the SDK and NDK from Android Studio.
|
||||||
2. Navigate to SDK and NDK paths.
|
2. Navigate to SDK and NDK paths.
|
||||||
3. Then set ANDROID_SDK_ROOT and ANDROID_NDK_ROOT in terminal via
|
3. Then set ANDROID_SDK_ROOT and ANDROID_NDK_ROOT in terminal via
|
||||||
`export ANDROID_SDK_ROOT=path/to/sdk`
|
`export ANDROID_SDK_ROOT=path/to/sdk`
|
||||||
`export ANDROID_NDK_ROOT=path/to/ndk`.
|
`export ANDROID_NDK_ROOT=path/to/ndk`.
|
||||||
4. Navigate to `eden/src/android`.
|
4. Navigate to `eden/src/android`.
|
||||||
5. Then Build with `./gradlew assemblerelWithDebInfo`.
|
5. Then Build with `./gradlew assemblerelWithDebInfo`.
|
||||||
6. To build the optimised build use `./gradlew assembleGenshinSpoofRelWithDebInfo`.
|
6. To build the optimised build use `./gradlew assembleGenshinSpoofRelWithDebInfo`.
|
||||||
|
|
||||||
### Script
|
### Script
|
||||||
A convenience script for building is provided in `.ci/android/build.sh`. The built APK can be put into an `artifacts` directory via `.ci/android/package.sh`. On Windows, these must be done in the Git Bash or MinGW terminal.
|
A convenience script for building is provided in `.ci/android/build.sh`. The built APK can be put into an `artifacts` directory via `.ci/android/package.sh`. On Windows, these must be done in the Git Bash or MinGW terminal.
|
||||||
|
|
||||||
### Additional Resources
|
### Additional Resources
|
||||||
https://developer.android.com/studio/intro
|
https://developer.android.com/studio/intro
|
||||||
|
|
164
docs/build/FreeBSD.md
vendored
164
docs/build/FreeBSD.md
vendored
|
@ -1,85 +1,81 @@
|
||||||
## One word of caution before proceeding.
|
Eden is not currently available as a port on FreeBSD, though it is in the works. For now, the recommended method of usage is to compile it yourself. Check back often, as the build process frequently changes.
|
||||||
|
|
||||||
This is not the usual or preferred way to build programs on FreeBSD.
|
## Dependencies.
|
||||||
As of writing there is no official fresh port available for Eden, but it is in the works.
|
Eden needs the following dependencies:
|
||||||
After it is available you can find a link to the eden-emu fresh port here and on Escary's github repo.
|
|
||||||
See this build as an AppImage alternative for FreeBSD.
|
```
|
||||||
|
devel/cmake
|
||||||
## Dependencies.
|
devel/sdl20
|
||||||
Before we start we need some dependencies.
|
devel/boost-libs
|
||||||
These dependencies are generally needed to build Eden on FreeBSD.
|
devel/catch2
|
||||||
|
devel/libfmt
|
||||||
```
|
devel/nlohmann-json
|
||||||
devel/cmake
|
devel/ninja
|
||||||
devel/sdl20
|
devel/nasm
|
||||||
devel/boost-libs
|
devel/autoconf
|
||||||
devel/catch2
|
devel/pkgconf
|
||||||
devel/libfmt
|
devel/qt6-base
|
||||||
devel/nlohmann-json
|
|
||||||
devel/ninja
|
net/enet
|
||||||
devel/nasm
|
|
||||||
devel/autoconf
|
multimedia/ffnvcodec-headers
|
||||||
devel/pkgconf
|
multimedia/ffmpeg
|
||||||
devel/qt6-base
|
|
||||||
|
audio/opus
|
||||||
multimedia/ffnvcodec-headers
|
|
||||||
multimedia/ffmpeg
|
archivers/liblz4
|
||||||
|
|
||||||
audio/opus
|
lang/gcc12
|
||||||
|
|
||||||
archivers/liblz4
|
graphics/glslang
|
||||||
|
graphics/vulkan-utility-libraries
|
||||||
lang/gcc12
|
```
|
||||||
|
|
||||||
graphics/glslang
|
If using FreeBSD 12 or prior, use `devel/pkg-config` instead.
|
||||||
graphics/vulkan-utility-libraries
|
|
||||||
```
|
---
|
||||||
|
|
||||||
If using FreeBSD 12 or prior, use `devel/pkg-config` instead.
|
### Build preparations:
|
||||||
|
Run the following command to clone eden with git:
|
||||||
---
|
```sh
|
||||||
|
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
||||||
### Build preparations:
|
```
|
||||||
Run the following command to clone eden with git:
|
You usually want to add the `--recursive` parameter as it also takes care of the external dependencies for you.
|
||||||
```sh
|
|
||||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
Now change into the eden directory and create a build directory there:
|
||||||
```
|
```sh
|
||||||
You usually want to add the `--recursive` parameter as it also takes care of the external dependencies for you.
|
cd eden
|
||||||
|
mkdir build
|
||||||
Now change into the eden directory and create a build directory there:
|
```
|
||||||
```sh
|
|
||||||
cd eden
|
Change into that build directory:
|
||||||
mkdir build
|
```sh
|
||||||
```
|
cd build
|
||||||
|
```
|
||||||
Change into that build directory:
|
|
||||||
```sh
|
#### 1. Building in Release Mode (usually preferred and the most performant choice):
|
||||||
cd build
|
```sh
|
||||||
```
|
cmake .. -GNinja -DYUZU_TESTS=OFF
|
||||||
|
```
|
||||||
#### 1. Building in Release Mode (usually preferred and the most performant choice):
|
|
||||||
```sh
|
#### 2. Building in Release Mode with debugging symbols (useful if you want to debug errors for a eventual fix):
|
||||||
cmake .. -GNinja -DYUZU_TESTS=OFF
|
```sh
|
||||||
```
|
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_TESTS=ON
|
||||||
|
```
|
||||||
#### 2. Building in Release Mode with debugging symbols (useful if you want to debug errors for a eventual fix):
|
|
||||||
```sh
|
Build the emulator locally:
|
||||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_TESTS=ON
|
```sh
|
||||||
```
|
ninja
|
||||||
|
```
|
||||||
Build the emulator locally:
|
|
||||||
```sh
|
Optional: If you wish to install eden globally onto your system issue the following command:
|
||||||
ninja
|
```sh
|
||||||
```
|
sudo ninja install
|
||||||
|
```
|
||||||
Optional: If you wish to install eden globally onto your system issue the following command:
|
OR
|
||||||
```sh
|
```sh
|
||||||
sudo ninja install
|
doas -- ninja install
|
||||||
```
|
```
|
||||||
OR
|
|
||||||
```sh
|
## OpenSSL
|
||||||
doas -- ninja install
|
|
||||||
```
|
|
||||||
|
|
||||||
## OpenSSL
|
|
||||||
The available OpenSSL port (3.0.17) is out-of-date, and using a bundled static library instead is recommended; to do so, add `-DYUZU_USE_CPM=ON` to your CMake configure command.
|
The available OpenSSL port (3.0.17) is out-of-date, and using a bundled static library instead is recommended; to do so, add `-DYUZU_USE_CPM=ON` to your CMake configure command.
|
276
docs/build/Linux.md
vendored
276
docs/build/Linux.md
vendored
|
@ -1,138 +1,138 @@
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|
||||||
You'll need to download and install the following to build Eden:
|
You'll need to download and install the following to build Eden:
|
||||||
|
|
||||||
* [GCC](https://gcc.gnu.org/) v11+ (for C++20 support) & misc
|
* [GCC](https://gcc.gnu.org/) v11+ (for C++20 support) & misc
|
||||||
* If GCC 12 is installed, [Clang](https://clang.llvm.org/) v14+ is required for compiling
|
* If GCC 12 is installed, [Clang](https://clang.llvm.org/) v14+ is required for compiling
|
||||||
* [CMake](https://www.cmake.org/) 3.22+
|
* [CMake](https://www.cmake.org/) 3.22+
|
||||||
|
|
||||||
The following are handled by Eden's externals:
|
The following are handled by Eden's externals:
|
||||||
|
|
||||||
* [FFmpeg](https://ffmpeg.org/)
|
* [FFmpeg](https://ffmpeg.org/)
|
||||||
* [SDL2](https://www.libsdl.org/download-2.0.php) 2.0.18+
|
* [SDL2](https://www.libsdl.org/download-2.0.php) 2.0.18+
|
||||||
* [opus](https://opus-codec.org/downloads/) 1.3+
|
* [opus](https://opus-codec.org/downloads/) 1.3+
|
||||||
|
|
||||||
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:
|
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:
|
||||||
|
|
||||||
* [Boost](https://www.boost.org/users/download/) 1.79.0+
|
* [Boost](https://www.boost.org/users/download/) 1.79.0+
|
||||||
* [Catch2](https://github.com/catchorg/Catch2) 2.13.7 - 2.13.9
|
* [Catch2](https://github.com/catchorg/Catch2) 2.13.7 - 2.13.9
|
||||||
* [fmt](https://fmt.dev/) 8.0.1+
|
* [fmt](https://fmt.dev/) 8.0.1+
|
||||||
* [lz4](http://www.lz4.org) 1.8+
|
* [lz4](http://www.lz4.org) 1.8+
|
||||||
* [nlohmann_json](https://github.com/nlohmann/json) 3.8+
|
* [nlohmann_json](https://github.com/nlohmann/json) 3.8+
|
||||||
* [OpenSSL](https://www.openssl.org/source/) 1.1.1+
|
* [OpenSSL](https://www.openssl.org/source/) 1.1.1+
|
||||||
* [ZLIB](https://www.zlib.net/) 1.2+
|
* [ZLIB](https://www.zlib.net/) 1.2+
|
||||||
* [zstd](https://facebook.github.io/zstd/) 1.5+
|
* [zstd](https://facebook.github.io/zstd/) 1.5+
|
||||||
* [enet](http://enet.bespin.org/) 1.3+
|
* [enet](http://enet.bespin.org/) 1.3+
|
||||||
* [cubeb](https://github.com/mozilla/cubeb)
|
* [cubeb](https://github.com/mozilla/cubeb)
|
||||||
* [SimpleIni](https://github.com/brofield/simpleini)
|
* [SimpleIni](https://github.com/brofield/simpleini)
|
||||||
|
|
||||||
Certain other dependencies (httplib, jwt, sirit, etc.) will be fetched by CPM regardless. System packages *can* be used for these libraries but this is generally not recommended.
|
Certain other dependencies (httplib, jwt, sirit, etc.) will be fetched by CPM regardless. System packages *can* be used for these libraries but this is generally not recommended.
|
||||||
|
|
||||||
Dependencies are listed here as commands that can be copied/pasted. Of course, they should be inspected before being run.
|
Dependencies are listed here as commands that can be copied/pasted. Of course, they should be inspected before being run.
|
||||||
|
|
||||||
- Arch / Manjaro:
|
- Arch / Manjaro:
|
||||||
- `sudo pacman -Syu --needed base-devel boost catch2 cmake enet ffmpeg fmt git glslang libzip lz4 mbedtls ninja nlohmann-json openssl opus qt6-base qt6-multimedia sdl2 zlib zstd zip unzip`
|
- `sudo pacman -Syu --needed base-devel boost catch2 cmake enet ffmpeg fmt git glslang libzip lz4 mbedtls ninja nlohmann-json openssl opus qt6-base qt6-multimedia sdl2 zlib zstd zip unzip`
|
||||||
- Building with QT Web Engine requires `qt6-webengine` as well.
|
- Building with QT Web Engine requires `qt6-webengine` as well.
|
||||||
- Proper wayland support requires `qt6-wayland`
|
- Proper wayland support requires `qt6-wayland`
|
||||||
- GCC 11 or later is required.
|
- GCC 11 or later is required.
|
||||||
|
|
||||||
- Ubuntu / Linux Mint / Debian:
|
- Ubuntu / Linux Mint / Debian:
|
||||||
- `sudo apt-get install autoconf cmake g++ gcc git glslang-tools libasound2 libboost-context-dev libglu1-mesa-dev libhidapi-dev libpulse-dev libtool libudev-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxext-dev libxkbcommon-x11-0 mesa-common-dev nasm ninja-build qt6-base-private-dev libmbedtls-dev catch2 libfmt-dev liblz4-dev nlohmann-json3-dev libzstd-dev libssl-dev libavfilter-dev libavcodec-dev libswscale-dev pkg-config zlib1g-dev libva-dev libvdpau-dev`
|
- `sudo apt-get install autoconf cmake g++ gcc git glslang-tools libasound2 libboost-context-dev libglu1-mesa-dev libhidapi-dev libpulse-dev libtool libudev-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxext-dev libxkbcommon-x11-0 mesa-common-dev nasm ninja-build qt6-base-private-dev libmbedtls-dev catch2 libfmt-dev liblz4-dev nlohmann-json3-dev libzstd-dev libssl-dev libavfilter-dev libavcodec-dev libswscale-dev pkg-config zlib1g-dev libva-dev libvdpau-dev`
|
||||||
- Ubuntu 22.04, Linux Mint 20, or Debian 12 or later is required.
|
- Ubuntu 22.04, Linux Mint 20, or Debian 12 or later is required.
|
||||||
- Users need to manually specify building with QT Web Engine enabled. This is done using the parameter `-DYUZU_USE_QT_WEB_ENGINE=ON` when running CMake.
|
- Users need to manually specify building with QT Web Engine enabled. This is done using the parameter `-DYUZU_USE_QT_WEB_ENGINE=ON` when running CMake.
|
||||||
- Users need to manually disable building SDL2 from externals if they intend to use the version provided by their system by adding the parameters `-DYUZU_USE_EXTERNAL_SDL2=OFF`
|
- Users need to manually disable building SDL2 from externals if they intend to use the version provided by their system by adding the parameters `-DYUZU_USE_EXTERNAL_SDL2=OFF`
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
cmake .. -GNinja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
|
cmake .. -GNinja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
|
||||||
```
|
```
|
||||||
|
|
||||||
- Fedora:
|
- Fedora:
|
||||||
- `sudo dnf install autoconf ccache cmake fmt-devel gcc{,-c++} glslang hidapi-devel json-devel libtool libusb1-devel libzstd-devel lz4-devel nasm ninja-build openssl-devel pulseaudio-libs-devel qt6-linguist qt6-qtbase{-private,}-devel qt6-qtwebengine-devel qt6-qtmultimedia-devel speexdsp-devel wayland-devel zlib-devel ffmpeg-devel libXext-devel`
|
- `sudo dnf install autoconf ccache cmake fmt-devel gcc{,-c++} glslang hidapi-devel json-devel libtool libusb1-devel libzstd-devel lz4-devel nasm ninja-build openssl-devel pulseaudio-libs-devel qt6-linguist qt6-qtbase{-private,}-devel qt6-qtwebengine-devel qt6-qtmultimedia-devel speexdsp-devel wayland-devel zlib-devel ffmpeg-devel libXext-devel`
|
||||||
- Fedora 32 or later is required.
|
- Fedora 32 or later is required.
|
||||||
- Due to GCC 12, Fedora 36 or later users need to install `clang`, and configure CMake to use it via `-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang`
|
- Due to GCC 12, Fedora 36 or later users need to install `clang`, and configure CMake to use it via `-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang`
|
||||||
- CMake arguments to force system libraries:
|
- CMake arguments to force system libraries:
|
||||||
- SDL2: `-DYUZU_USE_BUNDLED_SDL2=OFF -DYUZU_USE_EXTERNAL_SDL2=OFF`
|
- SDL2: `-DYUZU_USE_BUNDLED_SDL2=OFF -DYUZU_USE_EXTERNAL_SDL2=OFF`
|
||||||
- FFmpeg: `-DYUZU_USE_EXTERNAL_FFMPEG=OFF`
|
- FFmpeg: `-DYUZU_USE_EXTERNAL_FFMPEG=OFF`
|
||||||
- [RPM Fusion](https://rpmfusion.org/) (free) is required to install `ffmpeg-devel`
|
- [RPM Fusion](https://rpmfusion.org/) (free) is required to install `ffmpeg-devel`
|
||||||
|
|
||||||
### Cloning Eden with Git
|
### Cloning Eden with Git
|
||||||
|
|
||||||
**Master:**
|
**Master:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
||||||
cd eden
|
cd eden
|
||||||
```
|
```
|
||||||
|
|
||||||
The `--recursive` option automatically clones the required Git submodules.
|
The `--recursive` option automatically clones the required Git submodules.
|
||||||
|
|
||||||
### Building Eden in Release Mode (Optimised)
|
### Building Eden in Release Mode (Optimised)
|
||||||
|
|
||||||
If you need to run ctests, you can disable `-DYUZU_TESTS=OFF` and install Catch2.
|
If you need to run ctests, you can disable `-DYUZU_TESTS=OFF` and install Catch2.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake .. -GNinja -DYUZU_TESTS=OFF
|
cmake .. -GNinja -DYUZU_TESTS=OFF
|
||||||
ninja
|
ninja
|
||||||
sudo ninja install
|
sudo ninja install
|
||||||
```
|
```
|
||||||
You may also want to include support for Discord Rich Presence by adding `-DUSE_DISCORD_PRESENCE=ON` after `cmake ..`
|
You may also want to include support for Discord Rich Presence by adding `-DUSE_DISCORD_PRESENCE=ON` after `cmake ..`
|
||||||
|
|
||||||
`-DYUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS=OFF` might be needed if ninja command failed with `undefined reference to symbol 'spvOptimizerOptionsCreate`, reason currently unknown
|
`-DYUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS=OFF` might be needed if ninja command failed with `undefined reference to symbol 'spvOptimizerOptionsCreate`, reason currently unknown
|
||||||
|
|
||||||
Optionally, you can use `cmake-gui ..` to adjust various options (e.g. disable the Qt GUI).
|
Optionally, you can use `cmake-gui ..` to adjust various options (e.g. disable the Qt GUI).
|
||||||
|
|
||||||
### Building Eden in Debug Mode (Slow)
|
### Building Eden in Debug Mode (Slow)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DYUZU_TESTS=OFF
|
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DYUZU_TESTS=OFF
|
||||||
ninja
|
ninja
|
||||||
```
|
```
|
||||||
|
|
||||||
### Building with debug symbols
|
### Building with debug symbols
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU -DYUZU_TESTS=OFF
|
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU -DYUZU_TESTS=OFF
|
||||||
ninja
|
ninja
|
||||||
```
|
```
|
||||||
|
|
||||||
### Building with Scripts
|
### Building with Scripts
|
||||||
A convenience script for building is provided in `.ci/linux/build.sh`. You must provide an arch target for optimization, e.g. `.ci/linux/build.sh amd64`. Valid targets:
|
A convenience script for building is provided in `.ci/linux/build.sh`. You must provide an arch target for optimization, e.g. `.ci/linux/build.sh amd64`. Valid targets:
|
||||||
- `legacy`: x86_64 generic, only needed for CPUs older than 2013 or so
|
- `legacy`: x86_64 generic, only needed for CPUs older than 2013 or so
|
||||||
- `amd64`: x86_64-v3, for CPUs newer than 2013 or so
|
- `amd64`: x86_64-v3, for CPUs newer than 2013 or so
|
||||||
- `steamdeck` / `zen2`: For Steam Deck or Zen >= 2 AMD CPUs (untested on Intel)
|
- `steamdeck` / `zen2`: For Steam Deck or Zen >= 2 AMD CPUs (untested on Intel)
|
||||||
- `rog-ally` / `allyx` / `zen4`: For ROG Ally X or Zen >= 4 AMD CPUs (untested on Intel)
|
- `rog-ally` / `allyx` / `zen4`: For ROG Ally X or Zen >= 4 AMD CPUs (untested on Intel)
|
||||||
- `aarch64`: For armv8-a CPUs, older than mid-2021 or so
|
- `aarch64`: For armv8-a CPUs, older than mid-2021 or so
|
||||||
- `armv9`: For armv9-a CPUs, newer than mid-2021 or so
|
- `armv9`: For armv9-a CPUs, newer than mid-2021 or so
|
||||||
- `native`: Optimize to your native host architecture
|
- `native`: Optimize to your native host architecture
|
||||||
|
|
||||||
Extra flags to pass to CMake should be passed after the arch target.
|
Extra flags to pass to CMake should be passed after the arch target.
|
||||||
|
|
||||||
Additional environment variables can be used to control building:
|
Additional environment variables can be used to control building:
|
||||||
- `NPROC`: Number of threads to use for compilation (defaults to all)
|
- `NPROC`: Number of threads to use for compilation (defaults to all)
|
||||||
- `TARGET`: Set to `appimage` to disable standalone `eden-cli` and `eden-room` executables
|
- `TARGET`: Set to `appimage` to disable standalone `eden-cli` and `eden-room` executables
|
||||||
- `BUILD_TYPE`: Sets the build type to use. Defaults to `Release`
|
- `BUILD_TYPE`: Sets the build type to use. Defaults to `Release`
|
||||||
|
|
||||||
The following environment variables are boolean flags. Set to `true` to enable or `false` to disable:
|
The following environment variables are boolean flags. Set to `true` to enable or `false` to disable:
|
||||||
- `DEVEL` (default FALSE): Disable Qt update checker
|
- `DEVEL` (default FALSE): Disable Qt update checker
|
||||||
- `USE_WEBENGINE` (default FALSE): Enable Qt WebEngine
|
- `USE_WEBENGINE` (default FALSE): Enable Qt WebEngine
|
||||||
- `USE_MULTIMEDIA` (default TRUE): Enable Qt Multimedia
|
- `USE_MULTIMEDIA` (default TRUE): Enable Qt Multimedia
|
||||||
|
|
||||||
After building, an AppImage can be packaged via `.ci/linux/package.sh`. This script takes the same arch targets as the build script. If the build was created in a different directory, you can specify its path relative to the source directory, e.g. `.ci/linux/package.sh amd64 build-appimage`. Additionally, set the `DEVEL` environment variable to `true` to change the app name to `Eden Nightly`.
|
After building, an AppImage can be packaged via `.ci/linux/package.sh`. This script takes the same arch targets as the build script. If the build was created in a different directory, you can specify its path relative to the source directory, e.g. `.ci/linux/package.sh amd64 build-appimage`. Additionally, set the `DEVEL` environment variable to `true` to change the app name to `Eden Nightly`.
|
||||||
|
|
||||||
### Running without installing
|
### Running without installing
|
||||||
|
|
||||||
After building, the binaries `eden` and `eden-cmd` (depending on your build options) will end up in `build/bin/`.
|
After building, the binaries `eden` and `eden-cmd` (depending on your build options) will end up in `build/bin/`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# SDL
|
# SDL
|
||||||
cd build/bin/
|
cd build/bin/
|
||||||
./eden-cmd
|
./eden-cmd
|
||||||
|
|
||||||
# Qt
|
# Qt
|
||||||
cd build/bin/
|
cd build/bin/
|
||||||
./eden
|
./eden
|
||||||
```
|
```
|
||||||
|
|
10
docs/build/OpenBSD.md
vendored
Normal file
10
docs/build/OpenBSD.md
vendored
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# Building for OpenBSD
|
||||||
|
|
||||||
|
```sh
|
||||||
|
pkg_add -u
|
||||||
|
pkg_add cmake nasm git boost unzip--iconv autoconf-2.72p0 bash ffmpeg glslang gmake llvm-19.1.7p3 qt6 jq
|
||||||
|
git --recursive https://git.eden-emu.dev/eden-emu/eden
|
||||||
|
cmake -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19 -DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_QT=OFF -DENABLE_OPENSSL=OFF -DENABLE_WEB_SERVICE=OFF -B /usr/obj/eden
|
||||||
|
```
|
||||||
|
|
||||||
|
- Modify `externals/ffmpeg/CMakeFiles/ffmpeg-build/build.make` to use `-j$(nproc)` instead of just `-j`.
|
100
docs/build/Solaris.md
vendored
100
docs/build/Solaris.md
vendored
|
@ -1,51 +1,51 @@
|
||||||
# Building for Solaris
|
# Building for Solaris
|
||||||
|
|
||||||
## Dependencies.
|
## Dependencies.
|
||||||
Always consult [the OpenIndiana package list](https://pkg.openindiana.org/hipster/en/index.shtml) to cross-verify availability.
|
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`.
|
Run the usual update + install of essential toolings: `sudo pkg update && sudo pkg install git cmake`.
|
||||||
|
|
||||||
- **gcc**: `sudo pkg install developer/gcc-14`.
|
- **gcc**: `sudo pkg install developer/gcc-14`.
|
||||||
- **clang**: Version 20 is broken, use `sudo pkg install developer/clang-19`.
|
- **clang**: Version 20 is broken, use `sudo pkg install developer/clang-19`.
|
||||||
|
|
||||||
Then install the libraies: `sudo pkg install qt6 boost glslang libzip library/lz4 nlohmann-json openssl opus sdl2 zlib compress/zstd unzip pkg-config nasm autoconf mesa library/libdrm header-drm developer/fmt`.
|
Then install the libraies: `sudo pkg install qt6 boost glslang libzip library/lz4 nlohmann-json openssl opus sdl2 zlib compress/zstd unzip pkg-config nasm autoconf mesa library/libdrm header-drm developer/fmt`.
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
Clone eden with git `git clone --recursive https://git.eden-emu.dev/eden-emu/eden`
|
Clone eden with git `git clone --recursive https://git.eden-emu.dev/eden-emu/eden`
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Needed for some dependencies that call cc directly (tz)
|
# Needed for some dependencies that call cc directly (tz)
|
||||||
echo '#!/bin/sh' >cc
|
echo '#!/bin/sh' >cc
|
||||||
echo 'gcc $@' >>cc
|
echo 'gcc $@' >>cc
|
||||||
chmod +x cc
|
chmod +x cc
|
||||||
export PATH="$PATH:$PWD"
|
export PATH="$PATH:$PWD"
|
||||||
```
|
```
|
||||||
|
|
||||||
Patch for FFmpeg:
|
Patch for FFmpeg:
|
||||||
```sh
|
```sh
|
||||||
sed -i 's/ make / gmake /' externals/ffmpeg/CMakeFiles/ffmpeg-build.dir/build.make
|
sed -i 's/ make / gmake /' externals/ffmpeg/CMakeFiles/ffmpeg-build.dir/build.make
|
||||||
```
|
```
|
||||||
|
|
||||||
- **Configure**: `cmake -B build -DYUZU_USE_CPM=ON -DCMAKE_CXX_FLAGS="-I/usr/include/SDL2" -DCMAKE_C_FLAGS="-I/usr/include/SDL2"`.
|
- **Configure**: `cmake -B build -DYUZU_USE_CPM=ON -DCMAKE_CXX_FLAGS="-I/usr/include/SDL2" -DCMAKE_C_FLAGS="-I/usr/include/SDL2"`.
|
||||||
- **Build**: `cmake --build build`.
|
- **Build**: `cmake --build build`.
|
||||||
- **Installing**: `sudo cmake --install build`.
|
- **Installing**: `sudo cmake --install build`.
|
||||||
|
|
||||||
### Running
|
### Running
|
||||||
|
|
||||||
Default Mesa is a bit outdated, the following environment variables should be set for a smoother experience:
|
Default Mesa is a bit outdated, the following environment variables should be set for a smoother experience:
|
||||||
```sh
|
```sh
|
||||||
export MESA_GL_VERSION_OVERRIDE=4.6
|
export MESA_GL_VERSION_OVERRIDE=4.6
|
||||||
export MESA_GLSL_VERSION_OVERRIDE=460
|
export MESA_GLSL_VERSION_OVERRIDE=460
|
||||||
export MESA_EXTENSION_MAX_YEAR=2025
|
export MESA_EXTENSION_MAX_YEAR=2025
|
||||||
export MESA_DEBUG=1
|
export MESA_DEBUG=1
|
||||||
export MESA_VK_VERSION_OVERRIDE=1.3
|
export MESA_VK_VERSION_OVERRIDE=1.3
|
||||||
# Only if nvidia/intel drm drivers cause crashes, will severely hinder performance
|
# Only if nvidia/intel drm drivers cause crashes, will severely hinder performance
|
||||||
export LIBGL_ALWAYS_SOFTWARE=1
|
export LIBGL_ALWAYS_SOFTWARE=1
|
||||||
```
|
```
|
||||||
|
|
||||||
### Notes
|
### Notes
|
||||||
|
|
||||||
- Modify the generated ffmpeg.make (in build dir) if using multiple threads (base system `make` doesn't use `-j4`, so change for `gmake`).
|
- 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 cmake configuration; Audio driver defaults to SunOS `<sys/audioio.h>`, which does not exist on OpenIndiana.
|
- If using OpenIndiana, due to a bug in SDL2 cmake configuration; Audio driver defaults to SunOS `<sys/audioio.h>`, which does not exist on OpenIndiana.
|
||||||
- System OpenSSL generally does not work. Instead, use `-DYUZU_USE_CPM=ON` to use a bundled static OpenSSL, or build a system dependency from source.
|
- System OpenSSL generally does not work. Instead, use `-DYUZU_USE_CPM=ON` to use a bundled static OpenSSL, or build a system dependency from source.
|
452
docs/build/Windows.md
vendored
452
docs/build/Windows.md
vendored
|
@ -1,193 +1,259 @@
|
||||||
# THIS GUIDE IS INTENDED FOR DEVELOPERS ONLY, SUPPORT WILL ONLY BE GIVEN IF YOU'RE A DEVELOPER.
|
# ⚠️ This guide is for developers ONLY! Support will be provided to developers ONLY.
|
||||||
|
|
||||||
## Method I: MSVC Build for Windows
|
## 📋 Current building methods:
|
||||||
|
|
||||||
### Minimal Dependencies
|
* [ Minimal Dependencies](#minimal-dependencies)
|
||||||
|
* [⚡ Method I: MSVC Build for Windows](#method-i-msvc-build-for-windows)
|
||||||
On Windows, all library dependencies are automatically included within the `externals` folder, or can be downloaded on-demand. To build Eden, you need to install:
|
* [🐧 Method II: MinGW-w64 Build with MSYS2](#method-ii-mingw-w64-build-with-msys2)
|
||||||
|
* [🖥️ Method III: CLion Environment Setup](#method-iii-clion-environment-setup)
|
||||||
* **[Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/)** - **Make sure to select C++ support in the installer. Make sure to update to the latest version if already installed.**
|
* [💻 Building from the command line with MSVC](#building-from-the-command-line-with-msvc)
|
||||||
* **[CMake](https://cmake.org/download/)** - Used to generate Visual Studio project files. Does not matter if either 32-bit or 64-bit version is installed.
|
* [📜 Building with Scripts](#building-with-scripts)
|
||||||
* **[Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows)** - **Make sure to select Latest SDK.**
|
|
||||||
- A convenience script to install the latest SDK is provided in `.ci\windows\install-vulkan-sdk.ps1`.
|
---
|
||||||
|
|
||||||

|
|
||||||
|
## Minimal Dependencies
|
||||||
* **Git** - We recommend [Git for Windows](https://gitforwindows.org).
|
|
||||||
|
On Windows, **all** library dependencies are **automatically included** within the `externals` folder.
|
||||||

|
|
||||||
|
You still need to install:
|
||||||
* While installing Git Bash, you should tell it to include Git in your system path. (Choose the "Git from the command line and also from 3rd-party software" option.) If you missed that, don't worry, you'll just have to manually tell CMake where your git.exe is, since it's used to include version info into the built executable.
|
|
||||||
|
* **[CMake](https://cmake.org/download/)** - Used to generate Visual Studio project files.
|
||||||

|
* **[Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows)** - Make sure to select **Latest SDK**.
|
||||||
|
|
||||||
### Cloning Eden with Git
|
* *A convenience script to install the latest SDK is provided in `.ci/windows/install-vulkan-sdk.ps1`*
|
||||||
|
* **[Git for Windows](https://gitforwindows.org)** - We recommend installing Git for command line use and version control integration.
|
||||||
**Master:**
|
|
||||||
```cmd
|
<img src="https://i.imgur.com/x0rRs1t.png" width="500">
|
||||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
|
||||||
cd eden
|
* *While installing Git Bash, select "Git from the command line and also from 3rd-party software". If missed, manually set `git.exe` path in CMake.*
|
||||||
```
|
|
||||||
|
---
|
||||||

|
|
||||||
|
## ⚡ Method I: MSVC Build for Windows
|
||||||
* *(Note: eden by default downloads to `C:\Users\<user-name>\eden` (Master)
|
|
||||||
|
### a. Prerequisites to MSVC Build
|
||||||
### Building
|
|
||||||
|
* **[Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/)** - Make sure to **select C++ support** in the installer, or **update to the latest version** if already installed.
|
||||||
* Open the CMake GUI application and point it to the `eden` (Master)
|
|
||||||
|
* *A convenience script to install the **minimal** version (Visual Build Tools) is provided in `.ci/windows/install-msvc.ps1`*
|
||||||

|
|
||||||
|
---
|
||||||
* For the build directory, use a `/build` subdirectory inside the source directory or some other directory of your choice. (Tell CMake to create it.)
|
|
||||||
|
### b. Clone the eden repository with Git
|
||||||
* Click the "Configure" button and choose `Visual Studio 17 2022`, with `x64` for the optional platform.
|
|
||||||
|
Open Terminal on
|
||||||

|
|
||||||
|
```cmd
|
||||||
* *(Note: If you used GitHub's own app to clone, run `git submodule update --init --recursive` to get the remaining dependencies)*
|
git clone https://git.eden-emu.dev/eden-emu/eden
|
||||||
|
cd eden
|
||||||
* *(You may also want to disable `YUZU_TESTS` in this case since Catch2 is not yet supported with this.)*
|
```
|
||||||
|
|
||||||

|
* *By default `eden` downloads to `C:\Users\<user-name>\eden`*
|
||||||
|
|
||||||
* Click "Generate" to create the project files.
|
---
|
||||||
|
|
||||||

|
### c. Building
|
||||||
|
|
||||||
* Open the solution file `yuzu.sln` in Visual Studio 2022, which is located in the build folder.
|
* Open the CMake GUI application and point it to the `eden`
|
||||||
|
|
||||||

|
<img src="https://i.imgur.com/qOslIWv.png" width="500">
|
||||||
|
|
||||||
* Depending if you want a graphical user interface or not (`eden` has the graphical user interface, while `eden-cmd` doesn't), select `eden` or `eden-cmd` in the Solution Explorer, right-click and `Set as StartUp Project`.
|
* For the build directory, use a `build/` subdirectory inside the source directory or some other directory of your choice. (Tell CMake to create it.)
|
||||||
|
|
||||||
 
|
* Click the "Configure" button and choose `Visual Studio 17 2022`, with `x64` for the optional platform.
|
||||||
|
|
||||||
* Select the appropriate build type, Debug for debug purposes or Release for performance (in case of doubt choose Release).
|
<img src="https://i.imgur.com/DKiREaK.png" width="500">
|
||||||
|
|
||||||

|
* *(You may also want to disable `YUZU_TESTS` in this case since Catch2 is not yet supported with this.)*
|
||||||
|
|
||||||
* Right-click the project you want to build and press Build in the submenu or press F5.
|
<img src="https://user-images.githubusercontent.com/22451773/180585999-07316d6e-9751-4d11-b957-1cf57cd7cd58.png" width="500">
|
||||||
|
|
||||||

|
* Click "Generate" to create the project files.
|
||||||
|
|
||||||
## Method II: MinGW-w64 Build with MSYS2
|
<img src="https://i.imgur.com/5LKg92k.png" width="500">
|
||||||
|
|
||||||
### Prerequisites to install
|
* Open the solution file `yuzu.sln` in Visual Studio 2022, which is located in the build folder.
|
||||||
|
|
||||||
* [MSYS2](https://www.msys2.org)
|
<img src="https://i.imgur.com/208yMml.png" width="500">
|
||||||
* [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows) - **Make sure to select Latest SDK.**
|
|
||||||
* Make sure to follow the instructions and update to the latest version by running `pacman -Syu` as many times as needed.
|
* * Depending on whether you want a graphical user interface or not, select in the Solution Explorer:
|
||||||
|
* `eden` (GUI)
|
||||||
### Install eden dependencies for MinGW-w64
|
* `eden-cmd` (command-line only)
|
||||||
|
* Then **right-click** and choose `Set as StartUp Project`.
|
||||||
* Open the `MSYS2 MinGW 64-bit` (mingw64.exe) shell
|
|
||||||
* Download and install all dependencies using: `pacman -Syu git make mingw-w64-x86_64-SDL2 mingw-w64-x86_64-cmake mingw-w64-x86_64-python-pip mingw-w64-x86_64-qt6 mingw-w64-x86_64-toolchain autoconf libtool automake-wrapper`
|
<img src="https://i.imgur.com/nPMajnn.png" height="500">
|
||||||
* Add MinGW binaries to the PATH: `echo 'PATH=/mingw64/bin:$PATH' >> ~/.bashrc`
|
<img src="https://i.imgur.com/BDMLzRZ.png" height="500">
|
||||||
* Add glslangValidator to the PATH: `echo 'PATH=$(readlink -e /c/VulkanSDK/*/Bin/):$PATH' >> ~/.bashrc`
|
|
||||||
|
* Select the appropriate build type, `Debug` for debug purposes or `Release` for performance (in case of doubt choose `Release`).
|
||||||
### Clone the eden repository with Git
|
|
||||||
|
<img src="https://i.imgur.com/qxg4roC.png" width="500">
|
||||||
```bash
|
|
||||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
* **Right-click** the project you want to build and press **Build** in the submenu or press `F5`.
|
||||||
cd eden
|
|
||||||
```
|
<img src="https://i.imgur.com/CkQgOFW.png" height="500">
|
||||||
|
|
||||||
### Run the following commands to build eden (dynamically linked build)
|
---
|
||||||
|
|
||||||
```bash
|
## 🐧 Method II: MinGW-w64 Build with MSYS2
|
||||||
mkdir build && cd build
|
|
||||||
cmake -G "MSYS Makefiles" -DYUZU_TESTS=OFF ..
|
### a. Prerequisites to MinGW-w64
|
||||||
make -j$(nproc)
|
|
||||||
# test eden out with
|
* **[MSYS2](https://www.msys2.org)** - A versatile and up-to-date development environment for Windows, providing a Unix-like shell, package manager, and toolchain.
|
||||||
./bin/eden.exe
|
|
||||||
```
|
---
|
||||||
|
|
||||||
* *(Note: This build is not a static build meaning that you need to include all of the DLLs with the .exe in order to use it!)*
|
### b. Install eden dependencies for MinGW-w64
|
||||||
|
|
||||||
e.g.
|
* Open the `MSYS2 MinGW 64-bit` shell (`mingw64.exe`)
|
||||||
```Bash
|
* Download and install all dependencies using:
|
||||||
cp externals/ffmpeg-*/bin/*.dll bin/
|
* `pacman -Syu git make mingw-w64-x86_64-SDL2 mingw-w64-x86_64-cmake mingw-w64-x86_64-python-pip mingw-w64-x86_64-qt6 mingw-w64-x86_64-toolchain autoconf libtool automake-wrapper`
|
||||||
```
|
* Add MinGW binaries to the PATH:
|
||||||
|
* `echo 'PATH=/mingw64/bin:$PATH' >> ~/.bashrc`
|
||||||
Bonus Note: Running programs from inside `MSYS2 MinGW x64` shell has a different %PATH% than directly from explorer. This different %PATH% has the locations of the other DLLs required.
|
* Add VulkanSDK to the PATH:
|
||||||

|
* `echo 'PATH=$(readlink -e /c/VulkanSDK/*/Bin/):$PATH' >> ~/.bashrc`
|
||||||
|
|
||||||
|
---
|
||||||
### Building without Qt (Optional)
|
|
||||||
|
### c. Clone the eden repository with Git
|
||||||
Doesn't require the rather large Qt dependency, but you will lack a GUI frontend:
|
|
||||||
|
```cmd
|
||||||
* Pass the `-DENABLE_QT=no` flag to cmake
|
git clone https://git.eden-emu.dev/eden-emu/eden
|
||||||
|
cd eden
|
||||||
## Method III: CLion Environment Setup
|
```
|
||||||
|
|
||||||
### Minimal Dependencies
|
---
|
||||||
|
|
||||||
To build eden, you need to install the following:
|
### d. Building dynamically-linked eden
|
||||||
|
|
||||||
* [CLion](https://www.jetbrains.com/clion/) - This IDE is not free; for a free alternative, check Method I
|
* This process will generate a *dynamically* linked build
|
||||||
* [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows) - Make sure to select the Latest SDK.
|
|
||||||
|
```bash
|
||||||
### Cloning eden with CLion
|
# Make build dir and enter
|
||||||
|
mkdir build && cd build
|
||||||
* Clone the Repository:
|
|
||||||
|
# Generate CMake Makefiles
|
||||||

|
cmake .. -G "MSYS Makefiles" -DYUZU_TESTS=OFF
|
||||||

|
|
||||||

|
# Build
|
||||||
|
make -j$(nproc)
|
||||||
|
|
||||||
|
# Run eden!
|
||||||
### Building & Setup
|
./bin/eden.exe
|
||||||
|
```
|
||||||
* Once Cloned, You will be taken to a prompt like the image below:
|
|
||||||
|
* *Warning: This build is not a **static** build meaning that you **need** to include all of the DLLs with the .exe in order to use it or other systems!*
|
||||||

|
|
||||||
|
---
|
||||||
* Set the settings to the image below:
|
|
||||||
* Change `Build type: Release`
|
### Additional notes
|
||||||
* Change `Name: Release`
|
|
||||||
* Change `Toolchain Visual Studio`
|
|
||||||
* Change `Generator: Let CMake decide`
|
* Eden doesn't require the rather large Qt dependency, but you will lack a GUI frontend
|
||||||
* Change `Build directory: build`
|
|
||||||
|
```bash
|
||||||

|
# ...
|
||||||
|
|
||||||
* Click OK; now Clion will build a directory and index your code to allow for IntelliSense. Please be patient.
|
# Generate CMake Makefiles (withou QT)
|
||||||
* Once this process has been completed (No loading bar bottom right), you can now build eden
|
cmake .. -G "MSYS Makefiles" -DYUZU_TESTS=OFF -DENABLE_QT=no
|
||||||
* In the top right, click on the drop-down menu, select all configurations, then select eden
|
|
||||||
|
$ ...
|
||||||

|
```
|
||||||
|
|
||||||
* Now run by clicking the play button or pressing Shift+F10, and eden will auto-launch once built.
|
* Running programs from inside `MSYS2 MinGW x64` shell has a different `%PATH%` than directly from explorer.
|
||||||
|
* This different `%PATH%` has the locations of the other DLLs required.
|
||||||

|
|
||||||
|
<img src="https://user-images.githubusercontent.com/190571/165000848-005e8428-8a82-41b1-bb4d-4ce7797cdac8.png" width="500">
|
||||||
## Building from the command line with MSVC
|
|
||||||
|
---
|
||||||
```cmd
|
|
||||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
## 🖥️ Method III: CLion Environment Setup
|
||||||
cd eden
|
|
||||||
mkdir build
|
### a. Prerequisites to CLion
|
||||||
cd build
|
|
||||||
cmake .. -G "Visual Studio 17 2022" -A x64
|
* [CLion](https://www.jetbrains.com/clion/) - This IDE is not free; for a free alternative, check Method I
|
||||||
cmake --build . --config Release
|
|
||||||
```
|
---
|
||||||
|
|
||||||
### Building with Scripts
|
### b. Cloning eden with CLion
|
||||||
A convenience script for building is provided in `.ci/windows/build.sh`. You must run this with Bash, e.g. Git Bash or MinGW TTY. To use this script, you must have windeployqt installed (usually bundled with Qt) and set the `WINDEPLOYQT` environment variable to its canonical Bash location, e.g. `WINDEPLOYQT="/c/Qt/6.9.1/msvc2022_64/bin/windeployqt6.exe" .ci/windows/build.sh`.
|
|
||||||
|
* Clone the Repository:
|
||||||
Extra CMake flags should be placed in the arguments of the script.
|
|
||||||
|
<img src="https://user-images.githubusercontent.com/42481638/216899046-0d41d7d6-8e4d-4ed2-9587-b57088af5214.png" width="500">
|
||||||
Additional environment variables can be used to control building:
|
<img src="https://user-images.githubusercontent.com/42481638/216899061-b2ea274a-e88c-40ae-bf0b-4450b46e9fea.png" width="500">
|
||||||
- `BUILD_TYPE`: Sets the build type to use. Defaults to `Release`
|
<img src="https://user-images.githubusercontent.com/42481638/216899076-0e5988c4-d431-4284-a5ff-9ecff973db76.png" width="500">
|
||||||
|
|
||||||
The following environment variables are boolean flags. Set to `true` to enable or `false` to disable:
|
---
|
||||||
- `DEVEL` (default FALSE): Disable Qt update checker
|
|
||||||
- `USE_WEBENGINE` (default FALSE): Enable Qt WebEngine
|
### c. Building & Setup
|
||||||
- `USE_MULTIMEDIA` (default TRUE): Enable Qt Multimedia
|
|
||||||
- `BUNDLE_QT` (default FALSE): Use bundled Qt
|
* Once Cloned, You will be taken to a prompt like the image below:
|
||||||
* Note that using system Qt requires you to include the Qt CMake directory in `CMAKE_PREFIX_PATH`, e.g. `.ci/windows/build.sh -DCMAKE_PREFIX_PATH=C:/Qt/6.9.0/msvc2022_64/lib/cmake/Qt6`
|
|
||||||
|
<img src="https://user-images.githubusercontent.com/42481638/216899092-3fe4cec6-a540-44e3-9e1e-3de9c2fffc2f.png" width="500">
|
||||||
After building, a zip can be packaged via `.ci/windows/package.sh`. Note that you must have 7-zip installed and in your PATH. The resulting zip will be placed into `artifacts` in the source directory.
|
|
||||||
|
* Set the settings to the image below:
|
||||||
|
* Change `Build type: Release`
|
||||||
|
* Change `Name: Release`
|
||||||
|
* Change `Toolchain Visual Studio`
|
||||||
|
* Change `Generator: Let CMake decide`
|
||||||
|
* Change `Build directory: build`
|
||||||
|
|
||||||
|
<img src="https://user-images.githubusercontent.com/42481638/216899164-6cee8482-3d59-428f-b1bc-e6dc793c9b20.png" width="500">
|
||||||
|
|
||||||
|
* Click OK; now Clion will build a directory and index your code to allow for IntelliSense. Please be patient.
|
||||||
|
* Once this process has been completed (No loading bar bottom right), you can now build eden
|
||||||
|
* In the top right, click on the drop-down menu, select all configurations, then select eden
|
||||||
|
|
||||||
|
<img src="https://user-images.githubusercontent.com/42481638/216899226-975048e9-bc6d-4ec1-bc2d-bd8a1e15ed04.png" height="500" >
|
||||||
|
|
||||||
|
* Now run by clicking the play button or pressing Shift+F10, and eden will auto-launch once built.
|
||||||
|
|
||||||
|
<img src="https://user-images.githubusercontent.com/42481638/216899275-d514ec6a-e563-470e-81e2-3e04f0429b68.png" width="500">
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 💻 Building from the command line with MSVC
|
||||||
|
|
||||||
|
```cmd
|
||||||
|
# Clone eden and enter
|
||||||
|
git clone https://git.eden-emu.dev/eden-emu/eden
|
||||||
|
cd eden
|
||||||
|
|
||||||
|
# Make build dir and enter
|
||||||
|
mkdir build && cd build
|
||||||
|
|
||||||
|
# Generate CMake Makefiles
|
||||||
|
cmake .. -G "Visual Studio 17 2022" -A x64 -DYUZU_TESTS=OFF
|
||||||
|
|
||||||
|
# Build
|
||||||
|
cmake --build . --config Release
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📜 Building with Scripts
|
||||||
|
|
||||||
|
* A convenience script for building is provided in `.ci/windows/build.sh`.
|
||||||
|
* You must run this with Bash, e.g. Git Bash or MinGW TTY.
|
||||||
|
* To use this script, you must have `windeployqt` installed (usually bundled with Qt) and set the `WINDEPLOYQT` environment variable to its canonical Bash location:
|
||||||
|
* `WINDEPLOYQT="/c/Qt/6.9.1/msvc2022_64/bin/windeployqt6.exe" .ci/windows/build.sh`.
|
||||||
|
* You can use `aqtinstall`, more info on <https://github.com/miurahr/aqtinstall> and <https://ddalcino.github.io/aqt-list-server/>
|
||||||
|
|
||||||
|
|
||||||
|
* Extra CMake flags should be placed in the arguments of the script.
|
||||||
|
|
||||||
|
#### Additional environment variables can be used to control building:
|
||||||
|
|
||||||
|
* `BUILD_TYPE` (default `Release`): Sets the build type to use.
|
||||||
|
|
||||||
|
* The following environment variables are boolean flags. Set to `true` to enable or `false` to disable:
|
||||||
|
|
||||||
|
* `DEVEL` (default FALSE): Disable Qt update checker
|
||||||
|
* `USE_WEBENGINE` (default FALSE): Enable Qt WebEngine
|
||||||
|
* `USE_MULTIMEDIA` (default TRUE): Enable Qt Multimedia
|
||||||
|
* `BUNDLE_QT` (default FALSE): Use bundled Qt
|
||||||
|
|
||||||
|
* Note that using **system Qt** requires you to include the Qt CMake directory in `CMAKE_PREFIX_PATH`
|
||||||
|
* `.ci/windows/build.sh -DCMAKE_PREFIX_PATH=C:/Qt/6.9.0/msvc2022_64/lib/cmake/Qt6`
|
||||||
|
|
||||||
|
* After building, a zip can be packaged via `.ci/windows/package.sh`. You must have 7-zip installed and in your PATH.
|
||||||
|
* The resulting zip will be placed into `artifacts` in the source directory.
|
||||||
|
|
||||||
|
|
183
docs/build/macOS.md
vendored
183
docs/build/macOS.md
vendored
|
@ -1,105 +1,78 @@
|
||||||
Please note this article is intended for development, and eden on macOS is not currently ready for regular use.
|
Please note this article is intended for development, and Eden on macOS is not currently ready for regular use.
|
||||||
|
|
||||||
This article was written for developers. eden support for macOS is not ready for casual use.
|
This article was written for developers. Eden support for macOS is not ready for casual use.
|
||||||
|
|
||||||
## Method I: ninja
|
## Dependencies
|
||||||
---
|
Install dependencies from Homebrew:
|
||||||
If you are compiling on Intel Mac or are using a Rosetta Homebrew installation, you must replace all references of `/opt/homebrew` to `/usr/local`.
|
```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
|
||||||
Install dependencies from Homebrew:
|
```
|
||||||
```sh
|
|
||||||
brew install autoconf automake boost ccache ffmpeg fmt glslang hidapi libtool libusb lz4 ninja nlohmann-json openssl pkg-config qt@6 sdl2 speexdsp zlib zlib zstd cmake Catch2 molten-vk vulkan-loader
|
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`.
|
||||||
```
|
|
||||||
|
Now, clone the repo:
|
||||||
Clone the repo
|
```sh
|
||||||
```sh
|
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
||||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
cd eden
|
||||||
|
```
|
||||||
cd eden
|
|
||||||
```
|
## Method I: ninja
|
||||||
|
|
||||||
Build for release
|
---
|
||||||
```sh
|
Build for release
|
||||||
mkdir build && cd build
|
```sh
|
||||||
|
export Qt6_DIR="/opt/homebrew/opt/qt@6/lib/cmake"
|
||||||
export Qt6_DIR="/opt/homebrew/opt/qt@6/lib/cmake"
|
export LIBVULKAN_PATH=/opt/homebrew/lib/libvulkan.dylib
|
||||||
|
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=ON -DENABLE_LIBUSB=OFF -DCLANG_FORMAT=ON -DSDL2_DISABLE_INSTALL=ON -DSDL_ALTIVEC=ON
|
||||||
export LIBVULKAN_PATH=/opt/homebrew/lib/libvulkan.dylib
|
ninja
|
||||||
|
```
|
||||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_USE_BUNDLED_VCPKG=OFF -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=ON -DENABLE_LIBUSB=OFF -DCLANG_FORMAT=ON -DSDL2_DISABLE_INSTALL=ON -DSDL_ALTIVEC=ON
|
|
||||||
|
You may also want to include support for Discord Rich Presence by adding `-DUSE_DISCORD_PRESENCE=ON`
|
||||||
ninja
|
```sh
|
||||||
```
|
export Qt6_DIR="/opt/homebrew/opt/qt@6/lib/cmake"
|
||||||
|
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_LIBUSB=OFF
|
||||||
You may also want to include support for Discord Rich Presence by adding `-DUSE_DISCORD_PRESENCE=ON` after `cmake ..`
|
ninja
|
||||||
|
```
|
||||||
Build with debug symbols (vcpkg is not currently used due to broken boost-context library):
|
|
||||||
```sh
|
Run the output:
|
||||||
mkdir build && cd build
|
```
|
||||||
export Qt6_DIR="/opt/homebrew/opt/qt@6/lib/cmake"
|
bin/eden.app/Contents/MacOS/eden
|
||||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_USE_BUNDLED_VCPKG=OFF -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_LIBUSB=OFF
|
```
|
||||||
ninja
|
|
||||||
```
|
## Method II: Xcode
|
||||||
|
|
||||||
Run the output:
|
---
|
||||||
```
|
Build for release
|
||||||
bin/eden.app/Contents/MacOS/eden
|
```sh
|
||||||
```
|
export Qt6_DIR="/opt/homebrew/opt/qt@6/lib/cmake"
|
||||||
|
export LIBVULKAN_PATH=/opt/homebrew/lib/libvulkan.dylib
|
||||||
## Method II: Xcode
|
# Only if having errors about Xcode 15.0
|
||||||
|
sudo /usr/bin/xcode-select --switch /Users/admin/Downloads/Xcode.ap
|
||||||
---
|
cmake -B build -GXcode -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=ON -DENABLE_LIBUSB=OFF -DCLANG_FORMAT=ON -DSDL2_DISABLE_INSTALL=ON -DSDL_ALTIVEC=ON
|
||||||
If you are compiling on Intel Mac or are using a Rosetta Homebrew installation, you must replace all references of `/opt/homebrew` to `/usr/local`.
|
xcodebuild build -project yuzu.xcodeproj -scheme "yuzu" -configuration "RelWithDebInfo"
|
||||||
|
```
|
||||||
Install dependencies from Homebrew:
|
|
||||||
```sh
|
Build with debug symbols:
|
||||||
brew install autoconf automake boost ccache ffmpeg fmt glslang hidapi libtool libusb lz4 ninja nlohmann-json openssl pkg-config qt@6 sdl2 speexdsp zlib zlib zstd cmake Catch2 molten-vk vulkan-loader
|
```sh
|
||||||
```
|
export Qt6_DIR="/opt/homebrew/opt/qt@6/lib/cmake"
|
||||||
|
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_LIBUSB=OFF
|
||||||
Clone the repo
|
ninja
|
||||||
```sh
|
```
|
||||||
git clone --recursive https://git.eden-emu.dev/eden-emu/eden
|
|
||||||
|
Run the output:
|
||||||
cd eden
|
```
|
||||||
```
|
bin/eden.app/Contents/MacOS/eden
|
||||||
|
```
|
||||||
Build for release
|
|
||||||
```sh
|
---
|
||||||
mkdir build && cd build
|
|
||||||
|
To run with MoltenVK, install additional dependencies:
|
||||||
export Qt6_DIR="/opt/homebrew/opt/qt@6/lib/cmake"
|
```sh
|
||||||
|
brew install molten-vk vulkan-loader
|
||||||
export LIBVULKAN_PATH=/opt/homebrew/lib/libvulkan.dylib
|
```
|
||||||
|
|
||||||
cmake .. -GXcode -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_USE_BUNDLED_VCPKG=OFF -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=ON -DENABLE_LIBUSB=OFF -DCLANG_FORMAT=ON -DSDL2_DISABLE_INSTALL=ON -DSDL_ALTIVEC=ON
|
Run with Vulkan loader path:
|
||||||
|
```sh
|
||||||
xcodebuild build -project eden.xcodeproj -scheme "eden" -configuration "RelWithDebInfo"
|
export LIBVULKAN_PATH=/opt/homebrew/lib/libvulkan.dylib
|
||||||
```
|
bin/eden.app/Contents/MacOS/eden
|
||||||
|
```
|
||||||
You may also want to include support for Discord Rich Presence by adding `-DUSE_DISCORD_PRESENCE=ON` after `cmake ..`
|
|
||||||
|
|
||||||
Build with debug symbols (vcpkg is not currently used due to broken boost-context library):
|
|
||||||
```sh
|
|
||||||
mkdir build && cd build
|
|
||||||
export Qt6_DIR="/opt/homebrew/opt/qt@6/lib/cmake"
|
|
||||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_USE_BUNDLED_VCPKG=OFF -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_LIBUSB=OFF
|
|
||||||
ninja
|
|
||||||
```
|
|
||||||
|
|
||||||
Run the output:
|
|
||||||
```
|
|
||||||
bin/eden.app/Contents/MacOS/eden
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
To run with MoltenVK, install additional dependencies:
|
|
||||||
```sh
|
|
||||||
brew install molten-vk vulkan-loader
|
|
||||||
```
|
|
||||||
|
|
||||||
Run with Vulkan loader path:
|
|
||||||
```sh
|
|
||||||
export LIBVULKAN_PATH=/opt/homebrew/lib/libvulkan.dylib
|
|
||||||
bin/eden.app/Contents/MacOS/eden
|
|
||||||
```
|
|
||||||
|
|
62
externals/CMakeLists.txt
vendored
62
externals/CMakeLists.txt
vendored
|
@ -1,3 +1,6 @@
|
||||||
|
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2025 Eden Emulator Project
|
# SPDX-FileCopyrightText: 2025 Eden Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
@ -7,8 +10,6 @@
|
||||||
# TODO(crueter): A lot of this should be moved to the root.
|
# TODO(crueter): A lot of this should be moved to the root.
|
||||||
# otherwise we have to do weird shenanigans with library linking and stuff
|
# otherwise we have to do weird shenanigans with library linking and stuff
|
||||||
|
|
||||||
# Explicitly include CPMUtil here since we have a separate cpmfile for externals
|
|
||||||
set(CPMUTIL_JSON_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cpmfile.json)
|
|
||||||
include(CPMUtil)
|
include(CPMUtil)
|
||||||
|
|
||||||
# Explicitly declare this option here to propagate to the oaknut CPM call
|
# Explicitly declare this option here to propagate to the oaknut CPM call
|
||||||
|
@ -33,7 +34,7 @@ endif()
|
||||||
|
|
||||||
# Xbyak (also used by Dynarmic, so needs to be added first)
|
# Xbyak (also used by Dynarmic, so needs to be added first)
|
||||||
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
|
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
|
||||||
if (PLATFORM_SUN)
|
if (PLATFORM_SUN OR PLATFORM_OPENBSD)
|
||||||
AddJsonPackage(xbyak_sun)
|
AddJsonPackage(xbyak_sun)
|
||||||
else()
|
else()
|
||||||
AddJsonPackage(xbyak)
|
AddJsonPackage(xbyak)
|
||||||
|
@ -62,12 +63,19 @@ if (mbedtls_ADDED)
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
target_compile_options(mbedcrypto PRIVATE
|
target_compile_options(mbedcrypto PRIVATE
|
||||||
-Wno-unused-but-set-variable
|
-Wno-unused-but-set-variable
|
||||||
-Wno-string-concatenation)
|
-Wno-string-concatenation
|
||||||
|
)
|
||||||
|
elseif(CXX_CLANG)
|
||||||
|
foreach(TARGET mbedtls mbedcrypto mbedx509)
|
||||||
|
target_compile_options(${TARGET} PRIVATE
|
||||||
|
-w
|
||||||
|
)
|
||||||
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# libusb
|
# libusb
|
||||||
if (ENABLE_LIBUSB AND NOT TARGET libusb::usb)
|
if (ENABLE_LIBUSB)
|
||||||
add_subdirectory(libusb)
|
add_subdirectory(libusb)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -83,6 +91,8 @@ if(MSVC AND USE_CCACHE AND sirit_ADDED)
|
||||||
list(FILTER _opts EXCLUDE REGEX "/Zi")
|
list(FILTER _opts EXCLUDE REGEX "/Zi")
|
||||||
list(APPEND _opts "/Z7")
|
list(APPEND _opts "/Z7")
|
||||||
set_target_properties(sirit PROPERTIES COMPILE_OPTIONS "${_opts}")
|
set_target_properties(sirit PROPERTIES COMPILE_OPTIONS "${_opts}")
|
||||||
|
elseif(MSVC AND CXX_CLANG)
|
||||||
|
target_compile_options(sirit PRIVATE -Wno-error=unused-command-line-argument)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# httplib
|
# httplib
|
||||||
|
@ -96,15 +106,7 @@ if (ENABLE_WEB_SERVICE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# unordered_dense
|
# unordered_dense
|
||||||
AddPackage(
|
AddJsonPackage(unordered-dense)
|
||||||
NAME unordered_dense
|
|
||||||
REPO "Lizzie841/unordered_dense"
|
|
||||||
SHA e59d30b7b1
|
|
||||||
HASH 71eff7bd9ba4b9226967bacd56a8ff000946f8813167cb5664bb01e96fb79e4e220684d824fe9c59c4d1cc98c606f13aff05b7940a1ed8ab3c95d6974ee34fa0
|
|
||||||
FIND_PACKAGE_ARGUMENTS "CONFIG"
|
|
||||||
OPTIONS
|
|
||||||
"UNORDERED_DENSE_INSTALL OFF"
|
|
||||||
)
|
|
||||||
|
|
||||||
# FFMpeg
|
# FFMpeg
|
||||||
if (YUZU_USE_BUNDLED_FFMPEG)
|
if (YUZU_USE_BUNDLED_FFMPEG)
|
||||||
|
@ -115,21 +117,17 @@ if (YUZU_USE_BUNDLED_FFMPEG)
|
||||||
set(FFmpeg_INCLUDE_DIR "${FFmpeg_INCLUDE_DIR}" PARENT_SCOPE)
|
set(FFmpeg_INCLUDE_DIR "${FFmpeg_INCLUDE_DIR}" PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Vulkan-Headers
|
# VulkanUtilityHeaders - pulls in headers and utility libs
|
||||||
|
|
||||||
# TODO(crueter): Vk1.4 impl
|
|
||||||
|
|
||||||
AddJsonPackage(
|
AddJsonPackage(
|
||||||
NAME vulkan-headers
|
NAME vulkan-utility-headers
|
||||||
BUNDLED_PACKAGE ${YUZU_USE_EXTERNAL_VULKAN_HEADERS}
|
|
||||||
)
|
|
||||||
|
|
||||||
# Vulkan-Utility-Libraries
|
|
||||||
AddJsonPackage(
|
|
||||||
NAME vulkan-utility-libraries
|
|
||||||
BUNDLED_PACKAGE ${YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES}
|
BUNDLED_PACKAGE ${YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# small hack
|
||||||
|
if (NOT VulkanUtilityLibraries_ADDED)
|
||||||
|
find_package(VulkanHeaders 1.3.274 REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
# SPIRV Tools
|
# SPIRV Tools
|
||||||
AddJsonPackage(
|
AddJsonPackage(
|
||||||
NAME spirv-tools
|
NAME spirv-tools
|
||||||
|
@ -147,6 +145,18 @@ add_subdirectory(nx_tzdb)
|
||||||
# VMA
|
# VMA
|
||||||
AddJsonPackage(vulkan-memory-allocator)
|
AddJsonPackage(vulkan-memory-allocator)
|
||||||
|
|
||||||
|
if (VulkanMemoryAllocator_ADDED)
|
||||||
|
if (CXX_CLANG)
|
||||||
|
target_compile_options(VulkanMemoryAllocator INTERFACE
|
||||||
|
-Wno-unused-variable
|
||||||
|
)
|
||||||
|
elseif(MSVC)
|
||||||
|
target_compile_options(VulkanMemoryAllocator INTERFACE
|
||||||
|
/wd4189
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT TARGET LLVM::Demangle)
|
if (NOT TARGET LLVM::Demangle)
|
||||||
add_library(demangle demangle/ItaniumDemangle.cpp)
|
add_library(demangle demangle/ItaniumDemangle.cpp)
|
||||||
target_include_directories(demangle PUBLIC ./demangle)
|
target_include_directories(demangle PUBLIC ./demangle)
|
||||||
|
@ -243,7 +253,7 @@ if (YUZU_CRASH_DUMPS AND NOT TARGET libbreakpad_client)
|
||||||
file(GLOB_RECURSE LIBBREAKPAD_CLIENT_SOURCES ${breakpad_SOURCE_DIR}/src/client/mac/*.cc ${breakpad_SOURCE_DIR}/src/common/mac/*.cc)
|
file(GLOB_RECURSE LIBBREAKPAD_CLIENT_SOURCES ${breakpad_SOURCE_DIR}/src/client/mac/*.cc ${breakpad_SOURCE_DIR}/src/common/mac/*.cc)
|
||||||
list(APPEND LIBBREAKPAD_CLIENT_SOURCES ${breakpad_SOURCE_DIR}/src/common/mac/MachIPC.mm)
|
list(APPEND LIBBREAKPAD_CLIENT_SOURCES ${breakpad_SOURCE_DIR}/src/common/mac/MachIPC.mm)
|
||||||
else()
|
else()
|
||||||
target_compile_definitions(libbreakpad_client PUBLIC -DHAVE_A_OUT_H)
|
target_compile_definitions(libbreakpad_client PUBLIC HAVE_A_OUT_H)
|
||||||
file(GLOB_RECURSE LIBBREAKPAD_CLIENT_SOURCES ${breakpad_SOURCE_DIR}/src/client/linux/*.cc ${breakpad_SOURCE_DIR}/src/common/linux/*.cc)
|
file(GLOB_RECURSE LIBBREAKPAD_CLIENT_SOURCES ${breakpad_SOURCE_DIR}/src/client/linux/*.cc ${breakpad_SOURCE_DIR}/src/common/linux/*.cc)
|
||||||
endif()
|
endif()
|
||||||
list(APPEND LIBBREAKPAD_CLIENT_SOURCES ${LIBBREAKPAD_COMMON_SOURCES})
|
list(APPEND LIBBREAKPAD_CLIENT_SOURCES ${LIBBREAKPAD_COMMON_SOURCES})
|
||||||
|
|
55
externals/cpmfile.json
vendored
55
externals/cpmfile.json
vendored
|
@ -1,11 +1,9 @@
|
||||||
{
|
{
|
||||||
"mbedtls": {
|
"mbedtls": {
|
||||||
"repo": "Mbed-TLS/mbedtls",
|
"repo": "eden-emulator/mbedtls",
|
||||||
"sha": "8c88150ca1",
|
"sha": "ce4f81f4a9",
|
||||||
"hash": "769ad1e94c570671071e1f2a5c0f1027e0bf6bcdd1a80ea8ac970f2c86bc45ce4e31aa88d6d8110fc1bed1de81c48bc624df1b38a26f8b340a44e109d784a966",
|
"hash": "f2e7f887651b28745e508149214d409fd7cfdb92cb94b4146b47ff1e0fc09e47143f203ac18e34c2c1814b5bd031d04c74828676c0d4342920a2ddb7fd35e9a5",
|
||||||
"patches": [
|
"find_args": "MODULE"
|
||||||
"0001-cmake-version.patch"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"spirv-headers": {
|
"spirv-headers": {
|
||||||
"package": "SPIRV-Headers",
|
"package": "SPIRV-Headers",
|
||||||
|
@ -17,6 +15,7 @@
|
||||||
"repo": "eden-emulator/sirit",
|
"repo": "eden-emulator/sirit",
|
||||||
"sha": "db1f1e8ab5",
|
"sha": "db1f1e8ab5",
|
||||||
"hash": "73eb3a042848c63a10656545797e85f40d142009dfb7827384548a385e1e28e1ac72f42b25924ce530d58275f8638554281e884d72f9c7aaf4ed08690a414b05",
|
"hash": "73eb3a042848c63a10656545797e85f40d142009dfb7827384548a385e1e28e1ac72f42b25924ce530d58275f8638554281e884d72f9c7aaf4ed08690a414b05",
|
||||||
|
"find_args": "MODULE",
|
||||||
"options": [
|
"options": [
|
||||||
"SIRIT_USE_SYSTEM_SPIRV_HEADERS ON"
|
"SIRIT_USE_SYSTEM_SPIRV_HEADERS ON"
|
||||||
]
|
]
|
||||||
|
@ -28,32 +27,21 @@
|
||||||
},
|
},
|
||||||
"cpp-jwt": {
|
"cpp-jwt": {
|
||||||
"version": "1.4",
|
"version": "1.4",
|
||||||
"repo": "arun11299/cpp-jwt",
|
"repo": "crueter/cpp-jwt",
|
||||||
"sha": "a54fa08a3b",
|
"sha": "9eaea6328f",
|
||||||
"hash": "a90f7e594ada0c7e49d5ff9211c71097534e7742a8e44bf0851b0362642a7271d53f5d83d04eeaae2bad17ef3f35e09e6818434d8eaefa038f3d1f7359d0969a",
|
"hash": "e237d92c59ebbf0dc8ac0bae3bc80340e1e9cf430e1c1c9638443001118e16de2b3e9036ac4b98105427667b0386d97831415170b68c432438dcad9ef8052de7",
|
||||||
"find_args": "CONFIG",
|
"find_args": "CONFIG",
|
||||||
"options": [
|
"options": [
|
||||||
"CPP_JWT_BUILD_EXAMPLES OFF",
|
|
||||||
"CPP_JWT_BUILD_TESTS OFF",
|
|
||||||
"CPP_JWT_USE_VENDORED_NLOHMANN_JSON OFF"
|
"CPP_JWT_USE_VENDORED_NLOHMANN_JSON OFF"
|
||||||
],
|
|
||||||
"patches": [
|
|
||||||
"0001-no-install.patch",
|
|
||||||
"0002-missing-decl.patch"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"vulkan-headers": {
|
"vulkan-utility-headers": {
|
||||||
"package": "VulkanHeaders",
|
|
||||||
"version": "1.3.274",
|
|
||||||
"repo": "KhronosGroup/Vulkan-Headers",
|
|
||||||
"sha": "89268a6d17",
|
|
||||||
"hash": "3ab349f74298ba72cafb8561015690c0674d428a09fb91ccd3cd3daca83650d190d46d33fd97b0a8fd4223fe6df2bcabae89136fbbf7c0bfeb8776f9448304c8"
|
|
||||||
},
|
|
||||||
"vulkan-utility-libraries": {
|
|
||||||
"package": "VulkanUtilityLibraries",
|
"package": "VulkanUtilityLibraries",
|
||||||
"repo": "KhronosGroup/Vulkan-Utility-Libraries",
|
"repo": "scripts/VulkanUtilityHeaders",
|
||||||
"sha": "df2e358152",
|
"tag": "1.4.326",
|
||||||
"hash": "3e468c3d9ff93f6d418d71e5527abe0a12c8c7ab5b0b52278bbbee4d02bb87e99073906729b727e0147242b7e3fd5dedf68b803f1878cb4c0e4f730bc2238d79"
|
"artifact": "VulkanUtilityHeaders.tar.zst",
|
||||||
|
"git_host": "git.crueter.xyz",
|
||||||
|
"hash": "5924629755cb1605c4aa4eee20ef7957a9dd8d61e4df548be656d98054f2730c4109693c1bd35811f401f4705d2ccff9fc849be32b0d8480bc3f73541a5e0964"
|
||||||
},
|
},
|
||||||
"vulkan-memory-allocator": {
|
"vulkan-memory-allocator": {
|
||||||
"package": "VulkanMemoryAllocator",
|
"package": "VulkanMemoryAllocator",
|
||||||
|
@ -74,14 +62,14 @@
|
||||||
},
|
},
|
||||||
"xbyak_sun": {
|
"xbyak_sun": {
|
||||||
"package": "xbyak",
|
"package": "xbyak",
|
||||||
"repo": "Lizzie841/xbyak",
|
"repo": "herumi/xbyak",
|
||||||
"sha": "51f507b0b3",
|
"sha": "9bb219333a",
|
||||||
"hash": "4a29a3c2f97f7d5adf667a21a008be03c951fb6696b0d7ba27e7e4afa037bc76eb5e059bb84860e01baf741d4d3ac851b840cd54c99d038812fbe0f1fa6d38a4",
|
"hash": "303165d45c8c19387ec49d9fda7d7a4e0d86d4c0153898c23f25ce2d58ece567f44c0bbbfe348239b933edb6e1a1e34f4bc1c0ab3a285bee5da0e548879387b0",
|
||||||
"bundled": true
|
"bundled": true
|
||||||
},
|
},
|
||||||
"xbyak": {
|
"xbyak": {
|
||||||
"package": "xbyak",
|
"package": "xbyak",
|
||||||
"repo": "Lizzie841/xbyak",
|
"repo": "herumi/xbyak",
|
||||||
"sha": "4e44f4614d",
|
"sha": "4e44f4614d",
|
||||||
"hash": "5824e92159e07fa36a774aedd3b3ef3541d0241371d522cffa4ab3e1f215fa5097b1b77865b47b2481376c704fa079875557ea463ca63d0a7fd6a8a20a589e70",
|
"hash": "5824e92159e07fa36a774aedd3b3ef3541d0241371d522cffa4ab3e1f215fa5097b1b77865b47b2481376c704fa079875557ea463ca63d0a7fd6a8a20a589e70",
|
||||||
"bundled": true
|
"bundled": true
|
||||||
|
@ -105,5 +93,12 @@
|
||||||
"sha": "2bc873e53c",
|
"sha": "2bc873e53c",
|
||||||
"hash": "02329058a7f9cf7d5039afaae5ab170d9f42f60f4c01e21eaf4f46073886922b057a9ae30eeac040b3ac182f51b9c1bfe9fe1050a2c9f6ce567a1a9a0ec2c768",
|
"hash": "02329058a7f9cf7d5039afaae5ab170d9f42f60f4c01e21eaf4f46073886922b057a9ae30eeac040b3ac182f51b9c1bfe9fe1050a2c9f6ce567a1a9a0ec2c768",
|
||||||
"bundled": true
|
"bundled": true
|
||||||
|
},
|
||||||
|
"unordered-dense": {
|
||||||
|
"package": "unordered_dense",
|
||||||
|
"repo": "martinus/unordered_dense",
|
||||||
|
"sha": "73f3cbb237",
|
||||||
|
"hash": "c08c03063938339d61392b687562909c1a92615b6ef39ec8df19ea472aa6b6478e70d7d5e33d4a27b5d23f7806daf57fe1bacb8124c8a945c918c7663a9e8532",
|
||||||
|
"find_args": "CONFIG"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
30
externals/ffmpeg/CMakeLists.txt
vendored
30
externals/ffmpeg/CMakeLists.txt
vendored
|
@ -1,8 +1,6 @@
|
||||||
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
|
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
# Explicitly include CPMUtil here since we have a separate cpmfile for ffmpeg
|
|
||||||
set(CPMUTIL_JSON_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cpmfile.json)
|
|
||||||
include(CPMUtil)
|
include(CPMUtil)
|
||||||
|
|
||||||
if (NOT WIN32 AND NOT ANDROID)
|
if (NOT WIN32 AND NOT ANDROID)
|
||||||
|
@ -63,20 +61,22 @@ if (NOT WIN32 AND NOT ANDROID)
|
||||||
set(FFmpeg_HWACCEL_INCLUDE_DIRS)
|
set(FFmpeg_HWACCEL_INCLUDE_DIRS)
|
||||||
set(FFmpeg_HWACCEL_LDFLAGS)
|
set(FFmpeg_HWACCEL_LDFLAGS)
|
||||||
|
|
||||||
# In Solaris needs explicit linking for ffmpeg which links to /lib/amd64/libX11.so
|
if (NOT APPLE)
|
||||||
if(PLATFORM_SUN)
|
# In Solaris needs explicit linking for ffmpeg which links to /lib/amd64/libX11.so
|
||||||
list(APPEND FFmpeg_HWACCEL_LIBRARIES
|
if(PLATFORM_SUN)
|
||||||
X11
|
list(APPEND FFmpeg_HWACCEL_LIBRARIES
|
||||||
"/usr/lib/xorg/amd64/libdrm.so")
|
X11
|
||||||
else()
|
"/usr/lib/xorg/amd64/libdrm.so")
|
||||||
pkg_check_modules(LIBDRM libdrm REQUIRED)
|
else()
|
||||||
list(APPEND FFmpeg_HWACCEL_LIBRARIES
|
pkg_check_modules(LIBDRM libdrm REQUIRED)
|
||||||
${LIBDRM_LIBRARIES})
|
list(APPEND FFmpeg_HWACCEL_LIBRARIES
|
||||||
list(APPEND FFmpeg_HWACCEL_INCLUDE_DIRS
|
${LIBDRM_LIBRARIES})
|
||||||
${LIBDRM_INCLUDE_DIRS})
|
list(APPEND FFmpeg_HWACCEL_INCLUDE_DIRS
|
||||||
|
${LIBDRM_INCLUDE_DIRS})
|
||||||
|
endif()
|
||||||
|
list(APPEND FFmpeg_HWACCEL_FLAGS
|
||||||
|
--enable-libdrm)
|
||||||
endif()
|
endif()
|
||||||
list(APPEND FFmpeg_HWACCEL_FLAGS
|
|
||||||
--enable-libdrm)
|
|
||||||
|
|
||||||
if(LIBVA_FOUND)
|
if(LIBVA_FOUND)
|
||||||
find_package(X11 REQUIRED)
|
find_package(X11 REQUIRED)
|
||||||
|
|
66
externals/libusb/CMakeLists.txt
vendored
66
externals/libusb/CMakeLists.txt
vendored
|
@ -1,7 +1,15 @@
|
||||||
# SPDX-FileCopyrightText: 2020 yuzu Emulator Project
|
# SPDX-FileCopyrightText: 2020 yuzu Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
if (MINGW OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux") OR APPLE)
|
include(CPMUtil)
|
||||||
|
|
||||||
|
AddJsonPackage(libusb)
|
||||||
|
|
||||||
|
if (NOT libusb_ADDED)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (MINGW OR PLATFORM_LINUX OR APPLE)
|
||||||
set(LIBUSB_FOUND ON CACHE BOOL "libusb is present" FORCE)
|
set(LIBUSB_FOUND ON CACHE BOOL "libusb is present" FORCE)
|
||||||
set(LIBUSB_VERSION "1.0.24" CACHE STRING "libusb version string" FORCE)
|
set(LIBUSB_VERSION "1.0.24" CACHE STRING "libusb version string" FORCE)
|
||||||
|
|
||||||
|
@ -19,8 +27,8 @@ if (MINGW OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux") OR APPLE)
|
||||||
message(FATAL_ERROR "Required program `libtoolize` not found.")
|
message(FATAL_ERROR "Required program `libtoolize` not found.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(LIBUSB_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/libusb")
|
set(LIBUSB_PREFIX "${libusb_BINARY_DIR}")
|
||||||
set(LIBUSB_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libusb")
|
set(LIBUSB_SRC_DIR "${libusb_SOURCE_DIR}")
|
||||||
|
|
||||||
# Workarounds for MSYS/MinGW
|
# Workarounds for MSYS/MinGW
|
||||||
if (MSYS)
|
if (MSYS)
|
||||||
|
@ -118,27 +126,27 @@ else() # MINGW OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(usb
|
add_library(usb
|
||||||
libusb/libusb/core.c
|
${libusb_SOURCE_DIR}/libusb/core.c
|
||||||
libusb/libusb/core.c
|
${libusb_SOURCE_DIR}/libusb/core.c
|
||||||
libusb/libusb/descriptor.c
|
${libusb_SOURCE_DIR}/libusb/descriptor.c
|
||||||
libusb/libusb/hotplug.c
|
${libusb_SOURCE_DIR}/libusb/hotplug.c
|
||||||
libusb/libusb/io.c
|
${libusb_SOURCE_DIR}/libusb/io.c
|
||||||
libusb/libusb/strerror.c
|
${libusb_SOURCE_DIR}/libusb/strerror.c
|
||||||
libusb/libusb/sync.c
|
${libusb_SOURCE_DIR}/libusb/sync.c
|
||||||
)
|
)
|
||||||
set_target_properties(usb PROPERTIES VERSION 1.0.24)
|
set_target_properties(usb PROPERTIES VERSION 1.0.24)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_include_directories(usb
|
target_include_directories(usb
|
||||||
BEFORE
|
BEFORE
|
||||||
PUBLIC
|
PUBLIC
|
||||||
libusb/libusb
|
${libusb_SOURCE_DIR}/libusb
|
||||||
|
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT MINGW)
|
if (NOT MINGW)
|
||||||
target_include_directories(usb BEFORE PRIVATE libusb/msvc)
|
target_include_directories(usb BEFORE PRIVATE ${libusb_SOURCE_DIR}/msvc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
@ -148,7 +156,7 @@ else() # MINGW OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
BEFORE
|
BEFORE
|
||||||
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
libusb/libusb
|
${libusb_SOURCE_DIR}/libusb
|
||||||
|
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
|
@ -157,15 +165,15 @@ else() # MINGW OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
|
|
||||||
if(WIN32 OR CYGWIN)
|
if(WIN32 OR CYGWIN)
|
||||||
target_sources(usb PRIVATE
|
target_sources(usb PRIVATE
|
||||||
libusb/libusb/os/threads_windows.c
|
${libusb_SOURCE_DIR}/libusb/os/threads_windows.c
|
||||||
libusb/libusb/os/windows_winusb.c
|
${libusb_SOURCE_DIR}/libusb/os/windows_winusb.c
|
||||||
libusb/libusb/os/windows_usbdk.c
|
${libusb_SOURCE_DIR}/libusb/os/windows_usbdk.c
|
||||||
libusb/libusb/os/windows_common.c
|
${libusb_SOURCE_DIR}/libusb/os/windows_common.c
|
||||||
)
|
)
|
||||||
set(OS_WINDOWS TRUE)
|
set(OS_WINDOWS TRUE)
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
target_sources(usb PRIVATE
|
target_sources(usb PRIVATE
|
||||||
libusb/libusb/os/darwin_usb.c
|
${libusb_SOURCE_DIR}/libusb/os/darwin_usb.c
|
||||||
)
|
)
|
||||||
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
|
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
|
||||||
find_library(IOKIT_LIBRARY IOKit)
|
find_library(IOKIT_LIBRARY IOKit)
|
||||||
|
@ -178,20 +186,20 @@ else() # MINGW OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
set(OS_DARWIN TRUE)
|
set(OS_DARWIN TRUE)
|
||||||
elseif(ANDROID)
|
elseif(ANDROID)
|
||||||
target_sources(usb PRIVATE
|
target_sources(usb PRIVATE
|
||||||
libusb/libusb/os/linux_usbfs.c
|
${libusb_SOURCE_DIR}/libusb/os/linux_usbfs.c
|
||||||
libusb/libusb/os/linux_netlink.c
|
${libusb_SOURCE_DIR}/libusb/os/linux_netlink.c
|
||||||
)
|
)
|
||||||
find_library(LOG_LIBRARY log)
|
find_library(LOG_LIBRARY log)
|
||||||
target_link_libraries(usb PRIVATE ${LOG_LIBRARY})
|
target_link_libraries(usb PRIVATE ${LOG_LIBRARY})
|
||||||
set(OS_LINUX TRUE)
|
set(OS_LINUX TRUE)
|
||||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
target_sources(usb PRIVATE
|
target_sources(usb PRIVATE
|
||||||
libusb/libusb/os/linux_usbfs.c
|
${libusb_SOURCE_DIR}/libusb/os/linux_usbfs.c
|
||||||
)
|
)
|
||||||
find_package(Libudev)
|
find_package(Libudev)
|
||||||
if(LIBUDEV_FOUND)
|
if(LIBUDEV_FOUND)
|
||||||
target_sources(usb PRIVATE
|
target_sources(usb PRIVATE
|
||||||
libusb/libusb/os/linux_udev.c
|
${libusb_SOURCE_DIR}/libusb/os/linux_udev.c
|
||||||
)
|
)
|
||||||
target_link_libraries(usb PRIVATE "${LIBUDEV_LIBRARIES}")
|
target_link_libraries(usb PRIVATE "${LIBUDEV_LIBRARIES}")
|
||||||
target_include_directories(usb PRIVATE "${LIBUDEV_INCLUDE_DIR}")
|
target_include_directories(usb PRIVATE "${LIBUDEV_INCLUDE_DIR}")
|
||||||
|
@ -199,26 +207,26 @@ else() # MINGW OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
set(USE_UDEV TRUE)
|
set(USE_UDEV TRUE)
|
||||||
else()
|
else()
|
||||||
target_sources(usb PRIVATE
|
target_sources(usb PRIVATE
|
||||||
libusb/libusb/os/linux_netlink.c
|
${libusb_SOURCE_DIR}/libusb/os/linux_netlink.c
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
set(OS_LINUX TRUE)
|
set(OS_LINUX TRUE)
|
||||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
|
elseif(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
|
||||||
target_sources(usb PRIVATE
|
target_sources(usb PRIVATE
|
||||||
libusb/libusb/os/netbsd_usb.c
|
${libusb_SOURCE_DIR}/libusb/os/netbsd_usb.c
|
||||||
)
|
)
|
||||||
set(OS_NETBSD TRUE)
|
set(OS_NETBSD TRUE)
|
||||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
elseif(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||||
target_sources(usb PRIVATE
|
target_sources(usb PRIVATE
|
||||||
libusb/libusb/os/openbsd_usb.c
|
${libusb_SOURCE_DIR}/libusb/os/openbsd_usb.c
|
||||||
)
|
)
|
||||||
set(OS_OPENBSD TRUE)
|
set(OS_OPENBSD TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
target_sources(usb PRIVATE
|
target_sources(usb PRIVATE
|
||||||
libusb/libusb/os/events_posix.c
|
${libusb_SOURCE_DIR}/libusb/os/events_posix.c
|
||||||
libusb/libusb/os/threads_posix.c
|
${libusb_SOURCE_DIR}/libusb/os/threads_posix.c
|
||||||
)
|
)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
if(THREADS_HAVE_PTHREAD_ARG)
|
if(THREADS_HAVE_PTHREAD_ARG)
|
||||||
|
@ -230,8 +238,8 @@ else() # MINGW OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
set(THREADS_POSIX TRUE)
|
set(THREADS_POSIX TRUE)
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
target_sources(usb PRIVATE
|
target_sources(usb PRIVATE
|
||||||
libusb/libusb/os/events_windows.c
|
${libusb_SOURCE_DIR}/libusb/os/events_windows.c
|
||||||
libusb/libusb/os/threads_windows.c
|
${libusb_SOURCE_DIR}/libusb/os/threads_windows.c
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
8
externals/libusb/cpmfile.json
vendored
Normal file
8
externals/libusb/cpmfile.json
vendored
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"libusb": {
|
||||||
|
"repo": "libusb/libusb",
|
||||||
|
"sha": "c060e9ce30",
|
||||||
|
"hash": "44647357ba1179020cfa6674d809fc35cf6f89bff1c57252fe3a610110f5013ad678fc6eb5918e751d4384c30e2fe678868dbffc5f85736157e546cb9d10accc",
|
||||||
|
"find_args": "MODULE"
|
||||||
|
}
|
||||||
|
}
|
1
externals/libusb/libusb
vendored
1
externals/libusb/libusb
vendored
|
@ -1 +0,0 @@
|
||||||
Subproject commit c060e9ce30ac2e3ffb49d94209c4dae77b6642f7
|
|
11
externals/nx_tzdb/CMakeLists.txt
vendored
11
externals/nx_tzdb/CMakeLists.txt
vendored
|
@ -4,8 +4,6 @@
|
||||||
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
# Explicitly include CPMUtil here since we have a separate cpmfile for nx_tzdb
|
|
||||||
set(CPMUTIL_JSON_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cpmfile.json)
|
|
||||||
include(CPMUtil)
|
include(CPMUtil)
|
||||||
|
|
||||||
set(NX_TZDB_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/include")
|
set(NX_TZDB_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/include")
|
||||||
|
@ -35,9 +33,12 @@ if (CAN_BUILD_NX_TZDB AND NOT YUZU_DOWNLOAD_TIME_ZONE_DATA)
|
||||||
set(NX_TZDB_TZ_DIR "${NX_TZDB_BASE_DIR}/zoneinfo")
|
set(NX_TZDB_TZ_DIR "${NX_TZDB_BASE_DIR}/zoneinfo")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# TODO(crueter): This is a terrible solution, but MSVC fails to link without it
|
if(NOT YUZU_TZDB_PATH STREQUAL "")
|
||||||
# Need to investigate further but I still can't reproduce...
|
set(NX_TZDB_BASE_DIR "${YUZU_TZDB_PATH}")
|
||||||
if (MSVC)
|
set(NX_TZDB_TZ_DIR "${NX_TZDB_BASE_DIR}/zoneinfo")
|
||||||
|
elseif (MSVC)
|
||||||
|
# TODO(crueter): This is a terrible solution, but MSVC fails to link without it
|
||||||
|
# Need to investigate further but I still can't reproduce...
|
||||||
set(NX_TZDB_VERSION "250725")
|
set(NX_TZDB_VERSION "250725")
|
||||||
set(NX_TZDB_ARCHIVE "${CPM_SOURCE_CACHE}/nx_tzdb/${NX_TZDB_VERSION}.zip")
|
set(NX_TZDB_ARCHIVE "${CPM_SOURCE_CACHE}/nx_tzdb/${NX_TZDB_VERSION}.zip")
|
||||||
|
|
||||||
|
|
5
externals/nx_tzdb/cpmfile.json
vendored
5
externals/nx_tzdb/cpmfile.json
vendored
|
@ -1,7 +1,10 @@
|
||||||
{
|
{
|
||||||
"tzdb": {
|
"tzdb": {
|
||||||
"package": "nx_tzdb",
|
"package": "nx_tzdb",
|
||||||
"url": "https://github.com/crueter/tzdb_to_nx/releases/download/250725/250725.zip",
|
"repo": "misc/tzdb_to_nx",
|
||||||
|
"git_host": "git.crueter.xyz",
|
||||||
|
"artifact": "%VERSION%.zip",
|
||||||
|
"tag": "%VERSION%",
|
||||||
"hash": "8f60b4b29f285e39c0443f3d5572a73780f3dbfcfd5b35004451fadad77f3a215b2e2aa8d0fffe7e348e2a7b0660882b35228b6178dda8804a14ce44509fd2ca",
|
"hash": "8f60b4b29f285e39c0443f3d5572a73780f3dbfcfd5b35004451fadad77f3a215b2e2aa8d0fffe7e348e2a7b0660882b35228b6178dda8804a14ce44509fd2ca",
|
||||||
"version": "250725"
|
"version": "250725"
|
||||||
}
|
}
|
||||||
|
|
22
externals/sse2neon/sse2neon.h
vendored
22
externals/sse2neon/sse2neon.h
vendored
|
@ -183,7 +183,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Compiler barrier */
|
/* Compiler barrier */
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
#define SSE2NEON_BARRIER() _ReadWriteBarrier()
|
#define SSE2NEON_BARRIER() _ReadWriteBarrier()
|
||||||
#else
|
#else
|
||||||
#define SSE2NEON_BARRIER() \
|
#define SSE2NEON_BARRIER() \
|
||||||
|
@ -859,7 +859,7 @@ FORCE_INLINE uint64x2_t _sse2neon_vmull_p64(uint64x1_t _a, uint64x1_t _b)
|
||||||
{
|
{
|
||||||
poly64_t a = vget_lane_p64(vreinterpret_p64_u64(_a), 0);
|
poly64_t a = vget_lane_p64(vreinterpret_p64_u64(_a), 0);
|
||||||
poly64_t b = vget_lane_p64(vreinterpret_p64_u64(_b), 0);
|
poly64_t b = vget_lane_p64(vreinterpret_p64_u64(_b), 0);
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
__n64 a1 = {a}, b1 = {b};
|
__n64 a1 = {a}, b1 = {b};
|
||||||
return vreinterpretq_u64_p128(vmull_p64(a1, b1));
|
return vreinterpretq_u64_p128(vmull_p64(a1, b1));
|
||||||
#else
|
#else
|
||||||
|
@ -1770,7 +1770,7 @@ FORCE_INLINE void _mm_free(void *addr)
|
||||||
FORCE_INLINE uint64_t _sse2neon_get_fpcr(void)
|
FORCE_INLINE uint64_t _sse2neon_get_fpcr(void)
|
||||||
{
|
{
|
||||||
uint64_t value;
|
uint64_t value;
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
value = _ReadStatusReg(ARM64_FPCR);
|
value = _ReadStatusReg(ARM64_FPCR);
|
||||||
#else
|
#else
|
||||||
__asm__ __volatile__("mrs %0, FPCR" : "=r"(value)); /* read */
|
__asm__ __volatile__("mrs %0, FPCR" : "=r"(value)); /* read */
|
||||||
|
@ -1780,7 +1780,7 @@ FORCE_INLINE uint64_t _sse2neon_get_fpcr(void)
|
||||||
|
|
||||||
FORCE_INLINE void _sse2neon_set_fpcr(uint64_t value)
|
FORCE_INLINE void _sse2neon_set_fpcr(uint64_t value)
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
_WriteStatusReg(ARM64_FPCR, value);
|
_WriteStatusReg(ARM64_FPCR, value);
|
||||||
#else
|
#else
|
||||||
__asm__ __volatile__("msr FPCR, %0" ::"r"(value)); /* write */
|
__asm__ __volatile__("msr FPCR, %0" ::"r"(value)); /* write */
|
||||||
|
@ -2249,7 +2249,7 @@ FORCE_INLINE __m128 _mm_or_ps(__m128 a, __m128 b)
|
||||||
FORCE_INLINE void _mm_prefetch(char const *p, int i)
|
FORCE_INLINE void _mm_prefetch(char const *p, int i)
|
||||||
{
|
{
|
||||||
(void) i;
|
(void) i;
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case _MM_HINT_NTA:
|
case _MM_HINT_NTA:
|
||||||
__prefetch2(p, 1);
|
__prefetch2(p, 1);
|
||||||
|
@ -4820,7 +4820,7 @@ FORCE_INLINE __m128i _mm_packus_epi16(const __m128i a, const __m128i b)
|
||||||
// https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_pause
|
// https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_pause
|
||||||
FORCE_INLINE void _mm_pause(void)
|
FORCE_INLINE void _mm_pause(void)
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
__isb(_ARM64_BARRIER_SY);
|
__isb(_ARM64_BARRIER_SY);
|
||||||
#else
|
#else
|
||||||
__asm__ __volatile__("isb\n");
|
__asm__ __volatile__("isb\n");
|
||||||
|
@ -5716,7 +5716,7 @@ FORCE_INLINE __m128d _mm_undefined_pd(void)
|
||||||
#pragma GCC diagnostic ignored "-Wuninitialized"
|
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||||
#endif
|
#endif
|
||||||
__m128d a;
|
__m128d a;
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
a = _mm_setzero_pd();
|
a = _mm_setzero_pd();
|
||||||
#endif
|
#endif
|
||||||
return a;
|
return a;
|
||||||
|
@ -8130,7 +8130,7 @@ FORCE_INLINE int _sse2neon_sido_negative(int res, int lb, int imm8, int bound)
|
||||||
|
|
||||||
FORCE_INLINE int _sse2neon_clz(unsigned int x)
|
FORCE_INLINE int _sse2neon_clz(unsigned int x)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
unsigned long cnt = 0;
|
unsigned long cnt = 0;
|
||||||
if (_BitScanReverse(&cnt, x))
|
if (_BitScanReverse(&cnt, x))
|
||||||
return 31 - cnt;
|
return 31 - cnt;
|
||||||
|
@ -8142,7 +8142,7 @@ FORCE_INLINE int _sse2neon_clz(unsigned int x)
|
||||||
|
|
||||||
FORCE_INLINE int _sse2neon_ctz(unsigned int x)
|
FORCE_INLINE int _sse2neon_ctz(unsigned int x)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
unsigned long cnt = 0;
|
unsigned long cnt = 0;
|
||||||
if (_BitScanForward(&cnt, x))
|
if (_BitScanForward(&cnt, x))
|
||||||
return cnt;
|
return cnt;
|
||||||
|
@ -9058,7 +9058,7 @@ FORCE_INLINE __m128i _mm_aeskeygenassist_si128(__m128i a, const int rcon)
|
||||||
// AESE does ShiftRows and SubBytes on A
|
// AESE does ShiftRows and SubBytes on A
|
||||||
uint8x16_t u8 = vaeseq_u8(vreinterpretq_u8_m128i(a), vdupq_n_u8(0));
|
uint8x16_t u8 = vaeseq_u8(vreinterpretq_u8_m128i(a), vdupq_n_u8(0));
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#if !defined(_MSC_VER) || defined(__clang__)
|
||||||
uint8x16_t dest = {
|
uint8x16_t dest = {
|
||||||
// Undo ShiftRows step from AESE and extract X1 and X3
|
// Undo ShiftRows step from AESE and extract X1 and X3
|
||||||
u8[0x4], u8[0x1], u8[0xE], u8[0xB], // SubBytes(X1)
|
u8[0x4], u8[0x1], u8[0xE], u8[0xB], // SubBytes(X1)
|
||||||
|
@ -9245,7 +9245,7 @@ FORCE_INLINE uint64_t _rdtsc(void)
|
||||||
* bits wide and it is attributed with the flag 'cap_user_time_short'
|
* bits wide and it is attributed with the flag 'cap_user_time_short'
|
||||||
* is true.
|
* is true.
|
||||||
*/
|
*/
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
val = _ReadStatusReg(ARM64_SYSREG(3, 3, 14, 0, 2));
|
val = _ReadStatusReg(ARM64_SYSREG(3, 3, 14, 0, 2));
|
||||||
#else
|
#else
|
||||||
__asm__ __volatile__("mrs %0, cntvct_el0" : "=r"(val));
|
__asm__ __volatile__("mrs %0, cntvct_el0" : "=r"(val));
|
||||||
|
|
|
@ -18,20 +18,20 @@ set_property(DIRECTORY APPEND PROPERTY
|
||||||
COMPILE_DEFINITIONS $<$<CONFIG:Debug>:_DEBUG> $<$<NOT:$<CONFIG:Debug>>:NDEBUG>)
|
COMPILE_DEFINITIONS $<$<CONFIG:Debug>:_DEBUG> $<$<NOT:$<CONFIG:Debug>>:NDEBUG>)
|
||||||
|
|
||||||
# Set compilation flags
|
# Set compilation flags
|
||||||
if (MSVC)
|
if (MSVC AND NOT CXX_CLANG)
|
||||||
set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE STRING "" FORCE)
|
set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE STRING "" FORCE)
|
||||||
|
|
||||||
# Silence "deprecation" warnings
|
# Silence "deprecation" warnings
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
|
add_compile_definitions(_CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_DEPRECATE _SCL_SECURE_NO_WARNINGS)
|
||||||
|
|
||||||
# Avoid windows.h junk
|
# Avoid windows.h junk
|
||||||
add_definitions(-DNOMINMAX)
|
add_compile_definitions(NOMINMAX)
|
||||||
|
|
||||||
# Avoid windows.h from including some usually unused libs like winsocks.h, since this might cause some redefinition errors.
|
# Avoid windows.h from including some usually unused libs like winsocks.h, since this might cause some redefinition errors.
|
||||||
add_definitions(-DWIN32_LEAN_AND_MEAN)
|
add_compile_definitions(WIN32_LEAN_AND_MEAN)
|
||||||
|
|
||||||
# Ensure that projects are built with Unicode support.
|
# Ensure that projects are built with Unicode support.
|
||||||
add_definitions(-DUNICODE -D_UNICODE)
|
add_compile_definitions(UNICODE _UNICODE)
|
||||||
|
|
||||||
# /W4 - Level 4 warnings
|
# /W4 - Level 4 warnings
|
||||||
# /MP - Multi-threaded compilation
|
# /MP - Multi-threaded compilation
|
||||||
|
@ -69,10 +69,6 @@ if (MSVC)
|
||||||
/external:anglebrackets # Treats all headers included by #include <header>, where the header file is enclosed in angle brackets (< >), as external headers
|
/external:anglebrackets # Treats all headers included by #include <header>, where the header file is enclosed in angle brackets (< >), as external headers
|
||||||
/external:W0 # Sets the default warning level to 0 for external headers, effectively disabling warnings for them.
|
/external:W0 # Sets the default warning level to 0 for external headers, effectively disabling warnings for them.
|
||||||
|
|
||||||
# Warnings
|
|
||||||
/W4
|
|
||||||
/WX-
|
|
||||||
|
|
||||||
/we4062 # Enumerator 'identifier' in a switch of enum 'enumeration' is not handled
|
/we4062 # Enumerator 'identifier' in a switch of enum 'enumeration' is not handled
|
||||||
/we4189 # 'identifier': local variable is initialized but not referenced
|
/we4189 # 'identifier': local variable is initialized but not referenced
|
||||||
/we4265 # 'class': class has virtual functions, but destructor is not virtual
|
/we4265 # 'class': class has virtual functions, but destructor is not virtual
|
||||||
|
@ -97,6 +93,14 @@ if (MSVC)
|
||||||
/wd4702 # unreachable code (when used with LTO)
|
/wd4702 # unreachable code (when used with LTO)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (NOT CXX_CLANG)
|
||||||
|
add_compile_options(
|
||||||
|
# Warnings
|
||||||
|
/W4
|
||||||
|
/WX-
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (USE_CCACHE OR YUZU_USE_PRECOMPILED_HEADERS)
|
if (USE_CCACHE OR YUZU_USE_PRECOMPILED_HEADERS)
|
||||||
# when caching, we need to use /Z7 to downgrade debug info to use an older but more cacheable format
|
# when caching, we need to use /Z7 to downgrade debug info to use an older but more cacheable format
|
||||||
# Precompiled headers are deleted if not using /Z7. See https://github.com/nanoant/CMakePCHCompiler/issues/21
|
# Precompiled headers are deleted if not using /Z7. See https://github.com/nanoant/CMakePCHCompiler/issues/21
|
||||||
|
@ -118,9 +122,13 @@ if (MSVC)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG /MANIFEST:NO" CACHE STRING "" FORCE)
|
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG /MANIFEST:NO" CACHE STRING "" FORCE)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /MANIFEST:NO /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE)
|
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /MANIFEST:NO /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE)
|
||||||
else()
|
else()
|
||||||
add_compile_options(
|
if (NOT MSVC)
|
||||||
-fwrapv
|
add_compile_options(
|
||||||
|
-fwrapv
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_compile_options(
|
||||||
-Werror=all
|
-Werror=all
|
||||||
-Werror=extra
|
-Werror=extra
|
||||||
-Werror=missing-declarations
|
-Werror=missing-declarations
|
||||||
|
@ -133,14 +141,19 @@ else()
|
||||||
-Wno-missing-field-initializers
|
-Wno-missing-field-initializers
|
||||||
)
|
)
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID MATCHES Clang OR CMAKE_CXX_COMPILER_ID MATCHES IntelLLVM) # Clang or AppleClang
|
if (CXX_CLANG OR CXX_ICC) # Clang or AppleClang
|
||||||
|
if (NOT MSVC)
|
||||||
|
add_compile_options(
|
||||||
|
-Werror=shadow-uncaptured-local
|
||||||
|
-Werror=implicit-fallthrough
|
||||||
|
-Werror=type-limits
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
-Wno-braced-scalar-init
|
-Wno-braced-scalar-init
|
||||||
-Wno-unused-private-field
|
-Wno-unused-private-field
|
||||||
-Wno-nullability-completeness
|
-Wno-nullability-completeness
|
||||||
-Werror=shadow-uncaptured-local
|
|
||||||
-Werror=implicit-fallthrough
|
|
||||||
-Werror=type-limits
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -148,12 +161,12 @@ else()
|
||||||
add_compile_options("-mcx16")
|
add_compile_options("-mcx16")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
if (APPLE AND CXX_CLANG)
|
||||||
add_compile_options("-stdlib=libc++")
|
add_compile_options("-stdlib=libc++")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# GCC bugs
|
# GCC bugs
|
||||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11" AND CXX_GCC)
|
||||||
# These diagnostics would be great if they worked, but are just completely broken
|
# These diagnostics would be great if they worked, but are just completely broken
|
||||||
# and produce bogus errors on external libraries like fmt.
|
# and produce bogus errors on external libraries like fmt.
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
|
@ -169,15 +182,15 @@ else()
|
||||||
# glibc, which may default to 32 bits. glibc allows this to be configured
|
# glibc, which may default to 32 bits. glibc allows this to be configured
|
||||||
# by setting _FILE_OFFSET_BITS.
|
# by setting _FILE_OFFSET_BITS.
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR MINGW)
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR MINGW)
|
||||||
add_definitions(-D_FILE_OFFSET_BITS=64)
|
add_compile_definitions(_FILE_OFFSET_BITS=64)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (MINGW)
|
if (MINGW)
|
||||||
add_definitions(-DMINGW_HAS_SECURE_API)
|
add_compile_definitions(MINGW_HAS_SECURE_API)
|
||||||
add_compile_options("-msse4.1")
|
add_compile_options("-msse4.1")
|
||||||
|
|
||||||
if (MINGW_STATIC_BUILD)
|
if (MINGW_STATIC_BUILD)
|
||||||
add_definitions(-DQT_STATICPLUGIN)
|
add_compile_definitions(QT_STATICPLUGIN)
|
||||||
add_compile_options("-static")
|
add_compile_options("-static")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -30,8 +30,8 @@ val autoVersion = (((System.currentTimeMillis() / 1000) - 1451606400) / 10).toIn
|
||||||
android {
|
android {
|
||||||
namespace = "org.yuzu.yuzu_emu"
|
namespace = "org.yuzu.yuzu_emu"
|
||||||
|
|
||||||
compileSdkVersion = "android-35"
|
compileSdkVersion = "android-36"
|
||||||
ndkVersion = "26.1.10909125"
|
ndkVersion = "28.2.13676358"
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
viewBinding = true
|
viewBinding = true
|
||||||
|
@ -173,12 +173,14 @@ android {
|
||||||
"-DENABLE_OPENSSL=ON",
|
"-DENABLE_OPENSSL=ON",
|
||||||
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
|
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
|
||||||
"-DYUZU_USE_CPM=ON",
|
"-DYUZU_USE_CPM=ON",
|
||||||
|
"-DCPMUTIL_FORCE_BUNDLED=ON",
|
||||||
"-DYUZU_USE_BUNDLED_FFMPEG=ON",
|
"-DYUZU_USE_BUNDLED_FFMPEG=ON",
|
||||||
"-DYUZU_ENABLE_LTO=ON",
|
"-DYUZU_ENABLE_LTO=ON",
|
||||||
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
|
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
|
||||||
"-DBUILD_TESTING=OFF",
|
"-DBUILD_TESTING=OFF",
|
||||||
"-DYUZU_TESTS=OFF",
|
"-DYUZU_TESTS=OFF",
|
||||||
"-DDYNARMIC_TESTS=OFF"
|
"-DDYNARMIC_TESTS=OFF",
|
||||||
|
"-DDYNARMIC_ENABLE_LTO=ON"
|
||||||
)
|
)
|
||||||
|
|
||||||
abiFilters("arm64-v8a")
|
abiFilters("arm64-v8a")
|
||||||
|
|
|
@ -36,6 +36,9 @@ import androidx.core.net.toUri
|
||||||
import androidx.core.content.edit
|
import androidx.core.content.edit
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import org.yuzu.yuzu_emu.NativeLibrary
|
import org.yuzu.yuzu_emu.NativeLibrary
|
||||||
|
import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting
|
||||||
|
import org.yuzu.yuzu_emu.features.settings.model.Settings
|
||||||
|
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||||
|
|
||||||
class GameAdapter(private val activity: AppCompatActivity) :
|
class GameAdapter(private val activity: AppCompatActivity) :
|
||||||
AbstractDiffAdapter<Game, GameAdapter.GameViewHolder>(exact = false) {
|
AbstractDiffAdapter<Game, GameAdapter.GameViewHolder>(exact = false) {
|
||||||
|
@ -229,6 +232,8 @@ class GameAdapter(private val activity: AppCompatActivity) :
|
||||||
binding.root.findNavController().navigate(action)
|
binding.root.findNavController().navigate(action)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val preferences = PreferenceManager.getDefaultSharedPreferences(YuzuApplication.appContext)
|
||||||
|
|
||||||
if (NativeLibrary.gameRequiresFirmware(game.programId) && !NativeLibrary.isFirmwareAvailable()) {
|
if (NativeLibrary.gameRequiresFirmware(game.programId) && !NativeLibrary.isFirmwareAvailable()) {
|
||||||
MaterialAlertDialogBuilder(activity)
|
MaterialAlertDialogBuilder(activity)
|
||||||
.setTitle(R.string.loader_requires_firmware)
|
.setTitle(R.string.loader_requires_firmware)
|
||||||
|
@ -243,6 +248,23 @@ class GameAdapter(private val activity: AppCompatActivity) :
|
||||||
}
|
}
|
||||||
.setNegativeButton(android.R.string.cancel) { _, _ -> }
|
.setNegativeButton(android.R.string.cancel) { _, _ -> }
|
||||||
.show()
|
.show()
|
||||||
|
} else if (BooleanSetting.DISABLE_NCA_VERIFICATION.getBoolean(false) && !preferences.getBoolean(
|
||||||
|
Settings.PREF_HIDE_NCA_POPUP, false)) {
|
||||||
|
MaterialAlertDialogBuilder(activity)
|
||||||
|
.setTitle(R.string.nca_verification_disabled)
|
||||||
|
.setMessage(activity.getString(R.string.nca_verification_disabled_description))
|
||||||
|
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||||
|
launch()
|
||||||
|
}
|
||||||
|
.setNeutralButton(R.string.dont_show_again) { _, _ ->
|
||||||
|
preferences.edit {
|
||||||
|
putBoolean(Settings.PREF_HIDE_NCA_POPUP, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
launch()
|
||||||
|
}
|
||||||
|
.setNegativeButton(android.R.string.cancel) { _, _ -> }
|
||||||
|
.show()
|
||||||
} else {
|
} else {
|
||||||
launch()
|
launch()
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
|
||||||
RENDERER_SAMPLE_SHADING("sample_shading"),
|
RENDERER_SAMPLE_SHADING("sample_shading"),
|
||||||
PICTURE_IN_PICTURE("picture_in_picture"),
|
PICTURE_IN_PICTURE("picture_in_picture"),
|
||||||
USE_CUSTOM_RTC("custom_rtc_enabled"),
|
USE_CUSTOM_RTC("custom_rtc_enabled"),
|
||||||
|
DISABLE_NCA_VERIFICATION("disable_nca_verification"),
|
||||||
BLACK_BACKGROUNDS("black_backgrounds"),
|
BLACK_BACKGROUNDS("black_backgrounds"),
|
||||||
JOYSTICK_REL_CENTER("joystick_rel_center"),
|
JOYSTICK_REL_CENTER("joystick_rel_center"),
|
||||||
DPAD_SLIDE("dpad_slide"),
|
DPAD_SLIDE("dpad_slide"),
|
||||||
|
|
|
@ -37,6 +37,7 @@ object Settings {
|
||||||
const val PREF_SHOULD_SHOW_PRE_ALPHA_WARNING = "ShouldShowPreAlphaWarning"
|
const val PREF_SHOULD_SHOW_PRE_ALPHA_WARNING = "ShouldShowPreAlphaWarning"
|
||||||
const val PREF_SHOULD_SHOW_EDENS_VEIL_DIALOG = "ShouldShowEdensVeilDialog"
|
const val PREF_SHOULD_SHOW_EDENS_VEIL_DIALOG = "ShouldShowEdensVeilDialog"
|
||||||
const val PREF_MEMORY_WARNING_SHOWN = "MemoryWarningShown"
|
const val PREF_MEMORY_WARNING_SHOWN = "MemoryWarningShown"
|
||||||
|
const val PREF_HIDE_NCA_POPUP = "HideNCAVerificationPopup"
|
||||||
const val SECTION_STATS_OVERLAY = "Stats Overlay"
|
const val SECTION_STATS_OVERLAY = "Stats Overlay"
|
||||||
|
|
||||||
// Deprecated input overlay preference keys
|
// Deprecated input overlay preference keys
|
||||||
|
|
|
@ -297,7 +297,13 @@ abstract class SettingsItem(
|
||||||
descriptionId = R.string.use_custom_rtc_description
|
descriptionId = R.string.use_custom_rtc_description
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
put(
|
||||||
|
SwitchSetting(
|
||||||
|
BooleanSetting.DISABLE_NCA_VERIFICATION,
|
||||||
|
titleId = R.string.disable_nca_verification,
|
||||||
|
descriptionId = R.string.disable_nca_verification_description
|
||||||
|
)
|
||||||
|
)
|
||||||
put(
|
put(
|
||||||
StringInputSetting(
|
StringInputSetting(
|
||||||
StringSetting.WEB_TOKEN,
|
StringSetting.WEB_TOKEN,
|
||||||
|
|
|
@ -210,6 +210,7 @@ class SettingsFragmentPresenter(
|
||||||
add(IntSetting.LANGUAGE_INDEX.key)
|
add(IntSetting.LANGUAGE_INDEX.key)
|
||||||
add(BooleanSetting.USE_CUSTOM_RTC.key)
|
add(BooleanSetting.USE_CUSTOM_RTC.key)
|
||||||
add(LongSetting.CUSTOM_RTC.key)
|
add(LongSetting.CUSTOM_RTC.key)
|
||||||
|
add(BooleanSetting.DISABLE_NCA_VERIFICATION.key)
|
||||||
|
|
||||||
add(HeaderSetting(R.string.network))
|
add(HeaderSetting(R.string.network))
|
||||||
add(StringSetting.WEB_TOKEN.key)
|
add(StringSetting.WEB_TOKEN.key)
|
||||||
|
|
|
@ -79,7 +79,7 @@ class DriverFetcherFragment : Fragment() {
|
||||||
IntRange(600, 639) to "Mr. Purple EOL-24.3.4",
|
IntRange(600, 639) to "Mr. Purple EOL-24.3.4",
|
||||||
IntRange(640, 699) to "Mr. Purple T19",
|
IntRange(640, 699) to "Mr. Purple T19",
|
||||||
IntRange(700, 710) to "KIMCHI 25.2.0_r5",
|
IntRange(700, 710) to "KIMCHI 25.2.0_r5",
|
||||||
IntRange(711, 799) to "Mr. Purple T21",
|
IntRange(711, 799) to "Mr. Purple T22",
|
||||||
IntRange(800, 899) to "GameHub Adreno 8xx",
|
IntRange(800, 899) to "GameHub Adreno 8xx",
|
||||||
IntRange(900, Int.MAX_VALUE) to "Unsupported"
|
IntRange(900, Int.MAX_VALUE) to "Unsupported"
|
||||||
)
|
)
|
||||||
|
|
|
@ -509,6 +509,8 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||||
gpuModel = GpuDriverHelper.getGpuModel().toString()
|
gpuModel = GpuDriverHelper.getGpuModel().toString()
|
||||||
fwVersion = NativeLibrary.firmwareVersion()
|
fwVersion = NativeLibrary.firmwareVersion()
|
||||||
|
|
||||||
|
updateQuickOverlayMenuEntry(BooleanSetting.SHOW_INPUT_OVERLAY.getBoolean())
|
||||||
|
|
||||||
binding.surfaceEmulation.holder.addCallback(this)
|
binding.surfaceEmulation.holder.addCallback(this)
|
||||||
binding.doneControlConfig.setOnClickListener { stopConfiguringControls() }
|
binding.doneControlConfig.setOnClickListener { stopConfiguringControls() }
|
||||||
|
|
||||||
|
@ -530,6 +532,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||||
binding.drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED)
|
binding.drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED)
|
||||||
binding.inGameMenu.requestFocus()
|
binding.inGameMenu.requestFocus()
|
||||||
emulationViewModel.setDrawerOpen(true)
|
emulationViewModel.setDrawerOpen(true)
|
||||||
|
updateQuickOverlayMenuEntry(BooleanSetting.SHOW_INPUT_OVERLAY.getBoolean())
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDrawerClosed(drawerView: View) {
|
override fun onDrawerClosed(drawerView: View) {
|
||||||
|
@ -571,25 +574,24 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||||
R.id.menu_pause_emulation -> {
|
R.id.menu_pause_emulation -> {
|
||||||
if (emulationState.isPaused) {
|
if (emulationState.isPaused) {
|
||||||
emulationState.run(false)
|
emulationState.run(false)
|
||||||
it.title = resources.getString(R.string.emulation_pause)
|
updatePauseMenuEntry(false)
|
||||||
it.icon = ResourcesCompat.getDrawable(
|
|
||||||
resources,
|
|
||||||
R.drawable.ic_pause,
|
|
||||||
requireContext().theme
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
emulationState.pause()
|
emulationState.pause()
|
||||||
it.title = resources.getString(R.string.emulation_unpause)
|
updatePauseMenuEntry(true)
|
||||||
it.icon = ResourcesCompat.getDrawable(
|
|
||||||
resources,
|
|
||||||
R.drawable.ic_play,
|
|
||||||
requireContext().theme
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
binding.inGameMenu.requestFocus()
|
binding.inGameMenu.requestFocus()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
R.id.menu_quick_overlay -> {
|
||||||
|
val newState = !BooleanSetting.SHOW_INPUT_OVERLAY.getBoolean()
|
||||||
|
BooleanSetting.SHOW_INPUT_OVERLAY.setBoolean(newState)
|
||||||
|
updateQuickOverlayMenuEntry(newState)
|
||||||
|
binding.surfaceInputOverlay.refreshControls()
|
||||||
|
NativeConfig.saveGlobalConfig()
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
R.id.menu_settings -> {
|
R.id.menu_settings -> {
|
||||||
val action = HomeNavigationDirections.actionGlobalSettingsActivity(
|
val action = HomeNavigationDirections.actionGlobalSettingsActivity(
|
||||||
null,
|
null,
|
||||||
|
@ -844,9 +846,50 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun updateQuickOverlayMenuEntry(isVisible: Boolean) {
|
||||||
|
val menu = binding.inGameMenu.menu
|
||||||
|
val item = menu.findItem(R.id.menu_quick_overlay)
|
||||||
|
if (isVisible) {
|
||||||
|
item.title = getString(R.string.emulation_hide_overlay)
|
||||||
|
item.icon = ResourcesCompat.getDrawable(
|
||||||
|
resources,
|
||||||
|
R.drawable.ic_controller_disconnected,
|
||||||
|
requireContext().theme
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
item.title = getString(R.string.emulation_show_overlay)
|
||||||
|
item.icon = ResourcesCompat.getDrawable(
|
||||||
|
resources,
|
||||||
|
R.drawable.ic_controller,
|
||||||
|
requireContext().theme
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun updatePauseMenuEntry(isPaused: Boolean) {
|
||||||
|
val menu = binding.inGameMenu.menu
|
||||||
|
val pauseItem = menu.findItem(R.id.menu_pause_emulation)
|
||||||
|
if (isPaused) {
|
||||||
|
pauseItem.title = getString(R.string.emulation_unpause)
|
||||||
|
pauseItem.icon = ResourcesCompat.getDrawable(
|
||||||
|
resources,
|
||||||
|
R.drawable.ic_play,
|
||||||
|
requireContext().theme
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
pauseItem.title = getString(R.string.emulation_pause)
|
||||||
|
pauseItem.icon = ResourcesCompat.getDrawable(
|
||||||
|
resources,
|
||||||
|
R.drawable.ic_pause,
|
||||||
|
requireContext().theme
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
if (emulationState.isRunning && emulationActivity?.isInPictureInPictureMode != true) {
|
if (emulationState.isRunning && emulationActivity?.isInPictureInPictureMode != true) {
|
||||||
emulationState.pause()
|
emulationState.pause()
|
||||||
|
updatePauseMenuEntry(true)
|
||||||
}
|
}
|
||||||
super.onPause()
|
super.onPause()
|
||||||
}
|
}
|
||||||
|
@ -869,6 +912,10 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||||
|
|
||||||
val socPosition = IntSetting.SOC_OVERLAY_POSITION.getInt()
|
val socPosition = IntSetting.SOC_OVERLAY_POSITION.getInt()
|
||||||
updateSocPosition(socPosition)
|
updateSocPosition(socPosition)
|
||||||
|
|
||||||
|
binding.inGameMenu.post {
|
||||||
|
emulationState?.isPaused?.let { updatePauseMenuEntry(it) }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun resetInputOverlay() {
|
private fun resetInputOverlay() {
|
||||||
|
@ -1391,6 +1438,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||||
R.id.menu_show_overlay -> {
|
R.id.menu_show_overlay -> {
|
||||||
it.isChecked = !it.isChecked
|
it.isChecked = !it.isChecked
|
||||||
BooleanSetting.SHOW_INPUT_OVERLAY.setBoolean(it.isChecked)
|
BooleanSetting.SHOW_INPUT_OVERLAY.setBoolean(it.isChecked)
|
||||||
|
updateQuickOverlayMenuEntry(it.isChecked)
|
||||||
binding.surfaceInputOverlay.refreshControls()
|
binding.surfaceInputOverlay.refreshControls()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,9 +31,6 @@ class HomeViewModel : ViewModel() {
|
||||||
private val _checkKeys = MutableStateFlow(false)
|
private val _checkKeys = MutableStateFlow(false)
|
||||||
val checkKeys = _checkKeys.asStateFlow()
|
val checkKeys = _checkKeys.asStateFlow()
|
||||||
|
|
||||||
private val _checkFirmware = MutableStateFlow(false)
|
|
||||||
val checkFirmware = _checkFirmware.asStateFlow()
|
|
||||||
|
|
||||||
var navigatedToSetup = false
|
var navigatedToSetup = false
|
||||||
|
|
||||||
fun setStatusBarShadeVisibility(visible: Boolean) {
|
fun setStatusBarShadeVisibility(visible: Boolean) {
|
||||||
|
@ -66,8 +63,4 @@ class HomeViewModel : ViewModel() {
|
||||||
fun setCheckKeys(value: Boolean) {
|
fun setCheckKeys(value: Boolean) {
|
||||||
_checkKeys.value = value
|
_checkKeys.value = value
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setCheckFirmware(value: Boolean) {
|
|
||||||
_checkFirmware.value = value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ import org.yuzu.yuzu_emu.model.DriverViewModel
|
||||||
import org.yuzu.yuzu_emu.model.GamesViewModel
|
import org.yuzu.yuzu_emu.model.GamesViewModel
|
||||||
import org.yuzu.yuzu_emu.model.HomeViewModel
|
import org.yuzu.yuzu_emu.model.HomeViewModel
|
||||||
import org.yuzu.yuzu_emu.model.InstallResult
|
import org.yuzu.yuzu_emu.model.InstallResult
|
||||||
|
import android.os.Build
|
||||||
import org.yuzu.yuzu_emu.model.TaskState
|
import org.yuzu.yuzu_emu.model.TaskState
|
||||||
import org.yuzu.yuzu_emu.model.TaskViewModel
|
import org.yuzu.yuzu_emu.model.TaskViewModel
|
||||||
import org.yuzu.yuzu_emu.utils.*
|
import org.yuzu.yuzu_emu.utils.*
|
||||||
|
@ -47,6 +48,7 @@ import java.io.BufferedOutputStream
|
||||||
import java.util.zip.ZipEntry
|
import java.util.zip.ZipEntry
|
||||||
import java.util.zip.ZipInputStream
|
import java.util.zip.ZipInputStream
|
||||||
import androidx.core.content.edit
|
import androidx.core.content.edit
|
||||||
|
import kotlin.text.compareTo
|
||||||
|
|
||||||
class MainActivity : AppCompatActivity(), ThemeProvider {
|
class MainActivity : AppCompatActivity(), ThemeProvider {
|
||||||
private lateinit var binding: ActivityMainBinding
|
private lateinit var binding: ActivityMainBinding
|
||||||
|
@ -110,6 +112,19 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
|
||||||
|
|
||||||
binding = ActivityMainBinding.inflate(layoutInflater)
|
binding = ActivityMainBinding.inflate(layoutInflater)
|
||||||
|
|
||||||
|
// Since Android 15, google automatically forces "games" to be 60 hrz
|
||||||
|
// This ensures the display's max refresh rate is actually used
|
||||||
|
display?.let {
|
||||||
|
val supportedModes = it.supportedModes
|
||||||
|
val maxRefreshRate = supportedModes.maxByOrNull { mode -> mode.refreshRate }
|
||||||
|
|
||||||
|
if (maxRefreshRate != null) {
|
||||||
|
val layoutParams = window.attributes
|
||||||
|
layoutParams.preferredDisplayModeId = maxRefreshRate.modeId
|
||||||
|
window.attributes = layoutParams
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
|
||||||
checkAndRequestBluetoothPermissions()
|
checkAndRequestBluetoothPermissions()
|
||||||
|
@ -127,16 +142,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
|
||||||
checkedDecryption = true
|
checkedDecryption = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!checkedFirmware) {
|
|
||||||
val firstTimeSetup = PreferenceManager.getDefaultSharedPreferences(applicationContext)
|
|
||||||
.getBoolean(Settings.PREF_FIRST_APP_LAUNCH, true)
|
|
||||||
if (!firstTimeSetup) {
|
|
||||||
checkFirmware()
|
|
||||||
showPreAlphaWarningDialog()
|
|
||||||
}
|
|
||||||
checkedFirmware = true
|
|
||||||
}
|
|
||||||
|
|
||||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING)
|
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING)
|
||||||
|
|
||||||
|
@ -183,13 +188,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
|
||||||
if (it) checkKeys()
|
if (it) checkKeys()
|
||||||
}
|
}
|
||||||
|
|
||||||
homeViewModel.checkFirmware.collect(
|
|
||||||
this,
|
|
||||||
resetState = { homeViewModel.setCheckFirmware(false) }
|
|
||||||
) {
|
|
||||||
if (it) checkFirmware()
|
|
||||||
}
|
|
||||||
|
|
||||||
setInsets()
|
setInsets()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,21 +226,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
|
||||||
).show(supportFragmentManager, MessageDialogFragment.TAG)
|
).show(supportFragmentManager, MessageDialogFragment.TAG)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkFirmware() {
|
|
||||||
val resultCode: Int = NativeLibrary.verifyFirmware()
|
|
||||||
if (resultCode == 0) return
|
|
||||||
|
|
||||||
val resultString: String =
|
|
||||||
resources.getStringArray(R.array.verifyFirmwareResults)[resultCode]
|
|
||||||
|
|
||||||
MessageDialogFragment.newInstance(
|
|
||||||
titleId = R.string.firmware_invalid,
|
|
||||||
descriptionString = resultString,
|
|
||||||
helpLinkId = R.string.firmware_missing_help
|
|
||||||
).show(supportFragmentManager, MessageDialogFragment.TAG)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onSaveInstanceState(outState: Bundle) {
|
override fun onSaveInstanceState(outState: Bundle) {
|
||||||
super.onSaveInstanceState(outState)
|
super.onSaveInstanceState(outState)
|
||||||
outState.putBoolean(CHECKED_DECRYPTION, checkedDecryption)
|
outState.putBoolean(CHECKED_DECRYPTION, checkedDecryption)
|
||||||
|
@ -419,7 +402,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
|
||||||
cacheFirmwareDir.copyRecursively(firmwarePath, true)
|
cacheFirmwareDir.copyRecursively(firmwarePath, true)
|
||||||
NativeLibrary.initializeSystem(true)
|
NativeLibrary.initializeSystem(true)
|
||||||
homeViewModel.setCheckKeys(true)
|
homeViewModel.setCheckKeys(true)
|
||||||
homeViewModel.setCheckFirmware(true)
|
|
||||||
getString(R.string.save_file_imported_success)
|
getString(R.string.save_file_imported_success)
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
@ -449,7 +431,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
|
||||||
// Optionally reinitialize the system or perform other necessary steps
|
// Optionally reinitialize the system or perform other necessary steps
|
||||||
NativeLibrary.initializeSystem(true)
|
NativeLibrary.initializeSystem(true)
|
||||||
homeViewModel.setCheckKeys(true)
|
homeViewModel.setCheckKeys(true)
|
||||||
homeViewModel.setCheckFirmware(true)
|
|
||||||
messageToShow = getString(R.string.firmware_uninstalled_success)
|
messageToShow = getString(R.string.firmware_uninstalled_success)
|
||||||
} else {
|
} else {
|
||||||
messageToShow = getString(R.string.firmware_uninstalled_failure)
|
messageToShow = getString(R.string.firmware_uninstalled_failure)
|
||||||
|
|
|
@ -124,11 +124,16 @@ object CustomSettingsHandler {
|
||||||
|
|
||||||
// Check for driver requirements if activity and driverViewModel are provided
|
// Check for driver requirements if activity and driverViewModel are provided
|
||||||
if (activity != null && driverViewModel != null) {
|
if (activity != null && driverViewModel != null) {
|
||||||
val driverPath = extractDriverPath(customSettings)
|
val rawDriverPath = extractDriverPath(customSettings)
|
||||||
if (driverPath != null) {
|
if (rawDriverPath != null) {
|
||||||
Log.info("[CustomSettingsHandler] Custom settings specify driver: $driverPath")
|
// Normalize to local storage path (we only store drivers under driverStoragePath)
|
||||||
|
val driverFilename = rawDriverPath.substringAfterLast('/')
|
||||||
|
.substringAfterLast('\\')
|
||||||
|
val localDriverPath = "${GpuDriverHelper.driverStoragePath}$driverFilename"
|
||||||
|
Log.info("[CustomSettingsHandler] Custom settings specify driver: $rawDriverPath (normalized: $localDriverPath)")
|
||||||
|
|
||||||
// Check if driver exists in the driver storage
|
// Check if driver exists in the driver storage
|
||||||
val driverFile = File(driverPath)
|
val driverFile = File(localDriverPath)
|
||||||
if (!driverFile.exists()) {
|
if (!driverFile.exists()) {
|
||||||
Log.info("[CustomSettingsHandler] Driver not found locally: ${driverFile.name}")
|
Log.info("[CustomSettingsHandler] Driver not found locally: ${driverFile.name}")
|
||||||
|
|
||||||
|
@ -182,7 +187,7 @@ object CustomSettingsHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Attempt to download and install the driver
|
// Attempt to download and install the driver
|
||||||
val driverUri = DriverResolver.ensureDriverAvailable(driverPath, activity) { progress ->
|
val driverUri = DriverResolver.ensureDriverAvailable(driverFilename, activity) { progress ->
|
||||||
progressChannel.trySend(progress.toInt())
|
progressChannel.trySend(progress.toInt())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,12 +214,12 @@ object CustomSettingsHandler {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify the downloaded driver
|
// Verify the downloaded driver (from normalized local path)
|
||||||
val installedFile = File(driverPath)
|
val installedFile = File(localDriverPath)
|
||||||
val metadata = GpuDriverHelper.getMetadataFromZip(installedFile)
|
val metadata = GpuDriverHelper.getMetadataFromZip(installedFile)
|
||||||
if (metadata.name == null) {
|
if (metadata.name == null) {
|
||||||
Log.error(
|
Log.error(
|
||||||
"[CustomSettingsHandler] Downloaded driver is invalid: $driverPath"
|
"[CustomSettingsHandler] Downloaded driver is invalid: $localDriverPath"
|
||||||
)
|
)
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
activity,
|
activity,
|
||||||
|
@ -232,7 +237,7 @@ object CustomSettingsHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add to driver list
|
// Add to driver list
|
||||||
driverViewModel.onDriverAdded(Pair(driverPath, metadata))
|
driverViewModel.onDriverAdded(Pair(localDriverPath, metadata))
|
||||||
Log.info(
|
Log.info(
|
||||||
"[CustomSettingsHandler] Successfully downloaded and installed driver: ${metadata.name}"
|
"[CustomSettingsHandler] Successfully downloaded and installed driver: ${metadata.name}"
|
||||||
)
|
)
|
||||||
|
@ -268,7 +273,7 @@ object CustomSettingsHandler {
|
||||||
// Driver exists, verify it's valid
|
// Driver exists, verify it's valid
|
||||||
val metadata = GpuDriverHelper.getMetadataFromZip(driverFile)
|
val metadata = GpuDriverHelper.getMetadataFromZip(driverFile)
|
||||||
if (metadata.name == null) {
|
if (metadata.name == null) {
|
||||||
Log.error("[CustomSettingsHandler] Invalid driver file: $driverPath")
|
Log.error("[CustomSettingsHandler] Invalid driver file: $localDriverPath")
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
activity,
|
activity,
|
||||||
activity.getString(
|
activity.getString(
|
||||||
|
@ -459,6 +464,8 @@ object CustomSettingsHandler {
|
||||||
|
|
||||||
if (inGpuDriverSection && trimmed.startsWith("driver_path=")) {
|
if (inGpuDriverSection && trimmed.startsWith("driver_path=")) {
|
||||||
return trimmed.substringAfter("driver_path=")
|
return trimmed.substringAfter("driver_path=")
|
||||||
|
.trim()
|
||||||
|
.removeSurrounding("\"", "\"")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,48 @@ object DriverResolver {
|
||||||
val filename: String
|
val filename: String
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Matching helpers
|
||||||
|
private val KNOWN_SUFFIXES = listOf(
|
||||||
|
".adpkg.zip",
|
||||||
|
".zip",
|
||||||
|
".7z",
|
||||||
|
".tar.gz",
|
||||||
|
".tar.xz",
|
||||||
|
".rar"
|
||||||
|
)
|
||||||
|
|
||||||
|
private fun stripKnownSuffixes(name: String): String {
|
||||||
|
var result = name
|
||||||
|
var changed: Boolean
|
||||||
|
do {
|
||||||
|
changed = false
|
||||||
|
for (s in KNOWN_SUFFIXES) {
|
||||||
|
if (result.endsWith(s, ignoreCase = true)) {
|
||||||
|
result = result.dropLast(s.length)
|
||||||
|
changed = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} while (changed)
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun normalizeName(name: String): String {
|
||||||
|
val base = stripKnownSuffixes(name.lowercase())
|
||||||
|
// Remove non-alphanumerics to make substring checks resilient
|
||||||
|
return base.replace(Regex("[^a-z0-9]+"), " ").trim()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun tokenize(name: String): Set<String> =
|
||||||
|
normalizeName(name).split(Regex("\\s+")).filter { it.isNotBlank() }.toSet()
|
||||||
|
|
||||||
|
// Jaccard similarity between two sets
|
||||||
|
private fun jaccard(a: Set<String>, b: Set<String>): Double {
|
||||||
|
if (a.isEmpty() || b.isEmpty()) return 0.0
|
||||||
|
val inter = a.intersect(b).size.toDouble()
|
||||||
|
val uni = a.union(b).size.toDouble()
|
||||||
|
return if (uni == 0.0) 0.0 else inter / uni
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolve a driver download URL from its filename
|
* Resolve a driver download URL from its filename
|
||||||
* @param filename The driver filename (e.g., "turnip_mrpurple-T19-toasted.adpkg.zip")
|
* @param filename The driver filename (e.g., "turnip_mrpurple-T19-toasted.adpkg.zip")
|
||||||
|
@ -98,7 +140,7 @@ object DriverResolver {
|
||||||
async {
|
async {
|
||||||
searchRepository(repoPath, filename)
|
searchRepository(repoPath, filename)
|
||||||
}
|
}
|
||||||
}.mapNotNull { it.await() }.firstOrNull().also { resolved ->
|
}.firstNotNullOfOrNull { it.await() }.also { resolved ->
|
||||||
// Cache the result if found
|
// Cache the result if found
|
||||||
resolved?.let {
|
resolved?.let {
|
||||||
urlCache[filename] = it
|
urlCache[filename] = it
|
||||||
|
@ -119,22 +161,56 @@ object DriverResolver {
|
||||||
releaseCache[repoPath] = it
|
releaseCache[repoPath] = it
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search through all releases and artifacts
|
// First pass: exact name (case-insensitive) against asset filenames
|
||||||
|
val target = filename.lowercase()
|
||||||
for (release in releases) {
|
for (release in releases) {
|
||||||
for (artifact in release.artifacts) {
|
for (artifact in release.artifacts) {
|
||||||
if (artifact.name == filename) {
|
if (artifact.name.equals(filename, ignoreCase = true) || artifact.name.lowercase() == target) {
|
||||||
Log.info(
|
Log.info("[DriverResolver] Found $filename in $repoPath/${release.tagName}")
|
||||||
"[DriverResolver] Found $filename in $repoPath/${release.tagName}"
|
|
||||||
)
|
|
||||||
return@withContext ResolvedDriver(
|
return@withContext ResolvedDriver(
|
||||||
downloadUrl = artifact.url.toString(),
|
downloadUrl = artifact.url.toString(),
|
||||||
repoPath = repoPath,
|
repoPath = repoPath,
|
||||||
releaseTag = release.tagName,
|
releaseTag = release.tagName,
|
||||||
filename = filename
|
filename = artifact.name
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Second pass: fuzzy match by asset filenames only
|
||||||
|
val reqNorm = normalizeName(filename)
|
||||||
|
val reqTokens = tokenize(filename)
|
||||||
|
var best: ResolvedDriver? = null
|
||||||
|
var bestScore = 0.0
|
||||||
|
|
||||||
|
for (release in releases) {
|
||||||
|
for (artifact in release.artifacts) {
|
||||||
|
val artNorm = normalizeName(artifact.name)
|
||||||
|
val artTokens = tokenize(artifact.name)
|
||||||
|
|
||||||
|
var score = jaccard(reqTokens, artTokens)
|
||||||
|
// Boost if one normalized name contains the other
|
||||||
|
if (artNorm.contains(reqNorm) || reqNorm.contains(artNorm)) {
|
||||||
|
score = maxOf(score, 0.92)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (score > bestScore) {
|
||||||
|
bestScore = score
|
||||||
|
best = ResolvedDriver(
|
||||||
|
downloadUrl = artifact.url.toString(),
|
||||||
|
repoPath = repoPath,
|
||||||
|
releaseTag = release.tagName,
|
||||||
|
filename = artifact.name
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Threshold to avoid bad guesses, this worked fine in testing but might need tuning
|
||||||
|
if (best != null && bestScore >= 0.6) {
|
||||||
|
Log.info("[DriverResolver] Fuzzy matched $filename -> ${best.filename} in ${best.repoPath} (score=%.2f)".format(bestScore))
|
||||||
|
return@withContext best
|
||||||
|
}
|
||||||
null
|
null
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.error("[DriverResolver] Failed to search $repoPath: ${e.message}")
|
Log.error("[DriverResolver] Failed to search $repoPath: ${e.message}")
|
||||||
|
@ -296,8 +372,8 @@ object DriverResolver {
|
||||||
context: Context,
|
context: Context,
|
||||||
onProgress: ((Float) -> Unit)? = null
|
onProgress: ((Float) -> Unit)? = null
|
||||||
): Uri? {
|
): Uri? {
|
||||||
// Extract filename from path
|
// Extract filename from path (support both separators)
|
||||||
val filename = driverPath.substringAfterLast('/')
|
val filename = driverPath.substringAfterLast('/').substringAfterLast('\\')
|
||||||
|
|
||||||
// Check if driver already exists locally
|
// Check if driver already exists locally
|
||||||
val localPath = "${GpuDriverHelper.driverStoragePath}$filename"
|
val localPath = "${GpuDriverHelper.driverStoragePath}$filename"
|
||||||
|
|
|
@ -17,7 +17,7 @@ add_library(yuzu-android SHARED
|
||||||
|
|
||||||
set_property(TARGET yuzu-android PROPERTY IMPORTED_LOCATION ${FFmpeg_LIBRARY_DIR})
|
set_property(TARGET yuzu-android PROPERTY IMPORTED_LOCATION ${FFmpeg_LIBRARY_DIR})
|
||||||
|
|
||||||
target_link_libraries(yuzu-android PRIVATE audio_core common core input_common frontend_common Vulkan::Headers)
|
target_link_libraries(yuzu-android PRIVATE audio_core common core input_common frontend_common video_core)
|
||||||
target_link_libraries(yuzu-android PRIVATE android camera2ndk EGL glad jnigraphics log)
|
target_link_libraries(yuzu-android PRIVATE android camera2ndk EGL glad jnigraphics log)
|
||||||
if (ARCHITECTURE_arm64)
|
if (ARCHITECTURE_arm64)
|
||||||
target_link_libraries(yuzu-android PRIVATE adrenotools)
|
target_link_libraries(yuzu-android PRIVATE adrenotools)
|
||||||
|
|
|
@ -596,6 +596,8 @@ jstring Java_org_yuzu_yuzu_1emu_utils_GpuDriverHelper_getGpuModel(JNIEnv *env, j
|
||||||
|
|
||||||
const std::string model_name{device.GetModelName()};
|
const std::string model_name{device.GetModelName()};
|
||||||
|
|
||||||
|
window.release();
|
||||||
|
|
||||||
return Common::Android::ToJString(env, model_name);
|
return Common::Android::ToJString(env, model_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,11 @@
|
||||||
android:icon="@drawable/ic_pause"
|
android:icon="@drawable/ic_pause"
|
||||||
android:title="@string/emulation_pause" />
|
android:title="@string/emulation_pause" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_quick_overlay"
|
||||||
|
android:icon="@drawable/ic_controller"
|
||||||
|
android:title="@string/emulation_show_overlay"/>
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/menu_settings"
|
android:id="@+id/menu_settings"
|
||||||
android:icon="@drawable/ic_settings"
|
android:icon="@drawable/ic_settings"
|
||||||
|
|
|
@ -498,6 +498,8 @@
|
||||||
<string name="use_custom_rtc">ساعة مخصصة في الوقت الحقيقي</string>
|
<string name="use_custom_rtc">ساعة مخصصة في الوقت الحقيقي</string>
|
||||||
<string name="use_custom_rtc_description">يسمح لك بتعيين ساعة مخصصة في الوقت الفعلي منفصلة عن وقت النظام الحالي لديك</string>
|
<string name="use_custom_rtc_description">يسمح لك بتعيين ساعة مخصصة في الوقت الفعلي منفصلة عن وقت النظام الحالي لديك</string>
|
||||||
<string name="set_custom_rtc">تعيين ساعة مخصصة في الوقت الحقيقي</string>
|
<string name="set_custom_rtc">تعيين ساعة مخصصة في الوقت الحقيقي</string>
|
||||||
|
<string name="disable_nca_verification">تعطيل التحقق من NCA</string>
|
||||||
|
<string name="disable_nca_verification_description">يعطل التحقق من سلامة أرشيفات محتوى NCA. قد يحسن هذا من سرعة التحميل لكنه يخاطر بتلف البيانات أو تمرير ملفات غير صالحة دون اكتشاف. ضروري لجعل الألعاب والتحديثات التي تتطلب نظامًا أساسيًا 20+ تعمل.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">توليد</string>
|
<string name="generate">توليد</string>
|
||||||
|
@ -733,7 +735,8 @@
|
||||||
<string name="emulation_rel_stick_center">مركز العصا النسبي</string>
|
<string name="emulation_rel_stick_center">مركز العصا النسبي</string>
|
||||||
<string name="emulation_dpad_slide">مزلاق الأسهم</string>
|
<string name="emulation_dpad_slide">مزلاق الأسهم</string>
|
||||||
<string name="emulation_haptics">الاهتزازات الديناميكية</string>
|
<string name="emulation_haptics">الاهتزازات الديناميكية</string>
|
||||||
<string name="emulation_show_overlay">عرض التراكب</string>
|
<string name="emulation_show_overlay">إظهار وحدة التحكم</string>
|
||||||
|
<string name="emulation_hide_overlay">إخفاء وحدة التحكم</string>
|
||||||
<string name="emulation_toggle_all">الكل</string>
|
<string name="emulation_toggle_all">الكل</string>
|
||||||
<string name="emulation_control_adjust">ضبط التراكب</string>
|
<string name="emulation_control_adjust">ضبط التراكب</string>
|
||||||
<string name="emulation_control_scale">الحجم</string>
|
<string name="emulation_control_scale">الحجم</string>
|
||||||
|
|
|
@ -482,6 +482,8 @@
|
||||||
<string name="use_custom_rtc">RTCی تایبەتمەند</string>
|
<string name="use_custom_rtc">RTCی تایبەتمەند</string>
|
||||||
<string name="use_custom_rtc_description">ڕێگەت پێدەدات کاتژمێرێکی کاتی ڕاستەقینەی تایبەتمەند دابنێیت کە جیاوازە لە کاتی ئێستای سیستەمەکەت.</string>
|
<string name="use_custom_rtc_description">ڕێگەت پێدەدات کاتژمێرێکی کاتی ڕاستەقینەی تایبەتمەند دابنێیت کە جیاوازە لە کاتی ئێستای سیستەمەکەت.</string>
|
||||||
<string name="set_custom_rtc">دانانی RTCی تایبەتمەند</string>
|
<string name="set_custom_rtc">دانانی RTCی تایبەتمەند</string>
|
||||||
|
<string name="disable_nca_verification">ناچالاککردنی پشکنینی NCA</string>
|
||||||
|
<string name="disable_nca_verification_description">پشکنینی پێکهاتەی ئارشیڤەکانی ناوەڕۆکی NCA ناچالاک دەکات. ئەمە لەوانەیە خێرایی بارکردن بهرهوپێش ببات، بەڵام مەترسی لەناوچوونی داتا یان ئەوەی فایلە نادروستەکان بەبێ ئەوەی دۆزرایەوە تێپەڕبن زیاتر دەکات. بۆ ئەوەی یاری و نوێکردنەوەکان کار بکەن کە پێویستی بە فریموێری 20+ هەیە زۆر پێویستە.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">بەرهەم هێنان</string>
|
<string name="generate">بەرهەم هێنان</string>
|
||||||
|
@ -710,7 +712,8 @@
|
||||||
<string name="emulation_rel_stick_center">ناوەندی گێڕ بەنزیکەیی</string>
|
<string name="emulation_rel_stick_center">ناوەندی گێڕ بەنزیکەیی</string>
|
||||||
<string name="emulation_dpad_slide">خلیسکانی 4 دوگمەکە</string>
|
<string name="emulation_dpad_slide">خلیسکانی 4 دوگمەکە</string>
|
||||||
<string name="emulation_haptics">لەرینەوەی پەنجەلێدان</string>
|
<string name="emulation_haptics">لەرینەوەی پەنجەلێدان</string>
|
||||||
<string name="emulation_show_overlay">نیشاندانی داپۆشەر</string>
|
<string name="emulation_show_overlay">نیشاندانی کۆنتڕۆڵەر</string>
|
||||||
|
<string name="emulation_hide_overlay">پیشاندانی کۆنتڕۆڵەر</string>
|
||||||
<string name="emulation_toggle_all">گۆڕینی سەرجەم</string>
|
<string name="emulation_toggle_all">گۆڕینی سەرجەم</string>
|
||||||
<string name="emulation_control_adjust">ڕێکخستنی داپۆشەر</string>
|
<string name="emulation_control_adjust">ڕێکخستنی داپۆشەر</string>
|
||||||
<string name="emulation_control_scale">پێوەر</string>
|
<string name="emulation_control_scale">پێوەر</string>
|
||||||
|
|
|
@ -458,6 +458,8 @@
|
||||||
<string name="use_custom_rtc">Vlastní RTC</string>
|
<string name="use_custom_rtc">Vlastní RTC</string>
|
||||||
<string name="use_custom_rtc_description">Vlastní nastavení času</string>
|
<string name="use_custom_rtc_description">Vlastní nastavení času</string>
|
||||||
<string name="set_custom_rtc">Nastavit vlastní RTC</string>
|
<string name="set_custom_rtc">Nastavit vlastní RTC</string>
|
||||||
|
<string name="disable_nca_verification">Zakázat ověřování NCA</string>
|
||||||
|
<string name="disable_nca_verification_description">Zakáže ověřování integrity archivů obsahu NCA. To může zlepšit rychlost načítání, ale hrozí poškození dat nebo neodhalení neplatných souborů. Je nutné, aby fungovaly hry a aktualizace vyžadující firmware 20+.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">Generovat</string>
|
<string name="generate">Generovat</string>
|
||||||
|
@ -691,7 +693,8 @@
|
||||||
<string name="emulation_rel_stick_center">Relativní střed joysticku</string>
|
<string name="emulation_rel_stick_center">Relativní střed joysticku</string>
|
||||||
<string name="emulation_dpad_slide">D-pad slide</string>
|
<string name="emulation_dpad_slide">D-pad slide</string>
|
||||||
<string name="emulation_haptics">Haptická odezva</string>
|
<string name="emulation_haptics">Haptická odezva</string>
|
||||||
<string name="emulation_show_overlay">Zobrazit překryv</string>
|
<string name="emulation_show_overlay">Zobrazit ovladač</string>
|
||||||
|
<string name="emulation_hide_overlay">Skrýt ovladač</string>
|
||||||
<string name="emulation_toggle_all">Přepnout vše</string>
|
<string name="emulation_toggle_all">Přepnout vše</string>
|
||||||
<string name="emulation_control_adjust">Upravit překryv</string>
|
<string name="emulation_control_adjust">Upravit překryv</string>
|
||||||
<string name="emulation_control_scale">Měřítko</string>
|
<string name="emulation_control_scale">Měřítko</string>
|
||||||
|
|
|
@ -486,6 +486,8 @@ Wird der Handheld-Modus verwendet, verringert es die Auflösung und erhöht die
|
||||||
<string name="select_rtc_date">RTC-Datum auswählen</string>
|
<string name="select_rtc_date">RTC-Datum auswählen</string>
|
||||||
<string name="select_rtc_time">RTC-Zeit auswählen</string>
|
<string name="select_rtc_time">RTC-Zeit auswählen</string>
|
||||||
<string name="use_custom_rtc">Benutzerdefinierte Echtzeituhr</string>
|
<string name="use_custom_rtc">Benutzerdefinierte Echtzeituhr</string>
|
||||||
|
<string name="disable_nca_verification">NCA-Verifizierung deaktivieren</string>
|
||||||
|
<string name="disable_nca_verification_description">Deaktiviert die Integritätsprüfung von NCA-Inhaltsarchiven. Dies kann die Ladegeschwindigkeit verbessern, riskiert jedoch Datenbeschädigung oder dass ungültige Dateien unentdeckt bleiben. Ist notwendig, um Spiele und Updates, die Firmware 20+ benötigen, zum Laufen zu bringen.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">Generieren</string>
|
<string name="generate">Generieren</string>
|
||||||
|
@ -762,6 +764,13 @@ Wirklich fortfahren?</string>
|
||||||
<string name="emulation_exit">Emulation beenden</string>
|
<string name="emulation_exit">Emulation beenden</string>
|
||||||
<string name="emulation_done">Fertig</string>
|
<string name="emulation_done">Fertig</string>
|
||||||
<string name="emulation_fps_counter">FPS Zähler</string>
|
<string name="emulation_fps_counter">FPS Zähler</string>
|
||||||
|
<string name="emulation_thermal_indicator"></string>
|
||||||
|
<string name="emulation_toggle_controls">Steuerung umschalten</string>
|
||||||
|
<string name="emulation_rel_stick_center">Relativer Stick-Zentrum</string>
|
||||||
|
<string name="emulation_dpad_slide">D-Pad-Scrollen</string>
|
||||||
|
<string name="emulation_haptics">Haptisches Feedback</string>
|
||||||
|
<string name="emulation_show_overlay">Controller anzeigen</string>
|
||||||
|
<string name="emulation_hide_overlay">Controller ausblenden</string>
|
||||||
<string name="emulation_toggle_all">Alle umschalten</string>
|
<string name="emulation_toggle_all">Alle umschalten</string>
|
||||||
<string name="emulation_control_adjust">Overlay anpassen</string>
|
<string name="emulation_control_adjust">Overlay anpassen</string>
|
||||||
<string name="emulation_control_scale">Größe</string>
|
<string name="emulation_control_scale">Größe</string>
|
||||||
|
|
|
@ -506,6 +506,8 @@
|
||||||
<string name="use_custom_rtc">RTC personalizado</string>
|
<string name="use_custom_rtc">RTC personalizado</string>
|
||||||
<string name="use_custom_rtc_description">Te permite tener un reloj personalizado en tiempo real diferente del tiempo del propio sistema.</string>
|
<string name="use_custom_rtc_description">Te permite tener un reloj personalizado en tiempo real diferente del tiempo del propio sistema.</string>
|
||||||
<string name="set_custom_rtc">Configurar RTC personalizado</string>
|
<string name="set_custom_rtc">Configurar RTC personalizado</string>
|
||||||
|
<string name="disable_nca_verification">Desactivar verificación NCA</string>
|
||||||
|
<string name="disable_nca_verification_description">Desactiva la verificación de integridad de los archivos de contenido NCA. Esto puede mejorar la velocidad de carga, pero arriesga corrupción de datos o que archivos inválidos pasen desapercibidos. Es necesario para que funcionen juegos y actualizaciones que requieren firmware 20+.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">Generar</string>
|
<string name="generate">Generar</string>
|
||||||
|
@ -806,7 +808,8 @@
|
||||||
<string name="emulation_rel_stick_center">Centro relativo del stick</string>
|
<string name="emulation_rel_stick_center">Centro relativo del stick</string>
|
||||||
<string name="emulation_dpad_slide">Deslizamiento de la cruceta</string>
|
<string name="emulation_dpad_slide">Deslizamiento de la cruceta</string>
|
||||||
<string name="emulation_haptics">Toques hápticos</string>
|
<string name="emulation_haptics">Toques hápticos</string>
|
||||||
<string name="emulation_show_overlay">Mostrar overlay</string>
|
<string name="emulation_show_overlay">Mostrar controlador</string>
|
||||||
|
<string name="emulation_hide_overlay">Ocultar controlador</string>
|
||||||
<string name="emulation_toggle_all">Alternar todo</string>
|
<string name="emulation_toggle_all">Alternar todo</string>
|
||||||
<string name="emulation_control_adjust">Ajustar overlay</string>
|
<string name="emulation_control_adjust">Ajustar overlay</string>
|
||||||
<string name="emulation_control_scale">Escala</string>
|
<string name="emulation_control_scale">Escala</string>
|
||||||
|
|
|
@ -504,6 +504,8 @@
|
||||||
<string name="use_custom_rtc">زمان سفارشی</string>
|
<string name="use_custom_rtc">زمان سفارشی</string>
|
||||||
<string name="use_custom_rtc_description">به شما امکان میدهد یک ساعت سفارشی جدا از زمان فعلی سیستم خود تنظیم کنید.</string>
|
<string name="use_custom_rtc_description">به شما امکان میدهد یک ساعت سفارشی جدا از زمان فعلی سیستم خود تنظیم کنید.</string>
|
||||||
<string name="set_custom_rtc">تنظیم زمان سفارشی</string>
|
<string name="set_custom_rtc">تنظیم زمان سفارشی</string>
|
||||||
|
<string name="disable_nca_verification">غیرفعال کردن تأیید اعتبار NCA</string>
|
||||||
|
<string name="disable_nca_verification_description">بررسی صحت آرشیوهای محتوای NCA را غیرفعال میکند. این ممکن است سرعت بارگذاری را بهبود بخشد اما خطر خرابی داده یا تشخیص داده نشدن فایلهای نامعتبر را به همراه دارد. برای کار کردن بازیها و بهروزرسانیهایی که به فرمور ۲۰+ نیاز دارند، ضروری است.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">تولید</string>
|
<string name="generate">تولید</string>
|
||||||
|
@ -805,7 +807,8 @@
|
||||||
<string name="emulation_rel_stick_center">مرکز نسبی استیک</string>
|
<string name="emulation_rel_stick_center">مرکز نسبی استیک</string>
|
||||||
<string name="emulation_dpad_slide">لغزش دکمههای جهتی</string>
|
<string name="emulation_dpad_slide">لغزش دکمههای جهتی</string>
|
||||||
<string name="emulation_haptics">لرزش لمسی</string>
|
<string name="emulation_haptics">لرزش لمسی</string>
|
||||||
<string name="emulation_show_overlay">نشان دادن نمایش روی صفحه</string>
|
<string name="emulation_show_overlay">نمایش کنترلر</string>
|
||||||
|
<string name="emulation_hide_overlay">پنهان کردن کنترلر</string>
|
||||||
<string name="emulation_toggle_all">تغییر همه</string>
|
<string name="emulation_toggle_all">تغییر همه</string>
|
||||||
<string name="emulation_control_adjust">تنظیم نمایش روی صفحه</string>
|
<string name="emulation_control_adjust">تنظیم نمایش روی صفحه</string>
|
||||||
<string name="emulation_control_scale">مقیاس</string>
|
<string name="emulation_control_scale">مقیاس</string>
|
||||||
|
|
|
@ -506,6 +506,8 @@
|
||||||
<string name="use_custom_rtc">RTC personnalisé</string>
|
<string name="use_custom_rtc">RTC personnalisé</string>
|
||||||
<string name="use_custom_rtc_description">Vous permet de définir une horloge en temps réel personnalisée distincte de l\'heure actuelle de votre système.</string>
|
<string name="use_custom_rtc_description">Vous permet de définir une horloge en temps réel personnalisée distincte de l\'heure actuelle de votre système.</string>
|
||||||
<string name="set_custom_rtc">Définir l\'horloge RTC personnalisée</string>
|
<string name="set_custom_rtc">Définir l\'horloge RTC personnalisée</string>
|
||||||
|
<string name="disable_nca_verification">Désactiver la vérification NCA</string>
|
||||||
|
<string name="disable_nca_verification_description">Désactive la vérification d\'intégrité des archives de contenu NCA. Cela peut améliorer la vitesse de chargement mais risque une corruption des données ou que des fichiers invalides ne soient pas détectés. Est nécessaire pour faire fonctionner les jeux et mises à jour nécessitant un firmware 20+.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">Générer</string>
|
<string name="generate">Générer</string>
|
||||||
|
@ -854,7 +856,8 @@
|
||||||
<string name="emulation_rel_stick_center">Centre du stick relatif</string>
|
<string name="emulation_rel_stick_center">Centre du stick relatif</string>
|
||||||
<string name="emulation_dpad_slide">Glissement du D-pad</string>
|
<string name="emulation_dpad_slide">Glissement du D-pad</string>
|
||||||
<string name="emulation_haptics">Toucher haptique</string>
|
<string name="emulation_haptics">Toucher haptique</string>
|
||||||
<string name="emulation_show_overlay">Afficher l\'overlay</string>
|
<string name="emulation_show_overlay">Afficher la manette</string>
|
||||||
|
<string name="emulation_hide_overlay">Masquer la manette</string>
|
||||||
<string name="emulation_toggle_all">Tout basculer</string>
|
<string name="emulation_toggle_all">Tout basculer</string>
|
||||||
<string name="emulation_control_adjust">Ajuster l\'overlay</string>
|
<string name="emulation_control_adjust">Ajuster l\'overlay</string>
|
||||||
<string name="emulation_control_scale">Échelle</string>
|
<string name="emulation_control_scale">Échelle</string>
|
||||||
|
|
|
@ -505,6 +505,8 @@
|
||||||
<string name="use_custom_rtc">RTC מותאם אישית</string>
|
<string name="use_custom_rtc">RTC מותאם אישית</string>
|
||||||
<string name="use_custom_rtc_description">מאפשר לך לקבוע שעון זמן אמת נפרד משעון המערכת שלך.</string>
|
<string name="use_custom_rtc_description">מאפשר לך לקבוע שעון זמן אמת נפרד משעון המערכת שלך.</string>
|
||||||
<string name="set_custom_rtc">קבע RTC מותאם אישית</string>
|
<string name="set_custom_rtc">קבע RTC מותאם אישית</string>
|
||||||
|
<string name="disable_nca_verification">השבת אימות NCA</string>
|
||||||
|
<string name="disable_nca_verification_description">משבית את אימות השלמות של ארכיוני התוכן של NCA. זה עשוי לשפר את מהירות הטעינה אך מסתכן בשחיקת נתונים או שמא קבצים לא חוקיים יעברו ללא זיהוי. זה הכרחי כדי לגרום למשחקים ועדכונים הדורשים firmware 20+ לעבוד.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">יצירה</string>
|
<string name="generate">יצירה</string>
|
||||||
|
@ -739,7 +741,8 @@
|
||||||
<string name="emulation_rel_stick_center">מרכז ג׳ויסטיק יחסי</string>
|
<string name="emulation_rel_stick_center">מרכז ג׳ויסטיק יחסי</string>
|
||||||
<string name="emulation_dpad_slide">החלקת D-pad</string>
|
<string name="emulation_dpad_slide">החלקת D-pad</string>
|
||||||
<string name="emulation_haptics">רטט מגע</string>
|
<string name="emulation_haptics">רטט מגע</string>
|
||||||
<string name="emulation_show_overlay">הצג את שכבת-העל</string>
|
<string name="emulation_show_overlay">הצג בקר</string>
|
||||||
|
<string name="emulation_hide_overlay">הסתר בקר</string>
|
||||||
<string name="emulation_toggle_all">החלף הכל</string>
|
<string name="emulation_toggle_all">החלף הכל</string>
|
||||||
<string name="emulation_control_adjust">התאם את שכבת-העל</string>
|
<string name="emulation_control_adjust">התאם את שכבת-העל</string>
|
||||||
<string name="emulation_control_scale">קנה מידה</string>
|
<string name="emulation_control_scale">קנה מידה</string>
|
||||||
|
|
|
@ -501,6 +501,8 @@
|
||||||
<string name="use_custom_rtc">Egyéni RTC</string>
|
<string name="use_custom_rtc">Egyéni RTC</string>
|
||||||
<string name="use_custom_rtc_description">Megadhatsz egy valós idejű órát, amely eltér a rendszer által használt órától.</string>
|
<string name="use_custom_rtc_description">Megadhatsz egy valós idejű órát, amely eltér a rendszer által használt órától.</string>
|
||||||
<string name="set_custom_rtc">Egyéni RTC beállítása</string>
|
<string name="set_custom_rtc">Egyéni RTC beállítása</string>
|
||||||
|
<string name="disable_nca_verification">NCA ellenőrzés letiltása</string>
|
||||||
|
<string name="disable_nca_verification_description">Letiltja az NCA tartalomarchívumok integritás-ellenőrzését. Ez javíthatja a betöltési sebességet, de az adatsérülés vagy az érvénytelen fájlok észrevétlen maradásának kockázatával jár. Elengedhetetlen a 20+ firmware-et igénylő játékok és frissítések működtetéséhez.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">Generálás</string>
|
<string name="generate">Generálás</string>
|
||||||
|
@ -843,7 +845,8 @@
|
||||||
<string name="emulation_toggle_controls">Irányítás átkapcsolása</string>
|
<string name="emulation_toggle_controls">Irányítás átkapcsolása</string>
|
||||||
<string name="emulation_dpad_slide">D-pad csúsztatása</string>
|
<string name="emulation_dpad_slide">D-pad csúsztatása</string>
|
||||||
<string name="emulation_haptics">Érintés haptikája</string>
|
<string name="emulation_haptics">Érintés haptikája</string>
|
||||||
<string name="emulation_show_overlay">Átfedés mutatása</string>
|
<string name="emulation_show_overlay">Vezérlő megjelenítése</string>
|
||||||
|
<string name="emulation_hide_overlay">Vezérlő elrejtése</string>
|
||||||
<string name="emulation_toggle_all">Összes átkapcsolása</string>
|
<string name="emulation_toggle_all">Összes átkapcsolása</string>
|
||||||
<string name="emulation_control_adjust">Átfedés testreszabása</string>
|
<string name="emulation_control_adjust">Átfedés testreszabása</string>
|
||||||
<string name="emulation_control_scale">Skálázás</string>
|
<string name="emulation_control_scale">Skálázás</string>
|
||||||
|
|
|
@ -502,6 +502,8 @@
|
||||||
<string name="use_custom_rtc">RTC Kustom</string>
|
<string name="use_custom_rtc">RTC Kustom</string>
|
||||||
<string name="use_custom_rtc_description">Memungkinkan Anda untuk mengatur jam waktu nyata kustom yang terpisah dari waktu sistem saat ini Anda.</string>
|
<string name="use_custom_rtc_description">Memungkinkan Anda untuk mengatur jam waktu nyata kustom yang terpisah dari waktu sistem saat ini Anda.</string>
|
||||||
<string name="set_custom_rtc">Setel RTC Kustom</string>
|
<string name="set_custom_rtc">Setel RTC Kustom</string>
|
||||||
|
<string name="disable_nca_verification">Nonaktifkan Verifikasi NCA</string>
|
||||||
|
<string name="disable_nca_verification_description">Menonaktifkan verifikasi integritas arsip konten NCA. Ini dapat meningkatkan kecepatan pemuatan tetapi berisiko kerusakan data atau file yang tidak valid tidak terdeteksi. Diperlukan untuk membuat game dan pembaruan yang membutuhkan firmware 20+ bekerja.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">Hasilkan</string>
|
<string name="generate">Hasilkan</string>
|
||||||
|
@ -798,7 +800,8 @@
|
||||||
<string name="emulation_rel_stick_center">Pusat stick relatif</string>
|
<string name="emulation_rel_stick_center">Pusat stick relatif</string>
|
||||||
<string name="emulation_dpad_slide">Geser Dpad</string>
|
<string name="emulation_dpad_slide">Geser Dpad</string>
|
||||||
<string name="emulation_haptics">Haptik</string>
|
<string name="emulation_haptics">Haptik</string>
|
||||||
<string name="emulation_show_overlay">Tampilkan Hamparan</string>
|
<string name="emulation_show_overlay">Tampilkan Kontroler</string>
|
||||||
|
<string name="emulation_hide_overlay">Sembunyikan Kontroler</string>
|
||||||
<string name="emulation_toggle_all">Alihkan Semua</string>
|
<string name="emulation_toggle_all">Alihkan Semua</string>
|
||||||
<string name="emulation_control_adjust">Menyesuaikan</string>
|
<string name="emulation_control_adjust">Menyesuaikan</string>
|
||||||
<string name="emulation_control_scale">Skala</string>
|
<string name="emulation_control_scale">Skala</string>
|
||||||
|
|
|
@ -505,6 +505,8 @@
|
||||||
<string name="use_custom_rtc">RTC Personalizzato</string>
|
<string name="use_custom_rtc">RTC Personalizzato</string>
|
||||||
<string name="use_custom_rtc_description">Ti permette di impostare un orologio in tempo reale personalizzato, completamente separato da quello di sistema.</string>
|
<string name="use_custom_rtc_description">Ti permette di impostare un orologio in tempo reale personalizzato, completamente separato da quello di sistema.</string>
|
||||||
<string name="set_custom_rtc">Imposta un orologio in tempo reale personalizzato</string>
|
<string name="set_custom_rtc">Imposta un orologio in tempo reale personalizzato</string>
|
||||||
|
<string name="disable_nca_verification">Disabilita verifica NCA</string>
|
||||||
|
<string name="disable_nca_verification_description">Disabilita la verifica dell\'integrità degli archivi di contenuto NCA. Può migliorare la velocità di caricamento ma rischia il danneggiamento dei dati o che file non validi passino inosservati. Necessario per far funzionare giochi e aggiornamenti che richiedono il firmware 20+.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">Genera</string>
|
<string name="generate">Genera</string>
|
||||||
|
@ -770,7 +772,8 @@
|
||||||
<string name="emulation_rel_stick_center">Centro relativo degli Stick</string>
|
<string name="emulation_rel_stick_center">Centro relativo degli Stick</string>
|
||||||
<string name="emulation_dpad_slide">DPad A Scorrimento</string>
|
<string name="emulation_dpad_slide">DPad A Scorrimento</string>
|
||||||
<string name="emulation_haptics">Feedback Aptico</string>
|
<string name="emulation_haptics">Feedback Aptico</string>
|
||||||
<string name="emulation_show_overlay">Mostra l\'overlay</string>
|
<string name="emulation_show_overlay">Mostra l\'controller</string>
|
||||||
|
<string name="emulation_hide_overlay">Nascondi l\'controller</string>
|
||||||
<string name="emulation_toggle_all">Attiva/Disattiva tutto</string>
|
<string name="emulation_toggle_all">Attiva/Disattiva tutto</string>
|
||||||
<string name="emulation_control_adjust">Regola l\'overlay</string>
|
<string name="emulation_control_adjust">Regola l\'overlay</string>
|
||||||
<string name="emulation_control_scale">Scala</string>
|
<string name="emulation_control_scale">Scala</string>
|
||||||
|
|
|
@ -491,6 +491,8 @@
|
||||||
<string name="use_custom_rtc">カスタム RTC</string>
|
<string name="use_custom_rtc">カスタム RTC</string>
|
||||||
<string name="use_custom_rtc_description">現在のシステム時間とは別に、任意のリアルタイムクロックを設定できます。</string>
|
<string name="use_custom_rtc_description">現在のシステム時間とは別に、任意のリアルタイムクロックを設定できます。</string>
|
||||||
<string name="set_custom_rtc">カスタムRTCを設定</string>
|
<string name="set_custom_rtc">カスタムRTCを設定</string>
|
||||||
|
<string name="disable_nca_verification">NCA検証を無効化</string>
|
||||||
|
<string name="disable_nca_verification_description">NCAコンテンツアーカイブの整合性検証を無効にします。読み込み速度が向上する可能性がありますが、データ破損や不正なファイルが検出されないリスクがあります。ファームウェア20以上が必要なゲームや更新を動作させるために必要です。</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">生成</string>
|
<string name="generate">生成</string>
|
||||||
|
@ -729,7 +731,8 @@
|
||||||
<string name="emulation_rel_stick_center">スティックを固定しない</string>
|
<string name="emulation_rel_stick_center">スティックを固定しない</string>
|
||||||
<string name="emulation_dpad_slide">十字キーをスライド操作</string>
|
<string name="emulation_dpad_slide">十字キーをスライド操作</string>
|
||||||
<string name="emulation_haptics">タッチ振動</string>
|
<string name="emulation_haptics">タッチ振動</string>
|
||||||
<string name="emulation_show_overlay">ボタンを表示</string>
|
<string name="emulation_show_overlay">コントローラーを表示</string>
|
||||||
|
<string name="emulation_hide_overlay">コントローラーを非表示</string>
|
||||||
<string name="emulation_toggle_all">すべて切替</string>
|
<string name="emulation_toggle_all">すべて切替</string>
|
||||||
<string name="emulation_control_adjust">見た目を調整</string>
|
<string name="emulation_control_adjust">見た目を調整</string>
|
||||||
<string name="emulation_control_scale">大きさ</string>
|
<string name="emulation_control_scale">大きさ</string>
|
||||||
|
|
|
@ -501,6 +501,8 @@
|
||||||
<string name="use_custom_rtc">사용자 지정 RTC</string>
|
<string name="use_custom_rtc">사용자 지정 RTC</string>
|
||||||
<string name="use_custom_rtc_description">현재 시스템 시간과 별도로 사용자 지정 RTC를 설정할 수 있습니다.</string>
|
<string name="use_custom_rtc_description">현재 시스템 시간과 별도로 사용자 지정 RTC를 설정할 수 있습니다.</string>
|
||||||
<string name="set_custom_rtc">사용자 지정 RTC 설정</string>
|
<string name="set_custom_rtc">사용자 지정 RTC 설정</string>
|
||||||
|
<string name="disable_nca_verification">NCA 검증 비활성화</string>
|
||||||
|
<string name="disable_nca_verification_description">NCA 콘텐츠 아카이브의 무결성 검증을 비활성화합니다. 로딩 속도를 향상시킬 수 있지만 데이터 손상이나 유효하지 않은 파일이 미검증될 위험이 있습니다. 펌웨어 20+가 필요한 게임 및 업데이트를 실행하려면 필요합니다.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">생성</string>
|
<string name="generate">생성</string>
|
||||||
|
@ -798,6 +800,7 @@
|
||||||
<string name="emulation_dpad_slide">십자키 슬라이드</string>
|
<string name="emulation_dpad_slide">십자키 슬라이드</string>
|
||||||
<string name="emulation_haptics">터치 햅틱</string>
|
<string name="emulation_haptics">터치 햅틱</string>
|
||||||
<string name="emulation_show_overlay">컨트롤러 표시</string>
|
<string name="emulation_show_overlay">컨트롤러 표시</string>
|
||||||
|
<string name="emulation_hide_overlay">컨트롤러 숨기기</string>
|
||||||
<string name="emulation_toggle_all">모두 선택</string>
|
<string name="emulation_toggle_all">모두 선택</string>
|
||||||
<string name="emulation_control_adjust">컨트롤러 조정</string>
|
<string name="emulation_control_adjust">컨트롤러 조정</string>
|
||||||
<string name="emulation_control_scale">크기</string>
|
<string name="emulation_control_scale">크기</string>
|
||||||
|
|
|
@ -482,6 +482,8 @@
|
||||||
<string name="use_custom_rtc">Tilpasset Sannhetstidsklokke</string>
|
<string name="use_custom_rtc">Tilpasset Sannhetstidsklokke</string>
|
||||||
<string name="use_custom_rtc_description">Gjør det mulig å stille inn en egendefinert sanntidsklokke separat fra den gjeldende systemtiden.</string>
|
<string name="use_custom_rtc_description">Gjør det mulig å stille inn en egendefinert sanntidsklokke separat fra den gjeldende systemtiden.</string>
|
||||||
<string name="set_custom_rtc">Angi tilpasset RTC</string>
|
<string name="set_custom_rtc">Angi tilpasset RTC</string>
|
||||||
|
<string name="disable_nca_verification">Deaktiver NCA-verifisering</string>
|
||||||
|
<string name="disable_nca_verification_description">Deaktiverer integritetsverifisering av NCA-innholdsarkiv. Dette kan forbedre lastehastigheten, men medfører risiko for datakorrupsjon eller at ugyldige filer ikke oppdages. Er nødvendig for å få spill og oppdateringer som trenger firmware 20+ til å fungere.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">Generer</string>
|
<string name="generate">Generer</string>
|
||||||
|
@ -720,7 +722,8 @@
|
||||||
<string name="emulation_rel_stick_center">Relativt pinnesenter</string>
|
<string name="emulation_rel_stick_center">Relativt pinnesenter</string>
|
||||||
<string name="emulation_dpad_slide">D-pad-skyving</string>
|
<string name="emulation_dpad_slide">D-pad-skyving</string>
|
||||||
<string name="emulation_haptics">Berøringshaptikk</string>
|
<string name="emulation_haptics">Berøringshaptikk</string>
|
||||||
<string name="emulation_show_overlay">Vis overlegg</string>
|
<string name="emulation_show_overlay">Vis kontroller</string>
|
||||||
|
<string name="emulation_hide_overlay">Skjul kontroller</string>
|
||||||
<string name="emulation_toggle_all">Veksle mellom alle</string>
|
<string name="emulation_toggle_all">Veksle mellom alle</string>
|
||||||
<string name="emulation_control_adjust">Juster overlegg</string>
|
<string name="emulation_control_adjust">Juster overlegg</string>
|
||||||
<string name="emulation_control_scale">Skaler</string>
|
<string name="emulation_control_scale">Skaler</string>
|
||||||
|
|
|
@ -482,6 +482,8 @@
|
||||||
<string name="use_custom_rtc">Niestandardowy RTC</string>
|
<string name="use_custom_rtc">Niestandardowy RTC</string>
|
||||||
<string name="use_custom_rtc_description">Ta opcja pozwala na wybranie własnych ustawień czasu używanych w czasie emulacji, innych niż czas systemu Android.</string>
|
<string name="use_custom_rtc_description">Ta opcja pozwala na wybranie własnych ustawień czasu używanych w czasie emulacji, innych niż czas systemu Android.</string>
|
||||||
<string name="set_custom_rtc">Ustaw niestandardowy czas RTC</string>
|
<string name="set_custom_rtc">Ustaw niestandardowy czas RTC</string>
|
||||||
|
<string name="disable_nca_verification">Wyłącz weryfikację NCA</string>
|
||||||
|
<string name="disable_nca_verification_description">Wyłącza weryfikację integralności archiwów zawartości NCA. Może to poprawić szybkość ładowania, ale niesie ryzyko uszkodzenia danych lub niezauważenia nieprawidłowych plików. Konieczne, aby działały gry i aktualizacje wymagające firmware\'u 20+.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">Generuj</string>
|
<string name="generate">Generuj</string>
|
||||||
|
@ -718,7 +720,8 @@
|
||||||
<string name="emulation_rel_stick_center">Wycentruj gałki</string>
|
<string name="emulation_rel_stick_center">Wycentruj gałki</string>
|
||||||
<string name="emulation_dpad_slide">Ruchomy D-pad</string>
|
<string name="emulation_dpad_slide">Ruchomy D-pad</string>
|
||||||
<string name="emulation_haptics">Wibracje haptyczne</string>
|
<string name="emulation_haptics">Wibracje haptyczne</string>
|
||||||
<string name="emulation_show_overlay">Pokaż przyciski</string>
|
<string name="emulation_show_overlay">Pokaż kontroler</string>
|
||||||
|
<string name="emulation_hide_overlay">Ukryj kontroler</string>
|
||||||
<string name="emulation_toggle_all">Włącz wszystkie</string>
|
<string name="emulation_toggle_all">Włącz wszystkie</string>
|
||||||
<string name="emulation_control_adjust">Dostosuj nakładkę</string>
|
<string name="emulation_control_adjust">Dostosuj nakładkę</string>
|
||||||
<string name="emulation_control_scale">Skala</string>
|
<string name="emulation_control_scale">Skala</string>
|
||||||
|
|
|
@ -506,6 +506,8 @@
|
||||||
<string name="use_custom_rtc">Data e hora personalizadas</string>
|
<string name="use_custom_rtc">Data e hora personalizadas</string>
|
||||||
<string name="use_custom_rtc_description">Permite a você configurar um relógio em tempo real separado do relógio do seu dispositivo.</string>
|
<string name="use_custom_rtc_description">Permite a você configurar um relógio em tempo real separado do relógio do seu dispositivo.</string>
|
||||||
<string name="set_custom_rtc">Definir um relógio em tempo real personalizado</string>
|
<string name="set_custom_rtc">Definir um relógio em tempo real personalizado</string>
|
||||||
|
<string name="disable_nca_verification">Desativar verificação NCA</string>
|
||||||
|
<string name="disable_nca_verification_description">Desativa a verificação de integridade de arquivos de conteúdo NCA. Pode melhorar a velocidade de carregamento, mas arrisica corromper dados ou que arquivos inválidos passem despercebidos. É necessário para fazer jogos e atualizações que exigem firmware 20+ funcionarem.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">Gerar</string>
|
<string name="generate">Gerar</string>
|
||||||
|
@ -855,7 +857,8 @@ uma tentativa de mapeamento automático</string>
|
||||||
<string name="emulation_rel_stick_center">Centro Relativo do Analógico</string>
|
<string name="emulation_rel_stick_center">Centro Relativo do Analógico</string>
|
||||||
<string name="emulation_dpad_slide">Deslizamento dos Botões Direcionais</string>
|
<string name="emulation_dpad_slide">Deslizamento dos Botões Direcionais</string>
|
||||||
<string name="emulation_haptics">Vibração ao tocar</string>
|
<string name="emulation_haptics">Vibração ao tocar</string>
|
||||||
<string name="emulation_show_overlay">Mostrar overlay</string>
|
<string name="emulation_show_overlay">Mostrar controle</string>
|
||||||
|
<string name="emulation_hide_overlay">Ocultar controle</string>
|
||||||
<string name="emulation_toggle_all">Marcar/Desmarcar tudo</string>
|
<string name="emulation_toggle_all">Marcar/Desmarcar tudo</string>
|
||||||
<string name="emulation_control_adjust">Ajustar overlay</string>
|
<string name="emulation_control_adjust">Ajustar overlay</string>
|
||||||
<string name="emulation_control_scale">Escala</string>
|
<string name="emulation_control_scale">Escala</string>
|
||||||
|
|
|
@ -506,6 +506,8 @@
|
||||||
<string name="use_custom_rtc">RTC personalizado</string>
|
<string name="use_custom_rtc">RTC personalizado</string>
|
||||||
<string name="use_custom_rtc_description">Permite a você configurar um relógio em tempo real separado do relógio do seu dispositivo.</string>
|
<string name="use_custom_rtc_description">Permite a você configurar um relógio em tempo real separado do relógio do seu dispositivo.</string>
|
||||||
<string name="set_custom_rtc">Defina um relógio em tempo real personalizado</string>
|
<string name="set_custom_rtc">Defina um relógio em tempo real personalizado</string>
|
||||||
|
<string name="disable_nca_verification">Desativar verificação NCA</string>
|
||||||
|
<string name="disable_nca_verification_description">Desativa a verificação de integridade dos arquivos de conteúdo NCA. Pode melhorar a velocidade de carregamento, mas arrisca a corrupção de dados ou que ficheiros inválidos passem despercebidos. É necessário para que jogos e atualizações que necessitam de firmware 20+ funcionem.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">Gerar</string>
|
<string name="generate">Gerar</string>
|
||||||
|
@ -855,7 +857,8 @@ uma tentativa de mapeamento automático</string>
|
||||||
<string name="emulation_rel_stick_center">Centro Relativo de Analógico</string>
|
<string name="emulation_rel_stick_center">Centro Relativo de Analógico</string>
|
||||||
<string name="emulation_dpad_slide">Deslizamento dos Botões Direcionais</string>
|
<string name="emulation_dpad_slide">Deslizamento dos Botões Direcionais</string>
|
||||||
<string name="emulation_haptics">Vibração ao tocar</string>
|
<string name="emulation_haptics">Vibração ao tocar</string>
|
||||||
<string name="emulation_show_overlay">Mostrar overlay</string>
|
<string name="emulation_show_overlay">Mostrar comando</string>
|
||||||
|
<string name="emulation_hide_overlay">Ocultar comando</string>
|
||||||
<string name="emulation_toggle_all">Marcar/Desmarcar tudo</string>
|
<string name="emulation_toggle_all">Marcar/Desmarcar tudo</string>
|
||||||
<string name="emulation_control_adjust">Ajustar overlay</string>
|
<string name="emulation_control_adjust">Ajustar overlay</string>
|
||||||
<string name="emulation_control_scale">Escala</string>
|
<string name="emulation_control_scale">Escala</string>
|
||||||
|
|
|
@ -508,6 +508,8 @@
|
||||||
<string name="use_custom_rtc">Пользовательский RTC</string>
|
<string name="use_custom_rtc">Пользовательский RTC</string>
|
||||||
<string name="use_custom_rtc_description">Позволяет установить пользовательские часы реального времени отдельно от текущего системного времени.</string>
|
<string name="use_custom_rtc_description">Позволяет установить пользовательские часы реального времени отдельно от текущего системного времени.</string>
|
||||||
<string name="set_custom_rtc">Установить пользовательский RTC</string>
|
<string name="set_custom_rtc">Установить пользовательский RTC</string>
|
||||||
|
<string name="disable_nca_verification">Отключить проверку NCA</string>
|
||||||
|
<string name="disable_nca_verification_description">Отключает проверку целостности архивов содержимого NCA. Может улучшить скорость загрузки, но есть риск повреждения данных или того, что недействительные файлы останутся незамеченными. Необходимо для работы игр и обновлений, требующих прошивку 20+.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">Создать</string>
|
<string name="generate">Создать</string>
|
||||||
|
@ -856,7 +858,8 @@
|
||||||
<string name="emulation_rel_stick_center">Относительный центр стика</string>
|
<string name="emulation_rel_stick_center">Относительный центр стика</string>
|
||||||
<string name="emulation_dpad_slide">Слайд крестовиной</string>
|
<string name="emulation_dpad_slide">Слайд крестовиной</string>
|
||||||
<string name="emulation_haptics">Обратная связь от нажатий</string>
|
<string name="emulation_haptics">Обратная связь от нажатий</string>
|
||||||
<string name="emulation_show_overlay">Показать оверлей</string>
|
<string name="emulation_show_overlay">Показать контроллер</string>
|
||||||
|
<string name="emulation_hide_overlay">Скрыть контроллер</string>
|
||||||
<string name="emulation_toggle_all">Переключить всё</string>
|
<string name="emulation_toggle_all">Переключить всё</string>
|
||||||
<string name="emulation_control_adjust">Регулировка оверлея</string>
|
<string name="emulation_control_adjust">Регулировка оверлея</string>
|
||||||
<string name="emulation_control_scale">Масштаб</string>
|
<string name="emulation_control_scale">Масштаб</string>
|
||||||
|
|
|
@ -457,6 +457,8 @@
|
||||||
<string name="use_custom_rtc">Цустом РТЦ</string>
|
<string name="use_custom_rtc">Цустом РТЦ</string>
|
||||||
<string name="use_custom_rtc_description">Омогућава вам да поставите прилагођени сат у реалном времену одвојено од тренутног времена система.</string>
|
<string name="use_custom_rtc_description">Омогућава вам да поставите прилагођени сат у реалном времену одвојено од тренутног времена система.</string>
|
||||||
<string name="set_custom_rtc">Подесите прилагођени РТЦ</string>
|
<string name="set_custom_rtc">Подесите прилагођени РТЦ</string>
|
||||||
|
<string name="disable_nca_verification">Искључи верификацију НЦА</string>
|
||||||
|
<string name="disable_nca_verification_description">Искључује верификацију интегритета НЦА архива садржаја. Ово може побољшати брзину учитавања, али ризикује оштећење података или да неважећи фајлови прођу незапажено. Неопходно је да би игре и ажурирања која захтевају firmware 20+ радили.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">Генериши</string>
|
<string name="generate">Генериши</string>
|
||||||
|
@ -812,7 +814,8 @@
|
||||||
<string name="emulation_rel_stick_center">Релативни центар за штапић</string>
|
<string name="emulation_rel_stick_center">Релативни центар за штапић</string>
|
||||||
<string name="emulation_dpad_slide">Д-Пад Слиде</string>
|
<string name="emulation_dpad_slide">Д-Пад Слиде</string>
|
||||||
<string name="emulation_haptics">Додирните ХАптицс</string>
|
<string name="emulation_haptics">Додирните ХАптицс</string>
|
||||||
<string name="emulation_show_overlay">Приказати прекривање</string>
|
<string name="emulation_show_overlay">Приказати контролер</string>
|
||||||
|
<string name="emulation_hide_overlay">Сакрити контролер</string>
|
||||||
<string name="emulation_toggle_all">Пребацивати све</string>
|
<string name="emulation_toggle_all">Пребацивати све</string>
|
||||||
<string name="emulation_control_adjust">Подесити прекривање</string>
|
<string name="emulation_control_adjust">Подесити прекривање</string>
|
||||||
<string name="emulation_control_scale">Скала</string>
|
<string name="emulation_control_scale">Скала</string>
|
||||||
|
|
|
@ -495,6 +495,8 @@
|
||||||
<string name="use_custom_rtc">Свій RTC</string>
|
<string name="use_custom_rtc">Свій RTC</string>
|
||||||
<string name="use_custom_rtc_description">Дозволяє встановити власний час (Real-time clock, або RTC), відмінний від системного.</string>
|
<string name="use_custom_rtc_description">Дозволяє встановити власний час (Real-time clock, або RTC), відмінний від системного.</string>
|
||||||
<string name="set_custom_rtc">Встановити RTC</string>
|
<string name="set_custom_rtc">Встановити RTC</string>
|
||||||
|
<string name="disable_nca_verification">Вимкнути перевірку NCA</string>
|
||||||
|
<string name="disable_nca_verification_description">Вимкає перевірку цілісності архівів вмісту NCA. Може покращити швидкість завантаження, але ризикує пошкодженням даних або тим, що недійсні файли залишаться непоміченими. Необхідно для роботи ігор та оновлень, які вимагають прошивки 20+.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">Створити</string>
|
<string name="generate">Створити</string>
|
||||||
|
@ -749,7 +751,8 @@
|
||||||
<string name="emulation_rel_stick_center">Відносний центр джойстика</string>
|
<string name="emulation_rel_stick_center">Відносний центр джойстика</string>
|
||||||
<string name="emulation_dpad_slide">Ковзання D-pad</string>
|
<string name="emulation_dpad_slide">Ковзання D-pad</string>
|
||||||
<string name="emulation_haptics">Тактильний відгук</string>
|
<string name="emulation_haptics">Тактильний відгук</string>
|
||||||
<string name="emulation_show_overlay">Показати накладання</string>
|
<string name="emulation_show_overlay">Показати контролер</string>
|
||||||
|
<string name="emulation_hide_overlay">Сховати контролер</string>
|
||||||
<string name="emulation_toggle_all">Перемкнути все</string>
|
<string name="emulation_toggle_all">Перемкнути все</string>
|
||||||
<string name="emulation_control_adjust">Налаштувати накладання</string>
|
<string name="emulation_control_adjust">Налаштувати накладання</string>
|
||||||
<string name="emulation_control_scale">Масштаб</string>
|
<string name="emulation_control_scale">Масштаб</string>
|
||||||
|
|
|
@ -482,6 +482,8 @@
|
||||||
<string name="use_custom_rtc">RTC tuỳ chỉnh</string>
|
<string name="use_custom_rtc">RTC tuỳ chỉnh</string>
|
||||||
<string name="use_custom_rtc_description">Cho phép bạn thiết lập một đồng hồ thời gian thực tùy chỉnh riêng biệt so với thời gian hệ thống hiện tại.</string>
|
<string name="use_custom_rtc_description">Cho phép bạn thiết lập một đồng hồ thời gian thực tùy chỉnh riêng biệt so với thời gian hệ thống hiện tại.</string>
|
||||||
<string name="set_custom_rtc">Thiết lập RTC tùy chỉnh</string>
|
<string name="set_custom_rtc">Thiết lập RTC tùy chỉnh</string>
|
||||||
|
<string name="disable_nca_verification">Tắt xác minh NCA</string>
|
||||||
|
<string name="disable_nca_verification_description">Tắt xác minh tính toàn vẹn của kho lưu trữ nội dung NCA. Có thể cải thiện tốc độ tải nhưng có nguy cơ hỏng dữ liệu hoặc các tệp không hợp lệ không bị phát hiện. Cần thiết để các trò chơi và bản cập nhật yêu cầu firmware 20+ hoạt động.</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">Tạo</string>
|
<string name="generate">Tạo</string>
|
||||||
|
@ -723,7 +725,8 @@
|
||||||
<string name="emulation_rel_stick_center">Trung tâm nút cần xoay tương đối</string>
|
<string name="emulation_rel_stick_center">Trung tâm nút cần xoay tương đối</string>
|
||||||
<string name="emulation_dpad_slide">Trượt D-pad</string>
|
<string name="emulation_dpad_slide">Trượt D-pad</string>
|
||||||
<string name="emulation_haptics">Chạm haptics</string>
|
<string name="emulation_haptics">Chạm haptics</string>
|
||||||
<string name="emulation_show_overlay">Hiện lớp phủ</string>
|
<string name="emulation_show_overlay">Hiện bộ điều khiển</string>
|
||||||
|
<string name="emulation_hide_overlay">Ẩn bộ điều khiển</string>
|
||||||
<string name="emulation_toggle_all">Chuyển đổi tất cả</string>
|
<string name="emulation_toggle_all">Chuyển đổi tất cả</string>
|
||||||
<string name="emulation_control_adjust">Điều chỉnh lớp phủ</string>
|
<string name="emulation_control_adjust">Điều chỉnh lớp phủ</string>
|
||||||
<string name="emulation_control_scale">Tỉ lệ thu phóng</string>
|
<string name="emulation_control_scale">Tỉ lệ thu phóng</string>
|
||||||
|
|
|
@ -500,6 +500,8 @@
|
||||||
<string name="use_custom_rtc">自定义系统时间</string>
|
<string name="use_custom_rtc">自定义系统时间</string>
|
||||||
<string name="use_custom_rtc_description">此选项允许您设置与目前系统时间相独立的自定义系统时钟。</string>
|
<string name="use_custom_rtc_description">此选项允许您设置与目前系统时间相独立的自定义系统时钟。</string>
|
||||||
<string name="set_custom_rtc">设置自定义系统时间</string>
|
<string name="set_custom_rtc">设置自定义系统时间</string>
|
||||||
|
<string name="disable_nca_verification">禁用NCA验证</string>
|
||||||
|
<string name="disable_nca_verification_description">禁用NCA内容存档的完整性验证。可能会提高加载速度,但存在数据损坏或无效文件未被检测到的风险。对于需要固件20+的游戏和更新是必需的。</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">生成</string>
|
<string name="generate">生成</string>
|
||||||
|
@ -848,7 +850,8 @@
|
||||||
<string name="emulation_rel_stick_center">相对摇杆中心</string>
|
<string name="emulation_rel_stick_center">相对摇杆中心</string>
|
||||||
<string name="emulation_dpad_slide">十字方向键滑动</string>
|
<string name="emulation_dpad_slide">十字方向键滑动</string>
|
||||||
<string name="emulation_haptics">触觉反馈</string>
|
<string name="emulation_haptics">触觉反馈</string>
|
||||||
<string name="emulation_show_overlay">显示虚拟按键</string>
|
<string name="emulation_show_overlay">显示控制器</string>
|
||||||
|
<string name="emulation_hide_overlay">隐藏控制器</string>
|
||||||
<string name="emulation_toggle_all">全部切换</string>
|
<string name="emulation_toggle_all">全部切换</string>
|
||||||
<string name="emulation_control_adjust">调整虚拟按键</string>
|
<string name="emulation_control_adjust">调整虚拟按键</string>
|
||||||
<string name="emulation_control_scale">缩放</string>
|
<string name="emulation_control_scale">缩放</string>
|
||||||
|
|
|
@ -505,6 +505,8 @@
|
||||||
<string name="use_custom_rtc">自訂 RTC</string>
|
<string name="use_custom_rtc">自訂 RTC</string>
|
||||||
<string name="use_custom_rtc_description">允許您設定與您的目前系統時間相互獨立的自訂即時時鐘。</string>
|
<string name="use_custom_rtc_description">允許您設定與您的目前系統時間相互獨立的自訂即時時鐘。</string>
|
||||||
<string name="set_custom_rtc">設定自訂 RTC</string>
|
<string name="set_custom_rtc">設定自訂 RTC</string>
|
||||||
|
<string name="disable_nca_verification">停用NCA驗證</string>
|
||||||
|
<string name="disable_nca_verification_description">停用NCA內容存檔的完整性驗證。可能會提高載入速度,但存在資料損毀或無效檔案未被偵測到的風險。對於需要韌體20+的遊戲和更新是必需的。</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="generate">生成</string>
|
<string name="generate">生成</string>
|
||||||
|
@ -853,7 +855,8 @@
|
||||||
<string name="emulation_rel_stick_center">相對搖桿中心</string>
|
<string name="emulation_rel_stick_center">相對搖桿中心</string>
|
||||||
<string name="emulation_dpad_slide">方向鍵滑動</string>
|
<string name="emulation_dpad_slide">方向鍵滑動</string>
|
||||||
<string name="emulation_haptics">觸覺回饋技術</string>
|
<string name="emulation_haptics">觸覺回饋技術</string>
|
||||||
<string name="emulation_show_overlay">顯示覆疊</string>
|
<string name="emulation_show_overlay">顯示控制器</string>
|
||||||
|
<string name="emulation_hide_overlay">隱藏控制器</string>
|
||||||
<string name="emulation_toggle_all">全部切換</string>
|
<string name="emulation_toggle_all">全部切換</string>
|
||||||
<string name="emulation_control_adjust">調整覆疊</string>
|
<string name="emulation_control_adjust">調整覆疊</string>
|
||||||
<string name="emulation_control_scale">縮放</string>
|
<string name="emulation_control_scale">縮放</string>
|
||||||
|
|
|
@ -474,6 +474,8 @@
|
||||||
<string name="use_custom_rtc">Custom RTC</string>
|
<string name="use_custom_rtc">Custom RTC</string>
|
||||||
<string name="use_custom_rtc_description">Allows you to set a custom real-time clock separate from your current system time.</string>
|
<string name="use_custom_rtc_description">Allows you to set a custom real-time clock separate from your current system time.</string>
|
||||||
<string name="set_custom_rtc">Set custom RTC</string>
|
<string name="set_custom_rtc">Set custom RTC</string>
|
||||||
|
<string name="disable_nca_verification">Disable NCA Verification</string>
|
||||||
|
<string name="disable_nca_verification_description">Disables integrity verification of NCA content archives. This may improve loading speed but risks data corruption or invalid files going undetected. Some games that require firmware versions 20+ may need this as well.</string>
|
||||||
|
|
||||||
<string name="generate">Generate</string>
|
<string name="generate">Generate</string>
|
||||||
|
|
||||||
|
@ -782,6 +784,9 @@
|
||||||
<string name="loader_requires_firmware">Game Requires Firmware</string>
|
<string name="loader_requires_firmware">Game Requires Firmware</string>
|
||||||
<string name="loader_requires_firmware_description"><![CDATA[The game you are trying to launch requires firmware to boot or to get past the opening menu. Please <a href="https://yuzu-mirror.github.io/help/quickstart"> dump and install firmware</a>, or press "OK" to launch anyways.]]></string>
|
<string name="loader_requires_firmware_description"><![CDATA[The game you are trying to launch requires firmware to boot or to get past the opening menu. Please <a href="https://yuzu-mirror.github.io/help/quickstart"> dump and install firmware</a>, or press "OK" to launch anyways.]]></string>
|
||||||
|
|
||||||
|
<string name="nca_verification_disabled">NCA Verification Disabled</string>
|
||||||
|
<string name="nca_verification_disabled_description">This is required to run new games and updates, but may cause instability or crashes if NCA files are corrupt, modified, or tampered with. If unsure, re-enable verification in Advanced Settings -> System, and use firmware versions of 19.0.1 or below.</string>
|
||||||
|
|
||||||
<!-- Intent Launch strings -->
|
<!-- Intent Launch strings -->
|
||||||
<string name="searching_for_game">Searching for game...</string>
|
<string name="searching_for_game">Searching for game...</string>
|
||||||
<string name="game_not_found_for_title_id">Game not found for Title ID: %1$s</string>
|
<string name="game_not_found_for_title_id">Game not found for Title ID: %1$s</string>
|
||||||
|
@ -835,7 +840,8 @@
|
||||||
<string name="emulation_rel_stick_center">Relative stick center</string>
|
<string name="emulation_rel_stick_center">Relative stick center</string>
|
||||||
<string name="emulation_dpad_slide">D-pad slide</string>
|
<string name="emulation_dpad_slide">D-pad slide</string>
|
||||||
<string name="emulation_haptics">Touch haptics</string>
|
<string name="emulation_haptics">Touch haptics</string>
|
||||||
<string name="emulation_show_overlay">Show overlay</string>
|
<string name="emulation_show_overlay">Show controller</string>
|
||||||
|
<string name="emulation_hide_overlay">Hide controller</string>
|
||||||
<string name="emulation_toggle_all">Toggle all</string>
|
<string name="emulation_toggle_all">Toggle all</string>
|
||||||
<string name="emulation_control_adjust">Adjust overlay</string>
|
<string name="emulation_control_adjust">Adjust overlay</string>
|
||||||
<string name="emulation_control_scale">Scale</string>
|
<string name="emulation_control_scale">Scale</string>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
@ -229,9 +232,10 @@ endif()
|
||||||
target_include_directories(audio_core PRIVATE ${OPUS_INCLUDE_DIRS})
|
target_include_directories(audio_core PRIVATE ${OPUS_INCLUDE_DIRS})
|
||||||
target_link_libraries(audio_core PUBLIC common core opus)
|
target_link_libraries(audio_core PUBLIC common core opus)
|
||||||
|
|
||||||
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
# what?
|
||||||
target_link_libraries(audio_core PRIVATE dynarmic::dynarmic)
|
# if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
||||||
endif()
|
# target_link_libraries(audio_core PRIVATE dynarmic::dynarmic)
|
||||||
|
# endif()
|
||||||
|
|
||||||
if (ENABLE_CUBEB)
|
if (ENABLE_CUBEB)
|
||||||
target_sources(audio_core PRIVATE
|
target_sources(audio_core PRIVATE
|
||||||
|
@ -240,7 +244,7 @@ if (ENABLE_CUBEB)
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(audio_core PRIVATE cubeb)
|
target_link_libraries(audio_core PRIVATE cubeb)
|
||||||
target_compile_definitions(audio_core PRIVATE -DHAVE_CUBEB=1)
|
target_compile_definitions(audio_core PRIVATE HAVE_CUBEB=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_SDL2)
|
if (ENABLE_SDL2)
|
||||||
|
|
|
@ -193,7 +193,7 @@ void AudioRenderer::Main(std::stop_token stop_token) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
max_time = std::min(command_buffer.time_limit, max_time);
|
max_time = (std::min)(command_buffer.time_limit, max_time);
|
||||||
command_list_processor.SetProcessTimeMax(max_time);
|
command_list_processor.SetProcessTimeMax(max_time);
|
||||||
|
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
|
|
|
@ -73,9 +73,9 @@ constexpr s32 HighestVoicePriority = 0;
|
||||||
constexpr u32 BufferAlignment = 0x40;
|
constexpr u32 BufferAlignment = 0x40;
|
||||||
constexpr u32 WorkbufferAlignment = 0x1000;
|
constexpr u32 WorkbufferAlignment = 0x1000;
|
||||||
constexpr s32 FinalMixId = 0;
|
constexpr s32 FinalMixId = 0;
|
||||||
constexpr s32 InvalidDistanceFromFinalMix = std::numeric_limits<s32>::min();
|
constexpr s32 InvalidDistanceFromFinalMix = (std::numeric_limits<s32>::min)();
|
||||||
constexpr s32 UnusedSplitterId = -1;
|
constexpr s32 UnusedSplitterId = -1;
|
||||||
constexpr s32 UnusedMixId = std::numeric_limits<s32>::max();
|
constexpr s32 UnusedMixId = (std::numeric_limits<s32>::max)();
|
||||||
constexpr u32 InvalidNodeId = 0xF0000000;
|
constexpr u32 InvalidNodeId = 0xF0000000;
|
||||||
constexpr s32 InvalidProcessOrder = -1;
|
constexpr s32 InvalidProcessOrder = -1;
|
||||||
constexpr u32 MaxBiquadFilters = 2;
|
constexpr u32 MaxBiquadFilters = 2;
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
@ -13,7 +16,7 @@
|
||||||
#include "common/polyfill_ranges.h"
|
#include "common/polyfill_ranges.h"
|
||||||
|
|
||||||
namespace AudioCore {
|
namespace AudioCore {
|
||||||
constexpr u32 CurrentRevision = 13;
|
constexpr u32 CurrentRevision = 16;
|
||||||
|
|
||||||
enum class SupportTags {
|
enum class SupportTags {
|
||||||
CommandProcessingTimeEstimatorVersion4,
|
CommandProcessingTimeEstimatorVersion4,
|
||||||
|
@ -54,6 +57,7 @@ constexpr u32 GetRevisionNum(u32 user_revision) {
|
||||||
user_revision -= Common::MakeMagic('R', 'E', 'V', '0');
|
user_revision -= Common::MakeMagic('R', 'E', 'V', '0');
|
||||||
user_revision >>= 24;
|
user_revision >>= 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
return user_revision;
|
return user_revision;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ public:
|
||||||
*/
|
*/
|
||||||
void RegisterBuffers(boost::container::static_vector<AudioBuffer, N>& out_buffers) {
|
void RegisterBuffers(boost::container::static_vector<AudioBuffer, N>& out_buffers) {
|
||||||
std::scoped_lock l{lock};
|
std::scoped_lock l{lock};
|
||||||
const s32 to_register{std::min(std::min(appended_count, BufferAppendLimit),
|
const s32 to_register{(std::min)((std::min)(appended_count, BufferAppendLimit),
|
||||||
BufferAppendLimit - registered_count)};
|
BufferAppendLimit - registered_count)};
|
||||||
|
|
||||||
for (s32 i = 0; i < to_register; i++) {
|
for (s32 i = 0; i < to_register; i++) {
|
||||||
|
@ -175,7 +175,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t buffers_to_flush{
|
size_t buffers_to_flush{
|
||||||
std::min(static_cast<u32>(registered_count + appended_count), max_buffers)};
|
(std::min)(static_cast<u32>(registered_count + appended_count), max_buffers)};
|
||||||
if (buffers_to_flush == 0) {
|
if (buffers_to_flush == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ u32 AudioDevice::ListAudioDeviceName(std::span<AudioDeviceName> out_buffer) cons
|
||||||
names = device_names;
|
names = device_names;
|
||||||
}
|
}
|
||||||
|
|
||||||
const u32 out_count{static_cast<u32>(std::min(out_buffer.size(), names.size()))};
|
const u32 out_count{static_cast<u32>((std::min)(out_buffer.size(), names.size()))};
|
||||||
for (u32 i = 0; i < out_count; i++) {
|
for (u32 i = 0; i < out_count; i++) {
|
||||||
out_buffer[i] = names[i];
|
out_buffer[i] = names[i];
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ u32 AudioDevice::ListAudioDeviceName(std::span<AudioDeviceName> out_buffer) cons
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 AudioDevice::ListAudioOutputDeviceName(std::span<AudioDeviceName> out_buffer) const {
|
u32 AudioDevice::ListAudioOutputDeviceName(std::span<AudioDeviceName> out_buffer) const {
|
||||||
const u32 out_count{static_cast<u32>(std::min(out_buffer.size(), output_device_names.size()))};
|
const u32 out_count{static_cast<u32>((std::min)(out_buffer.size(), output_device_names.size()))};
|
||||||
|
|
||||||
for (u32 i = 0; i < out_count; i++) {
|
for (u32 i = 0; i < out_count; i++) {
|
||||||
out_buffer[i] = output_device_names[i];
|
out_buffer[i] = output_device_names[i];
|
||||||
|
|
|
@ -43,7 +43,7 @@ void BehaviorInfo::AppendError(const ErrorInfo& error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BehaviorInfo::CopyErrorInfo(std::span<ErrorInfo> out_errors, u32& out_count) const {
|
void BehaviorInfo::CopyErrorInfo(std::span<ErrorInfo> out_errors, u32& out_count) const {
|
||||||
out_count = std::min(error_count, MaxErrors);
|
out_count = (std::min)(error_count, MaxErrors);
|
||||||
|
|
||||||
for (size_t i = 0; i < MaxErrors; i++) {
|
for (size_t i = 0; i < MaxErrors; i++) {
|
||||||
if (i < out_count) {
|
if (i < out_count) {
|
||||||
|
|
|
@ -464,7 +464,7 @@ void CommandBuffer::GenerateDeviceSinkCommand(const s32 node_id, const s16 buffe
|
||||||
s16 max_input{0};
|
s16 max_input{0};
|
||||||
for (u32 i = 0; i < parameter.input_count; i++) {
|
for (u32 i = 0; i < parameter.input_count; i++) {
|
||||||
cmd.inputs[i] = buffer_offset + parameter.inputs[i];
|
cmd.inputs[i] = buffer_offset + parameter.inputs[i];
|
||||||
max_input = std::max(max_input, cmd.inputs[i]);
|
max_input = (std::max)(max_input, cmd.inputs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.upsampler_info != nullptr) {
|
if (state.upsampler_info != nullptr) {
|
||||||
|
|
|
@ -56,11 +56,11 @@ public:
|
||||||
// Voices
|
// Voices
|
||||||
u64 voice_size{0};
|
u64 voice_size{0};
|
||||||
if (behavior.IsWaveBufferVer2Supported()) {
|
if (behavior.IsWaveBufferVer2Supported()) {
|
||||||
voice_size = std::max(std::max(sizeof(AdpcmDataSourceVersion2Command),
|
voice_size = (std::max)((std::max)(sizeof(AdpcmDataSourceVersion2Command),
|
||||||
sizeof(PcmInt16DataSourceVersion2Command)),
|
sizeof(PcmInt16DataSourceVersion2Command)),
|
||||||
sizeof(PcmFloatDataSourceVersion2Command));
|
sizeof(PcmFloatDataSourceVersion2Command));
|
||||||
} else {
|
} else {
|
||||||
voice_size = std::max(std::max(sizeof(AdpcmDataSourceVersion1Command),
|
voice_size = (std::max)((std::max)(sizeof(AdpcmDataSourceVersion1Command),
|
||||||
sizeof(PcmInt16DataSourceVersion1Command)),
|
sizeof(PcmInt16DataSourceVersion1Command)),
|
||||||
sizeof(PcmFloatDataSourceVersion1Command));
|
sizeof(PcmFloatDataSourceVersion1Command));
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ public:
|
||||||
|
|
||||||
// Sinks
|
// Sinks
|
||||||
size +=
|
size +=
|
||||||
params.sinks * std::max(sizeof(DeviceSinkCommand), sizeof(CircularBufferSinkCommand));
|
params.sinks * (std::max)(sizeof(DeviceSinkCommand), sizeof(CircularBufferSinkCommand));
|
||||||
|
|
||||||
// Performance
|
// Performance
|
||||||
size += (params.effects + params.voices + params.sinks + params.sub_mixes + 1 +
|
size += (params.effects + params.voices + params.sinks + params.sub_mixes + 1 +
|
||||||
|
|
|
@ -29,8 +29,8 @@ constexpr std::array<u8, 3> PitchBySrcQuality = {4, 8, 4};
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static u32 DecodePcm(Core::Memory::Memory& memory, std::span<s16> out_buffer,
|
static u32 DecodePcm(Core::Memory::Memory& memory, std::span<s16> out_buffer,
|
||||||
const DecodeArg& req) {
|
const DecodeArg& req) {
|
||||||
constexpr s32 min{std::numeric_limits<s16>::min()};
|
constexpr s32 min{(std::numeric_limits<s16>::min)()};
|
||||||
constexpr s32 max{std::numeric_limits<s16>::max()};
|
constexpr s32 max{(std::numeric_limits<s16>::max)()};
|
||||||
|
|
||||||
if (req.buffer == 0 || req.buffer_size == 0) {
|
if (req.buffer == 0 || req.buffer_size == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -41,7 +41,7 @@ static u32 DecodePcm(Core::Memory::Memory& memory, std::span<s16> out_buffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
auto samples_to_decode{
|
auto samples_to_decode{
|
||||||
std::min(req.samples_to_read, req.end_offset - req.start_offset - req.offset)};
|
(std::min)(req.samples_to_read, req.end_offset - req.start_offset - req.offset)};
|
||||||
u32 channel_count{static_cast<u32>(req.channel_count)};
|
u32 channel_count{static_cast<u32>(req.channel_count)};
|
||||||
|
|
||||||
switch (req.channel_count) {
|
switch (req.channel_count) {
|
||||||
|
@ -55,7 +55,7 @@ static u32 DecodePcm(Core::Memory::Memory& memory, std::span<s16> out_buffer,
|
||||||
if constexpr (std::is_floating_point_v<T>) {
|
if constexpr (std::is_floating_point_v<T>) {
|
||||||
for (u32 i = 0; i < samples_to_decode; i++) {
|
for (u32 i = 0; i < samples_to_decode; i++) {
|
||||||
auto sample{static_cast<s32>(samples[i * channel_count + req.target_channel] *
|
auto sample{static_cast<s32>(samples[i * channel_count + req.target_channel] *
|
||||||
std::numeric_limits<s16>::max())};
|
(std::numeric_limits<s16>::max)())};
|
||||||
out_buffer[i] = static_cast<s16>(std::clamp(sample, min, max));
|
out_buffer[i] = static_cast<s16>(std::clamp(sample, min, max));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -79,7 +79,7 @@ static u32 DecodePcm(Core::Memory::Memory& memory, std::span<s16> out_buffer,
|
||||||
if constexpr (std::is_floating_point_v<T>) {
|
if constexpr (std::is_floating_point_v<T>) {
|
||||||
for (u32 i = 0; i < samples_to_decode; i++) {
|
for (u32 i = 0; i < samples_to_decode; i++) {
|
||||||
auto sample{static_cast<s32>(samples[i * channel_count + req.target_channel] *
|
auto sample{static_cast<s32>(samples[i * channel_count + req.target_channel] *
|
||||||
std::numeric_limits<s16>::max())};
|
(std::numeric_limits<s16>::max)())};
|
||||||
out_buffer[i] = static_cast<s16>(std::clamp(sample, min, max));
|
out_buffer[i] = static_cast<s16>(std::clamp(sample, min, max));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -125,7 +125,7 @@ static u32 DecodeAdpcm(Core::Memory::Memory& memory, std::span<s16> out_buffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
auto start_pos{req.start_offset + req.offset};
|
auto start_pos{req.start_offset + req.offset};
|
||||||
auto samples_to_process{std::min(req.end_offset - start_pos, req.samples_to_read)};
|
auto samples_to_process{(std::min)(req.end_offset - start_pos, req.samples_to_read)};
|
||||||
if (samples_to_process == 0) {
|
if (samples_to_process == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ static u32 DecodeAdpcm(Core::Memory::Memory& memory, std::span<s16> out_buffer,
|
||||||
position_in_frame += 2;
|
position_in_frame += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto size{std::max((samples_to_process / 8U) * SamplesPerFrame, 8U)};
|
const auto size{(std::max)((samples_to_process / 8U) * SamplesPerFrame, 8U)};
|
||||||
Core::Memory::CpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::UnsafeRead> wavebuffer(
|
Core::Memory::CpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::UnsafeRead> wavebuffer(
|
||||||
memory, req.buffer + position_in_frame / 2, size);
|
memory, req.buffer + position_in_frame / 2, size);
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ void DecodeFromWaveBuffers(Core::Memory::Memory& memory, const DecodeFromWaveBuf
|
||||||
auto max_remaining_sample_count{
|
auto max_remaining_sample_count{
|
||||||
((Common::FixedPoint<17, 15>(TempBufferSize) - fraction) / sample_rate_ratio)
|
((Common::FixedPoint<17, 15>(TempBufferSize) - fraction) / sample_rate_ratio)
|
||||||
.to_uint_floor()};
|
.to_uint_floor()};
|
||||||
max_remaining_sample_count = std::min(max_remaining_sample_count, remaining_sample_count);
|
max_remaining_sample_count = (std::min)(max_remaining_sample_count, remaining_sample_count);
|
||||||
|
|
||||||
auto wavebuffers_consumed{voice_state.wave_buffers_consumed};
|
auto wavebuffers_consumed{voice_state.wave_buffers_consumed};
|
||||||
auto wavebuffer_index{voice_state.wave_buffer_index};
|
auto wavebuffer_index{voice_state.wave_buffer_index};
|
||||||
|
@ -273,7 +273,7 @@ void DecodeFromWaveBuffers(Core::Memory::Memory& memory, const DecodeFromWaveBuf
|
||||||
std::array<s16, TempBufferSize> temp_buffer{};
|
std::array<s16, TempBufferSize> temp_buffer{};
|
||||||
|
|
||||||
while (remaining_sample_count > 0) {
|
while (remaining_sample_count > 0) {
|
||||||
const auto samples_to_write{std::min(remaining_sample_count, max_remaining_sample_count)};
|
const auto samples_to_write{(std::min)(remaining_sample_count, max_remaining_sample_count)};
|
||||||
const auto samples_to_read{
|
const auto samples_to_read{
|
||||||
(fraction + samples_to_write * sample_rate_ratio).to_uint_floor()};
|
(fraction + samples_to_write * sample_rate_ratio).to_uint_floor()};
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue