Compare commits
83 commits
877da0ec66
...
8153cbe10d
Author | SHA1 | Date | |
---|---|---|---|
8153cbe10d | |||
f3ee95b2e3 | |||
40e8a3507b | |||
2e0a4163cf | |||
815d85677a | |||
f422d855b7 | |||
03c7d6ce4a | |||
824dc6948e | |||
85b5e650cc | |||
324ace3cd6 | |||
33f93ad003 | |||
9f423a24b8 | |||
50ceb9a43a | |||
ecb811ad04 | |||
bf302d7917 | |||
d19a7c3782 | |||
c725641f13 | |||
02016697d6 | |||
c77ad128b9 | |||
cc50571275 | |||
ba20e5c2f5 | |||
020ad29a8c | |||
4982dcfaa5 | |||
677148bdca | |||
f088f028f3 | |||
19eb8272b1 | |||
86ddb51a87 | |||
10aca2f90c | |||
1d83ba733c | |||
fd21774aae | |||
42280f34d6 | |||
2482846cf6 | |||
bf4dce8d0b | |||
45263ee7aa | |||
f19bbda517 | |||
f5bb07341a | |||
3e299dc0f5 | |||
3ac9d65cdd | |||
4f9b670c93 | |||
1937286798 | |||
76a8a6e039 | |||
49ddf95c70 | |||
d4427d90ea | |||
aec7f19b7e | |||
7050b92d61 | |||
48f7387e3a | |||
49f29e5071 | |||
f33a771d58 | |||
191e4c75a1 | |||
34302300d9 | |||
cbbdfc75cc | |||
1ca35b7559 | |||
06dabbadcb | |||
8c9cdf0d70 | |||
d623e04606 | |||
4b558e5303 | |||
28b8159da1 | |||
87d42cf542 | |||
725407b989 | |||
6510818fca | |||
a487cea683 | |||
a3c0d59dc9 | |||
cf634d4d6f | |||
b1ce3c8dc1 | |||
e1ffeec212 | |||
249e006667 | |||
8ac495acee | |||
cda6958111 | |||
dac2efc4c8 | |||
3b3278f44b | |||
3ca0bde0e9 | |||
6699361b7e | |||
19036c59b5 | |||
80dfc3d76f | |||
f4386423e8 | |||
4c5d03f5de | |||
d207df959a | |||
28d26b0d76 | |||
ad6045d9a4 | |||
3fbfd64722 | |||
13ecc1e481 | |||
2502352180 | |||
9d2681ecc9 |
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# SPDX-FileCopyrightText: 2025 eden Emulator Project
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
export NDK_CCACHE=$(which ccache)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# SPDX-FileCopyrightText: 2025 eden Emulator Project
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
GITDATE="$(git show -s --date=short --format='%ad' | sed 's/-//g')"
|
||||
|
|
|
@ -5,10 +5,13 @@ HEADER_HASH="$(cat "$PWD/.ci/license/header-hash.txt")"
|
|||
|
||||
echo "Getting branch changes"
|
||||
|
||||
BRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||
COMMITS=`git log ${BRANCH} --not master --pretty=format:"%h"`
|
||||
RANGE="${COMMITS[${#COMMITS[@]}-1]}^..${COMMITS[0]}"
|
||||
FILES=`git diff-tree --no-commit-id --name-only ${RANGE} -r`
|
||||
# BRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||
# COMMITS=`git log ${BRANCH} --not master --pretty=format:"%h"`
|
||||
# RANGE="${COMMITS[${#COMMITS[@]}-1]}^..${COMMITS[0]}"
|
||||
# FILES=`git diff-tree --no-commit-id --name-only ${RANGE} -r`
|
||||
|
||||
BASE=`git merge-base master HEAD`
|
||||
FILES=`git diff --name-only $BASE`
|
||||
|
||||
#FILES=$(git diff --name-only master)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# SPDX-FileCopyrightText: 2025 eden Emulator Project
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
case "$1" in
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# SPDX-FileCopyrightText: 2025 eden Emulator Project
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# This script assumes you're in the source directory
|
||||
|
|
|
@ -5,7 +5,7 @@ for i in dist/languages/*.ts; do
|
|||
TARGET=`head -n1 $i | awk -F 'language="' '{split($2, a, "\""); print a[1]}'`
|
||||
|
||||
# requires fd
|
||||
SOURCES=`fd . src/yuzu -tf -e ui -e cpp -e h -e plist`
|
||||
SOURCES=`fd . src/yuzu src/qt_common -tf -e ui -e cpp -e h -e plist`
|
||||
|
||||
lupdate -source-language $SRC -target-language $TARGET $SOURCES -ts /data/code/eden/$i
|
||||
done
|
||||
|
|
|
@ -1,59 +1,45 @@
|
|||
#!/bin/bash -e
|
||||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2025 eden Emulator Project
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
if [ "$DEVEL" != "true" ]; then
|
||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DENABLE_QT_UPDATE_CHECKER=ON)
|
||||
if [ "$COMPILER" == "clang" ]
|
||||
then
|
||||
EXTRA_CMAKE_FLAGS+=(
|
||||
-DCMAKE_CXX_COMPILER=clang-cl
|
||||
-DCMAKE_C_COMPILER=clang-cl
|
||||
-DCMAKE_CXX_FLAGS="-O3"
|
||||
-DCMAKE_C_FLAGS="-O3"
|
||||
)
|
||||
|
||||
BUILD_TYPE="RelWithDebInfo"
|
||||
fi
|
||||
|
||||
if [ "$CCACHE" = "true" ]; then
|
||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" -DUSE_CCACHE=ON)
|
||||
fi
|
||||
[ -z "$WINDEPLOYQT" ] && { echo "WINDEPLOYQT environment variable required."; exit 1; }
|
||||
|
||||
if [ "$BUNDLE_QT" = "true" ]; then
|
||||
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[@]}" $@)
|
||||
echo $EXTRA_CMAKE_FLAGS
|
||||
|
||||
mkdir -p build && cd build
|
||||
cmake .. -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
||||
-DENABLE_QT_TRANSLATION=ON \
|
||||
-DCMAKE_BUILD_TYPE="${BUILD_TYPE:-Release}" \
|
||||
-DENABLE_QT_TRANSLATION=ON \
|
||||
-DUSE_DISCORD_PRESENCE=ON \
|
||||
-DYUZU_USE_BUNDLED_SDL2=ON \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DYUZU_TESTS=OFF \
|
||||
-DDYNARMIC_TESTS=OFF \
|
||||
-DYUZU_CMD=OFF \
|
||||
-DYUZU_ROOM_STANDALONE=OFF \
|
||||
-DYUZU_USE_QT_MULTIMEDIA=$MULTIMEDIA \
|
||||
-DYUZU_USE_QT_WEB_ENGINE=$WEBENGINE \
|
||||
-DYUZU_USE_QT_MULTIMEDIA=${USE_MULTIMEDIA:-false} \
|
||||
-DYUZU_USE_QT_WEB_ENGINE=${USE_WEBENGINE:-false} \
|
||||
-DYUZU_ENABLE_LTO=ON \
|
||||
-DCMAKE_EXE_LINKER_FLAGS=" /LTCG" \
|
||||
-DDYNARMIC_ENABLE_LTO=ON \
|
||||
"${EXTRA_CMAKE_FLAGS[@]}"
|
||||
-DYUZU_USE_BUNDLED_QT=${BUNDLE_QT:-false} \
|
||||
-DUSE_CCACHE=${CCACHE:-false} \
|
||||
-DENABLE_QT_UPDATE_CHECKER=${DEVEL:-true} \
|
||||
"${EXTRA_CMAKE_FLAGS[@]}" \
|
||||
"$@"
|
||||
|
||||
ninja
|
||||
|
||||
|
@ -62,4 +48,5 @@ rm -f bin/*.pdb
|
|||
set -e
|
||||
|
||||
$WINDEPLOYQT --release --no-compiler-runtime --no-opengl-sw --no-system-dxc-compiler --no-system-d3d-compiler --dir pkg bin/eden.exe
|
||||
|
||||
cp bin/* pkg
|
||||
|
|
60
.ci/windows/install-msvc.ps1
Executable file
|
@ -0,0 +1,60 @@
|
|||
# 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_community.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"
|
||||
|
||||
$Arguments = @(
|
||||
"--quiet", # Suppress installer UI
|
||||
"--wait", # Wait for installation to complete
|
||||
"--norestart", # Prevent automatic restart
|
||||
"--force", # Force installation even if components are already installed
|
||||
"--add Microsoft.VisualStudio.Workload.NativeDesktop", # Desktop development with C++
|
||||
"--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64", # Core C++ compiler/tools for x86/x64
|
||||
"--add Microsoft.VisualStudio.Component.Windows11SDK.26100",# Windows 11 SDK (26100)
|
||||
"--add Microsoft.VisualStudio.Component.Windows10SDK.19041",# Windows 10 SDK (19041)
|
||||
"--add Microsoft.VisualStudio.Component.VC.Llvm.Clang", # LLVM Clang compiler
|
||||
"--add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset", # LLVM Clang integration toolset
|
||||
"--add Microsoft.VisualStudio.Component.Windows11SDK.22621",# Windows 11 SDK (22621)
|
||||
"--add Microsoft.VisualStudio.Component.VC.CMake.Project", # CMake project support
|
||||
"--add Microsoft.VisualStudio.ComponentGroup.VC.Tools.142.x86.x64", # VC++ 14.2 toolset
|
||||
"--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang" # LLVM Clang for native desktop
|
||||
)
|
||||
|
||||
Write-Host "Installing Visual Studio Build Tools"
|
||||
$InstallProcess = Start-Process -FilePath $Destination -NoNewWindow -PassThru -ArgumentList $Arguments
|
||||
|
||||
# Spinner while installing
|
||||
$Spinner = "|/-\"
|
||||
$i = 0
|
||||
while (-not $InstallProcess.HasExited) {
|
||||
Write-Host -NoNewline ("`rInstalling... " + $Spinner[$i % $Spinner.Length])
|
||||
Start-Sleep -Milliseconds 250
|
||||
$i++
|
||||
}
|
||||
|
||||
# Clear spinner line
|
||||
Write-Host "`rSetup completed! "
|
||||
|
||||
$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"
|
||||
|
||||
# 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"
|
||||
$ExeFile = "vulkansdk-windows-X64-$VulkanSDKVer.exe"
|
||||
$Uri = "https://sdk.lunarg.com/sdk/download/$VulkanSDKVer/windows/$ExeFile"
|
||||
|
|
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
|
@ -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
|
@ -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})
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
From e59d30b7b12e1d04cc2fc9c6219e35bda447c17e Mon Sep 17 00:00:00 2001
|
||||
From: Lizzie <159065448+Lizzie841@users.noreply.github.com>
|
||||
Date: Fri, 16 May 2025 04:12:13 +0100
|
||||
Subject: [PATCH] Update CMakeLists.txt
|
||||
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b5f4c4f..c5c6f31 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -24,7 +24,7 @@ target_include_directories(
|
||||
|
||||
target_compile_features(unordered_dense INTERFACE cxx_std_17)
|
||||
|
||||
-if(_unordered_dense_is_toplevel_project)
|
||||
+if(_unordered_dense_is_toplevel_project OR UNORDERED_DENSE_INSTALL)
|
||||
# locations are provided by GNUInstallDirs
|
||||
install(
|
||||
TARGETS unordered_dense
|
21
.tx/config
Executable file
|
@ -0,0 +1,21 @@
|
|||
[main]
|
||||
host = https://app.transifex.com
|
||||
|
||||
[o:edenemu:p:eden-emulator:r:android-translations]
|
||||
file_filter = src/android/app/src/main/res/values-<lang>/strings.xml
|
||||
source_file = src/android/app/src/main/res/values/strings.xml
|
||||
type = ANDROID
|
||||
minimum_perc = 0
|
||||
resource_name = Android Translations
|
||||
replace_edited_strings = false
|
||||
keep_translations = false
|
||||
lang_map = zh_CN: zh-rCN, zh_TW: zh-rTW, pt_BR: pt-rBR, pt_PT: pt-rPT, vi_VN: vi, ku: ckb, ja_JP: ja, ko_KR: ko, ru_RU: ru
|
||||
|
||||
[o:edenemu:p:eden-emulator:r:qt-translations]
|
||||
file_filter = dist/languages/<lang>.ts
|
||||
source_file = dist/languages/en.ts
|
||||
type = QT
|
||||
minimum_perc = 0
|
||||
resource_name = Qt Translations
|
||||
replace_edited_strings = false
|
||||
keep_translations = false
|
446
CMakeLists.txt
|
@ -15,6 +15,21 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
|||
set(PLATFORM_LINUX ON)
|
||||
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}/externals/cmake-modules")
|
||||
if (PLATFORM_SUN)
|
||||
|
@ -29,6 +44,84 @@ if (PLATFORM_SUN)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# Needed for FFmpeg w/ VAAPI and DRM
|
||||
if (PLATFORM_OPENBSD)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/X11R6/include")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/X11R6/include")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/X11R6/lib")
|
||||
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)
|
||||
|
||||
include(DownloadExternals)
|
||||
|
@ -36,7 +129,7 @@ include(CMakeDependentOption)
|
|||
include(CTest)
|
||||
|
||||
# Disable Warnings as Errors for MSVC
|
||||
if (MSVC)
|
||||
if (MSVC AND NOT CXX_CLANG)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /WX-")
|
||||
endif()
|
||||
|
||||
|
@ -46,77 +139,94 @@ endif()
|
|||
|
||||
# Set bundled sdl2/qt as dependent options.
|
||||
# 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 OFF)
|
||||
|
||||
if (MSVC OR ANDROID)
|
||||
set(EXT_DEFAULT ON)
|
||||
if (ENABLE_SDL2)
|
||||
# TODO(crueter): Cleanup, each dep that has a bundled option should allow to choose between bundled, external, system
|
||||
cmake_dependent_option(YUZU_USE_EXTERNAL_SDL2 "Compile external SDL2" OFF "NOT MSVC" OFF)
|
||||
option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MSVC}")
|
||||
endif()
|
||||
|
||||
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)
|
||||
|
||||
option(ENABLE_OPENGL "Enable OpenGL" ON)
|
||||
mark_as_advanced(FORCE ENABLE_OPENGL)
|
||||
|
||||
option(ENABLE_QT "Enable the Qt frontend" ON)
|
||||
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
|
||||
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)
|
||||
|
||||
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_WIFI_SCAN "Enable WiFi scanning" OFF)
|
||||
|
||||
option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" ${EXT_DEFAULT})
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES "Use Vulkan Utility Headers from externals" ${EXT_DEFAULT})
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS "Use SPIRV-Tools from externals" ${EXT_DEFAULT})
|
||||
|
||||
cmake_dependent_option(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF)
|
||||
option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF)
|
||||
|
||||
option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF)
|
||||
|
||||
set(YUZU_QT_MIRROR "" CACHE STRING "What mirror to use for downloading the bundled Qt libraries")
|
||||
|
||||
option(ENABLE_CUBEB "Enables the cubeb audio backend" ON)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF "ENABLE_QT" OFF)
|
||||
set(EXT_DEFAULT OFF)
|
||||
if (MSVC OR ANDROID)
|
||||
set(EXT_DEFAULT ON)
|
||||
endif()
|
||||
option(YUZU_USE_CPM "Use CPM to fetch system dependencies (fmt, boost, etc) if needed. Externals will still be fetched." ${EXT_DEFAULT})
|
||||
|
||||
option(ENABLE_MICROPROFILE "Enables microprofile capabilities" OFF)
|
||||
option(YUZU_USE_BUNDLED_FFMPEG "Download bundled FFmpeg" ${EXT_DEFAULT})
|
||||
cmake_dependent_option(YUZU_USE_EXTERNAL_FFMPEG "Build FFmpeg from source" OFF "NOT WIN32 AND NOT ANDROID" OFF)
|
||||
|
||||
cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID" OFF)
|
||||
|
||||
cmake_dependent_option(ENABLE_OPENGL "Enable OpenGL" ON "NOT WIN32 OR NOT ARCHITECTURE_arm64" OFF)
|
||||
mark_as_advanced(FORCE ENABLE_OPENGL)
|
||||
|
||||
option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
|
||||
option(ENABLE_WIFI_SCAN "Enable WiFi scanning" OFF)
|
||||
|
||||
cmake_dependent_option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF "ENABLE_QT" OFF)
|
||||
|
||||
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" OFF)
|
||||
if (YUZU_USE_PRECOMPILED_HEADERS)
|
||||
message(STATUS "Using Precompiled Headers.")
|
||||
set(CMAKE_PCH_INSTANTIATE_TEMPLATES ON)
|
||||
endif()
|
||||
option(YUZU_ENABLE_LTO "Enable link-time optimization" OFF)
|
||||
if(YUZU_ENABLE_LTO)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT COMPILER_SUPPORTS_LTO)
|
||||
if(NOT COMPILER_SUPPORTS_LTO)
|
||||
message(FATAL_ERROR "Your compiler does not support interprocedural optimization (IPO). Re-run CMake with -DYUZU_ENABLE_LTO=OFF.")
|
||||
endif()
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ${COMPILER_SUPPORTS_LTO})
|
||||
endif()
|
||||
option(USE_CCACHE "Use ccache for compilation" OFF)
|
||||
set(CCACHE_PATH "ccache" CACHE STRING "Path to ccache binary")
|
||||
if(USE_CCACHE)
|
||||
find_program(CCACHE_BINARY ${CCACHE_PATH})
|
||||
if(CCACHE_BINARY)
|
||||
message(STATUS "Found ccache at: ${CCACHE_BINARY}")
|
||||
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_BINARY})
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_BINARY})
|
||||
if (YUZU_USE_PRECOMPILED_HEADERS)
|
||||
message(FATAL_ERROR "Precompiled headers are incompatible with ccache. Re-run CMake with -DYUZU_USE_PRECOMPILED_HEADERS=OFF.")
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "USE_CCACHE enabled, but no executable found at: ${CCACHE_PATH}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# TODO(crueter): CI this?
|
||||
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)
|
||||
cmake_dependent_option(YUZU_ROOM "Enable dedicated room functionality" ON "NOT ANDROID" OFF)
|
||||
cmake_dependent_option(YUZU_ROOM_STANDALONE "Enable standalone room executable" ON "YUZU_ROOM" 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)
|
||||
option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MSVC}")
|
||||
endif()
|
||||
cmake_dependent_option(YUZU_CMD "Compile the eden-cli executable" ON "ENABLE_SDL2;NOT ANDROID" OFF)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_ROOM "Enable dedicated room functionality" ON "NOT ANDROID" 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 "ENABLE_SDL2;NOT ANDROID" OFF)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile crash dump (Minidump) support" OFF "WIN32 OR PLATFORM_LINUX OR PLATFORM_SUN" OFF)
|
||||
|
||||
option(YUZU_ENABLE_LTO "Enable link-time optimization" OFF)
|
||||
cmake_dependent_option(YUZU_CRASH_DUMPS "Compile crash dump (Minidump) support" OFF "WIN32 OR LINUX OR PLATFORM_SUN" OFF)
|
||||
|
||||
option(YUZU_DOWNLOAD_TIME_ZONE_DATA "Always download time zone binaries" ON)
|
||||
set(YUZU_TZDB_PATH "" CACHE STRING "Path to a pre-downloaded timezone database")
|
||||
|
||||
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 "LINUX" OFF)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead of the bundled one)" OFF "APPLE" OFF)
|
||||
cmake_dependent_option(YUZU_APPLE_USE_BUNDLED_MONTENVK "Download bundled MoltenVK lib" ON "APPLE" OFF)
|
||||
|
||||
option(YUZU_DISABLE_LLVM "Disable LLVM (useful for CI)" OFF)
|
||||
|
||||
set(DEFAULT_ENABLE_OPENSSL ON)
|
||||
if (ANDROID OR WIN32 OR APPLE OR PLATFORM_SUN)
|
||||
|
@ -128,24 +238,22 @@ if (ANDROID OR WIN32 OR APPLE OR PLATFORM_SUN)
|
|||
# your own copy of it.
|
||||
set(DEFAULT_ENABLE_OPENSSL OFF)
|
||||
endif()
|
||||
|
||||
if (ENABLE_WEB_SERVICE)
|
||||
set(DEFAULT_ENABLE_OPENSSL ON)
|
||||
endif()
|
||||
|
||||
option(ENABLE_OPENSSL "Enable OpenSSL backend for ISslConnection" ${DEFAULT_ENABLE_OPENSSL})
|
||||
|
||||
if (ENABLE_OPENSSL)
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_OPENSSL "Download bundled OpenSSL build" "${MSVC}" "NOT ANDROID" ON)
|
||||
cmake_dependent_option(YUZU_USE_BUNDLED_OPENSSL "Download bundled OpenSSL build" "${MSVC}" "NOT ANDROID" ON)
|
||||
endif()
|
||||
|
||||
if (ANDROID AND YUZU_DOWNLOAD_ANDROID_VVL)
|
||||
set(vvl_version "sdk-1.3.261.1")
|
||||
# TODO(crueter): CPM this
|
||||
set(vvl_version "1.4.321.0")
|
||||
set(vvl_zip_file "${CMAKE_BINARY_DIR}/externals/vvl-android.zip")
|
||||
if (NOT EXISTS "${vvl_zip_file}")
|
||||
# Download and extract validation layer release to externals directory
|
||||
set(vvl_base_url "https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases/download")
|
||||
file(DOWNLOAD "${vvl_base_url}/${vvl_version}/android-binaries-${vvl_version}-android.zip"
|
||||
file(DOWNLOAD "${vvl_base_url}/vulkan-sdk-${vvl_version}/android-binaries-${vvl_version}.zip"
|
||||
"${vvl_zip_file}" SHOW_PROGRESS)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${vvl_zip_file}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
|
||||
|
@ -162,21 +270,6 @@ if (ANDROID)
|
|||
set(CMAKE_POLICY_VERSION_MINIMUM 3.5) # Workaround for Oboe
|
||||
endif()
|
||||
|
||||
if (YUZU_USE_PRECOMPILED_HEADERS)
|
||||
if (MSVC AND CCACHE)
|
||||
# buildcache does not properly cache PCH files, leading to compilation errors.
|
||||
# See https://github.com/mbitsnbites/buildcache/discussions/230
|
||||
message(WARNING "buildcache does not properly support Precompiled Headers. Disabling PCH")
|
||||
set(DYNARMIC_USE_PRECOMPILED_HEADERS OFF CACHE BOOL "" FORCE)
|
||||
set(YUZU_USE_PRECOMPILED_HEADERS OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (YUZU_USE_PRECOMPILED_HEADERS)
|
||||
message(STATUS "Using Precompiled Headers.")
|
||||
set(CMAKE_PCH_INSTANTIATE_TEMPLATES ON)
|
||||
endif()
|
||||
|
||||
# Default to a Release build
|
||||
get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
if (NOT IS_MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE)
|
||||
|
@ -212,54 +305,6 @@ if (NOT EXISTS ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.
|
|||
file(WRITE ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json "")
|
||||
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_compile_definitions(ARCHITECTURE_${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_compile_definitions(ARCHITECTURE_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)
|
||||
add_compile_definitions(YUZU_UNIX=1)
|
||||
endif()
|
||||
|
@ -267,6 +312,7 @@ endif()
|
|||
if (ARCHITECTURE_arm64 AND (ANDROID OR PLATFORM_LINUX))
|
||||
set(HAS_NCE 1)
|
||||
add_compile_definitions(HAS_NCE=1)
|
||||
find_package(oaknut 2.0.1)
|
||||
endif()
|
||||
|
||||
if (YUZU_ROOM)
|
||||
|
@ -274,7 +320,7 @@ if (YUZU_ROOM)
|
|||
endif()
|
||||
|
||||
# Build/optimization presets
|
||||
if (PLATFORM_LINUX)
|
||||
if (PLATFORM_LINUX OR CXX_CLANG)
|
||||
if (ARCHITECTURE_x86_64)
|
||||
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")
|
||||
|
@ -336,11 +382,13 @@ if (YUZU_USE_CPM)
|
|||
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
set(BUILD_TESTING OFF)
|
||||
set(ENABLE_TESTING OFF)
|
||||
|
||||
# TODO(crueter): renderdoc?
|
||||
|
||||
# boost
|
||||
set(BOOST_INCLUDE_LIBRARIES algorithm icl pool container heap asio headers process filesystem crc variant)
|
||||
|
||||
AddJsonPackage(boost)
|
||||
|
||||
# really annoying thing where boost::headers doesn't work with cpm
|
||||
|
@ -350,13 +398,10 @@ if (YUZU_USE_CPM)
|
|||
if (Boost_ADDED)
|
||||
if (MSVC OR ANDROID)
|
||||
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()
|
||||
|
||||
if (NOT MSVC)
|
||||
if (NOT MSVC OR CXX_CLANG)
|
||||
# boost sucks
|
||||
# Solaris (and probably other NIXes) need explicit pthread definition
|
||||
if (PLATFORM_SUN)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthreads")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthreads")
|
||||
|
@ -407,12 +452,53 @@ if (YUZU_USE_CPM)
|
|||
target_include_directories(enet INTERFACE ${enet_SOURCE_DIR}/include)
|
||||
endif()
|
||||
|
||||
if (NOT TARGET enet::enet)
|
||||
add_library(enet::enet ALIAS enet)
|
||||
endif()
|
||||
|
||||
# Opus
|
||||
AddJsonPackage(opus)
|
||||
|
||||
if (Opus_ADDED)
|
||||
if (MSVC AND CXX_CLANG)
|
||||
target_compile_options(opus PRIVATE
|
||||
-Wno-implicit-function-declaration
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT TARGET Opus::opus)
|
||||
add_library(Opus::opus ALIAS opus)
|
||||
endif()
|
||||
|
||||
# VulkanUtilityHeaders - pulls in headers and utility libs
|
||||
AddJsonPackage(vulkan-utility-headers)
|
||||
|
||||
# small hack
|
||||
if (NOT VulkanUtilityLibraries_ADDED)
|
||||
find_package(VulkanHeaders 1.3.274 REQUIRED)
|
||||
endif()
|
||||
|
||||
# SPIRV Headers
|
||||
AddJsonPackage(spirv-headers)
|
||||
|
||||
# SPIRV Tools
|
||||
AddJsonPackage(spirv-tools)
|
||||
|
||||
if (SPIRV-Tools_ADDED)
|
||||
add_library(SPIRV-Tools::SPIRV-Tools ALIAS SPIRV-Tools-static)
|
||||
target_link_libraries(SPIRV-Tools-static PRIVATE SPIRV-Tools-opt SPIRV-Tools-link)
|
||||
endif()
|
||||
|
||||
# mbedtls
|
||||
AddJsonPackage(mbedtls)
|
||||
else()
|
||||
# Enforce the search mode of non-required packages for better and shorter failure messages
|
||||
find_package(fmt 8 REQUIRED)
|
||||
find_package(LLVM MODULE COMPONENTS Demangle)
|
||||
if (NOT YUZU_DISABLE_LLVM)
|
||||
find_package(LLVM MODULE COMPONENTS Demangle)
|
||||
endif()
|
||||
|
||||
find_package(nlohmann_json 3.8 REQUIRED)
|
||||
find_package(lz4 REQUIRED)
|
||||
find_package(RenderDoc MODULE)
|
||||
|
@ -422,6 +508,32 @@ else()
|
|||
find_package(ZLIB 1.2 REQUIRED)
|
||||
find_package(zstd 1.5 REQUIRED MODULE)
|
||||
|
||||
# wow
|
||||
if (PLATFORM_LINUX)
|
||||
find_package(Boost 1.57.0 REQUIRED headers context system fiber)
|
||||
else()
|
||||
find_package(Boost 1.57.0 REQUIRED)
|
||||
endif()
|
||||
|
||||
# OpenBSD does not package mbedtls3 (only 2)
|
||||
if (PLATFORM_OPENBSD)
|
||||
AddJsonPackage(mbedtls)
|
||||
else()
|
||||
find_package(MbedTLS 3 REQUIRED)
|
||||
endif()
|
||||
|
||||
find_package(VulkanUtilityLibraries REQUIRED)
|
||||
find_package(VulkanHeaders 1.3.274 REQUIRED)
|
||||
|
||||
# FreeBSD does not package spirv-headers
|
||||
if (PLATFORM_FREEBSD)
|
||||
AddJsonPackage(spirv-headers)
|
||||
else()
|
||||
find_package(SPIRV-Headers 1.3.274 REQUIRED)
|
||||
endif()
|
||||
|
||||
find_package(SPIRV-Tools MODULE REQUIRED)
|
||||
|
||||
if (YUZU_TESTS)
|
||||
find_package(Catch2 3.0.1 REQUIRED)
|
||||
endif()
|
||||
|
@ -441,6 +553,10 @@ endif()
|
|||
|
||||
# DiscordRPC
|
||||
if (USE_DISCORD_PRESENCE)
|
||||
if (ARCHITECTURE_arm64)
|
||||
add_compile_definitions(RAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN)
|
||||
endif()
|
||||
|
||||
AddJsonPackage(discord-rpc)
|
||||
|
||||
target_include_directories(discord-rpc INTERFACE ${discord-rpc_SOURCE_DIR}/include)
|
||||
|
@ -475,6 +591,10 @@ if(ENABLE_CUBEB)
|
|||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT TARGET cubeb::cubeb)
|
||||
add_library(cubeb::cubeb ALIAS cubeb)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# find SDL2 exports a bunch of variables that are needed, so its easier to do this outside of the YUZU_find_package
|
||||
|
@ -543,10 +663,12 @@ endfunction()
|
|||
add_subdirectory(externals)
|
||||
|
||||
# pass targets from externals
|
||||
find_package(VulkanUtilityLibraries)
|
||||
find_package(libusb)
|
||||
find_package(VulkanMemoryAllocator)
|
||||
find_package(SPIRV-Tools)
|
||||
|
||||
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
|
||||
find_package(xbyak)
|
||||
endif()
|
||||
|
||||
if (ENABLE_WEB_SERVICE)
|
||||
find_package(httplib)
|
||||
|
@ -556,10 +678,6 @@ if (ENABLE_WEB_SERVICE OR ENABLE_QT_UPDATE_CHECKER)
|
|||
find_package(cpp-jwt)
|
||||
endif()
|
||||
|
||||
if (ENABLE_SDL2)
|
||||
find_package(SDL2)
|
||||
endif()
|
||||
|
||||
if (ENABLE_QT)
|
||||
if (YUZU_USE_BUNDLED_QT)
|
||||
download_qt(6.8.3)
|
||||
|
@ -632,9 +750,8 @@ if (UNIX AND NOT APPLE AND NOT ANDROID)
|
|||
pkg_check_modules(LIBVA libva)
|
||||
endif()
|
||||
|
||||
if (NOT YUZU_USE_BUNDLED_FFMPEG)
|
||||
if (NOT (YUZU_USE_BUNDLED_FFMPEG OR YUZU_USE_EXTERNAL_FFMPEG))
|
||||
# Use system installed FFmpeg
|
||||
#find_package(FFmpeg 4.3 REQUIRED QUIET COMPONENTS ${FFmpeg_COMPONENTS})
|
||||
find_package(FFmpeg REQUIRED QUIET COMPONENTS ${FFmpeg_COMPONENTS})
|
||||
|
||||
# TODO(crueter): Version
|
||||
|
@ -749,18 +866,67 @@ if (MSVC AND CMAKE_GENERATOR STREQUAL "Ninja")
|
|||
)
|
||||
endif()
|
||||
|
||||
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.
|
||||
# Try to pick a faster linker.
|
||||
find_program(LLD lld)
|
||||
find_program(MOLD mold)
|
||||
# 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()
|
||||
|
||||
if (MOLD AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "12.1")
|
||||
message(NOTICE "Selecting mold as linker")
|
||||
add_link_options("-fuse-ld=mold")
|
||||
elseif (LLD)
|
||||
message(NOTICE "Selecting lld as linker")
|
||||
add_link_options("-fuse-ld=lld")
|
||||
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()
|
||||
|
||||
#[[
|
||||
search order:
|
||||
- gold (GCC only) - the best, generally, but unfortunately not packaged anymore
|
||||
- mold (GCC only) - generally does well on GCC
|
||||
- ldd - preferred on clang
|
||||
- bfd - the final fallback
|
||||
- If none are found (macOS uses ld.prime, etc) just use the default linker
|
||||
]]
|
||||
if (YUZU_USE_FASTER_LD)
|
||||
find_program(LINKER_BFD bfd)
|
||||
if (LINKER_BFD)
|
||||
set(LINKER bfd)
|
||||
endif()
|
||||
|
||||
find_program(LINKER_LLD lld)
|
||||
if (LINKER_LLD)
|
||||
set(LINKER lld)
|
||||
endif()
|
||||
|
||||
if (CXX_GCC)
|
||||
find_program(LINKER_MOLD mold)
|
||||
if (LINKER_MOLD AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "12.1")
|
||||
set(LINKER mold)
|
||||
endif()
|
||||
|
||||
find_program(LINKER_GOLD gold)
|
||||
if (LINKER_GOLD)
|
||||
set(LINKER gold)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (LINKER)
|
||||
message(NOTICE "Selecting ${LINKER} as linker")
|
||||
add_link_options("-fuse-ld=${LINKER}")
|
||||
else()
|
||||
message(WARNING "No faster linker found--using default")
|
||||
endif()
|
||||
|
||||
if (LINKER STREQUAL "lld" AND CXX_GCC)
|
||||
message(WARNING "Using lld on GCC may cause issues with certain LTO settings. If the program fails to compile, disable YUZU_USE_FASTER_LD, or install mold or GNU gold.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
@ -1,17 +1,6 @@
|
|||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# SPDX-FileCopyrightText: Copyright 2025 crueter
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Created-By: crueter
|
||||
# Docs will come at a later date, mostly this is to just reduce boilerplate
|
||||
# and some cmake magic to allow for runtime viewing of dependency versions
|
||||
|
||||
# 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?
|
||||
|
||||
# TODO(crueter): Remember to get more than 6 hours of sleep whenever making giant cmake changes
|
||||
if (MSVC OR ANDROID)
|
||||
set(BUNDLED_DEFAULT ON)
|
||||
else()
|
||||
|
@ -27,6 +16,7 @@ option(CPMUTIL_FORCE_SYSTEM
|
|||
cmake_minimum_required(VERSION 3.22)
|
||||
include(CPM)
|
||||
|
||||
# cpmfile parsing
|
||||
set(CPMUTIL_JSON_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cpmfile.json")
|
||||
|
||||
if (EXISTS ${CPMUTIL_JSON_FILE})
|
||||
|
@ -35,12 +25,11 @@ else()
|
|||
message(WARNING "[CPMUtil] cpmfile ${CPMUTIL_JSON_FILE} does not exist, AddJsonPackage will be a no-op")
|
||||
endif()
|
||||
|
||||
# utility
|
||||
# Utility stuff
|
||||
function(cpm_utils_message level name message)
|
||||
message(${level} "[CPMUtil] ${name}: ${message}")
|
||||
endfunction()
|
||||
|
||||
# utility
|
||||
function(array_to_list array length out)
|
||||
math(EXPR range "${length} - 1")
|
||||
|
||||
|
@ -53,7 +42,6 @@ function(array_to_list array length out)
|
|||
set("${out}" "${NEW_LIST}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# utility
|
||||
function(get_json_element object out member default)
|
||||
string(JSON out_type ERROR_VARIABLE err TYPE "${object}" ${member})
|
||||
|
||||
|
@ -73,14 +61,13 @@ function(get_json_element object out member default)
|
|||
set("${out}" "${outvar}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Kinda cancerous but whatever
|
||||
# The preferred usage
|
||||
function(AddJsonPackage)
|
||||
set(oneValueArgs
|
||||
NAME
|
||||
|
||||
# these are overrides that can be generated at runtime, so can be defined separately from the json
|
||||
DOWNLOAD_ONLY
|
||||
SYSTEM_PACKAGE
|
||||
BUNDLED_PACKAGE
|
||||
)
|
||||
|
||||
|
@ -90,6 +77,7 @@ function(AddJsonPackage)
|
|||
"${ARGN}")
|
||||
|
||||
list(LENGTH ARGN argnLength)
|
||||
|
||||
# single name argument
|
||||
if(argnLength EQUAL 1)
|
||||
set(JSON_NAME "${ARGV0}")
|
||||
|
@ -138,6 +126,15 @@ function(AddJsonPackage)
|
|||
DISABLED_PLATFORMS ${disabled_platforms}
|
||||
CMAKE_FILENAME ${cmake_filename}
|
||||
)
|
||||
|
||||
# pass stuff to parent scope
|
||||
set(${package}_ADDED "${${package}_ADDED}"
|
||||
PARENT_SCOPE)
|
||||
set(${package}_SOURCE_DIR "${${package}_SOURCE_DIR}"
|
||||
PARENT_SCOPE)
|
||||
set(${package}_BINARY_DIR "${${package}_BINARY_DIR}"
|
||||
PARENT_SCOPE)
|
||||
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
@ -200,7 +197,6 @@ function(AddJsonPackage)
|
|||
endif()
|
||||
|
||||
set(options ${options} ${JSON_OPTIONS})
|
||||
|
||||
# end options
|
||||
|
||||
# system/bundled
|
||||
|
@ -254,7 +250,7 @@ endfunction()
|
|||
function(AddPackage)
|
||||
cpm_set_policies()
|
||||
|
||||
# TODO(crueter): docs, git clone
|
||||
# TODO(crueter): git clone?
|
||||
|
||||
#[[
|
||||
URL configurations, descending order of precedence:
|
||||
|
@ -627,11 +623,8 @@ function(AddCIPackage)
|
|||
if (DEFINED ARTIFACT_DIR)
|
||||
include(${ARTIFACT_DIR}/${ARTIFACT_CMAKE}.cmake)
|
||||
|
||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_NAMES ${ARTIFACT_NAME})
|
||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_URLS "https://github.com/${ARTIFACT_REPO}") # TODO(crueter) other hosts?
|
||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS ${ARTIFACT_VERSION})
|
||||
|
||||
set(${ARTIFACT_PACKAGE}_ADDED TRUE PARENT_SCOPE)
|
||||
set(${ARTIFACT_PACKAGE}_SOURCE_DIR "${ARTIFACT_DIR}" PARENT_SCOPE)
|
||||
else()
|
||||
find_package(${ARTIFACT_PACKAGE} ${ARTIFACT_MIN_VERSION} REQUIRED)
|
||||
endif()
|
||||
|
|
|
@ -10,11 +10,19 @@ function(download_bundled_external remote_path lib_name cpm_key prefix_var versi
|
|||
set(package_base_url "https://github.com/eden-emulator/")
|
||||
set(package_repo "no_platform")
|
||||
set(package_extension "no_platform")
|
||||
set(CACHE_KEY "")
|
||||
|
||||
# TODO(crueter): Need to convert ffmpeg to a CI.
|
||||
if (WIN32 OR FORCE_WIN_ARCHIVES)
|
||||
set(CACHE_KEY "windows")
|
||||
set(package_repo "ext-windows-bin/raw/master/")
|
||||
set(package_extension ".7z")
|
||||
if (ARCHITECTURE_arm64)
|
||||
set(CACHE_KEY "windows")
|
||||
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")
|
||||
set(CACHE_KEY "linux")
|
||||
set(package_repo "ext-linux-bin/raw/master/")
|
||||
|
@ -26,8 +34,9 @@ function(download_bundled_external remote_path lib_name cpm_key prefix_var versi
|
|||
else()
|
||||
message(FATAL_ERROR "No package available for this platform")
|
||||
endif()
|
||||
set(package_url "${package_base_url}${package_repo}")
|
||||
set(full_url ${package_url}${remote_path}${lib_name}${package_extension})
|
||||
string(CONCAT package_url "${package_base_url}" "${package_repo}")
|
||||
string(CONCAT full_url "${package_url}" "${remote_path}" "${lib_name}" "${package_extension}")
|
||||
message(STATUS "Resolved bundled URL: ${full_url}")
|
||||
|
||||
# TODO(crueter): DELETE THIS ENTIRELY, GLORY BE TO THE CI!
|
||||
AddPackage(
|
||||
|
@ -40,35 +49,12 @@ function(download_bundled_external remote_path lib_name cpm_key prefix_var versi
|
|||
# TODO(crueter): hash
|
||||
)
|
||||
|
||||
set(${prefix_var} "${${cpm_key}_SOURCE_DIR}" PARENT_SCOPE)
|
||||
message(STATUS "Using bundled binaries at ${${cpm_key}_SOURCE_DIR}")
|
||||
endfunction()
|
||||
|
||||
function(download_win_archives)
|
||||
set(FORCE_WIN_ARCHIVES ON)
|
||||
set(FFmpeg_EXT_NAME "ffmpeg-7.1.1")
|
||||
|
||||
download_bundled_external("ffmpeg/" ${FFmpeg_EXT_NAME} "ffmpeg-bundled" "" 7.1.1)
|
||||
|
||||
set(FORCE_WIN_ARCHIVES OFF)
|
||||
endfunction()
|
||||
|
||||
function(download_moltenvk_external platform version)
|
||||
set(MOLTENVK_DIR "${CMAKE_BINARY_DIR}/externals/MoltenVK")
|
||||
set(MOLTENVK_TAR "${CMAKE_BINARY_DIR}/externals/MoltenVK.tar")
|
||||
if (NOT EXISTS ${MOLTENVK_DIR})
|
||||
if (NOT EXISTS ${MOLTENVK_TAR})
|
||||
file(DOWNLOAD https://github.com/KhronosGroup/MoltenVK/releases/download/${version}/MoltenVK-${platform}.tar
|
||||
${MOLTENVK_TAR} SHOW_PROGRESS)
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${MOLTENVK_TAR}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
|
||||
if (DEFINED ${cpm_key}_SOURCE_DIR)
|
||||
set(${prefix_var} "${${cpm_key}_SOURCE_DIR}" PARENT_SCOPE)
|
||||
message(STATUS "Using bundled binaries at ${${cpm_key}_SOURCE_DIR}")
|
||||
else()
|
||||
message(FATAL_ERROR "AddPackage did not set ${cpm_key}_SOURCE_DIR")
|
||||
endif()
|
||||
|
||||
# Add the MoltenVK library path to the prefix so find_library can locate it.
|
||||
list(APPEND CMAKE_PREFIX_PATH "${MOLTENVK_DIR}/MoltenVK/dylib/${platform}")
|
||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Determine installation parameters for OS, architecture, and compiler
|
||||
|
@ -110,7 +96,7 @@ function(determine_qt_parameters target host_out type_out arch_out arch_path_out
|
|||
set(host "linux")
|
||||
set(type "desktop")
|
||||
set(arch "linux_gcc_64")
|
||||
set(arch_path "linux")
|
||||
set(arch_path "gcc_64")
|
||||
endif()
|
||||
|
||||
set(${host_out} "${host}" PARENT_SCOPE)
|
||||
|
@ -145,56 +131,79 @@ function(download_qt_configuration prefix_out target host type arch arch_path ba
|
|||
set(install_args -c "${CURRENT_MODULE_DIR}/aqt_config.ini")
|
||||
if (tool)
|
||||
set(prefix "${base_path}/Tools")
|
||||
set(install_args ${install_args} install-tool --outputdir ${base_path} ${host} desktop ${target})
|
||||
list(APPEND install_args install-tool --outputdir "${base_path}" "${host}" desktop "${target}")
|
||||
else()
|
||||
set(prefix "${base_path}/${target}/${arch_path}")
|
||||
set(install_args ${install_args} install-qt --outputdir ${base_path} ${host} ${type} ${target} ${arch} -m qt_base)
|
||||
list(APPEND install_args install-qt --outputdir "${base_path}" "${host}" "${type}" "${target}" "${arch}" -m qt_base)
|
||||
|
||||
if (YUZU_USE_QT_MULTIMEDIA)
|
||||
set(install_args ${install_args} qtmultimedia)
|
||||
list(APPEND install_args qtmultimedia)
|
||||
endif()
|
||||
|
||||
if (YUZU_USE_QT_WEB_ENGINE)
|
||||
set(install_args ${install_args} qtpositioning qtwebchannel qtwebengine)
|
||||
list(APPEND install_args qtpositioning qtwebchannel qtwebengine)
|
||||
endif()
|
||||
|
||||
if (NOT ${YUZU_QT_MIRROR} STREQUAL "")
|
||||
if (NOT "${YUZU_QT_MIRROR}" STREQUAL "")
|
||||
message(STATUS "Using Qt mirror ${YUZU_QT_MIRROR}")
|
||||
set(install_args ${install_args} -b ${YUZU_QT_MIRROR})
|
||||
list(APPEND install_args -b "${YUZU_QT_MIRROR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "Install Args ${install_args}")
|
||||
message(STATUS "Install Args: ${install_args}")
|
||||
|
||||
if (NOT EXISTS "${prefix}")
|
||||
message(STATUS "Downloading Qt binaries for ${target}:${host}:${type}:${arch}:${arch_path}")
|
||||
set(AQT_PREBUILD_BASE_URL "https://github.com/miurahr/aqtinstall/releases/download/v3.3.0")
|
||||
if (WIN32)
|
||||
set(aqt_path "${base_path}/aqt.exe")
|
||||
if (NOT EXISTS "${aqt_path}")
|
||||
file(DOWNLOAD
|
||||
${AQT_PREBUILD_BASE_URL}/aqt.exe
|
||||
${aqt_path} SHOW_PROGRESS)
|
||||
file(DOWNLOAD "${AQT_PREBUILD_BASE_URL}/aqt.exe" "${aqt_path}" SHOW_PROGRESS)
|
||||
endif()
|
||||
execute_process(COMMAND "${aqt_path}" ${install_args}
|
||||
WORKING_DIRECTORY "${base_path}"
|
||||
RESULT_VARIABLE aqt_res
|
||||
OUTPUT_VARIABLE aqt_out
|
||||
ERROR_VARIABLE aqt_err)
|
||||
if (NOT aqt_res EQUAL 0)
|
||||
message(FATAL_ERROR "aqt.exe failed: ${aqt_err}")
|
||||
endif()
|
||||
execute_process(COMMAND ${aqt_path} ${install_args}
|
||||
WORKING_DIRECTORY ${base_path})
|
||||
elseif (APPLE)
|
||||
set(aqt_path "${base_path}/aqt-macos")
|
||||
if (NOT EXISTS "${aqt_path}")
|
||||
file(DOWNLOAD
|
||||
${AQT_PREBUILD_BASE_URL}/aqt-macos
|
||||
${aqt_path} SHOW_PROGRESS)
|
||||
file(DOWNLOAD "${AQT_PREBUILD_BASE_URL}/aqt-macos" "${aqt_path}" SHOW_PROGRESS)
|
||||
endif()
|
||||
execute_process(COMMAND chmod +x "${aqt_path}")
|
||||
execute_process(COMMAND "${aqt_path}" ${install_args}
|
||||
WORKING_DIRECTORY "${base_path}"
|
||||
RESULT_VARIABLE aqt_res
|
||||
ERROR_VARIABLE aqt_err)
|
||||
if (NOT aqt_res EQUAL 0)
|
||||
message(FATAL_ERROR "aqt-macos failed: ${aqt_err}")
|
||||
endif()
|
||||
execute_process(COMMAND chmod +x ${aqt_path})
|
||||
execute_process(COMMAND ${aqt_path} ${install_args}
|
||||
WORKING_DIRECTORY ${base_path})
|
||||
else()
|
||||
find_program(PYTHON3_EXECUTABLE python3)
|
||||
if (NOT PYTHON3_EXECUTABLE)
|
||||
message(FATAL_ERROR "python3 is required to install Qt using aqt (pip mode).")
|
||||
endif()
|
||||
set(aqt_install_path "${base_path}/aqt")
|
||||
file(MAKE_DIRECTORY "${aqt_install_path}")
|
||||
|
||||
execute_process(COMMAND python3 -m pip install --target=${aqt_install_path} aqtinstall
|
||||
WORKING_DIRECTORY ${base_path})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${aqt_install_path} python3 -m aqt ${install_args}
|
||||
WORKING_DIRECTORY ${base_path})
|
||||
execute_process(COMMAND "${PYTHON3_EXECUTABLE}" -m pip install --target="${aqt_install_path}" aqtinstall
|
||||
WORKING_DIRECTORY "${base_path}"
|
||||
RESULT_VARIABLE pip_res
|
||||
ERROR_VARIABLE pip_err)
|
||||
if (NOT pip_res EQUAL 0)
|
||||
message(FATAL_ERROR "pip install aqtinstall failed: ${pip_err}")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND "${CMAKE_COMMAND}" -E env PYTHONPATH="${aqt_install_path}" "${PYTHON3_EXECUTABLE}" -m aqt ${install_args}
|
||||
WORKING_DIRECTORY "${base_path}"
|
||||
RESULT_VARIABLE aqt_res
|
||||
ERROR_VARIABLE aqt_err)
|
||||
if (NOT aqt_res EQUAL 0)
|
||||
message(FATAL_ERROR "aqt (python) failed: ${aqt_err}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "Downloaded Qt binaries for ${target}:${host}:${type}:${arch}:${arch_path} to ${prefix}")
|
||||
|
@ -212,7 +221,7 @@ endfunction()
|
|||
function(download_qt target)
|
||||
determine_qt_parameters("${target}" host type arch arch_path host_type host_arch host_arch_path)
|
||||
|
||||
get_external_prefix(qt base_path)
|
||||
set(base_path "${CMAKE_BINARY_DIR}/externals/qt")
|
||||
file(MAKE_DIRECTORY "${base_path}")
|
||||
|
||||
download_qt_configuration(prefix "${target}" "${host}" "${type}" "${arch}" "${arch_path}" "${base_path}")
|
||||
|
@ -229,26 +238,34 @@ function(download_qt target)
|
|||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(download_moltenvk)
|
||||
set(MOLTENVK_PLATFORM "macOS")
|
||||
function(download_moltenvk version platform)
|
||||
if(NOT version)
|
||||
message(FATAL_ERROR "download_moltenvk: version argument is required")
|
||||
endif()
|
||||
if(NOT platform)
|
||||
message(FATAL_ERROR "download_moltenvk: platform argument is required")
|
||||
endif()
|
||||
|
||||
set(MOLTENVK_DIR "${CMAKE_BINARY_DIR}/externals/MoltenVK")
|
||||
set(MOLTENVK_TAR "${CMAKE_BINARY_DIR}/externals/MoltenVK.tar")
|
||||
if (NOT EXISTS ${MOLTENVK_DIR})
|
||||
if (NOT EXISTS ${MOLTENVK_TAR})
|
||||
file(DOWNLOAD https://github.com/KhronosGroup/MoltenVK/releases/download/v1.2.10-rc2/MoltenVK-all.tar
|
||||
${MOLTENVK_TAR} SHOW_PROGRESS)
|
||||
endif()
|
||||
set(MOLTENVK_DIR "${CMAKE_BINARY_DIR}/externals/MoltenVK")
|
||||
set(MOLTENVK_TAR "${CMAKE_BINARY_DIR}/externals/MoltenVK.tar")
|
||||
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${MOLTENVK_TAR}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
|
||||
endif()
|
||||
if(NOT EXISTS "${MOLTENVK_DIR}")
|
||||
if(NOT EXISTS "${MOLTENVK_TAR}")
|
||||
file(DOWNLOAD "https://github.com/KhronosGroup/MoltenVK/releases/download/${version}/MoltenVK-${platform}.tar"
|
||||
"${MOLTENVK_TAR}" SHOW_PROGRESS)
|
||||
endif()
|
||||
|
||||
# Add the MoltenVK library path to the prefix so find_library can locate it.
|
||||
list(APPEND CMAKE_PREFIX_PATH "${MOLTENVK_DIR}/MoltenVK/dylib/${MOLTENVK_PLATFORM}")
|
||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xf "${MOLTENVK_TAR}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals"
|
||||
RESULT_VARIABLE tar_res
|
||||
ERROR_VARIABLE tar_err
|
||||
)
|
||||
if(NOT tar_res EQUAL 0)
|
||||
message(FATAL_ERROR "Extracting MoltenVK failed: ${tar_err}")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND CMAKE_PREFIX_PATH "${MOLTENVK_DIR}/MoltenVK/dylib/${platform}")
|
||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(get_external_prefix lib_name prefix_var)
|
||||
set(${prefix_var} "${CMAKE_BINARY_DIR}/externals/${lib_name}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
# 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
|
||||
)
|
|
@ -1,38 +1,37 @@
|
|||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Gets a UTC timestamp and sets the provided variable to it
|
||||
# generate git/build information
|
||||
include(GetSCMRev)
|
||||
|
||||
function(get_timestamp _var)
|
||||
string(TIMESTAMP timestamp UTC)
|
||||
set(${_var} "${timestamp}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# generate git/build information
|
||||
include(GetGitRevisionDescription)
|
||||
if(NOT GIT_REF_SPEC)
|
||||
get_git_head_revision(GIT_REF_SPEC GIT_REV)
|
||||
endif()
|
||||
if(NOT GIT_DESC)
|
||||
git_describe(GIT_DESC --always --long --dirty)
|
||||
endif()
|
||||
if (NOT GIT_BRANCH)
|
||||
git_branch_name(GIT_BRANCH)
|
||||
endif()
|
||||
get_timestamp(BUILD_DATE)
|
||||
|
||||
git_get_exact_tag(GIT_TAG --tags)
|
||||
if (GIT_TAG MATCHES "NOTFOUND")
|
||||
set(BUILD_VERSION "${GIT_DESC}")
|
||||
set(IS_DEV_BUILD true)
|
||||
else()
|
||||
set(BUILD_VERSION ${GIT_TAG})
|
||||
if (DEFINED GIT_RELEASE)
|
||||
set(BUILD_VERSION "${GIT_TAG}")
|
||||
set(GIT_REFSPEC "${GIT_RELEASE}")
|
||||
set(IS_DEV_BUILD false)
|
||||
else()
|
||||
string(SUBSTRING ${GIT_COMMIT} 0 10 BUILD_VERSION)
|
||||
set(BUILD_VERSION "${BUILD_VERSION}-${GIT_REFSPEC}")
|
||||
set(IS_DEV_BUILD true)
|
||||
endif()
|
||||
|
||||
set(GIT_DESC ${BUILD_VERSION})
|
||||
|
||||
# Generate cpp with Git revision from template
|
||||
# Also if this is a CI build, add the build name (ie: Nightly, Canary) to the scm_rev file as well
|
||||
set(REPO_NAME "Eden")
|
||||
set(BUILD_ID ${GIT_BRANCH})
|
||||
set(BUILD_ID ${GIT_REFSPEC})
|
||||
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)
|
||||
|
|
49
CMakeModules/GetSCMRev.cmake
Normal file
|
@ -0,0 +1,49 @@
|
|||
# SPDX-FileCopyrightText: 2025 crueter
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
include(GetGitRevisionDescription)
|
||||
|
||||
function(trim var)
|
||||
string(REGEX REPLACE "\n" "" new "${${var}}")
|
||||
set(${var} ${new} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
set(TAG_FILE ${CMAKE_SOURCE_DIR}/GIT-TAG)
|
||||
set(REF_FILE ${CMAKE_SOURCE_DIR}/GIT-REFSPEC)
|
||||
set(COMMIT_FILE ${CMAKE_SOURCE_DIR}/GIT-COMMIT)
|
||||
set(RELEASE_FILE ${CMAKE_SOURCE_DIR}/GIT-RELEASE)
|
||||
|
||||
if (EXISTS ${REF_FILE} AND EXISTS ${COMMIT_FILE})
|
||||
file(READ ${REF_FILE} GIT_REFSPEC)
|
||||
file(READ ${COMMIT_FILE} GIT_COMMIT)
|
||||
else()
|
||||
get_git_head_revision(GIT_REFSPEC GIT_COMMIT)
|
||||
git_branch_name(GIT_REFSPEC)
|
||||
if (GIT_REFSPEC MATCHES "NOTFOUND")
|
||||
set(GIT_REFSPEC 1.0.0)
|
||||
set(GIT_COMMIT stable)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (EXISTS ${TAG_FILE})
|
||||
file(READ ${TAG_FILE} GIT_TAG)
|
||||
else()
|
||||
git_describe(GIT_TAG --tags --abbrev=0)
|
||||
if (GIT_TAG MATCHES "NOTFOUND")
|
||||
set(GIT_TAG "${GIT_REFSPEC}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (EXISTS ${RELEASE_FILE})
|
||||
file(READ ${RELEASE_FILE} GIT_RELEASE)
|
||||
trim(GIT_RELEASE)
|
||||
message(STATUS "Git release: ${GIT_RELEASE}")
|
||||
endif()
|
||||
|
||||
trim(GIT_REFSPEC)
|
||||
trim(GIT_COMMIT)
|
||||
trim(GIT_TAG)
|
||||
|
||||
message(STATUS "Git commit: ${GIT_COMMIT}")
|
||||
message(STATUS "Git tag: ${GIT_TAG}")
|
||||
message(STATUS "Git refspec: ${GIT_REFSPEC}")
|
|
@ -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-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
@ -12,16 +15,25 @@ set(__windows_copy_files YES)
|
|||
|
||||
# Any number of files to copy from SOURCE_DIR to DEST_DIR can be specified after DEST_DIR.
|
||||
# This copying happens post-build.
|
||||
function(windows_copy_files TARGET SOURCE_DIR DEST_DIR)
|
||||
# windows commandline expects the / to be \ so switch them
|
||||
string(REPLACE "/" "\\\\" SOURCE_DIR ${SOURCE_DIR})
|
||||
string(REPLACE "/" "\\\\" DEST_DIR ${DEST_DIR})
|
||||
if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
|
||||
function(windows_copy_files TARGET SOURCE_DIR DEST_DIR)
|
||||
# windows commandline expects the / to be \ so switch them
|
||||
string(REPLACE "/" "\\\\" SOURCE_DIR ${SOURCE_DIR})
|
||||
string(REPLACE "/" "\\\\" DEST_DIR ${DEST_DIR})
|
||||
|
||||
# /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
|
||||
# so trick it into thinking the command was successful with the || cmd /c "exit /b 0"
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||
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"
|
||||
)
|
||||
endfunction()
|
||||
# /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
|
||||
# so trick it into thinking the command was successful with the || cmd /c "exit /b 0"
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||
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"
|
||||
)
|
||||
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()
|
||||
|
|
12
README.md
|
@ -55,15 +55,13 @@ You can also follow us on [X (Twitter)](https://x.com/edenemuofficial) for updat
|
|||
|
||||
If you would like to contribute, we are open to new developers and pull requests. Please ensure that your work is of a high standard and properly documented. You can also contact any of the developers on Discord or Revolt to learn more about the current state of the emulator.
|
||||
|
||||
See the [sign-up instructions](docs/SIGNUP.md) for information on registration.
|
||||
|
||||
Alternatively, if you wish to add translations, go to the [Eden project on Transifex](https://app.transifex.com/edenemu/eden-emulator) and review [the translations README](./dist/languages).
|
||||
|
||||
## Building
|
||||
|
||||
* **Windows**: [Windows Building Guide](./docs/build/Windows.md)
|
||||
* **Linux**: [Linux Building Guide](./docs/build/Linux.md)
|
||||
* **Android**: [Android Building Guide](./docs/build/Android.md)
|
||||
* **Solaris**: [Solaris Building Guide](./docs/build/Solaris.md)
|
||||
* **FreeBSD**: [FreeBSD Building Guide](./docs/build/FreeBSD.md)
|
||||
* **macOS**: [macOS Building Guide](./docs/build/macOS.md)
|
||||
* **OpenBSD**: [OpenBSD Building Guide](./docs/build/OpenBSD.md)
|
||||
See the [General Build Guide](docs/Build.md)
|
||||
|
||||
## Download
|
||||
|
||||
|
|
74
cpmfile.json
|
@ -4,17 +4,22 @@
|
|||
"package": "OpenSSL",
|
||||
"name": "openssl",
|
||||
"repo": "crueter-ci/OpenSSL",
|
||||
"version": "3.5.2",
|
||||
"version": "3.5.3",
|
||||
"min_version": "1.1.1"
|
||||
},
|
||||
"boost": {
|
||||
"package": "Boost",
|
||||
"repo": "boostorg/boost",
|
||||
"tag": "boost-%VERSION%",
|
||||
"artifact": "%TAG%-cmake.7z",
|
||||
"hash": "e5b049e5b61964480ca816395f63f95621e66cb9bcf616a8b10e441e0e69f129e22443acb11e77bc1e8170f8e4171b9b7719891efc43699782bfcd4b3a365f01",
|
||||
"git_version": "1.88.0",
|
||||
"version": "1.57"
|
||||
"artifact": "%TAG%-cmake.tar.xz",
|
||||
"hash": "4fb7f6fde92762305aad8754d7643cd918dd1f3f67e104e9ab385b18c73178d72a17321354eb203b790b6702f2cf6d725a5d6e2dfbc63b1e35f9eb59fb42ece9",
|
||||
"git_version": "1.89.0",
|
||||
"version": "1.57",
|
||||
"patches": [
|
||||
"0001-clang-cl.patch",
|
||||
"0002-use-marmasm.patch",
|
||||
"0003-armasm-options.patch"
|
||||
]
|
||||
},
|
||||
"fmt": {
|
||||
"repo": "fmtlib/fmt",
|
||||
|
@ -77,18 +82,51 @@
|
|||
},
|
||||
"opus": {
|
||||
"package": "Opus",
|
||||
"repo": "xiph/opus",
|
||||
"sha": "5ded705cf4",
|
||||
"hash": "0dc89e58ddda1f3bc6a7037963994770c5806c10e66f5cc55c59286fc76d0544fe4eca7626772b888fd719f434bc8a92f792bdb350c807968b2ac14cfc04b203",
|
||||
"repo": "crueter/opus",
|
||||
"sha": "ab19c44fad",
|
||||
"hash": "79d0d015b19e74ce6076197fc32b86fe91d724a0b5a79e86adfc4bdcb946ece384e252adbbf742b74d03040913b70bb0e9556eafa59ef20e42d2f3f4d6f2859a",
|
||||
"version": "1.3",
|
||||
"find_args": "MODULE",
|
||||
"options": [
|
||||
"OPUS_BUILD_TESTING OFF",
|
||||
"OPUS_BUILD_PROGRAMS OFF",
|
||||
"OPUS_INSTALL_PKG_CONFIG_MODULE OFF",
|
||||
"OPUS_INSTALL_CMAKE_CONFIG_MODULE OFF"
|
||||
"OPUS_PRESUME_NEON ON"
|
||||
]
|
||||
},
|
||||
"vulkan-utility-headers": {
|
||||
"package": "VulkanUtilityLibraries",
|
||||
"repo": "scripts/VulkanUtilityHeaders",
|
||||
"tag": "1.4.326",
|
||||
"artifact": "VulkanUtilityHeaders.tar.zst",
|
||||
"git_host": "git.crueter.xyz",
|
||||
"hash": "5924629755cb1605c4aa4eee20ef7957a9dd8d61e4df548be656d98054f2730c4109693c1bd35811f401f4705d2ccff9fc849be32b0d8480bc3f73541a5e0964"
|
||||
},
|
||||
"spirv-tools": {
|
||||
"package": "SPIRV-Tools",
|
||||
"repo": "KhronosGroup/SPIRV-Tools",
|
||||
"sha": "40eb301f32",
|
||||
"hash": "58d0fb1047d69373cf24c73e6f78c73a72a6cca3b4df1d9f083b9dcc0962745ef154abf3dbe9b3623b835be20c6ec769431cf11733349f45e7568b3525f707aa",
|
||||
"find_args": "MODULE",
|
||||
"options": [
|
||||
"SPIRV_SKIP_EXECUTABLES ON"
|
||||
]
|
||||
},
|
||||
"spirv-headers": {
|
||||
"package": "SPIRV-Headers",
|
||||
"repo": "KhronosGroup/SPIRV-Headers",
|
||||
"sha": "4e209d3d7e",
|
||||
"hash": "f48bbe18341ed55ea0fe280dbbbc0a44bf222278de6e716e143ca1e95ca320b06d4d23d6583fbf8d03e1428f3dac8fa00e5b82ddcd6b425e6236d85af09550a4",
|
||||
"options": [
|
||||
"SPIRV_WERROR OFF"
|
||||
]
|
||||
},
|
||||
"mbedtls": {
|
||||
"package": "MbedTLS",
|
||||
"repo": "Mbed-TLS/mbedtls",
|
||||
"tag": "mbedtls-%VERSION%",
|
||||
"hash": "6671fb8fcaa832e5b115dfdce8f78baa6a4aea71f5c89a640583634cdee27aefe3bf4be075744da91f7c3ae5ea4e0c765c8fc3937b5cfd9ea73d87ef496524da",
|
||||
"version": "3",
|
||||
"git_version": "3.6.4",
|
||||
"artifact": "%TAG%.tar.bz2"
|
||||
},
|
||||
"cubeb": {
|
||||
"repo": "mozilla/cubeb",
|
||||
"sha": "fa02160712",
|
||||
|
@ -103,8 +141,8 @@
|
|||
},
|
||||
"boost_headers": {
|
||||
"repo": "boostorg/headers",
|
||||
"sha": "0456900fad",
|
||||
"hash": "50cd75dcdfc5f082225cdace058f47b4fb114a47585f7aee1d22236a910a80b667186254c214fa2fcebac67ae6d37ba4b6e695e1faea8affd6fd42a03cf996e3",
|
||||
"sha": "95930ca8f5",
|
||||
"hash": "d1dece16f3b209109de02123c537bfe1adf07a62b16c166367e7e5d62e0f7c323bf804c89b3192dd6871bc58a9d879d25a1cc3f7b9da0e497cf266f165816e2a",
|
||||
"bundled": true
|
||||
},
|
||||
"discord-rpc": {
|
||||
|
@ -143,5 +181,13 @@
|
|||
"version": "2.32.8",
|
||||
"min_version": "2.26.4",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
|
BIN
dist/icons/controller/applet_dual_joycon.png
vendored
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
dist/icons/controller/applet_dual_joycon_dark.png
vendored
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.4 KiB |
BIN
dist/icons/controller/applet_handheld.png
vendored
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
dist/icons/controller/applet_handheld_dark.png
vendored
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
dist/icons/controller/applet_handheld_disabled.png
vendored
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/controller/applet_handheld_midnight.png
vendored
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
dist/icons/controller/applet_pro_controller.png
vendored
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.2 KiB |
BIN
dist/icons/controller/applet_pro_controller_dark.png
vendored
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.3 KiB |
BIN
dist/icons/controller/applet_single_joycon_left.png
vendored
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/controller/applet_single_joycon_right.png
vendored
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
dist/icons/overlay/arrow_left.png
vendored
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 687 B |
BIN
dist/icons/overlay/arrow_left_dark.png
vendored
Before Width: | Height: | Size: 712 B After Width: | Height: | Size: 687 B |
BIN
dist/icons/overlay/arrow_right.png
vendored
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 656 B |
BIN
dist/icons/overlay/arrow_right_dark.png
vendored
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 656 B |
BIN
dist/icons/overlay/button_A_dark.png
vendored
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
dist/icons/overlay/button_B_dark.png
vendored
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.1 KiB |
BIN
dist/icons/overlay/button_L.png
vendored
Before Width: | Height: | Size: 796 B After Width: | Height: | Size: 564 B |
BIN
dist/icons/overlay/button_L_dark.png
vendored
Before Width: | Height: | Size: 745 B After Width: | Height: | Size: 563 B |
BIN
dist/icons/overlay/button_R.png
vendored
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
dist/icons/overlay/button_R_dark.png
vendored
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
dist/icons/overlay/button_X_dark.png
vendored
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.4 KiB |
BIN
dist/icons/overlay/button_Y_dark.png
vendored
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2 KiB |
BIN
dist/icons/overlay/button_minus.png
vendored
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
dist/icons/overlay/button_minus_dark.png
vendored
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
dist/icons/overlay/button_plus.png
vendored
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 1.7 KiB |
BIN
dist/icons/overlay/button_plus_dark.png
vendored
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 1.7 KiB |
BIN
dist/icons/overlay/button_press_stick_dark.png
vendored
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
dist/icons/overlay/osk_button_B.png
vendored
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/overlay/osk_button_B_dark.png
vendored
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/overlay/osk_button_B_dark_disabled.png
vendored
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/overlay/osk_button_B_disabled.png
vendored
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/overlay/osk_button_Y.png
vendored
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/overlay/osk_button_Y_dark.png
vendored
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/overlay/osk_button_Y_dark_disabled.png
vendored
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/overlay/osk_button_Y_disabled.png
vendored
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.8 KiB |
BIN
dist/icons/overlay/osk_button_plus.png
vendored
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
dist/icons/overlay/osk_button_plus_dark.png
vendored
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
dist/icons/overlay/osk_button_plus_dark_disabled.png
vendored
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
dist/icons/overlay/osk_button_plus_disabled.png
vendored
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
dist/icons/overlay/osk_button_shift_lock_off.png
vendored
Before Width: | Height: | Size: 936 B After Width: | Height: | Size: 648 B |
BIN
dist/icons/overlay/osk_button_shift_lock_on.png
vendored
Before Width: | Height: | Size: 894 B After Width: | Height: | Size: 648 B |
BIN
dist/icons/overlay/osk_button_shift_on_dark.png
vendored
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.6 KiB |
8
dist/languages/README.md
vendored
|
@ -1,3 +1,7 @@
|
|||
This directory stores translation patches (TS files) for yuzu Qt frontend. This directory is linked with [yuzu project on transifex](https://www.transifex.com/yuzu-emulator/yuzu), so you can update the translation by executing `tx pull -t -a`. If you want to contribute to the translation, please go the transifex link and submit your translation there. This directory on the main repo will be synchronized with transifex periodically.
|
||||
This directory stores translation patches (TS files) for yuzu Qt frontend. This directory is linked with the [Eden project on transifex](https://app.transifex.com/edenemu/eden-emulator), so you can update the translation by executing `tx pull -t -a`. If you want to contribute to the translation, please go the transifex link and submit your translation there. This directory on the main repo will be synchronized with transifex periodically. Do not directly open PRs on github to modify the translation.
|
||||
|
||||
Do not directly open PRs on github to modify the translation.
|
||||
When creating/improving translations, please keep in mind:
|
||||
|
||||
- You are responsible for providing accurate translations that do NOT contain illicit content or messages,
|
||||
- Many of our developers do not speak the languages you may be translating, so will only be able to help with confusions about the source language,
|
||||
- And bad-faith translations or attempts to insert illicit content may result in an immediate removal of access.
|
||||
|
|