mirror of
https://notabug.org/litucks/torzu.git
synced 2026-01-12 02:32:25 +00:00
Compare commits
228 commits
yuzu-final
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63f808b365 | ||
|
|
e40391eedd | ||
|
|
6210feba12 | ||
|
|
641c18e1a8 | ||
|
|
295aa94a05 | ||
|
|
59bda52beb | ||
|
|
25c6aaec18 | ||
|
|
dee5dca459 | ||
|
|
fd908334af | ||
|
|
c72862af09 | ||
|
|
1ea9565cb4 | ||
|
|
945de31fb9 | ||
|
|
634acab40b | ||
|
|
8561b75518 | ||
|
|
15d00322a0 | ||
|
|
7bd0bfbb0c | ||
|
|
829fad8b66 | ||
|
|
b539eef054 | ||
|
|
f7849077e1 | ||
|
|
35f4aa964f | ||
|
|
5b478bdb9c | ||
|
|
b10bcac0cf | ||
|
|
cfbaa32d66 | ||
|
|
125f4e2372 | ||
|
|
4e6bf7e82e | ||
|
|
76516783d3 | ||
|
|
a426de1c51 | ||
|
|
335570dfd3 | ||
|
|
1319089702 | ||
|
|
a640bbee41 | ||
|
|
709f70a3b2 | ||
|
|
977ed0063a | ||
|
|
7c17d72b1a | ||
|
|
ff2e94b286 | ||
|
|
5de4fd6c76 | ||
|
|
8f1b45003b | ||
|
|
f78b30dbc4 | ||
|
|
e7e5906892 | ||
|
|
1526678a53 | ||
|
|
2384d30c2a | ||
|
|
e52e4ca429 | ||
|
|
a16e593fa8 | ||
|
|
f8ae0e4f2a | ||
|
|
b23dea24cd | ||
|
|
eaa9c9e3a4 | ||
|
|
3d24fc2f00 | ||
|
|
6ead429195 | ||
|
|
914def23f6 | ||
|
|
3f6a2bac86 | ||
|
|
bc4239dd9f | ||
|
|
20ac5cd42b | ||
|
|
d306ebea30 | ||
|
|
02cfee3f18 | ||
|
|
86f6184375 | ||
|
|
a04ba7cd1e | ||
|
|
bb142c9657 | ||
|
|
266eb0d318 | ||
|
|
d231c26e22 | ||
|
|
247f61e1f9 | ||
|
|
154aab7c4b | ||
|
|
56f062ac4d | ||
|
|
05ccbaa8fa | ||
|
|
95ef5431c5 | ||
|
|
066d0e7eaa | ||
|
|
14d40552e5 | ||
|
|
9efce71072 | ||
|
|
5de1cb53bb | ||
|
|
85dc40ad23 | ||
|
|
f45341ef55 | ||
|
|
4259889895 | ||
|
|
a9b7cae667 | ||
|
|
6d2368b07b | ||
|
|
f52a2c5d99 | ||
|
|
11cd91ea01 | ||
|
|
783e8952e0 | ||
|
|
15470284cf | ||
|
|
a41691dbbb | ||
|
|
1a0d98f984 | ||
|
|
eefc75732f | ||
|
|
d6ca4f11c1 | ||
|
|
ab4c093976 | ||
|
|
ec2e6dfdac | ||
|
|
7b143fb07e | ||
|
|
6e61673959 | ||
|
|
ee37c4989c | ||
|
|
e157415bd9 | ||
|
|
8eea774401 | ||
|
|
3785f2a2c8 | ||
|
|
587825f60a | ||
|
|
0719273fed | ||
|
|
60a8bf844f | ||
|
|
cd40133aa4 | ||
|
|
1b51d49e16 | ||
|
|
c8997e4ab5 | ||
|
|
456612d272 | ||
|
|
f38060714a | ||
|
|
c92b9f9024 | ||
|
|
a1c2940b31 | ||
|
|
a41955cc58 | ||
|
|
ede46f9bd2 | ||
|
|
f615bac08e | ||
|
|
00ac6ff600 | ||
|
|
b5e4a009b4 | ||
|
|
8935e96db9 | ||
|
|
7e27e6476d | ||
|
|
224ec03070 | ||
|
|
32b2991a53 | ||
|
|
238c5e33dd | ||
|
|
e3ea6f2059 | ||
|
|
93c9c33b9f | ||
|
|
e8f43b7078 | ||
|
|
fb0ec55198 | ||
|
|
a9f6342ea4 | ||
|
|
b1895cf7ae | ||
|
|
c432641245 | ||
|
|
ccd735ec8a | ||
|
|
f064967e32 | ||
|
|
39af5e51ff | ||
|
|
cc81504195 | ||
|
|
3635a7a322 | ||
|
|
4208203ea4 | ||
|
|
a7d7aa0a5b | ||
|
|
4afc305458 | ||
|
|
1e8ea3af21 | ||
|
|
35fe455e5c | ||
|
|
002d0559f2 | ||
|
|
3319522789 | ||
|
|
fa84e4a2a4 | ||
|
|
252b2b11af | ||
|
|
66ae161cf8 | ||
|
|
63ea3f52f3 | ||
|
|
e339153ede | ||
|
|
910ffe7c10 | ||
|
|
01d9c403f2 | ||
|
|
009aa57f4a | ||
|
|
ab9cdab883 | ||
|
|
3ade835323 | ||
|
|
505dbf93d0 | ||
|
|
316f96eafe | ||
|
|
94c7db25e6 | ||
|
|
a96e97ea13 | ||
|
|
74df9ec3a7 | ||
|
|
2184968eb4 | ||
|
|
ffc907460f | ||
|
|
e966068fea | ||
|
|
fad5984210 | ||
|
|
e96b877ee2 | ||
|
|
377c9bc831 | ||
|
|
ef6fc3e26a | ||
|
|
bef55d43a5 | ||
|
|
08f47542e8 | ||
|
|
cdcbfdc837 | ||
|
|
036a7edb2c | ||
|
|
1df1841ad1 | ||
|
|
5097c6a0b9 | ||
|
|
4821698cd8 | ||
|
|
4ebd9dc2b5 | ||
|
|
12ccc468f4 | ||
|
|
82fce02827 | ||
|
|
bddfb77343 | ||
|
|
f7f1114ec1 | ||
|
|
c1449cca64 | ||
|
|
b242ac022c | ||
|
|
37e53d50bb | ||
|
|
b6e8e04533 | ||
|
|
f890dbb064 | ||
|
|
f05ffb6b05 | ||
|
|
934d816fd6 | ||
|
|
e49ac15049 | ||
|
|
2ad113f22c | ||
|
|
d37c170663 | ||
|
|
e0e2a4c0c5 | ||
|
|
178db2388c | ||
|
|
42075072c6 | ||
|
|
ad1d17405b | ||
|
|
fc87c76263 | ||
|
|
47e20e1ae6 | ||
|
|
ca068f6df2 | ||
|
|
fac1dbc7e6 | ||
|
|
69dd658a0b | ||
|
|
dfa2204aa2 | ||
|
|
53ad973d6a | ||
|
|
00dd7295a3 | ||
|
|
68ced8ab4f | ||
|
|
69a4d26b1e | ||
|
|
5bc8aaa78b | ||
|
|
56505be4c5 | ||
|
|
964b66bb00 | ||
|
|
d02da8726d | ||
|
|
487089ecaa | ||
|
|
c5fe645224 | ||
|
|
85baaf0ab1 | ||
|
|
566ba0cb2b | ||
|
|
30da7e61a4 | ||
|
|
22acf85d05 | ||
|
|
2c213a4002 | ||
|
|
8bfdd8f9ae | ||
|
|
5fdce35a27 | ||
|
|
a884e168ac | ||
|
|
ad1970bd05 | ||
|
|
fdd57f3615 | ||
|
|
1c88616a03 | ||
|
|
67e139edba | ||
|
|
40824a903d | ||
|
|
7e44e3d471 | ||
|
|
603702b64d | ||
|
|
f2592ff593 | ||
|
|
b07b266b87 | ||
|
|
3857ff1aa8 | ||
|
|
d0ef57274a | ||
|
|
30bd90424f | ||
|
|
268ee291a1 | ||
|
|
d75906a3e2 | ||
|
|
0cb34b7bc3 | ||
|
|
a5a11e03a1 | ||
|
|
4c25cbae7b | ||
|
|
fc18b71a20 | ||
|
|
11b815703f | ||
|
|
9e5df3461f | ||
|
|
372918fe0f | ||
|
|
920e2504c3 | ||
|
|
9bb9b8b30b | ||
|
|
c456568564 | ||
|
|
19158e468e | ||
|
|
c60f13169a | ||
|
|
56b06200e9 | ||
|
|
9b991208cd | ||
|
|
01a752555c |
4567 changed files with 1410545 additions and 10031 deletions
|
|
@ -1,29 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
export NDK_CCACHE="$(which ccache)"
|
||||
ccache -s
|
||||
|
||||
BUILD_FLAVOR="mainline"
|
||||
|
||||
BUILD_TYPE="release"
|
||||
if [ "${GITHUB_REPOSITORY}" == "yuzu-emu/yuzu" ]; then
|
||||
BUILD_TYPE="relWithDebInfo"
|
||||
fi
|
||||
|
||||
if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
|
||||
export ANDROID_KEYSTORE_FILE="${GITHUB_WORKSPACE}/ks.jks"
|
||||
base64 --decode <<< "${ANDROID_KEYSTORE_B64}" > "${ANDROID_KEYSTORE_FILE}"
|
||||
fi
|
||||
|
||||
cd src/android
|
||||
chmod +x ./gradlew
|
||||
./gradlew "assemble${BUILD_FLAVOR}${BUILD_TYPE}" "bundle${BUILD_FLAVOR}${BUILD_TYPE}"
|
||||
|
||||
ccache -s
|
||||
|
||||
if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
|
||||
rm "${ANDROID_KEYSTORE_FILE}"
|
||||
fi
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
export NDK_CCACHE="$(which ccache)"
|
||||
ccache -s
|
||||
|
||||
export ANDROID_KEYSTORE_FILE="${GITHUB_WORKSPACE}/ks.jks"
|
||||
base64 --decode <<< "${EA_PLAY_ANDROID_KEYSTORE_B64}" > "${ANDROID_KEYSTORE_FILE}"
|
||||
export ANDROID_KEY_ALIAS="${PLAY_ANDROID_KEY_ALIAS}"
|
||||
export ANDROID_KEYSTORE_PASS="${PLAY_ANDROID_KEYSTORE_PASS}"
|
||||
export SERVICE_ACCOUNT_KEY_PATH="${GITHUB_WORKSPACE}/sa.json"
|
||||
base64 --decode <<< "${EA_SERVICE_ACCOUNT_KEY_B64}" > "${SERVICE_ACCOUNT_KEY_PATH}"
|
||||
./gradlew "publishEaReleaseBundle"
|
||||
|
||||
ccache -s
|
||||
|
||||
if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
|
||||
rm "${ANDROID_KEYSTORE_FILE}"
|
||||
fi
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
export NDK_CCACHE="$(which ccache)"
|
||||
ccache -s
|
||||
|
||||
export ANDROID_KEYSTORE_FILE="${GITHUB_WORKSPACE}/ks.jks"
|
||||
base64 --decode <<< "${MAINLINE_PLAY_ANDROID_KEYSTORE_B64}" > "${ANDROID_KEYSTORE_FILE}"
|
||||
export ANDROID_KEY_ALIAS="${PLAY_ANDROID_KEY_ALIAS}"
|
||||
export ANDROID_KEYSTORE_PASS="${PLAY_ANDROID_KEYSTORE_PASS}"
|
||||
export SERVICE_ACCOUNT_KEY_PATH="${GITHUB_WORKSPACE}/sa.json"
|
||||
base64 --decode <<< "${MAINLINE_SERVICE_ACCOUNT_KEY_B64}" > "${SERVICE_ACCOUNT_KEY_PATH}"
|
||||
./gradlew "publishMainlineReleaseBundle"
|
||||
|
||||
ccache -s
|
||||
|
||||
if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
|
||||
rm "${ANDROID_KEYSTORE_FILE}"
|
||||
fi
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
. ./.ci/scripts/common/pre-upload.sh
|
||||
|
||||
REV_NAME="yuzu-${GITDATE}-${GITREV}"
|
||||
|
||||
BUILD_FLAVOR="mainline"
|
||||
|
||||
BUILD_TYPE_LOWER="release"
|
||||
BUILD_TYPE_UPPER="Release"
|
||||
if [ "${GITHUB_REPOSITORY}" == "yuzu-emu/yuzu" ]; then
|
||||
BUILD_TYPE_LOWER="relWithDebInfo"
|
||||
BUILD_TYPE_UPPER="RelWithDebInfo"
|
||||
fi
|
||||
|
||||
cp src/android/app/build/outputs/apk/"${BUILD_FLAVOR}/${BUILD_TYPE_LOWER}/app-${BUILD_FLAVOR}-${BUILD_TYPE_LOWER}.apk" \
|
||||
"artifacts/${REV_NAME}.apk"
|
||||
cp src/android/app/build/outputs/bundle/"${BUILD_FLAVOR}${BUILD_TYPE_UPPER}"/"app-${BUILD_FLAVOR}-${BUILD_TYPE_LOWER}.aab" \
|
||||
"artifacts/${REV_NAME}.aab"
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Exit on error, rather than continuing with the rest of the script.
|
||||
set -e
|
||||
|
||||
ccache -s
|
||||
|
||||
mkdir build || true && cd build
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
|
||||
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/clang++ \
|
||||
-DCMAKE_C_COMPILER=/usr/lib/ccache/clang \
|
||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||
-DDISPLAY_VERSION=$1 \
|
||||
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
|
||||
-DENABLE_QT_TRANSLATION=ON \
|
||||
-DUSE_DISCORD_PRESENCE=ON \
|
||||
-DYUZU_CRASH_DUMPS=ON \
|
||||
-DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
|
||||
-DYUZU_USE_BUNDLED_FFMPEG=ON \
|
||||
-GNinja
|
||||
|
||||
ninja
|
||||
|
||||
ccache -s
|
||||
|
||||
ctest -VV -C Release
|
||||
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
mkdir -p "ccache" || true
|
||||
chmod a+x ./.ci/scripts/clang/docker.sh
|
||||
# the UID for the container yuzu user is 1027
|
||||
sudo chown -R 1027 ./
|
||||
docker run -e ENABLE_COMPATIBILITY_REPORTING -e CCACHE_DIR=/yuzu/ccache -v "$(pwd):/yuzu" -w /yuzu yuzuemu/build-environments:linux-fresh /bin/bash /yuzu/.ci/scripts/clang/docker.sh "$1"
|
||||
sudo chown -R $UID ./
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
. .ci/scripts/common/pre-upload.sh
|
||||
|
||||
REV_NAME="yuzu-linux-${GITDATE}-${GITREV}"
|
||||
ARCHIVE_NAME="${REV_NAME}.tar.xz"
|
||||
COMPRESSION_FLAGS="-cJvf"
|
||||
|
||||
if [ "${RELEASE_NAME}" = "mainline" ]; then
|
||||
DIR_NAME="${REV_NAME}"
|
||||
else
|
||||
DIR_NAME="${REV_NAME}_${RELEASE_NAME}"
|
||||
fi
|
||||
|
||||
mkdir "$DIR_NAME"
|
||||
|
||||
cp build/bin/yuzu-cmd "$DIR_NAME"
|
||||
cp build/bin/yuzu "$DIR_NAME"
|
||||
|
||||
. .ci/scripts/common/post-upload.sh
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Copy documentation
|
||||
cp LICENSE.txt "$DIR_NAME"
|
||||
cp README.md "$DIR_NAME"
|
||||
|
||||
if [[ -z "${NO_SOURCE_PACK}" ]]; then
|
||||
git clone --depth 1 file://$(readlink -e .) ${REV_NAME}-source
|
||||
tar -cJvf "${REV_NAME}-source.tar.xz" ${REV_NAME}-source
|
||||
cp -v "${REV_NAME}-source.tar.xz" "$DIR_NAME"
|
||||
cp -v "${REV_NAME}-source.tar.xz" "${ARTIFACTS_DIR}/"
|
||||
fi
|
||||
|
||||
tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$DIR_NAME"
|
||||
|
||||
# move the compiled archive into the artifacts directory to be uploaded by travis releases
|
||||
mv "$ARCHIVE_NAME" "${ARTIFACTS_DIR}/"
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
|
||||
GITREV="`git show -s --format='%h'`"
|
||||
ARTIFACTS_DIR="$PWD/artifacts"
|
||||
|
||||
mkdir -p "${ARTIFACTS_DIR}/"
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Run clang-format
|
||||
cd /yuzu
|
||||
chmod a+x ./.ci/scripts/format/script.sh
|
||||
./.ci/scripts/format/script.sh
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
chmod a+x ./.ci/scripts/format/docker.sh
|
||||
# the UID for the container yuzu user is 1027
|
||||
sudo chown -R 1027 ./
|
||||
docker run -v "$(pwd):/yuzu" -w /yuzu yuzuemu/build-environments:linux-clang-format /bin/bash -ex /yuzu/.ci/scripts/format/docker.sh
|
||||
sudo chown -R $UID ./
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
shopt -s nullglob globstar
|
||||
|
||||
if git grep -nrI '\s$' src **/*.yml **/*.txt **/*.md Doxyfile .gitignore .gitmodules .ci* dist/*.desktop dist/*.svg dist/*.xml; then
|
||||
echo Trailing whitespace found, aborting
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Default clang-format points to default 3.5 version one
|
||||
CLANG_FORMAT="${CLANG_FORMAT:-clang-format-15}"
|
||||
"$CLANG_FORMAT" --version
|
||||
|
||||
# Turn off tracing for this because it's too verbose
|
||||
set +x
|
||||
|
||||
# Check everything for branch pushes
|
||||
FILES_TO_LINT="$(find src/ -name '*.cpp' -or -name '*.h')"
|
||||
|
||||
for f in $FILES_TO_LINT; do
|
||||
echo "$f"
|
||||
"$CLANG_FORMAT" -i "$f"
|
||||
done
|
||||
|
||||
DIFF=$(git -c core.fileMode=false diff)
|
||||
|
||||
if [ ! -z "$DIFF" ]; then
|
||||
echo "!!! Not compliant to coding style, here is the fix:"
|
||||
echo "$DIFF"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd src/android
|
||||
./gradlew ktlintCheck
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Exit on error, rather than continuing with the rest of the script.
|
||||
set -e
|
||||
|
||||
ccache -s
|
||||
|
||||
mkdir build || true && cd build
|
||||
cmake .. \
|
||||
-DBoost_USE_STATIC_LIBS=ON \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
|
||||
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \
|
||||
-DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \
|
||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||
-DDISPLAY_VERSION=$1 \
|
||||
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
|
||||
-DENABLE_QT_TRANSLATION=ON \
|
||||
-DUSE_DISCORD_PRESENCE=ON \
|
||||
-DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
|
||||
-DYUZU_USE_BUNDLED_FFMPEG=ON \
|
||||
-DYUZU_ENABLE_LTO=ON \
|
||||
-DYUZU_CRASH_DUMPS=ON \
|
||||
-GNinja
|
||||
|
||||
ninja
|
||||
|
||||
ccache -s
|
||||
|
||||
ctest -VV -C Release
|
||||
|
||||
# Separate debug symbols from specified executables
|
||||
for EXE in yuzu; do
|
||||
EXE_PATH="bin/$EXE"
|
||||
# Copy debug symbols out
|
||||
objcopy --only-keep-debug $EXE_PATH $EXE_PATH.debug
|
||||
# Add debug link and strip debug symbols
|
||||
objcopy -g --add-gnu-debuglink=$EXE_PATH.debug $EXE_PATH $EXE_PATH.out
|
||||
# Overwrite original with stripped copy
|
||||
mv $EXE_PATH.out $EXE_PATH
|
||||
done
|
||||
# Strip debug symbols from all executables
|
||||
find bin/ -type f -not -regex '.*.debug' -exec strip -g {} ';'
|
||||
|
||||
DESTDIR="$PWD/AppDir" ninja install
|
||||
rm -vf AppDir/usr/bin/yuzu-cmd AppDir/usr/bin/yuzu-tester
|
||||
|
||||
# Download tools needed to build an AppImage
|
||||
wget -nc https://raw.githubusercontent.com/yuzu-emu/ext-linux-bin/main/appimage/deploy-linux.sh
|
||||
wget -nc https://raw.githubusercontent.com/yuzu-emu/AppImageKit-checkrt/old/AppRun.sh
|
||||
wget -nc https://github.com/yuzu-emu/ext-linux-bin/raw/main/appimage/exec-x86_64.so
|
||||
# Set executable bit
|
||||
chmod 755 \
|
||||
deploy-linux.sh \
|
||||
AppRun.sh \
|
||||
exec-x86_64.so \
|
||||
|
||||
# Workaround for https://github.com/AppImage/AppImageKit/issues/828
|
||||
export APPIMAGE_EXTRACT_AND_RUN=1
|
||||
|
||||
mkdir -p AppDir/usr/optional
|
||||
mkdir -p AppDir/usr/optional/libstdc++
|
||||
mkdir -p AppDir/usr/optional/libgcc_s
|
||||
|
||||
# Deploy yuzu's needed dependencies
|
||||
DEPLOY_QT=1 ./deploy-linux.sh AppDir/usr/bin/yuzu AppDir
|
||||
|
||||
# Workaround for libQt5MultimediaGstTools indirectly requiring libwayland-client and breaking Vulkan usage on end-user systems
|
||||
find AppDir -type f -regex '.*libwayland-client\.so.*' -delete -print
|
||||
|
||||
# Workaround for building yuzu with GCC 10 but also trying to distribute it to Ubuntu 18.04 et al.
|
||||
# See https://github.com/darealshinji/AppImageKit-checkrt
|
||||
cp exec-x86_64.so AppDir/usr/optional/exec.so
|
||||
cp AppRun.sh AppDir/AppRun
|
||||
cp --dereference /usr/lib/x86_64-linux-gnu/libstdc++.so.6 AppDir/usr/optional/libstdc++/libstdc++.so.6
|
||||
cp --dereference /lib/x86_64-linux-gnu/libgcc_s.so.1 AppDir/usr/optional/libgcc_s/libgcc_s.so.1
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
mkdir -p "ccache" || true
|
||||
chmod a+x ./.ci/scripts/linux/docker.sh
|
||||
# the UID for the container yuzu user is 1027
|
||||
sudo chown -R 1027 ./
|
||||
|
||||
# The environment variables listed below:
|
||||
# AZURECIREPO TITLEBARFORMATIDLE TITLEBARFORMATRUNNING DISPLAYVERSION
|
||||
# are requested in src/common/CMakeLists.txt and appear to be provided somewhere in Azure DevOps
|
||||
|
||||
docker run -e AZURECIREPO -e TITLEBARFORMATIDLE -e TITLEBARFORMATRUNNING -e DISPLAYVERSION -e ENABLE_COMPATIBILITY_REPORTING -e CCACHE_DIR=/yuzu/ccache -v "$(pwd):/yuzu" -w /yuzu yuzuemu/build-environments:linux-fresh /bin/bash /yuzu/.ci/scripts/linux/docker.sh "$1"
|
||||
sudo chown -R $UID ./
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
. .ci/scripts/common/pre-upload.sh
|
||||
|
||||
APPIMAGE_NAME="yuzu-${RELEASE_NAME}-${GITDATE}-${GITREV}.AppImage"
|
||||
BASE_NAME="yuzu-linux"
|
||||
REV_NAME="${BASE_NAME}-${GITDATE}-${GITREV}"
|
||||
ARCHIVE_NAME="${REV_NAME}.tar.xz"
|
||||
COMPRESSION_FLAGS="-cJvf"
|
||||
|
||||
if [ "${RELEASE_NAME}" = "mainline" ] || [ "${RELEASE_NAME}" = "early-access" ]; then
|
||||
DIR_NAME="${BASE_NAME}-${RELEASE_NAME}"
|
||||
else
|
||||
DIR_NAME="${REV_NAME}-${RELEASE_NAME}"
|
||||
fi
|
||||
|
||||
mkdir "$DIR_NAME"
|
||||
|
||||
cp build/bin/yuzu-cmd "$DIR_NAME"
|
||||
if [ "${RELEASE_NAME}" != "early-access" ] && [ "${RELEASE_NAME}" != "mainline" ]; then
|
||||
cp build/bin/yuzu "$DIR_NAME"
|
||||
fi
|
||||
|
||||
# Build an AppImage
|
||||
cd build
|
||||
|
||||
wget -nc https://github.com/yuzu-emu/ext-linux-bin/raw/main/appimage/appimagetool-x86_64.AppImage
|
||||
chmod 755 appimagetool-x86_64.AppImage
|
||||
|
||||
# if FUSE is not available, then fallback to extract and run
|
||||
if ! ./appimagetool-x86_64.AppImage --version; then
|
||||
export APPIMAGE_EXTRACT_AND_RUN=1
|
||||
fi
|
||||
|
||||
# Don't let AppImageLauncher ask to integrate EA
|
||||
if [ "${RELEASE_NAME}" = "mainline" ] || [ "${RELEASE_NAME}" = "early-access" ]; then
|
||||
echo "X-AppImage-Integrate=false" >> AppDir/org.yuzu_emu.yuzu.desktop
|
||||
fi
|
||||
|
||||
if [ "${RELEASE_NAME}" = "mainline" ]; then
|
||||
# Generate update information if releasing to mainline
|
||||
./appimagetool-x86_64.AppImage -u "gh-releases-zsync|yuzu-emu|yuzu-${RELEASE_NAME}|latest|yuzu-*.AppImage.zsync" AppDir "${APPIMAGE_NAME}"
|
||||
else
|
||||
./appimagetool-x86_64.AppImage AppDir "${APPIMAGE_NAME}"
|
||||
fi
|
||||
cd ..
|
||||
|
||||
# Copy the AppImage and update info to the artifacts directory and avoid compressing it
|
||||
cp "build/${APPIMAGE_NAME}" "${ARTIFACTS_DIR}/"
|
||||
if [ -f "build/${APPIMAGE_NAME}.zsync" ]; then
|
||||
cp "build/${APPIMAGE_NAME}.zsync" "${ARTIFACTS_DIR}/"
|
||||
fi
|
||||
|
||||
# Copy the AppImage to the general release directory and remove git revision info
|
||||
if [ "${RELEASE_NAME}" = "mainline" ] || [ "${RELEASE_NAME}" = "early-access" ]; then
|
||||
cp "build/${APPIMAGE_NAME}" "${DIR_NAME}/yuzu-${RELEASE_NAME}.AppImage"
|
||||
fi
|
||||
|
||||
# Copy debug symbols to artifacts
|
||||
cd build/bin
|
||||
tar $COMPRESSION_FLAGS "${ARTIFACTS_DIR}/${REV_NAME}-debug.tar.xz" *.debug
|
||||
cd -
|
||||
|
||||
. .ci/scripts/common/post-upload.sh
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Download all pull requests as patches that match a specific label
|
||||
# Usage: python download-patches-by-label.py <Label to Match> <Root Path Folder to DL to>
|
||||
|
||||
import requests, sys, json, shutil, subprocess, os, traceback
|
||||
|
||||
org = os.getenv("PRIVATEMERGEORG", "yuzu-emu")
|
||||
repo = os.getenv("PRIVATEMERGEREPO", "yuzu-private")
|
||||
tagline = sys.argv[3]
|
||||
user = sys.argv[1]
|
||||
|
||||
dl_list = {}
|
||||
|
||||
TAG_NAME = sys.argv[2]
|
||||
|
||||
def check_individual(repo_id, pr_id):
|
||||
url = 'https://%sdev.azure.com/%s/%s/_apis/git/repositories/%s/pullRequests/%s/labels?api-version=5.1-preview.1' % (user, org, repo, repo_id, pr_id)
|
||||
response = requests.get(url)
|
||||
if (response.ok):
|
||||
try:
|
||||
js = response.json()
|
||||
return any(tag.get('name') == TAG_NAME for tag in js['value'])
|
||||
except:
|
||||
return False
|
||||
return False
|
||||
|
||||
def merge_pr(pn, ref):
|
||||
print("Matched PR# %s" % pn)
|
||||
print(subprocess.check_output(["git", "fetch", "https://%sdev.azure.com/%s/_git/%s" % (user, org, repo), ref, "-f", "--no-recurse-submodules"]))
|
||||
print(subprocess.check_output(["git", "merge", "--squash", 'origin/' + ref.replace('refs/heads/','')]))
|
||||
print(subprocess.check_output(["git", "commit", "-m\"Merge %s PR %s\"" % (tagline, pn)]))
|
||||
|
||||
def main():
|
||||
url = 'https://%sdev.azure.com/%s/%s/_apis/git/pullrequests?api-version=5.1' % (user, org, repo)
|
||||
response = requests.get(url)
|
||||
if (response.ok):
|
||||
js = response.json()
|
||||
tagged_prs = filter(lambda pr: check_individual(pr['repository']['id'], pr['pullRequestId']), js['value'])
|
||||
map(lambda pr: merge_pr(pr['pullRequestId'], pr['sourceRefName']), tagged_prs)
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
main()
|
||||
except:
|
||||
traceback.print_exc(file=sys.stdout)
|
||||
sys.exit(-1)
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Download all pull requests as patches that match a specific label
|
||||
# Usage: python apply-patches-by-label.py <Label to Match>
|
||||
|
||||
import json, requests, subprocess, sys, traceback
|
||||
|
||||
tagline = sys.argv[2]
|
||||
|
||||
def check_individual(labels):
|
||||
for label in labels:
|
||||
if (label["name"] == sys.argv[1]):
|
||||
return True
|
||||
return False
|
||||
|
||||
def do_page(page):
|
||||
url = f"https://api.github.com/repos/yuzu-emu/yuzu/pulls?page={page}"
|
||||
response = requests.get(url)
|
||||
response.raise_for_status()
|
||||
if (response.ok):
|
||||
j = json.loads(response.content)
|
||||
if j == []:
|
||||
return
|
||||
for pr in j:
|
||||
if (check_individual(pr["labels"])):
|
||||
pn = pr["number"]
|
||||
print(f"Matched PR# {pn}")
|
||||
print(subprocess.check_output(["git", "fetch", "https://github.com/yuzu-emu/yuzu.git", f"pull/{pn}/head:pr-{pn}", "-f", "--no-recurse-submodules"]))
|
||||
print(subprocess.check_output(["git", "merge", "--squash", f"pr-{pn}"]))
|
||||
print(subprocess.check_output(["git", "commit", f"-m\"Merge {tagline} PR {pn}\""]))
|
||||
|
||||
try:
|
||||
for i in range(1,10):
|
||||
do_page(i)
|
||||
except:
|
||||
traceback.print_exc(file=sys.stdout)
|
||||
sys.exit(-1)
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Checks to see if the specified pull request # has the specified tag
|
||||
# Usage: python check-label-presence.py <Pull Request ID> <Name of Label>
|
||||
|
||||
import requests, json, sys
|
||||
|
||||
try:
|
||||
url = 'https://api.github.com/repos/yuzu-emu/yuzu/issues/%s' % sys.argv[1]
|
||||
response = requests.get(url)
|
||||
if (response.ok):
|
||||
j = json.loads(response.content)
|
||||
for label in j["labels"]:
|
||||
if label["name"] == sys.argv[2]:
|
||||
print('##vso[task.setvariable variable=enabletesting;]true')
|
||||
sys.exit()
|
||||
except:
|
||||
sys.exit(-1)
|
||||
|
||||
print('##vso[task.setvariable variable=enabletesting;]false')
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
git config --global user.email "yuzu@yuzu-emu.org"
|
||||
git config --global user.name "yuzubot"
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set -x
|
||||
|
||||
echo -e "\e[1m\e[33mBuild tools information:\e[0m"
|
||||
cmake --version
|
||||
gcc -v
|
||||
tx --version
|
||||
|
||||
mkdir build && cd build
|
||||
cmake .. -DENABLE_QT_TRANSLATION=ON -DGENERATE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF -DYUZU_TESTS=OFF -DYUZU_USE_BUNDLED_VCPKG=ON
|
||||
make translation
|
||||
cd ..
|
||||
|
||||
cd dist/languages
|
||||
tx push -s
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set -e
|
||||
|
||||
#cd /yuzu
|
||||
|
||||
ccache -sv
|
||||
|
||||
mkdir -p build && cd build
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_TOOLCHAIN_FILE="${PWD}/../CMakeModules/MinGWCross.cmake" \
|
||||
-DDISPLAY_VERSION="$1" \
|
||||
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
|
||||
-DENABLE_QT_TRANSLATION=ON \
|
||||
-DUSE_CCACHE=ON \
|
||||
-DYUZU_USE_BUNDLED_SDL2=OFF \
|
||||
-DYUZU_USE_EXTERNAL_SDL2=OFF \
|
||||
-DYUZU_TESTS=OFF \
|
||||
-GNinja
|
||||
ninja yuzu yuzu-cmd
|
||||
|
||||
ccache -sv
|
||||
|
||||
echo "Tests skipped"
|
||||
#ctest -VV -C Release
|
||||
|
||||
echo 'Prepare binaries...'
|
||||
cd ..
|
||||
mkdir package
|
||||
|
||||
if [ -d "/usr/x86_64-w64-mingw32/lib/qt5/plugins/platforms/" ]; then
|
||||
QT_PLUGINS_PATH='/usr/x86_64-w64-mingw32/lib/qt5/plugins'
|
||||
else
|
||||
#fallback to qt
|
||||
QT_PLUGINS_PATH='/usr/x86_64-w64-mingw32/lib/qt/plugins'
|
||||
fi
|
||||
|
||||
find build/ -name "yuzu*.exe" -exec cp {} 'package' \;
|
||||
|
||||
# copy Qt plugins
|
||||
mkdir package/platforms
|
||||
cp -v "${QT_PLUGINS_PATH}/platforms/qwindows.dll" package/platforms/
|
||||
cp -rv "${QT_PLUGINS_PATH}/mediaservice/" package/
|
||||
cp -rv "${QT_PLUGINS_PATH}/imageformats/" package/
|
||||
cp -rv "${QT_PLUGINS_PATH}/styles/" package/
|
||||
rm -f package/mediaservice/*d.dll
|
||||
|
||||
for i in package/*.exe; do
|
||||
# we need to process pdb here, however, cv2pdb
|
||||
# does not work here, so we just simply strip all the debug symbols
|
||||
x86_64-w64-mingw32-strip "${i}"
|
||||
done
|
||||
|
||||
python3 .ci/scripts/windows/scan_dll.py package/*.exe package/imageformats/*.dll "package/"
|
||||
|
||||
# copy FFmpeg libraries
|
||||
EXTERNALS_PATH="$(pwd)/build/externals"
|
||||
FFMPEG_DLL_PATH="$(find "${EXTERNALS_PATH}" -maxdepth 1 -type d | grep 'ffmpeg-')/bin"
|
||||
find ${FFMPEG_DLL_PATH} -type f -regex ".*\.dll" -exec cp -nv {} package/ ';'
|
||||
|
||||
# copy libraries from yuzu.exe path
|
||||
find "$(pwd)/build/bin/" -type f -regex ".*\.dll" -exec cp -v {} package/ ';'
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
mkdir -p "ccache" || true
|
||||
chmod a+x ./.ci/scripts/windows/docker.sh
|
||||
# the UID for the container yuzu user is 1027
|
||||
sudo chown -R 1027 ./
|
||||
docker run -e CCACHE_DIR=/yuzu/ccache -v "$(pwd):/yuzu" -w /yuzu yuzuemu/build-environments:linux-mingw /bin/bash -ex /yuzu/.ci/scripts/windows/docker.sh "$1"
|
||||
sudo chown -R $UID ./
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$VulkanSDKVer = "1.3.250.1"
|
||||
$ExeFile = "VulkanSDK-$VulkanSDKVer-Installer.exe"
|
||||
$Uri = "https://sdk.lunarg.com/sdk/download/$VulkanSDKVer/windows/$ExeFile"
|
||||
$Destination = "./$ExeFile"
|
||||
|
||||
echo "Downloading Vulkan SDK $VulkanSDKVer from $Uri"
|
||||
$WebClient = New-Object System.Net.WebClient
|
||||
$WebClient.DownloadFile($Uri, $Destination)
|
||||
echo "Finished downloading $ExeFile"
|
||||
|
||||
$VULKAN_SDK = "C:/VulkanSDK/$VulkanSDKVer"
|
||||
$Arguments = "--root `"$VULKAN_SDK`" --accept-licenses --default-answer --confirm-command install"
|
||||
|
||||
echo "Installing Vulkan SDK $VulkanSDKVer"
|
||||
$InstallProcess = Start-Process -FilePath $Destination -NoNewWindow -PassThru -Wait -ArgumentList $Arguments
|
||||
$ExitCode = $InstallProcess.ExitCode
|
||||
|
||||
if ($ExitCode -ne 0) {
|
||||
echo "Error installing Vulkan SDK $VulkanSDKVer (Error: $ExitCode)"
|
||||
Exit $ExitCode
|
||||
}
|
||||
|
||||
echo "Finished installing Vulkan SDK $VulkanSDKVer"
|
||||
|
||||
if ("$env:GITHUB_ACTIONS" -eq "true") {
|
||||
echo "VULKAN_SDK=$VULKAN_SDK" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "$VULKAN_SDK/Bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
}
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
import pefile
|
||||
import sys
|
||||
import re
|
||||
import os
|
||||
import queue
|
||||
import shutil
|
||||
|
||||
# constant definitions
|
||||
KNOWN_SYS_DLLS = ['WINMM.DLL', 'MSVCRT.DLL', 'VERSION.DLL', 'MPR.DLL',
|
||||
'DWMAPI.DLL', 'UXTHEME.DLL', 'DNSAPI.DLL', 'IPHLPAPI.DLL']
|
||||
# below is for Ubuntu 18.04 with specified PPA enabled, if you are using
|
||||
# other distro or different repositories, change the following accordingly
|
||||
DLL_PATH = [
|
||||
'/usr/x86_64-w64-mingw32/bin/',
|
||||
'/usr/x86_64-w64-mingw32/lib/',
|
||||
'/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/'
|
||||
]
|
||||
|
||||
missing = []
|
||||
|
||||
|
||||
def parse_imports(file_name):
|
||||
results = []
|
||||
pe = pefile.PE(file_name, fast_load=True)
|
||||
pe.parse_data_directories()
|
||||
|
||||
for entry in pe.DIRECTORY_ENTRY_IMPORT:
|
||||
current = entry.dll.decode()
|
||||
current_u = current.upper() # b/c Windows is often case insensitive
|
||||
# here we filter out system dlls
|
||||
# dll w/ names like *32.dll are likely to be system dlls
|
||||
if current_u.upper() not in KNOWN_SYS_DLLS and not re.match(string=current_u, pattern=r'.*32\.DLL'):
|
||||
results.append(current)
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def parse_imports_recursive(file_name, path_list=[]):
|
||||
q = queue.Queue() # create a FIFO queue
|
||||
# file_name can be a string or a list for the convenience
|
||||
if isinstance(file_name, str):
|
||||
q.put(file_name)
|
||||
elif isinstance(file_name, list):
|
||||
for i in file_name:
|
||||
q.put(i)
|
||||
full_list = []
|
||||
while q.qsize():
|
||||
current = q.get_nowait()
|
||||
print('> %s' % current)
|
||||
deps = parse_imports(current)
|
||||
# if this dll does not have any import, ignore it
|
||||
if not deps:
|
||||
continue
|
||||
for dep in deps:
|
||||
# the dependency already included in the list, skip
|
||||
if dep in full_list:
|
||||
continue
|
||||
# find the requested dll in the provided paths
|
||||
full_path = find_dll(dep)
|
||||
if not full_path:
|
||||
missing.append(dep)
|
||||
continue
|
||||
full_list.append(dep)
|
||||
q.put(full_path)
|
||||
path_list.append(full_path)
|
||||
return full_list
|
||||
|
||||
|
||||
def find_dll(name):
|
||||
for path in DLL_PATH:
|
||||
for root, _, files in os.walk(path):
|
||||
for f in files:
|
||||
if name.lower() == f.lower():
|
||||
return os.path.join(root, f)
|
||||
|
||||
|
||||
def deploy(name, dst, dry_run=False):
|
||||
dlls_path = []
|
||||
parse_imports_recursive(name, dlls_path)
|
||||
for dll_entry in dlls_path:
|
||||
if not dry_run:
|
||||
shutil.copy(dll_entry, dst)
|
||||
else:
|
||||
print('[Dry-Run] Copy %s to %s' % (dll_entry, dst))
|
||||
print('Deploy completed.')
|
||||
return dlls_path
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 3:
|
||||
print('Usage: %s [files to examine ...] [target deploy directory]')
|
||||
return 1
|
||||
to_deploy = sys.argv[1:-1]
|
||||
tgt_dir = sys.argv[-1]
|
||||
if not os.path.isdir(tgt_dir):
|
||||
print('%s is not a directory.' % tgt_dir)
|
||||
return 1
|
||||
print('Scanning dependencies...')
|
||||
deploy(to_deploy, tgt_dir)
|
||||
if missing:
|
||||
print('Following DLLs are not found: %s' % ('\n'.join(missing)))
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
param($BUILD_NAME)
|
||||
|
||||
$GITDATE = $(git show -s --date=short --format='%ad') -replace "-", ""
|
||||
$GITREV = $(git show -s --format='%h')
|
||||
|
||||
if ("$BUILD_NAME" -eq "mainline") {
|
||||
$RELEASE_DIST = "yuzu-windows-msvc"
|
||||
}
|
||||
else {
|
||||
$RELEASE_DIST = "yuzu-windows-msvc-$BUILD_NAME"
|
||||
}
|
||||
|
||||
$MSVC_BUILD_ZIP = "yuzu-windows-msvc-$GITDATE-$GITREV.zip" -replace " ", ""
|
||||
$MSVC_BUILD_PDB = "yuzu-windows-msvc-$GITDATE-$GITREV-debugsymbols.zip" -replace " ", ""
|
||||
$MSVC_SEVENZIP = "yuzu-windows-msvc-$GITDATE-$GITREV.7z" -replace " ", ""
|
||||
$MSVC_TAR = "yuzu-windows-msvc-$GITDATE-$GITREV.tar" -replace " ", ""
|
||||
$MSVC_TARXZ = "yuzu-windows-msvc-$GITDATE-$GITREV.tar.xz" -replace " ", ""
|
||||
$MSVC_SOURCE = "yuzu-windows-msvc-source-$GITDATE-$GITREV" -replace " ", ""
|
||||
$MSVC_SOURCE_TAR = "$MSVC_SOURCE.tar"
|
||||
$MSVC_SOURCE_TARXZ = "$MSVC_SOURCE_TAR.xz"
|
||||
|
||||
$env:BUILD_ZIP = $MSVC_BUILD_ZIP
|
||||
$env:BUILD_SYMBOLS = $MSVC_BUILD_PDB
|
||||
$env:BUILD_UPDATE = $MSVC_SEVENZIP
|
||||
|
||||
if (Test-Path -Path ".\build\bin\Release") {
|
||||
$BUILD_DIR = ".\build\bin\Release"
|
||||
} else {
|
||||
$BUILD_DIR = ".\build\bin\"
|
||||
}
|
||||
|
||||
# Cleanup unneeded data in submodules
|
||||
git submodule foreach git clean -fxd
|
||||
|
||||
# Upload debugging symbols
|
||||
mkdir pdb
|
||||
Get-ChildItem "$BUILD_DIR\" -Recurse -Filter "*.pdb" | Copy-Item -destination .\pdb
|
||||
7z a -tzip $MSVC_BUILD_PDB .\pdb\*.pdb
|
||||
rm "$BUILD_DIR\*.pdb"
|
||||
|
||||
# Create artifact directories
|
||||
mkdir $RELEASE_DIST
|
||||
mkdir $MSVC_SOURCE
|
||||
mkdir "artifacts"
|
||||
|
||||
$CURRENT_DIR = Convert-Path .
|
||||
|
||||
# Build a tar.xz for the source of the release
|
||||
git clone --depth 1 file://$CURRENT_DIR $MSVC_SOURCE
|
||||
7z a -r -ttar $MSVC_SOURCE_TAR $MSVC_SOURCE
|
||||
7z a -r -txz $MSVC_SOURCE_TARXZ $MSVC_SOURCE_TAR
|
||||
|
||||
# Following section is quick hack to package artifacts differently for GitHub Actions
|
||||
if ("$env:GITHUB_ACTIONS" -eq "true") {
|
||||
echo "Hello GitHub Actions"
|
||||
|
||||
# With vcpkg we now have a few more dll files
|
||||
ls .\build\bin\*.dll
|
||||
cp .\build\bin\*.dll .\artifacts\
|
||||
|
||||
# Hopefully there is an exe in either .\build\bin or .\build\bin\Release
|
||||
cp .\build\bin\yuzu*.exe .\artifacts\
|
||||
Copy-Item "$BUILD_DIR\*" -Destination "artifacts" -Recurse
|
||||
Remove-Item .\artifacts\tests.exe -ErrorAction ignore
|
||||
|
||||
# None of the other GHA builds are including source, so commenting out today
|
||||
#Copy-Item $MSVC_SOURCE_TARXZ -Destination "artifacts"
|
||||
|
||||
# Debugging symbols
|
||||
cp .\build\bin\yuzu*.pdb .\artifacts\
|
||||
|
||||
# Write out a tag BUILD_TAG to environment for the Upload step
|
||||
# We're getting ${{ github.event.number }} as $env:PR_NUMBER"
|
||||
echo "env:PR_NUMBER: $env:PR_NUMBER"
|
||||
if (Test-Path env:PR_NUMBER) {
|
||||
$PR_NUMBER = $env:PR_NUMBER.Substring(2) -as [int]
|
||||
$PR_NUMBER_TAG = "pr"+([string]$PR_NUMBER).PadLeft(5,'0')
|
||||
if ($PR_NUMBER -gt 1){
|
||||
$BUILD_TAG="verify-$PR_NUMBER_TAG-$GITDATE-$GITREV"
|
||||
} else {
|
||||
$BUILD_TAG = "verify-$GITDATE-$GITREV"
|
||||
}
|
||||
} else {
|
||||
# If env:PR_NUMBER isn't set, we should still write out a variable
|
||||
$BUILD_TAG = "verify-$GITDATE-$GITREV"
|
||||
}
|
||||
echo "BUILD_TAG=$BUILD_TAG"
|
||||
echo "BUILD_TAG=$BUILD_TAG" >> $env:GITHUB_ENV
|
||||
|
||||
# For extra job, just the exe
|
||||
$INDIVIDUAL_EXE = "yuzu-msvc-$BUILD_TAG.exe"
|
||||
echo "INDIVIDUAL_EXE=$INDIVIDUAL_EXE"
|
||||
echo "INDIVIDUAL_EXE=$INDIVIDUAL_EXE" >> $env:GITHUB_ENV
|
||||
echo "Just the exe: $INDIVIDUAL_EXE"
|
||||
cp .\artifacts\yuzu.exe .\$INDIVIDUAL_EXE
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
# Build the final release artifacts
|
||||
Copy-Item $MSVC_SOURCE_TARXZ -Destination $RELEASE_DIST
|
||||
Copy-Item "$BUILD_DIR\*" -Destination $RELEASE_DIST -Recurse
|
||||
rm "$RELEASE_DIST\*.exe"
|
||||
Get-ChildItem "$BUILD_DIR" -Recurse -Filter "yuzu*.exe" | Copy-Item -destination $RELEASE_DIST
|
||||
Get-ChildItem "$BUILD_DIR" -Recurse -Filter "QtWebEngineProcess*.exe" | Copy-Item -destination $RELEASE_DIST
|
||||
7z a -tzip $MSVC_BUILD_ZIP $RELEASE_DIST\*
|
||||
7z a $MSVC_SEVENZIP $RELEASE_DIST
|
||||
|
||||
7z a -r -ttar $MSVC_TAR $RELEASE_DIST
|
||||
7z a -r -txz $MSVC_TARXZ $MSVC_TAR
|
||||
|
||||
Get-ChildItem . -Filter "*.zip" | Copy-Item -destination "artifacts"
|
||||
Get-ChildItem . -Filter "*.7z" | Copy-Item -destination "artifacts"
|
||||
Get-ChildItem . -Filter "*.tar.xz" | Copy-Item -destination "artifacts"
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
. .ci/scripts/common/pre-upload.sh
|
||||
|
||||
REV_NAME="yuzu-windows-mingw-${GITDATE}-${GITREV}"
|
||||
ARCHIVE_NAME="${REV_NAME}.tar.xz"
|
||||
COMPRESSION_FLAGS="-cJvf"
|
||||
|
||||
if [ "${RELEASE_NAME}" = "mainline" ]; then
|
||||
DIR_NAME="${REV_NAME}"
|
||||
else
|
||||
DIR_NAME="${REV_NAME}_${RELEASE_NAME}"
|
||||
fi
|
||||
|
||||
mkdir "$DIR_NAME"
|
||||
# get around the permission issues
|
||||
cp -r package/* "$DIR_NAME"
|
||||
|
||||
. .ci/scripts/common/post-upload.sh
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
steps:
|
||||
- script: mkdir artifacts || echo 'X' > artifacts/T1.txt
|
||||
- publish: artifacts
|
||||
artifact: 'yuzu-$(BuildName)-mock'
|
||||
displayName: 'Upload Artifacts'
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
parameters:
|
||||
artifactSource: 'true'
|
||||
cache: 'false'
|
||||
version: ''
|
||||
|
||||
steps:
|
||||
- task: Powershell@2
|
||||
displayName: 'Install Vulkan SDK'
|
||||
inputs:
|
||||
targetType: 'filePath'
|
||||
filePath: './.ci/scripts/windows/install-vulkan-sdk.ps1'
|
||||
- script: refreshenv && glslangValidator --version && mkdir build && cd build && cmake -E env CXXFLAGS="/Gw" cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_POLICY_DEFAULT_CMP0069=NEW -DYUZU_ENABLE_LTO=ON -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DYUZU_TESTS=OFF -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DDISPLAY_VERSION=${{ parameters['version'] }} -DCMAKE_BUILD_TYPE=Release -DYUZU_CRASH_DUMPS=ON .. && cd ..
|
||||
displayName: 'Configure CMake'
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build'
|
||||
inputs:
|
||||
solution: 'build/yuzu.sln'
|
||||
maximumCpuCount: true
|
||||
configuration: release
|
||||
- task: PowerShell@2
|
||||
displayName: 'Package Artifacts'
|
||||
inputs:
|
||||
targetType: 'filePath'
|
||||
filePath: './.ci/scripts/windows/upload.ps1'
|
||||
arguments: '$(BuildName)'
|
||||
- publish: artifacts
|
||||
artifact: 'yuzu-$(BuildName)-windows-msvc'
|
||||
displayName: 'Upload Artifacts'
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
parameters:
|
||||
artifactSource: 'true'
|
||||
cache: 'false'
|
||||
version: ''
|
||||
|
||||
steps:
|
||||
- task: DockerInstaller@0
|
||||
displayName: 'Prepare Environment'
|
||||
inputs:
|
||||
dockerVersion: '17.09.0-ce'
|
||||
- task: CacheBeta@0
|
||||
displayName: 'Cache Build System'
|
||||
inputs:
|
||||
key: yuzu-v1-$(BuildName)-$(BuildSuffix)-$(CacheSuffix)
|
||||
path: $(System.DefaultWorkingDirectory)/ccache
|
||||
cacheHitVar: CACHE_RESTORED
|
||||
- script: chmod a+x ./.ci/scripts/$(ScriptFolder)/exec.sh && ./.ci/scripts/$(ScriptFolder)/exec.sh ${{ parameters['version'] }}
|
||||
displayName: 'Build'
|
||||
- script: chmod a+x ./.ci/scripts/$(ScriptFolder)/upload.sh && RELEASE_NAME=$(BuildName) ./.ci/scripts/$(ScriptFolder)/upload.sh
|
||||
displayName: 'Package Artifacts'
|
||||
- publish: artifacts
|
||||
artifact: 'yuzu-$(BuildName)-$(BuildSuffix)'
|
||||
displayName: 'Upload Artifacts'
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
parameters:
|
||||
version: ''
|
||||
|
||||
jobs:
|
||||
- job: build
|
||||
displayName: 'standard'
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
strategy:
|
||||
maxParallel: 10
|
||||
matrix:
|
||||
windows:
|
||||
BuildSuffix: 'windows-mingw'
|
||||
ScriptFolder: 'windows'
|
||||
clang:
|
||||
BuildSuffix: 'clang'
|
||||
ScriptFolder: 'clang'
|
||||
linux:
|
||||
BuildSuffix: 'linux'
|
||||
ScriptFolder: 'linux'
|
||||
steps:
|
||||
- template: ./sync-source.yml
|
||||
parameters:
|
||||
artifactSource: $(parameters.artifactSource)
|
||||
needSubmodules: 'true'
|
||||
- template: ./build-single.yml
|
||||
parameters:
|
||||
artifactSource: 'false'
|
||||
cache: $(parameters.cache)
|
||||
version: $(parameters.version)
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
parameters:
|
||||
version: ''
|
||||
|
||||
jobs:
|
||||
- job: build_test
|
||||
displayName: 'testing'
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
strategy:
|
||||
maxParallel: 5
|
||||
matrix:
|
||||
windows:
|
||||
BuildSuffix: 'windows-testing'
|
||||
ScriptFolder: 'windows'
|
||||
steps:
|
||||
- script: sudo apt-get update && sudo apt-get --only-upgrade -y install python3-pip && pip install requests urllib3
|
||||
displayName: 'Prepare Environment'
|
||||
- task: PythonScript@0
|
||||
condition: eq(variables['Build.Reason'], 'PullRequest')
|
||||
displayName: 'Determine Testing Status'
|
||||
inputs:
|
||||
scriptSource: 'filePath'
|
||||
scriptPath: '.ci/scripts/merge/check-label-presence.py'
|
||||
arguments: '$(System.PullRequest.PullRequestNumber) create-testing-build'
|
||||
- ${{ if eq(variables.enabletesting, 'true') }}:
|
||||
- template: ./sync-source.yml
|
||||
parameters:
|
||||
artifactSource: $(parameters.artifactSource)
|
||||
needSubmodules: 'true'
|
||||
- template: ./mergebot.yml
|
||||
parameters:
|
||||
matchLabel: 'testing-merge'
|
||||
- template: ./build-single.yml
|
||||
parameters:
|
||||
artifactSource: 'false'
|
||||
cache: 'false'
|
||||
version: $(parameters.version)
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
parameters:
|
||||
artifactSource: 'true'
|
||||
|
||||
steps:
|
||||
- template: ./sync-source.yml
|
||||
parameters:
|
||||
artifactSource: $(parameters.artifactSource)
|
||||
needSubmodules: 'false'
|
||||
- task: DockerInstaller@0
|
||||
displayName: 'Prepare Environment'
|
||||
inputs:
|
||||
dockerVersion: '17.09.0-ce'
|
||||
- script: chmod a+x ./.ci/scripts/format/exec.sh && ./.ci/scripts/format/exec.sh
|
||||
displayName: 'Verify Formatting'
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
jobs:
|
||||
- job: merge
|
||||
displayName: 'pull requests'
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- checkout: self
|
||||
submodules: recursive
|
||||
- template: ./mergebot-private.yml
|
||||
parameters:
|
||||
matchLabel: '$(BuildName)-merge'
|
||||
matchLabelPublic: '$(PublicBuildName)-merge'
|
||||
- task: ArchiveFiles@2
|
||||
displayName: 'Package Source'
|
||||
inputs:
|
||||
rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
|
||||
includeRootFolder: false
|
||||
archiveType: '7z'
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/yuzu-$(BuildName)-source.7z'
|
||||
- task: PublishPipelineArtifact@1
|
||||
displayName: 'Upload Artifacts'
|
||||
inputs:
|
||||
targetPath: '$(Build.ArtifactStagingDirectory)/yuzu-$(BuildName)-source.7z'
|
||||
artifact: 'yuzu-$(BuildName)-source'
|
||||
replaceExistingArchive: true
|
||||
- job: upload_source
|
||||
displayName: 'upload'
|
||||
dependsOn: merge
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- template: ./sync-source.yml
|
||||
parameters:
|
||||
artifactSource: 'true'
|
||||
needSubmodules: 'true'
|
||||
- script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh
|
||||
displayName: 'Apply Git Configuration'
|
||||
- script: git remote add other $(GitRepoPushChangesURL)
|
||||
displayName: 'Register Repository'
|
||||
- script: git push --force other HEAD:$(GitPushBranch)
|
||||
displayName: 'Update Code'
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
jobs:
|
||||
- job: merge
|
||||
displayName: 'pull requests'
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- checkout: self
|
||||
submodules: recursive
|
||||
- template: ./mergebot.yml
|
||||
parameters:
|
||||
matchLabel: '$(BuildName)-merge'
|
||||
- task: ArchiveFiles@2
|
||||
displayName: 'Package Source'
|
||||
inputs:
|
||||
rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
|
||||
includeRootFolder: false
|
||||
archiveType: '7z'
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/yuzu-$(BuildName)-source.7z'
|
||||
- task: PublishPipelineArtifact@1
|
||||
displayName: 'Upload Artifacts'
|
||||
inputs:
|
||||
targetPath: '$(Build.ArtifactStagingDirectory)/yuzu-$(BuildName)-source.7z'
|
||||
artifact: 'yuzu-$(BuildName)-source'
|
||||
replaceExistingArchive: true
|
||||
- job: upload_source
|
||||
displayName: 'upload'
|
||||
dependsOn: merge
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- template: ./sync-source.yml
|
||||
parameters:
|
||||
artifactSource: 'true'
|
||||
needSubmodules: 'true'
|
||||
- script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh
|
||||
displayName: 'Apply Git Configuration'
|
||||
- script: git remote add other $(GitRepoPushChangesURL)
|
||||
displayName: 'Register Repository'
|
||||
- script: git push --force other HEAD:$(GitPushBranch)
|
||||
displayName: 'Update Code'
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
parameters:
|
||||
matchLabel: 'dummy-merge'
|
||||
matchLabelPublic: 'dummy-merge'
|
||||
|
||||
steps:
|
||||
- script: mkdir $(System.DefaultWorkingDirectory)/patches && pip install requests urllib3
|
||||
displayName: 'Prepare Environment'
|
||||
- script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh
|
||||
displayName: 'Apply Git Configuration'
|
||||
- task: PythonScript@0
|
||||
displayName: 'Discover, Download, and Apply Patches (Mainline)'
|
||||
inputs:
|
||||
scriptSource: 'filePath'
|
||||
scriptPath: '.ci/scripts/merge/apply-patches-by-label.py'
|
||||
arguments: '${{ parameters.matchLabelPublic }} $(MergeTaglinePublic) patches-public'
|
||||
workingDirectory: '$(System.DefaultWorkingDirectory)'
|
||||
- task: PythonScript@0
|
||||
displayName: 'Discover, Download, and Apply Patches (Patreon Public)'
|
||||
inputs:
|
||||
scriptSource: 'filePath'
|
||||
scriptPath: '.ci/scripts/merge/apply-patches-by-label.py'
|
||||
arguments: '${{ parameters.matchLabel }} "$(MergeTaglinePrivate) Public" patches-mixed-public'
|
||||
workingDirectory: '$(System.DefaultWorkingDirectory)'
|
||||
- task: PythonScript@0
|
||||
displayName: 'Discover, Download, and Apply Patches (Patreon Private)'
|
||||
inputs:
|
||||
scriptSource: 'filePath'
|
||||
scriptPath: '.ci/scripts/merge/apply-patches-by-label-private.py'
|
||||
arguments: '$(PrivateMergeUser) ${{ parameters.matchLabel }} "$(MergeTaglinePrivate) Private" patches-private'
|
||||
workingDirectory: '$(System.DefaultWorkingDirectory)'
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
parameters:
|
||||
matchLabel: 'dummy-merge'
|
||||
|
||||
steps:
|
||||
- script: mkdir $(System.DefaultWorkingDirectory)/patches && pip install requests urllib3
|
||||
displayName: 'Prepare Environment'
|
||||
- script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh
|
||||
displayName: 'Apply Git Configuration'
|
||||
- task: PythonScript@0
|
||||
displayName: 'Discover, Download, and Apply Patches'
|
||||
inputs:
|
||||
scriptSource: 'filePath'
|
||||
scriptPath: '.ci/scripts/merge/apply-patches-by-label.py'
|
||||
arguments: '${{ parameters.matchLabel }} Tagged patches'
|
||||
workingDirectory: '$(System.DefaultWorkingDirectory)'
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
steps:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download Windows Release'
|
||||
inputs:
|
||||
artifactName: 'yuzu-$(BuildName)-windows-msvc'
|
||||
buildType: 'current'
|
||||
targetPath: '$(Build.ArtifactStagingDirectory)'
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download Linux Release'
|
||||
inputs:
|
||||
artifactName: 'yuzu-$(BuildName)-linux'
|
||||
buildType: 'current'
|
||||
targetPath: '$(Build.ArtifactStagingDirectory)'
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
steps:
|
||||
- template: ./release-download.yml
|
||||
- task: GitHubRelease@0
|
||||
displayName: 'GitHub Release'
|
||||
inputs:
|
||||
action: 'create'
|
||||
title: '$(ReleasePrefix) $(DisplayVersion)'
|
||||
assets: '$(Build.ArtifactStagingDirectory)/*'
|
||||
gitHubConnection: $(GitHubReleaseConnectionName)
|
||||
repositoryName: '$(Build.Repository.Name)'
|
||||
target: '$(Build.SourceVersion)'
|
||||
tagSource: manual
|
||||
tag: $(BuildName)-$(DisplayPrefix)-$(DisplayVersion)
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
steps:
|
||||
- script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh
|
||||
displayName: 'Apply Git Configuration'
|
||||
- script: git tag -a $(BuildName)-$(DisplayPrefix)-$(DisplayVersion) -m "yuzu $(BuildName) $(Build.BuildNumber) $(Build.DefinitionName) $(DisplayPrefix)-$(DisplayVersion)"
|
||||
displayName: 'Tag Source'
|
||||
- script: git remote add other $(GitRepoPushChangesURL)
|
||||
displayName: 'Register Repository'
|
||||
- script: git push other $(BuildName)-$(DisplayPrefix)-$(DisplayVersion)
|
||||
displayName: 'Update Code'
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
steps:
|
||||
- template: ./release-download.yml
|
||||
- task: UniversalPackages@0
|
||||
displayName: Publish Artifacts
|
||||
inputs:
|
||||
command: publish
|
||||
publishDirectory: '$(Build.ArtifactStagingDirectory)'
|
||||
vstsFeedPublish: 'yuzu-$(BuildName)'
|
||||
vstsFeedPackagePublish: 'main'
|
||||
packagePublishDescription: 'Yuzu Windows and Linux Executable Packages'
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
steps:
|
||||
- checkout: none
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download Source'
|
||||
inputs:
|
||||
artifactName: 'yuzu-$(BuildName)-source'
|
||||
buildType: 'current'
|
||||
targetPath: '$(Build.ArtifactStagingDirectory)'
|
||||
- script: rm -rf $(System.DefaultWorkingDirectory) && mkdir $(System.DefaultWorkingDirectory)
|
||||
displayName: 'Clean Working Directory'
|
||||
- task: ExtractFiles@1
|
||||
displayName: 'Prepare Source'
|
||||
inputs:
|
||||
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/*.7z'
|
||||
destinationFolder: '$(System.DefaultWorkingDirectory)'
|
||||
cleanDestinationFolder: false
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
parameters:
|
||||
needSubmodules: 'true'
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
displayName: 'Checkout Recursive'
|
||||
submodules: recursive
|
||||
# condition: eq(parameters.needSubmodules, 'true')
|
||||
#- checkout: self
|
||||
# displayName: 'Checkout Fast'
|
||||
# condition: ne(parameters.needSubmodules, 'true')
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
steps:
|
||||
- ${{ if eq(parameters.artifactSource, 'true') }}:
|
||||
- template: ./retrieve-artifact-source.yml
|
||||
- ${{ if ne(parameters.artifactSource, 'true') }}:
|
||||
- template: ./retrieve-master-source.yml
|
||||
parameters:
|
||||
needSubmodules: $(parameters.needSubmodules)
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
trigger:
|
||||
- master
|
||||
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
|
||||
stages:
|
||||
- stage: merge
|
||||
displayName: 'merge'
|
||||
jobs:
|
||||
- template: ./templates/merge.yml
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
trigger:
|
||||
- master
|
||||
|
||||
variables:
|
||||
DisplayVersion: $[counter(variables['DisplayPrefix'], 1)]
|
||||
|
||||
stages:
|
||||
- stage: build
|
||||
displayName: 'build'
|
||||
jobs:
|
||||
- job: build
|
||||
timeoutInMinutes: 120
|
||||
displayName: 'standard'
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
strategy:
|
||||
maxParallel: 10
|
||||
matrix:
|
||||
linux:
|
||||
BuildSuffix: 'linux'
|
||||
ScriptFolder: 'linux'
|
||||
steps:
|
||||
- template: ./templates/sync-source.yml
|
||||
parameters:
|
||||
artifactSource: $(parameters.artifactSource)
|
||||
needSubmodules: 'true'
|
||||
- template: ./templates/build-single.yml
|
||||
parameters:
|
||||
artifactSource: 'false'
|
||||
cache: 'true'
|
||||
version: $(DisplayVersion)
|
||||
- stage: build_win
|
||||
displayName: 'build-windows'
|
||||
jobs:
|
||||
- job: build
|
||||
timeoutInMinutes: 120
|
||||
displayName: 'msvc'
|
||||
pool:
|
||||
vmImage: windows-2022
|
||||
steps:
|
||||
- template: ./templates/sync-source.yml
|
||||
parameters:
|
||||
artifactSource: $(parameters.artifactSource)
|
||||
needSubmodules: 'true'
|
||||
- template: ./templates/build-msvc.yml
|
||||
parameters:
|
||||
artifactSource: 'false'
|
||||
cache: 'true'
|
||||
version: $(DisplayVersion)
|
||||
- stage: release
|
||||
displayName: 'release'
|
||||
dependsOn:
|
||||
- build
|
||||
- build_win
|
||||
jobs:
|
||||
- job: github
|
||||
displayName: 'github'
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- template: ./templates/release-github.yml
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
trigger:
|
||||
- master
|
||||
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
|
||||
stages:
|
||||
- stage: merge
|
||||
displayName: 'merge'
|
||||
jobs:
|
||||
- template: ./templates/merge-private.yml
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
trigger:
|
||||
- master
|
||||
|
||||
variables:
|
||||
DisplayVersion: $[counter(variables['DisplayPrefix'], 1)]
|
||||
|
||||
stages:
|
||||
- stage: build
|
||||
displayName: 'build'
|
||||
jobs:
|
||||
- job: linux
|
||||
timeoutInMinutes: 120
|
||||
displayName: 'linux'
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
strategy:
|
||||
maxParallel: 10
|
||||
matrix:
|
||||
linux:
|
||||
BuildSuffix: 'linux'
|
||||
ScriptFolder: 'linux'
|
||||
steps:
|
||||
- template: ./templates/sync-source.yml
|
||||
parameters:
|
||||
artifactSource: $(parameters.artifactSource)
|
||||
needSubmodules: 'true'
|
||||
- template: ./templates/build-single.yml
|
||||
parameters:
|
||||
artifactSource: 'false'
|
||||
cache: $(parameters.cache)
|
||||
version: $(DisplayVersion)
|
||||
- job: msvc
|
||||
timeoutInMinutes: 120
|
||||
displayName: 'windows'
|
||||
pool:
|
||||
vmImage: windows-2022
|
||||
steps:
|
||||
- template: ./templates/sync-source.yml
|
||||
parameters:
|
||||
artifactSource: $(parameters.artifactSource)
|
||||
needSubmodules: 'true'
|
||||
- template: ./templates/build-msvc.yml
|
||||
parameters:
|
||||
artifactSource: 'false'
|
||||
cache: $(parameters.cache)
|
||||
version: $(DisplayVersion)
|
||||
- stage: release
|
||||
displayName: 'release'
|
||||
dependsOn: build
|
||||
jobs:
|
||||
- job: release
|
||||
displayName: 'source'
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- template: ./templates/release-private-tag.yml
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
trigger:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
- job: copy
|
||||
displayName: 'Sync Repository'
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- script: echo 'https://$(GitUsername):$(GitAccessToken)@dev.azure.com' > $HOME/.git-credentials
|
||||
displayName: 'Load Credentials'
|
||||
- script: git config --global credential.helper store
|
||||
displayName: 'Register Credential Helper'
|
||||
- script: git remote add other $(GitRepoPushChangesURL)
|
||||
displayName: 'Register Repository'
|
||||
- script: git push --force other HEAD:$(GitPushBranch)
|
||||
displayName: 'Update Code'
|
||||
- script: rm -rf $HOME/.git-credentials
|
||||
displayName: 'Clear Cached Credentials'
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
stages:
|
||||
- stage: format
|
||||
displayName: 'format'
|
||||
jobs:
|
||||
- job: format
|
||||
displayName: 'clang'
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- template: ./templates/format-check.yml
|
||||
parameters:
|
||||
artifactSource: 'false'
|
||||
- stage: build
|
||||
displayName: 'build'
|
||||
dependsOn: format
|
||||
jobs:
|
||||
- template: ./templates/build-standard.yml
|
||||
parameters:
|
||||
cache: 'false'
|
||||
- template: ./templates/build-testing.yml
|
||||
6
.github/FUNDING.yml
vendored
6
.github/FUNDING.yml
vendored
|
|
@ -1,6 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# These are supported funding model platforms
|
||||
|
||||
patreon: yuzuteam
|
||||
7
.github/ISSUE_TEMPLATE/config.yml
vendored
7
.github/ISSUE_TEMPLATE/config.yml
vendored
|
|
@ -1,8 +1 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: yuzu Discord
|
||||
url: https://discord.com/invite/u77vRWY
|
||||
about: If you are experiencing an issue with yuzu, and you need tech support, or if you have a general question, try asking in the official yuzu Discord linked here. Piracy is not allowed.
|
||||
- name: Community forums
|
||||
url: https://community.citra-emu.org
|
||||
about: This is an alternative place for tech support, however helpers there are not as active.
|
||||
|
|
|
|||
80
.github/workflows/android-build.yml
vendored
80
.github/workflows/android-build.yml
vendored
|
|
@ -1,80 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
name: 'yuzu-android-build'
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: [ "*" ]
|
||||
|
||||
jobs:
|
||||
android:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.repository == 'yuzu-emu/yuzu-android' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
- name: Set up cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
~/.ccache
|
||||
key: ${{ runner.os }}-android-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-android-
|
||||
- name: Query tag name
|
||||
uses: olegtarasov/get-tag@v2.1.2
|
||||
id: tagName
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ccache apksigner glslang-dev glslang-tools
|
||||
- name: Build
|
||||
run: ./.ci/scripts/android/build.sh
|
||||
env:
|
||||
ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }}
|
||||
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
|
||||
- name: Copy artifacts
|
||||
run: ./.ci/scripts/android/upload.sh
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: android
|
||||
path: artifacts/
|
||||
# release steps
|
||||
release-android:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [android]
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/download-artifact@v3
|
||||
- name: Query tag name
|
||||
uses: olegtarasov/get-tag@v2.1.2
|
||||
id: tagName
|
||||
- name: Create release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ steps.tagName.outputs.tag }}
|
||||
release_name: ${{ steps.tagName.outputs.tag }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
- name: Upload artifacts
|
||||
uses: alexellis/upload-assets@0.2.3
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
asset_paths: '["./**/*.apk","./**/*.aab"]'
|
||||
66
.github/workflows/android-ea-play-release.yml
vendored
66
.github/workflows/android-ea-play-release.yml
vendored
|
|
@ -1,66 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
name: yuzu-android-ea-play-release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release-track:
|
||||
description: 'Play store release track (internal/alpha/beta/production)'
|
||||
required: true
|
||||
default: 'alpha'
|
||||
|
||||
jobs:
|
||||
android:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.repository == 'yuzu-emu/yuzu' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
name: Checkout
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
token: ${{ secrets.ALT_GITHUB_TOKEN }}
|
||||
- run: npm install execa@5
|
||||
- uses: actions/github-script@v5
|
||||
name: 'Merge and publish Android EA changes'
|
||||
env:
|
||||
ALT_GITHUB_TOKEN: ${{ secrets.ALT_GITHUB_TOKEN }}
|
||||
BUILD_EA: true
|
||||
with:
|
||||
script: |
|
||||
const execa = require("execa");
|
||||
const mergebot = require('./.github/workflows/android-merge.js').mergebot;
|
||||
process.chdir('${{ github.workspace }}');
|
||||
mergebot(github, context, execa);
|
||||
- name: Get tag name
|
||||
run: echo "GIT_TAG_NAME=$(cat tag-name.txt)" >> $GITHUB_ENV
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ccache apksigner glslang-dev glslang-tools
|
||||
- name: Build
|
||||
run: ./.ci/scripts/android/eabuild.sh
|
||||
env:
|
||||
EA_PLAY_ANDROID_KEYSTORE_B64: ${{ secrets.PLAY_ANDROID_KEYSTORE_B64 }}
|
||||
PLAY_ANDROID_KEY_ALIAS: ${{ secrets.PLAY_ANDROID_KEY_ALIAS }}
|
||||
PLAY_ANDROID_KEYSTORE_PASS: ${{ secrets.PLAY_ANDROID_KEYSTORE_PASS }}
|
||||
EA_SERVICE_ACCOUNT_KEY_B64: ${{ secrets.EA_SERVICE_ACCOUNT_KEY_B64 }}
|
||||
STORE_TRACK: ${{ github.event.inputs.release-track }}
|
||||
AUTO_VERSIONED: true
|
||||
BUILD_EA: true
|
||||
- name: Create release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ${{ env.EA_TAG_NAME }}
|
||||
name: ${{ env.EA_TAG_NAME }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
repository: yuzu/yuzu-android
|
||||
token: ${{ secrets.ALT_GITHUB_TOKEN }}
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
name: yuzu-android-mainline-play-release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release-tag:
|
||||
description: 'Tag # from yuzu-android that you want to build and publish'
|
||||
required: true
|
||||
default: '200'
|
||||
release-track:
|
||||
description: 'Play store release track (internal/alpha/beta/production)'
|
||||
required: true
|
||||
default: 'alpha'
|
||||
|
||||
jobs:
|
||||
android:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.repository == 'yuzu-emu/yuzu' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
name: Checkout
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
token: ${{ secrets.ALT_GITHUB_TOKEN }}
|
||||
- run: npm install execa@5
|
||||
- uses: actions/github-script@v5
|
||||
name: 'Pull mainline tag'
|
||||
env:
|
||||
MAINLINE_TAG: ${{ github.event.inputs.release-tag }}
|
||||
with:
|
||||
script: |
|
||||
const execa = require("execa");
|
||||
const mergebot = require('./.github/workflows/android-merge.js').getMainlineTag;
|
||||
process.chdir('${{ github.workspace }}');
|
||||
mergebot(execa);
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ccache apksigner glslang-dev glslang-tools
|
||||
- name: Build
|
||||
run: |
|
||||
echo "GIT_TAG_NAME=android-${{ github.event.inputs.releast-tag }}" >> $GITHUB_ENV
|
||||
./.ci/scripts/android/mainlinebuild.sh
|
||||
env:
|
||||
MAINLINE_PLAY_ANDROID_KEYSTORE_B64: ${{ secrets.PLAY_ANDROID_KEYSTORE_B64 }}
|
||||
PLAY_ANDROID_KEY_ALIAS: ${{ secrets.PLAY_ANDROID_KEY_ALIAS }}
|
||||
PLAY_ANDROID_KEYSTORE_PASS: ${{ secrets.PLAY_ANDROID_KEYSTORE_PASS }}
|
||||
SERVICE_ACCOUNT_KEY_B64: ${{ secrets.MAINLINE_SERVICE_ACCOUNT_KEY_B64 }}
|
||||
STORE_TRACK: ${{ github.event.inputs.release-track }}
|
||||
AUTO_VERSIONED: true
|
||||
318
.github/workflows/android-merge.js
vendored
318
.github/workflows/android-merge.js
vendored
|
|
@ -1,318 +0,0 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
// Note: This is a GitHub Actions script
|
||||
// It is not meant to be executed directly on your machine without modifications
|
||||
|
||||
const fs = require("fs");
|
||||
// which label to check for changes
|
||||
const CHANGE_LABEL_MAINLINE = 'android-merge';
|
||||
const CHANGE_LABEL_EA = 'android-ea-merge';
|
||||
// how far back in time should we consider the changes are "recent"? (default: 24 hours)
|
||||
const DETECTION_TIME_FRAME = (parseInt(process.env.DETECTION_TIME_FRAME)) || (24 * 3600 * 1000);
|
||||
const BUILD_EA = process.env.BUILD_EA == 'true';
|
||||
const MAINLINE_TAG = process.env.MAINLINE_TAG;
|
||||
|
||||
async function checkBaseChanges(github) {
|
||||
// query the commit date of the latest commit on this branch
|
||||
const query = `query($owner:String!, $name:String!, $ref:String!) {
|
||||
repository(name:$name, owner:$owner) {
|
||||
ref(qualifiedName:$ref) {
|
||||
target {
|
||||
... on Commit { id pushedDate oid }
|
||||
}
|
||||
}
|
||||
}
|
||||
}`;
|
||||
const variables = {
|
||||
owner: 'yuzu-emu',
|
||||
name: 'yuzu',
|
||||
ref: 'refs/heads/master',
|
||||
};
|
||||
const result = await github.graphql(query, variables);
|
||||
const pushedAt = result.repository.ref.target.pushedDate;
|
||||
console.log(`Last commit pushed at ${pushedAt}.`);
|
||||
const delta = new Date() - new Date(pushedAt);
|
||||
if (delta <= DETECTION_TIME_FRAME) {
|
||||
console.info('New changes detected, triggering a new build.');
|
||||
return true;
|
||||
}
|
||||
console.info('No new changes detected.');
|
||||
return false;
|
||||
}
|
||||
|
||||
async function checkAndroidChanges(github) {
|
||||
if (checkBaseChanges(github)) return true;
|
||||
const pulls = getPulls(github, false);
|
||||
for (let i = 0; i < pulls.length; i++) {
|
||||
let pull = pulls[i];
|
||||
if (new Date() - new Date(pull.headRepository.pushedAt) <= DETECTION_TIME_FRAME) {
|
||||
console.info(`${pull.number} updated at ${pull.headRepository.pushedAt}`);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
console.info("No changes detected in any tagged pull requests.");
|
||||
return false;
|
||||
}
|
||||
|
||||
async function tagAndPush(github, owner, repo, execa, commit=false) {
|
||||
let altToken = process.env.ALT_GITHUB_TOKEN;
|
||||
if (!altToken) {
|
||||
throw `Please set ALT_GITHUB_TOKEN environment variable. This token should have write access to ${owner}/${repo}.`;
|
||||
}
|
||||
const query = `query ($owner:String!, $name:String!) {
|
||||
repository(name:$name, owner:$owner) {
|
||||
refs(refPrefix: "refs/tags/", orderBy: {field: TAG_COMMIT_DATE, direction: DESC}, first: 10) {
|
||||
nodes { name }
|
||||
}
|
||||
}
|
||||
}`;
|
||||
const variables = {
|
||||
owner: owner,
|
||||
name: repo,
|
||||
};
|
||||
const tags = await github.graphql(query, variables);
|
||||
const tagList = tags.repository.refs.nodes;
|
||||
let lastTag = 'android-1';
|
||||
for (let i = 0; i < tagList.length; ++i) {
|
||||
if (tagList[i].name.includes('android-')) {
|
||||
lastTag = tagList[i].name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
const tagNumber = /\w+-(\d+)/.exec(lastTag)[1] | 0;
|
||||
const channel = repo.split('-')[1];
|
||||
const newTag = `${channel}-${tagNumber + 1}`;
|
||||
console.log(`New tag: ${newTag}`);
|
||||
if (commit) {
|
||||
let channelName = channel[0].toUpperCase() + channel.slice(1);
|
||||
console.info(`Committing pending commit as ${channelName} ${tagNumber + 1}`);
|
||||
await execa("git", ['commit', '-m', `${channelName} ${tagNumber + 1}`]);
|
||||
}
|
||||
console.info('Pushing tags to GitHub ...');
|
||||
await execa("git", ['tag', newTag]);
|
||||
await execa("git", ['remote', 'add', 'target', `https://${altToken}@github.com/${owner}/${repo}.git`]);
|
||||
await execa("git", ['push', 'target', 'master', '-f']);
|
||||
await execa("git", ['push', 'target', 'master', '--tags']);
|
||||
console.info('Successfully pushed new changes.');
|
||||
}
|
||||
|
||||
async function tagAndPushEA(github, owner, repo, execa) {
|
||||
let altToken = process.env.ALT_GITHUB_TOKEN;
|
||||
if (!altToken) {
|
||||
throw `Please set ALT_GITHUB_TOKEN environment variable. This token should have write access to ${owner}/${repo}.`;
|
||||
}
|
||||
const query = `query ($owner:String!, $name:String!) {
|
||||
repository(name:$name, owner:$owner) {
|
||||
refs(refPrefix: "refs/tags/", orderBy: {field: TAG_COMMIT_DATE, direction: DESC}, first: 10) {
|
||||
nodes { name }
|
||||
}
|
||||
}
|
||||
}`;
|
||||
const variables = {
|
||||
owner: owner,
|
||||
name: repo,
|
||||
};
|
||||
const tags = await github.graphql(query, variables);
|
||||
const tagList = tags.repository.refs.nodes;
|
||||
let lastTag = 'ea-1';
|
||||
for (let i = 0; i < tagList.length; ++i) {
|
||||
if (tagList[i].name.includes('ea-')) {
|
||||
lastTag = tagList[i].name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
const tagNumber = /\w+-(\d+)/.exec(lastTag)[1] | 0;
|
||||
const newTag = `ea-${tagNumber + 1}`;
|
||||
console.log(`New tag: ${newTag}`);
|
||||
console.info('Pushing tags to GitHub ...');
|
||||
await execa("git", ["remote", "add", "android", "https://github.com/yuzu-emu/yuzu-android.git"]);
|
||||
await execa("git", ["fetch", "android"]);
|
||||
|
||||
await execa("git", ['tag', newTag]);
|
||||
await execa("git", ['push', 'android', `${newTag}`]);
|
||||
|
||||
fs.writeFile('tag-name.txt', newTag, (err) => {
|
||||
if (err) throw 'Could not write tag name to file!'
|
||||
})
|
||||
|
||||
console.info('Successfully pushed new changes.');
|
||||
}
|
||||
|
||||
async function generateReadme(pulls, context, mergeResults, execa) {
|
||||
let baseUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/`;
|
||||
let output =
|
||||
"| Pull Request | Commit | Title | Author | Merged? |\n|----|----|----|----|----|\n";
|
||||
for (let pull of pulls) {
|
||||
let pr = pull.number;
|
||||
let result = mergeResults[pr];
|
||||
output += `| [${pr}](${baseUrl}/pull/${pr}) | [\`${result.rev || "N/A"}\`](${baseUrl}/pull/${pr}/files) | ${pull.title} | [${pull.author.login}](https://github.com/${pull.author.login}/) | ${result.success ? "Yes" : "No"} |\n`;
|
||||
}
|
||||
output +=
|
||||
"\n\nEnd of merge log. You can find the original README.md below the break.\n\n-----\n\n";
|
||||
output += fs.readFileSync("./README.md");
|
||||
fs.writeFileSync("./README.md", output);
|
||||
await execa("git", ["add", "README.md"]);
|
||||
}
|
||||
|
||||
async function fetchPullRequests(pulls, repoUrl, execa) {
|
||||
console.log("::group::Fetch pull requests");
|
||||
for (let pull of pulls) {
|
||||
let pr = pull.number;
|
||||
console.info(`Fetching PR ${pr} ...`);
|
||||
await execa("git", [
|
||||
"fetch",
|
||||
"-f",
|
||||
"--no-recurse-submodules",
|
||||
repoUrl,
|
||||
`pull/${pr}/head:pr-${pr}`,
|
||||
]);
|
||||
}
|
||||
console.log("::endgroup::");
|
||||
}
|
||||
|
||||
async function mergePullRequests(pulls, execa) {
|
||||
let mergeResults = {};
|
||||
console.log("::group::Merge pull requests");
|
||||
await execa("git", ["config", "--global", "user.name", "yuzubot"]);
|
||||
await execa("git", [
|
||||
"config",
|
||||
"--global",
|
||||
"user.email",
|
||||
"yuzu\x40yuzu-emu\x2eorg", // prevent email harvesters from scraping the address
|
||||
]);
|
||||
let hasFailed = false;
|
||||
for (let pull of pulls) {
|
||||
let pr = pull.number;
|
||||
console.info(`Merging PR ${pr} ...`);
|
||||
try {
|
||||
const process1 = execa("git", [
|
||||
"merge",
|
||||
"--squash",
|
||||
"--no-edit",
|
||||
`pr-${pr}`,
|
||||
]);
|
||||
process1.stdout.pipe(process.stdout);
|
||||
await process1;
|
||||
|
||||
const process2 = execa("git", ["commit", "-m", `Merge yuzu-emu#${pr}`]);
|
||||
process2.stdout.pipe(process.stdout);
|
||||
await process2;
|
||||
|
||||
const process3 = await execa("git", ["rev-parse", "--short", `pr-${pr}`]);
|
||||
mergeResults[pr] = {
|
||||
success: true,
|
||||
rev: process3.stdout,
|
||||
};
|
||||
} catch (err) {
|
||||
console.log(
|
||||
`::error title=#${pr} not merged::Failed to merge pull request: ${pr}: ${err}`
|
||||
);
|
||||
mergeResults[pr] = { success: false };
|
||||
hasFailed = true;
|
||||
await execa("git", ["reset", "--hard"]);
|
||||
}
|
||||
}
|
||||
console.log("::endgroup::");
|
||||
if (hasFailed) {
|
||||
throw 'There are merge failures. Aborting!';
|
||||
}
|
||||
return mergeResults;
|
||||
}
|
||||
|
||||
async function resetBranch(execa) {
|
||||
console.log("::group::Reset master branch");
|
||||
let hasFailed = false;
|
||||
try {
|
||||
await execa("git", ["remote", "add", "source", "https://github.com/yuzu-emu/yuzu.git"]);
|
||||
await execa("git", ["fetch", "source"]);
|
||||
const process1 = await execa("git", ["rev-parse", "source/master"]);
|
||||
const headCommit = process1.stdout;
|
||||
|
||||
await execa("git", ["reset", "--hard", headCommit]);
|
||||
} catch (err) {
|
||||
console.log(`::error title=Failed to reset master branch`);
|
||||
hasFailed = true;
|
||||
}
|
||||
console.log("::endgroup::");
|
||||
if (hasFailed) {
|
||||
throw 'Failed to reset the master branch. Aborting!';
|
||||
}
|
||||
}
|
||||
|
||||
async function getPulls(github) {
|
||||
const query = `query ($owner:String!, $name:String!, $label:String!) {
|
||||
repository(name:$name, owner:$owner) {
|
||||
pullRequests(labels: [$label], states: OPEN, first: 100) {
|
||||
nodes {
|
||||
number title author { login }
|
||||
}
|
||||
}
|
||||
}
|
||||
}`;
|
||||
const mainlineVariables = {
|
||||
owner: 'yuzu-emu',
|
||||
name: 'yuzu',
|
||||
label: CHANGE_LABEL_MAINLINE,
|
||||
};
|
||||
const mainlineResult = await github.graphql(query, mainlineVariables);
|
||||
const pulls = mainlineResult.repository.pullRequests.nodes;
|
||||
if (BUILD_EA) {
|
||||
const eaVariables = {
|
||||
owner: 'yuzu-emu',
|
||||
name: 'yuzu',
|
||||
label: CHANGE_LABEL_EA,
|
||||
};
|
||||
const eaResult = await github.graphql(query, eaVariables);
|
||||
const eaPulls = eaResult.repository.pullRequests.nodes;
|
||||
return pulls.concat(eaPulls);
|
||||
}
|
||||
return pulls;
|
||||
}
|
||||
|
||||
async function getMainlineTag(execa) {
|
||||
console.log(`::group::Getting mainline tag android-${MAINLINE_TAG}`);
|
||||
let hasFailed = false;
|
||||
try {
|
||||
await execa("git", ["remote", "add", "mainline", "https://github.com/yuzu-emu/yuzu-android.git"]);
|
||||
await execa("git", ["fetch", "mainline", "--tags"]);
|
||||
await execa("git", ["checkout", `tags/android-${MAINLINE_TAG}`]);
|
||||
await execa("git", ["submodule", "update", "--init", "--recursive"]);
|
||||
} catch (err) {
|
||||
console.log('::error title=Failed pull tag');
|
||||
hasFailed = true;
|
||||
}
|
||||
console.log("::endgroup::");
|
||||
if (hasFailed) {
|
||||
throw 'Failed pull mainline tag. Aborting!';
|
||||
}
|
||||
}
|
||||
|
||||
async function mergebot(github, context, execa) {
|
||||
// Reset our local copy of master to what appears on yuzu-emu/yuzu - master
|
||||
await resetBranch(execa);
|
||||
|
||||
const pulls = await getPulls(github);
|
||||
let displayList = [];
|
||||
for (let i = 0; i < pulls.length; i++) {
|
||||
let pull = pulls[i];
|
||||
displayList.push({ PR: pull.number, Title: pull.title });
|
||||
}
|
||||
console.info("The following pull requests will be merged:");
|
||||
console.table(displayList);
|
||||
await fetchPullRequests(pulls, "https://github.com/yuzu-emu/yuzu", execa);
|
||||
const mergeResults = await mergePullRequests(pulls, execa);
|
||||
|
||||
if (BUILD_EA) {
|
||||
await tagAndPushEA(github, 'yuzu-emu', `yuzu-android`, execa);
|
||||
} else {
|
||||
await generateReadme(pulls, context, mergeResults, execa);
|
||||
await tagAndPush(github, 'yuzu-emu', `yuzu-android`, execa, true);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports.mergebot = mergebot;
|
||||
module.exports.checkAndroidChanges = checkAndroidChanges;
|
||||
module.exports.tagAndPush = tagAndPush;
|
||||
module.exports.checkBaseChanges = checkBaseChanges;
|
||||
module.exports.getMainlineTag = getMainlineTag;
|
||||
57
.github/workflows/android-publish.yml
vendored
57
.github/workflows/android-publish.yml
vendored
|
|
@ -1,57 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
name: yuzu-android-publish
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '37 0 * * *'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
android:
|
||||
description: 'Whether to trigger an Android build (true/false/auto)'
|
||||
required: false
|
||||
default: 'true'
|
||||
|
||||
jobs:
|
||||
android:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.inputs.android != 'false' && github.repository == 'yuzu-emu/yuzu' }}
|
||||
steps:
|
||||
# this checkout is required to make sure the GitHub Actions scripts are available
|
||||
- uses: actions/checkout@v3
|
||||
name: Pre-checkout
|
||||
with:
|
||||
submodules: false
|
||||
- uses: actions/github-script@v6
|
||||
id: check-changes
|
||||
name: 'Check for new changes'
|
||||
env:
|
||||
# 24 hours
|
||||
DETECTION_TIME_FRAME: 86400000
|
||||
with:
|
||||
script: |
|
||||
if (context.payload.inputs && context.payload.inputs.android === 'true') return true;
|
||||
const checkAndroidChanges = require('./.github/workflows/android-merge.js').checkAndroidChanges;
|
||||
return checkAndroidChanges(github);
|
||||
- run: npm install execa@5
|
||||
if: ${{ steps.check-changes.outputs.result == 'true' }}
|
||||
- uses: actions/checkout@v3
|
||||
name: Checkout
|
||||
if: ${{ steps.check-changes.outputs.result == 'true' }}
|
||||
with:
|
||||
path: 'yuzu-merge'
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
token: ${{ secrets.ALT_GITHUB_TOKEN }}
|
||||
- uses: actions/github-script@v5
|
||||
name: 'Check and merge Android changes'
|
||||
if: ${{ steps.check-changes.outputs.result == 'true' }}
|
||||
env:
|
||||
ALT_GITHUB_TOKEN: ${{ secrets.ALT_GITHUB_TOKEN }}
|
||||
with:
|
||||
script: |
|
||||
const execa = require("execa");
|
||||
const mergebot = require('./.github/workflows/android-merge.js').mergebot;
|
||||
process.chdir('${{ github.workspace }}/yuzu-merge');
|
||||
mergebot(github, context, execa);
|
||||
33
.github/workflows/ci.yml
vendored
33
.github/workflows/ci.yml
vendored
|
|
@ -1,33 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
name: yuzu-ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
tags: [ "*" ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
transifex:
|
||||
runs-on: ubuntu-latest
|
||||
container: yuzuemu/build-environments:linux-transifex
|
||||
if: ${{ github.repository == 'yuzu-emu/yuzu' && !github.head_ref }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
- name: Update Translation
|
||||
run: ./.ci/scripts/transifex/docker.sh
|
||||
env:
|
||||
TX_TOKEN: ${{ secrets.TRANSIFEX_API_TOKEN }}
|
||||
|
||||
reuse:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.repository == 'yuzu-emu/yuzu' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: fsfe/reuse-action@v1
|
||||
17
.github/workflows/codespell.yml
vendored
17
.github/workflows/codespell.yml
vendored
|
|
@ -1,17 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# GitHub Action to automate the identification of common misspellings in text files.
|
||||
# https://github.com/codespell-project/actions-codespell
|
||||
# https://github.com/codespell-project/codespell
|
||||
name: codespell
|
||||
on: pull_request
|
||||
permissions: {}
|
||||
jobs:
|
||||
codespell:
|
||||
name: Check for spelling errors
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: codespell-project/actions-codespell@master
|
||||
192
.github/workflows/verify.yml
vendored
192
.github/workflows/verify.yml
vendored
|
|
@ -1,192 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
name: 'yuzu verify'
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
env:
|
||||
PR_NUMBER: pr${{ github.event.number }}
|
||||
|
||||
jobs:
|
||||
format:
|
||||
name: 'verify format'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: false
|
||||
- name: set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
- name: 'Verify Formatting'
|
||||
run: bash -ex ./.ci/scripts/format/script.sh
|
||||
build:
|
||||
name: 'test build'
|
||||
needs: format
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- type: clang
|
||||
image: linux-fresh
|
||||
- type: linux
|
||||
image: linux-fresh
|
||||
- type: windows
|
||||
image: linux-mingw
|
||||
container:
|
||||
image: yuzuemu/build-environments:${{ matrix.image }}
|
||||
options: -u 1001
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
- name: Set up cache
|
||||
uses: actions/cache@v3
|
||||
id: ccache-restore
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{ runner.os }}-${{ matrix.type }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ matrix.type }}-
|
||||
- name: Create ccache directory
|
||||
if: steps.ccache-restore.outputs.cache-hit != 'true'
|
||||
run: mkdir -p ~/.ccache
|
||||
- name: Build
|
||||
run: ./.ci/scripts/${{ matrix.type }}/docker.sh
|
||||
env:
|
||||
ENABLE_COMPATIBILITY_REPORTING: "ON"
|
||||
- name: Pack
|
||||
run: ./.ci/scripts/${{ matrix.type }}/upload.sh
|
||||
env:
|
||||
NO_SOURCE_PACK: "YES"
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.type }}
|
||||
path: artifacts/
|
||||
build-mac:
|
||||
name: 'test build (macos)'
|
||||
needs: format
|
||||
runs-on: macos-14
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
brew install autoconf automake boost ccache ffmpeg fmt glslang hidapi libtool libusb lz4 ninja nlohmann-json openssl pkg-config qt@5 sdl2 speexdsp zlib zlib zstd
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
export Qt5_DIR="$(brew --prefix qt@5)/lib/cmake"
|
||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_USE_BUNDLED_VCPKG=OFF -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_LIBUSB=OFF
|
||||
ninja
|
||||
build-msvc:
|
||||
name: 'test build (windows, msvc)'
|
||||
needs: format
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
- name: Set up cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.buildcache
|
||||
key: ${{ runner.os }}-msvc-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-msvc-
|
||||
- name: Install dependencies
|
||||
shell: pwsh
|
||||
run: |
|
||||
$ErrorActionPreference = "Stop"
|
||||
$BuildCacheVer = "v0.28.4"
|
||||
$File = "buildcache-windows.zip"
|
||||
$Uri = "https://github.com/mbitsnbites/buildcache/releases/download/$BuildCacheVer/$File"
|
||||
$WebClient = New-Object System.Net.WebClient
|
||||
$WebClient.DownloadFile($Uri, $File)
|
||||
7z x $File
|
||||
$CurrentDir = Convert-Path .
|
||||
echo "$CurrentDir/buildcache/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
- name: Install Vulkan SDK
|
||||
shell: pwsh
|
||||
run: .\.ci\scripts\windows\install-vulkan-sdk.ps1
|
||||
- name: Set up MSVC
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
- name: Configure
|
||||
env:
|
||||
CC: cl.exe
|
||||
CXX: cl.exe
|
||||
run: |
|
||||
glslangValidator --version
|
||||
mkdir build
|
||||
cmake . -B build -GNinja -DCMAKE_TOOLCHAIN_FILE="CMakeModules/MSVCCache.cmake" -DUSE_CCACHE=ON -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DGIT_BRANCH=pr-verify -DYUZU_CRASH_DUMPS=ON
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
- name: Cache Summary
|
||||
run: buildcache -s
|
||||
- name: Pack
|
||||
shell: pwsh
|
||||
run: .\.ci\scripts\windows\upload.ps1
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: msvc
|
||||
path: artifacts/
|
||||
- name: Upload EXE
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.INDIVIDUAL_EXE }}
|
||||
path: ${{ env.INDIVIDUAL_EXE }}
|
||||
android:
|
||||
runs-on: ubuntu-latest
|
||||
needs: format
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
- name: set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
- name: Set up cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
~/.ccache
|
||||
key: ${{ runner.os }}-android-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-android-
|
||||
- name: Query tag name
|
||||
uses: olegtarasov/get-tag@v2.1.2
|
||||
id: tagName
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ccache apksigner glslang-dev glslang-tools
|
||||
- name: Build
|
||||
run: ./.ci/scripts/android/build.sh
|
||||
- name: Copy and sign artifacts
|
||||
env:
|
||||
ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }}
|
||||
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
|
||||
run: ./.ci/scripts/android/upload.sh
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: android
|
||||
path: artifacts/
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -5,6 +5,12 @@
|
|||
[Bb]uild*/
|
||||
doc-build/
|
||||
|
||||
# AppImageBuilder directory and torzu.AppImage
|
||||
AppImageBuilder/build/
|
||||
AppImageBuilder/appimagetool.AppImage
|
||||
AppImageBuilder/torzu.AppImage
|
||||
torzu.AppImage
|
||||
|
||||
# Generated source files
|
||||
src/common/scm_rev.cpp
|
||||
dist/english_plurals/generated_en.ts
|
||||
|
|
|
|||
47
.gitmodules
vendored
47
.gitmodules
vendored
|
|
@ -7,33 +7,15 @@
|
|||
[submodule "cubeb"]
|
||||
path = externals/cubeb
|
||||
url = https://github.com/mozilla/cubeb.git
|
||||
[submodule "dynarmic"]
|
||||
path = externals/dynarmic
|
||||
url = https://github.com/merryhime/dynarmic.git
|
||||
[submodule "libusb"]
|
||||
path = externals/libusb/libusb
|
||||
url = https://github.com/libusb/libusb.git
|
||||
[submodule "discord-rpc"]
|
||||
path = externals/discord-rpc
|
||||
url = https://github.com/yuzu-emu/discord-rpc.git
|
||||
[submodule "Vulkan-Headers"]
|
||||
path = externals/Vulkan-Headers
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers.git
|
||||
[submodule "sirit"]
|
||||
path = externals/sirit
|
||||
url = https://github.com/yuzu-emu/sirit.git
|
||||
[submodule "mbedtls"]
|
||||
path = externals/mbedtls
|
||||
url = https://github.com/yuzu-emu/mbedtls.git
|
||||
[submodule "xbyak"]
|
||||
path = externals/xbyak
|
||||
url = https://github.com/herumi/xbyak.git
|
||||
[submodule "opus"]
|
||||
path = externals/opus
|
||||
url = https://github.com/xiph/opus.git
|
||||
[submodule "SDL"]
|
||||
path = externals/SDL
|
||||
url = https://github.com/libsdl-org/SDL.git
|
||||
[submodule "cpp-httplib"]
|
||||
path = externals/cpp-httplib
|
||||
url = https://github.com/yhirose/cpp-httplib.git
|
||||
|
|
@ -49,21 +31,30 @@
|
|||
[submodule "libadrenotools"]
|
||||
path = externals/libadrenotools
|
||||
url = https://github.com/bylaws/libadrenotools.git
|
||||
[submodule "tzdb_to_nx"]
|
||||
path = externals/nx_tzdb/tzdb_to_nx
|
||||
url = https://github.com/lat9nq/tzdb_to_nx.git
|
||||
[submodule "VulkanMemoryAllocator"]
|
||||
path = externals/VulkanMemoryAllocator
|
||||
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
|
||||
[submodule "breakpad"]
|
||||
path = externals/breakpad
|
||||
url = https://github.com/yuzu-emu/breakpad.git
|
||||
[submodule "simpleini"]
|
||||
path = externals/simpleini
|
||||
url = https://github.com/brofield/simpleini.git
|
||||
[submodule "oaknut"]
|
||||
path = externals/oaknut
|
||||
url = https://github.com/merryhime/oaknut
|
||||
[submodule "Vulkan-Utility-Libraries"]
|
||||
[submodule "externals/SPIRV-Headers"]
|
||||
path = externals/SPIRV-Headers
|
||||
url = https://github.com/KhronosGroup/SPIRV-Headers.git
|
||||
[submodule "externals/SPIRV-Tools"]
|
||||
path = externals/SPIRV-Tools
|
||||
url = https://github.com/KhronosGroup/SPIRV-Tools.git
|
||||
[submodule "externals/fmt"]
|
||||
path = externals/fmt
|
||||
url = https://github.com/fmtlib/fmt.git
|
||||
[submodule "externals/Vulkan-Utility-Libraries"]
|
||||
path = externals/Vulkan-Utility-Libraries
|
||||
url = https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git
|
||||
[submodule "externals/VulkanMemoryAllocator"]
|
||||
path = externals/VulkanMemoryAllocator
|
||||
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
|
||||
[submodule "externals/Vulkan-Headers"]
|
||||
path = externals/Vulkan-Headers
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers.git
|
||||
[submodule "externals/SDL"]
|
||||
path = externals/SDL
|
||||
url = https://github.com/libsdl-org/SDL.git
|
||||
|
|
|
|||
99
AppImage-build-debian-inner.sh
Executable file
99
AppImage-build-debian-inner.sh
Executable file
|
|
@ -0,0 +1,99 @@
|
|||
#! /bin/bash
|
||||
set -e
|
||||
|
||||
# Make sure script is called from inside our container
|
||||
test -e /tmp/torzu-src-ro || (echo "Script MUST NOT be called directly!" ; exit 1)
|
||||
|
||||
# Set up environment
|
||||
export LANG=C.UTF-8
|
||||
export LC_ALL=C.UTF-8
|
||||
unset LC_ADDRESS LC_NAME LC_MONETARY LC_PAPER LC_TELEPHONE LC_MEASUREMENT LC_TIME
|
||||
|
||||
# Raise max open files count
|
||||
ulimit -n 50000
|
||||
|
||||
# Install dependencies
|
||||
apt -y install cmake ninja-build build-essential autoconf pkg-config locales wget git file mold libtool lsb-release wget software-properties-common gnupg \
|
||||
glslang-tools libssl-dev libavcodec-dev libavfilter-dev libavutil-dev libswscale-dev libpulse-dev libasound2-dev libudev-dev libice6
|
||||
if [ "$BUILD_QT" = 1 ]; then
|
||||
apt -y install libxcb-composite0-dev libxcb-damage0-dev libxcb-dpms0-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-ewmh-dev libxcb-present-dev libxcb-record0-dev libxcb-res0-dev libxcb-screensaver0-dev libxcb-xf86dri0-dev libxcb-xtest0-dev libxcb-xv0-dev libxcb-xvmc0-dev libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev libgl-dev
|
||||
else
|
||||
apt -y install qt6-base-dev qt6-base-private-dev qt6-multimedia-dev qt6-qpa-plugins
|
||||
fi
|
||||
if [ ! "$BUILD_USE_CPM" = 1 ]; then
|
||||
apt -y install libfmt-dev libenet-dev liblz4-dev nlohmann-json3-dev zlib1g-dev libopus-dev libsimpleini-dev libstb-dev libzstd-dev libusb-1.0-0-dev libcubeb-dev libcpp-jwt-dev libvulkan-dev gamemode-dev libasound2-dev libglu1-mesa-dev libxext-dev mesa-common-dev libva-dev
|
||||
|
||||
if [ ! -f /usr/local/lib/cmake/Boost-1.88.0/BoostConfigVersion.cmake ]; then
|
||||
# Install Boost
|
||||
wget https://archives.boost.io/release/1.88.0/source/boost_1_88_0.tar.bz2
|
||||
echo "Extracting Boost sources..."
|
||||
tar xf boost_1_88_0.tar.bz2
|
||||
cd boost_1_88_0
|
||||
./bootstrap.sh
|
||||
./b2 install --with-{headers,context,system,fiber,atomic,filesystem} link=static
|
||||
cd ..
|
||||
rm -rf boost_1_88_0 boost_1_88_0.tar.bz2
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install Clang
|
||||
if ([ "$BUILD_USE_CLANG" = 1 ] && ! clang-19 --version); then
|
||||
cd /tmp
|
||||
wget https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
./llvm.sh 19
|
||||
rm llvm.sh
|
||||
fi
|
||||
|
||||
# Mount Torzu sources with temporary overlay
|
||||
cd /tmp
|
||||
mkdir torzu-src-upper torzu-src-work torzu-src
|
||||
mount -t overlay overlay -olowerdir=torzu-src-ro,upperdir=torzu-src-upper,workdir=torzu-src-work torzu-src
|
||||
|
||||
# Get extra configuration/compilation options
|
||||
EXTRA_COMPILE_FLAGS=""
|
||||
EXTRA_CMAKE_FLAGS=""
|
||||
if [ "$BUILD_USE_CLANG" = 1 ]; then
|
||||
export CC=clang-19 CXX=clang++-19
|
||||
EXTRA_CMAKE_FLAGS="-DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX"
|
||||
EXTRA_COMPILE_FLAGS="-fuse-ld=lld-19 -Wno-unused-command-line-argument"
|
||||
FATLTO_FLAG="-flto=full"
|
||||
else
|
||||
FATLTO_FLAG="-flto"
|
||||
fi
|
||||
if [ "$BUILD_USE_THIN_LTO" = 1 ]; then
|
||||
EXTRA_COMPILE_FLAGS="$EXTRA_COMPILE_FLAGS -flto=thin"
|
||||
fi
|
||||
if [ "$BUILD_USE_FAT_LTO" = 1 ]; then
|
||||
EXTRA_COMPILE_FLAGS="$EXTRA_COMPILE_FLAGS $FATLTO_FLAG"
|
||||
fi
|
||||
if [ "$BUILD_USE_CPM" = 1 ]; then
|
||||
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DYUZU_USE_CPM=ON"
|
||||
fi
|
||||
if [ "$BUILD_QT" = 1 ]; then
|
||||
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DYUZU_BUILD_QT6=ON"
|
||||
if [ "$BUILD_PREFER_STATIC" = 1 ]; then
|
||||
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DYUZU_BUILD_QT6_STATIC=ON"
|
||||
fi
|
||||
fi
|
||||
if [ "$BUILD_PREFER_STATIC" = 1 ]; then
|
||||
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DBUILD_SHARED_LIBS=OFF -DCMAKE_FIND_LIBRARY_SUFFIXES=.a;.so"
|
||||
fi
|
||||
|
||||
# Build Torzu
|
||||
cd /tmp
|
||||
mkdir torzu-build
|
||||
cd torzu-build
|
||||
cmake /tmp/torzu-src -GNinja -DCMAKE_BUILD_TYPE=Release -DYUZU_TESTS=OFF -DENABLE_QT_TRANSLATION=OFF -DSPIRV_WERROR=OFF -DSPIRV-Headers_SOURCE_DIR=/tmp/torzu-src/externals/SPIRV-Headers -DCMAKE_{C,CXX}_FLAGS="$EXTRA_COMPILE_FLAGS -fdata-sections -ffunction-sections" -DCMAKE_{EXE,SHARED}_LINKER_FLAGS="-Wl,--gc-sections" $EXTRA_CMAKE_FLAGS
|
||||
ninja || (
|
||||
echo "Compilation has failed. Dropping you into a shell so you can inspect the situation. Run 'ninja' to retry and exit shell once compilation has finished successfully."
|
||||
echo "Note that any changes made here will not be reflected to the host environment."
|
||||
bash
|
||||
)
|
||||
|
||||
# Generate AppImage
|
||||
cp -rv /tmp/torzu-src/AppImageBuilder /tmp/AppImageBuilder
|
||||
cd /tmp/AppImageBuilder
|
||||
./build.sh /tmp/torzu-build /tmp/torzu.AppImage || echo "This error is known. Using workaround..."
|
||||
cp /lib/$(uname -m)-linux-gnu/libICE.so.6 build/
|
||||
mv build /tmp/hosttmp/torzu-debian-appimage-rootfs
|
||||
85
AppImage-build-debian.sh
Executable file
85
AppImage-build-debian.sh
Executable file
|
|
@ -0,0 +1,85 @@
|
|||
#! /bin/bash
|
||||
set -e
|
||||
|
||||
# Parse options
|
||||
for i in "$@"
|
||||
do
|
||||
case $i in
|
||||
-l|--clang)
|
||||
export BUILD_USE_CLANG=1
|
||||
echo "-> Using Clang for compilation."
|
||||
;;
|
||||
-o|--thin-lto)
|
||||
export BUILD_USE_THIN_LTO=1
|
||||
echo "-> Thin link time optimization enabled."
|
||||
;;
|
||||
-O|--fat-lto)
|
||||
export BUILD_USE_FAT_LTO=1
|
||||
echo "-> Fat link time optimization enabled."
|
||||
;;
|
||||
-p|--use-cpm)
|
||||
export BUILD_USE_CPM=1
|
||||
echo "-> Using CPM to download most dependencies."
|
||||
;;
|
||||
-q|--build-qt)
|
||||
export BUILD_QT=1
|
||||
echo "-> Building Qt."
|
||||
;;
|
||||
-s|--prefer-static)
|
||||
export BUILD_PREFER_STATIC=1
|
||||
export QTSTATIC=true
|
||||
echo "-> Preferring static libraries."
|
||||
;;
|
||||
-k|--keep-rootfs)
|
||||
BUILD_KEEP_ROOTFS=1
|
||||
echo "-> Not deleting rootfs after successful build."
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [--clang/-l] [--thin-lto/-o] [--fat-lto/-O] [--use-cpm/-p] [--build-qt/-q] [--prefer-static/-s] [--keep-rootfs/-k]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Make sure options are valid
|
||||
if [ "$BUILD_USE_THIN_LTO" = 1 ] && [ "$BUILD_USE_CLANG" != 1 ]; then
|
||||
echo "Thin LTO can't be used without Clang!"
|
||||
exit 2
|
||||
fi
|
||||
if [ "$BUILD_USE_THIN_LTO" = 1 ] && [ "$BUILD_USE_FAT_LTO" = 1 ]; then
|
||||
echo "Only either thin or fat LTO can be used!"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Get torzu source dir
|
||||
TORZU_SOURCE_DIR="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
echo "-> Source dir is $TORZU_SOURCE_DIR"
|
||||
rm -rf "$TORZU_SOURCE_DIR/AppImageBuilder/build"
|
||||
|
||||
# Generate debian rootfs
|
||||
cd /tmp
|
||||
echo "Cleaning up before build..."
|
||||
rm -rf torzu-debian-appimage-rootfs
|
||||
if ! [ -d rootfs-torzu-appimage-build ]; then
|
||||
debootstrap bookworm rootfs-torzu-appimage-build http://deb.debian.org/debian/
|
||||
else
|
||||
rm -rf rootfs-torzu-appimage-build/tmp/*
|
||||
fi
|
||||
bwrap --bind rootfs-torzu-appimage-build / \
|
||||
--unshare-pid \
|
||||
--dev-bind /dev /dev --proc /proc --ro-bind /sys /sys --dev-bind /run /run \
|
||||
--tmpfs /var/tmp \
|
||||
--chmod 1777 /tmp \
|
||||
--ro-bind /etc/resolv.conf /etc/resolv.conf \
|
||||
--ro-bind "$TORZU_SOURCE_DIR" /tmp/torzu-src-ro \
|
||||
--chdir / \
|
||||
--tmpfs /home \
|
||||
--setenv HOME /home \
|
||||
--bind /tmp /tmp/hosttmp \
|
||||
/tmp/torzu-src-ro/AppImage-build-debian-inner.sh
|
||||
appimagetool torzu-debian-appimage-rootfs torzu.AppImage
|
||||
echo "AppImage generated at /tmp/torzu.AppImage! Cleaning up..."
|
||||
rm -rf torzu-debian-appimage-rootfs
|
||||
if [ ! "$BUILD_KEEP_ROOTFS" = 1 ]; then
|
||||
rm -rf rootfs-torzu-appimage-build
|
||||
fi
|
||||
42
AppImage-build-local.sh
Executable file
42
AppImage-build-local.sh
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
|
||||
FILE=build/bin/yuzu
|
||||
if test -f "$FILE"; then
|
||||
# remove any previously made AppImage in the base torzu git folder
|
||||
rm ./torzu.AppImage
|
||||
|
||||
# enter AppImage utility folder
|
||||
cd AppImageBuilder
|
||||
|
||||
# run the build script to create the AppImage
|
||||
# (usage) ./build.sh [source torzu build folder] [destination .AppImage file]
|
||||
./build.sh ../build ./torzu.AppImage
|
||||
|
||||
FILE=./torzu.AppImage
|
||||
if test -f "$FILE"; then
|
||||
# move the AppImage to the main torzu folder
|
||||
mv torzu.AppImage ..
|
||||
# return to main torzu folder
|
||||
cd ..
|
||||
# show contents of current folder
|
||||
echo
|
||||
ls
|
||||
# show AppImages specifically
|
||||
echo
|
||||
ls *.AppImage
|
||||
echo
|
||||
echo "'torzu.AppImage' is now located in the current folder."
|
||||
echo
|
||||
else
|
||||
cd ..
|
||||
echo "AppImage was not built."
|
||||
fi
|
||||
else
|
||||
echo
|
||||
echo "$FILE does not exist."
|
||||
echo
|
||||
echo "No yuzu executable found in the /torzu/build/bin folder!"
|
||||
echo
|
||||
echo "You must first build a native linux version of torzu before running this script!"
|
||||
echo
|
||||
fi
|
||||
11
AppImageBuilder/assets/AppRun
Executable file
11
AppImageBuilder/assets/AppRun
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#! /bin/bash
|
||||
|
||||
cd "$APPDIR"
|
||||
|
||||
if [ -d /usr/lib/$(uname -m)-linux-gnu/qt5 ] || [ -d /usr/lib/qt ]; then
|
||||
# System-wide Qt5
|
||||
exec ./yuzu.sh "$@"
|
||||
else
|
||||
# Bundled Qt5
|
||||
exec ./yuzu-bqt.sh "$@"
|
||||
fi
|
||||
6
AppImageBuilder/assets/torzu.desktop
Normal file
6
AppImageBuilder/assets/torzu.desktop
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=torzu
|
||||
Icon=torzu
|
||||
Exec=AppRun
|
||||
Categories=Game;
|
||||
2
AppImageBuilder/assets/torzu.svg
Normal file
2
AppImageBuilder/assets/torzu.svg
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" version="1.1" viewBox="0 0 152 152" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><circle cx="75.585" cy="75.585" r="75.585" fill="url(#_Radial1)"/><clipPath id="_clip2"></clipPath><g clip-path="url(#_clip2)"><path d="m75.585 17.097c11.94-0 21.635 9.694 21.635 21.635s-9.695 21.635-21.635 21.635c-11.941 0-21.635-9.694-21.635-21.635s9.694-21.635 21.635-21.635zm-0 5.21c-9.066 0-16.425 7.36-16.425 16.425s7.359 16.425 16.425 16.425c9.065-0 16.424-7.36 16.424-16.425s-7.359-16.425-16.424-16.425z"/><path d="m75.585 27.343c6.285 0 11.388 5.103 11.388 11.389s-5.103 11.389-11.388 11.389c-6.286-0-11.389-5.103-11.389-11.389s5.103-11.389 11.389-11.389zm-0 5.21c-3.41 0-6.179 2.769-6.179 6.179s2.769 6.179 6.179 6.179 6.178-2.769 6.178-6.179-2.768-6.179-6.178-6.179z"/><path d="m112.44 53.95c11.941-0 21.635 9.694 21.635 21.635 0 11.94-9.694 21.635-21.635 21.635s-21.635-9.695-21.635-21.635c0-11.941 9.694-21.635 21.635-21.635zm0 5.21c-9.065-0-16.425 7.359-16.425 16.425 0 9.065 7.36 16.424 16.425 16.424s16.425-7.359 16.425-16.424c-0-9.066-7.36-16.425-16.425-16.425z"/><path d="m112.44 64.196c6.286-0 11.389 5.103 11.389 11.389-0 6.285-5.103 11.388-11.389 11.388s-11.389-5.103-11.389-11.388c0-6.286 5.103-11.389 11.389-11.389zm0 5.21c-3.41-0-6.178 2.769-6.178 6.179s2.768 6.178 6.178 6.178 6.179-2.768 6.179-6.178-2.769-6.179-6.179-6.179z"/><path d="m75.585 90.802c11.94 0 21.635 9.694 21.635 21.635s-9.695 21.635-21.635 21.635c-11.941 0-21.635-9.694-21.635-21.635s9.694-21.635 21.635-21.635zm-0 5.21c-9.066 0-16.425 7.36-16.425 16.425s7.359 16.425 16.425 16.425c9.065-0 16.424-7.36 16.424-16.425s-7.359-16.425-16.424-16.425z"/><path d="m75.585 101.05c6.285 0 11.388 5.103 11.388 11.389s-5.103 11.389-11.388 11.389c-6.286-0-11.389-5.103-11.389-11.389s5.103-11.389 11.389-11.389zm-0 5.211c-3.41-0-6.179 2.768-6.179 6.178s2.769 6.179 6.179 6.179 6.178-2.769 6.178-6.179-2.768-6.178-6.178-6.178z"/><path d="m38.732 53.95c11.941-0 21.635 9.694 21.635 21.635 0 11.94-9.694 21.635-21.635 21.635s-21.635-9.695-21.635-21.635c-0-11.941 9.694-21.635 21.635-21.635zm-0 5.21c-9.065-0-16.425 7.359-16.425 16.425 0 9.065 7.36 16.424 16.425 16.424s16.425-7.359 16.425-16.424c-0-9.066-7.36-16.425-16.425-16.425z"/><path d="m38.732 64.196c6.286-0 11.389 5.103 11.389 11.389-0 6.285-5.103 11.388-11.389 11.388s-11.389-5.103-11.389-11.388c0-6.286 5.103-11.389 11.389-11.389zm-0 5.21c-3.41-0-6.179 2.769-6.179 6.179s2.769 6.178 6.179 6.178 6.179-2.768 6.179-6.178-2.769-6.179-6.179-6.179z"/></g><defs><radialGradient id="_Radial1" cx="0" cy="0" r="1" gradientTransform="matrix(-81.196 -81.196 81.196 -81.196 114.32 116.87)" gradientUnits="userSpaceOnUse"><stop stop-color="#ff2088" offset="0"/><stop stop-color="#c24bac" offset=".44"/><stop stop-color="#37aeff" offset="1"/></radialGradient></defs></svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
3
AppImageBuilder/assets/yuzu-bqt.sh
Executable file
3
AppImageBuilder/assets/yuzu-bqt.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /bin/sh
|
||||
|
||||
LD_LIBRARY_PATH=./qt5:/usr/lib/$(uname -m)-linux-gnu:/usr/lib:. QT_PLUGIN_PATH=./qt5 exec ./yuzu "$@"
|
||||
3
AppImageBuilder/assets/yuzu.sh
Executable file
3
AppImageBuilder/assets/yuzu.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /bin/sh
|
||||
|
||||
LD_LIBRARY_PATH=/usr/lib/$(uname -m)-linux-gnu:/usr/lib:. exec ./yuzu "$@"
|
||||
0
AppImageBuilder/assets_aarch64/.gitkeep
Normal file
0
AppImageBuilder/assets_aarch64/.gitkeep
Normal file
BIN
AppImageBuilder/assets_aarch64/bwrap
Normal file
BIN
AppImageBuilder/assets_aarch64/bwrap
Normal file
Binary file not shown.
1
AppImageBuilder/assets_aarch64/bwrap-info.txt
Normal file
1
AppImageBuilder/assets_aarch64/bwrap-info.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
This is a statically compiled bubblewrap 0.9.0 executable.
|
||||
BIN
AppImageBuilder/assets_x86_64/bwrap
Executable file
BIN
AppImageBuilder/assets_x86_64/bwrap
Executable file
Binary file not shown.
1
AppImageBuilder/assets_x86_64/bwrap-info.txt
Normal file
1
AppImageBuilder/assets_x86_64/bwrap-info.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
This is a statically compiled bubblewrap 0.9.0 executable.
|
||||
172
AppImageBuilder/build.sh
Executable file
172
AppImageBuilder/build.sh
Executable file
|
|
@ -0,0 +1,172 @@
|
|||
#! /bin/bash
|
||||
set -e
|
||||
|
||||
# Check arguments
|
||||
if [[ $# != 2 ]]; then
|
||||
>&2 echo "Bad usage!"
|
||||
echo "Usage: $0 <build dir> <output file>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get paths
|
||||
ARCH="$(uname -m)"
|
||||
SYSTEM_LIBS="/usr/lib"
|
||||
SYSTEM_LIBS64="/usr/lib64"
|
||||
YUZU_BIN="${1}/bin"
|
||||
YUZU_BIN_GUI="${YUZU_BIN}/yuzu"
|
||||
|
||||
# Make sure executable exists
|
||||
if [[ $(file -b --mime-type "$YUZU_BIN_GUI") != application/x-pie-executable ]]; then
|
||||
>&2 echo "Invalid yuzu executable!"
|
||||
fi
|
||||
|
||||
# Clean up build dir
|
||||
rm -rf build
|
||||
mkdir build
|
||||
|
||||
# NOTE: some of these aren't used now, but can be reordered in priority when torzu is converted to QT6
|
||||
# QT5 - /usr/lib/${ARCH}-linux-gnu/qt5 (debian), /usr/lib64/qt5 (fedora), /usr/lib/qt (steam deck)
|
||||
# QT5 - /usr/lib/${ARCH}-linux-gnu/qt6 (debian), /usr/lib64/qt6 (fedora), /usr/lib/qt6 (steam deck)
|
||||
QTFOUND="true"
|
||||
QTDIR="$SYSTEM_LIBS"/${ARCH}-linux-gnu/qt5/plugins
|
||||
if [ ! -d "$QTDIR" ]; then
|
||||
# default qt5 folder not found, check for 64-bit qt5 folder
|
||||
QTDIR="$SYSTEM_LIBS64"/qt5/plugins
|
||||
if [ ! -d "$QTDIR" ]; then
|
||||
# 64-bit qt5 folder not found, check for Steam Deck qt (qt5) folder
|
||||
QTDIR="$SYSTEM_LIBS"/qt/plugins
|
||||
if [ ! -d "$QTDIR" ]; then
|
||||
# Steam Deck qt (qt5) folder not found, check for regular qt6 folder
|
||||
QTDIR="$SYSTEM_LIBS"/${ARCH}-linux-gnu/qt6/plugins
|
||||
if [ ! -d "$QTDIR" ]; then
|
||||
# regular qt6 folder not found, check for 64-bit qt6 folder
|
||||
QTDIR="$SYSTEM_LIBS64"/qt6/plugins
|
||||
if [ ! -d "$QTDIR" ]; then
|
||||
# 64-bit qt6 folder not found, check for Steam Deck qt6 folder
|
||||
QTDIR="$SYSTEM_LIBS"/qt6/plugins
|
||||
if [ ! -d "$QTDIR" ]; then
|
||||
QTFOUND="false"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ $QTFOUND == "true" ] || [ -n "$QTSTATIC" ]; then
|
||||
echo "QT plugins from $QTDIR will be used."
|
||||
|
||||
# Copy system dependencies used to build and required by the yuzu binary
|
||||
# includes:
|
||||
# - '/lib64/ld-linux-x86-64.so.2' or `/lib/ld-linux-aarch64.so.1` file per architecture
|
||||
# - required files from `/usr/lib/x86_64-linux-gnu` or `/usr/lib/aarch64-linux-gnu`
|
||||
# - different for SteamDeck, but still does it automatically
|
||||
function copy_libs {
|
||||
for lib in $(ldd "$1"); do
|
||||
(cp -vn "$lib" ./build/ 2> /dev/null) || true
|
||||
done
|
||||
}
|
||||
echo "Copying main dependencies..."
|
||||
copy_libs "$YUZU_BIN_GUI"
|
||||
|
||||
# Copy QT dependency folders, path determined above
|
||||
if [ -z "$QTSTATIC" ]; then
|
||||
echo "Copying Qt dependencies..."
|
||||
mkdir ./build/qt5
|
||||
cp -rv "$QTDIR"/{imageformats,platforms,platformthemes,xcbglintegrations} ./build/qt5/
|
||||
fi
|
||||
|
||||
# Discover indirect dependencies (mostly from runtime-loaded Qt plugins)
|
||||
echo "Copying extra dependencies..."
|
||||
while true; do
|
||||
LIBS="$(find ./build -name \*.so\*)"
|
||||
LIB_COUNT=$(echo "$LIBS" | wc -l)
|
||||
echo "$LIB_COUNT dependency libraries discovered so far..."
|
||||
if [ $LIB_COUNT == "$PREV_LIB_COUNT" ]; then
|
||||
break
|
||||
fi
|
||||
PREV_LIB_COUNT=$LIB_COUNT
|
||||
|
||||
for plib in $LIBS; do
|
||||
if [ -f "$plib" ]; then
|
||||
copy_libs "$plib"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# Copy executable
|
||||
cp -v "$YUZU_BIN_GUI" ./build/
|
||||
|
||||
# Copy assets for the appropriate arch
|
||||
cp -v ./assets_"${ARCH}"/* ./build/
|
||||
# Copy common assets
|
||||
cp -v ./assets/* ./build/
|
||||
|
||||
# Strip all libraries and executables
|
||||
for file in $(find ./build -type f); do
|
||||
(strip -v "$file" 2> /dev/null) || true
|
||||
done
|
||||
|
||||
PASSED_CHECKSUM="false"
|
||||
FILE=appimagetool.AppImage
|
||||
# total number of times to try downloading if a checksum doesn't match
|
||||
DL_TRIES=3
|
||||
while [ $PASSED_CHECKSUM == "false" ] && [ "$DL_TRIES" -gt 0 ]; do
|
||||
case $ARCH in
|
||||
x86_64)
|
||||
# Static copy from the 'ext-linux-bin' repo.
|
||||
# Checksum will need to be changed when/if this file in the repo is updated.
|
||||
if ! test -f "$FILE"; then
|
||||
echo "Downloading appimagetool for architecture '$ARCH'"
|
||||
wget -O appimagetool.AppImage https://github.com/litucks/ext-linux-bin/raw/refs/heads/main/appimage/appimagetool-x86_64.AppImage
|
||||
fi
|
||||
if [ $(shasum -a 256 appimagetool.AppImage | cut -d' ' -f1) = "110751478abece165a18460acbd7fd1398701f74a9405ad8ac053427d937bd5d" ] ; then
|
||||
PASSED_CHECKSUM="true"
|
||||
fi
|
||||
# DISABLED TO USE THE ABOVE
|
||||
# The current continuous release channel option, until a static copy is put in 'ext-linux-bin'.
|
||||
# The checksum will pass until the continuous release is updated, then a new one needs to be
|
||||
# generated to update this script.
|
||||
#if ! test -f "$FILE"; then
|
||||
# echo "Downloading appimagetool for architecture '$ARCH'"
|
||||
# wget -O appimagetool.AppImage https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||
#fi
|
||||
#if [ $(shasum -a 256 appimagetool.AppImage | cut -d' ' -f1) = "46fdd785094c7f6e545b61afcfb0f3d98d8eab243f644b4b17698c01d06083d1" ] ; then
|
||||
# PASSED_CHECKSUM="true"
|
||||
#fi
|
||||
;;
|
||||
aarch64)
|
||||
# Currently set to the continuous release channel until a static copy is put in 'ext-linux-bin'.
|
||||
# The checksum will pass until the continuous release is updated, then a new one needs to be
|
||||
# generated to update this script.
|
||||
if ! test -f "$FILE"; then
|
||||
echo "Downloading appimagetool for architecture '$ARCH'"
|
||||
wget -O appimagetool.AppImage https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-aarch64.AppImage
|
||||
fi
|
||||
if [ $(shasum -a 256 appimagetool.AppImage | cut -d' ' -f1) = "04f45ea45b5aa07bb2b071aed9dbf7a5185d3953b11b47358c1311f11ea94a96" ] ; then
|
||||
PASSED_CHECKSUM="true"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
PASSED_CHECKSUM="invalid_arch"
|
||||
;;
|
||||
esac
|
||||
# delete the appimagetool downloaded if the checksum doesn't match.
|
||||
if [ ! $PASSED_CHECKSUM == "true" ]; then
|
||||
rm -f appimagetool.AppImage
|
||||
fi
|
||||
((DL_TRIES-=1))
|
||||
done
|
||||
if [ $PASSED_CHECKSUM == "true" ]; then
|
||||
echo "Checksum passed. Proceeding to build image."
|
||||
# Build AppImage
|
||||
chmod a+x appimagetool.AppImage
|
||||
./appimagetool.AppImage ./build "$2"
|
||||
elif [ $PASSED_CHECKSUM == "invalid_arch" ]; then
|
||||
echo "No download found for architecture '$ARCH'. Building halted."
|
||||
else
|
||||
echo "Checksum for appimagetool does not match. Building halted."
|
||||
echo "If the file to be downloaded has been changed, a new checksum will need to be generated for this script."
|
||||
fi
|
||||
else
|
||||
echo "QT not found, aborting AppImage build."
|
||||
fi
|
||||
617
CMakeLists.txt
617
CMakeLists.txt
|
|
@ -1,4 +1,4 @@
|
|||
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
||||
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project and 2024 torzu project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
|
|
@ -12,6 +12,13 @@ include(DownloadExternals)
|
|||
include(CMakeDependentOption)
|
||||
include(CTest)
|
||||
|
||||
option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}")
|
||||
if (NOT YUZU_USE_BUNDLED_VCPKG)
|
||||
option(YUZU_USE_CPM "Use CPM.cmake for yuzu dependencies" OFF)
|
||||
else()
|
||||
set(YUZU_USE_CPM OFF)
|
||||
endif()
|
||||
|
||||
# Set bundled sdl2/qt as dependent options.
|
||||
# OFF by default, but if ENABLE_SDL2 and MSVC are true then ON
|
||||
option(ENABLE_SDL2 "Enable the SDL2 frontend" ON)
|
||||
|
|
@ -24,28 +31,45 @@ cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID"
|
|||
option(ENABLE_OPENGL "Enable OpenGL" ON)
|
||||
mark_as_advanced(FORCE ENABLE_OPENGL)
|
||||
option(ENABLE_QT "Enable the Qt frontend" ON)
|
||||
option(ENABLE_QT6 "Allow usage of Qt6 to be attempted" OFF)
|
||||
set(QT6_LOCATION "" CACHE PATH "Additional Location to search for Qt6 libraries like C:/Qt/6.3.1/msvc2019_64/")
|
||||
|
||||
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF)
|
||||
if (ENABLE_QT)
|
||||
option(YUZU_BUILD_QT6 "Build Qt6 at configure time" OFF)
|
||||
if (YUZU_BUILD_QT6)
|
||||
option(YUZU_BUILD_QT6_STATIC "Build Qt6 statically" OFF)
|
||||
endif()
|
||||
|
||||
option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
|
||||
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" ON)
|
||||
|
||||
option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF)
|
||||
|
||||
option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF)
|
||||
endif()
|
||||
|
||||
set(ENABLE_WEB_SERVICE OFF)
|
||||
|
||||
option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" "${WIN32}")
|
||||
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_HEADERS "Use Vulkan-Headers from externals" ON)
|
||||
if (NOT YUZU_USE_CPM)
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_HEADERS "Use Vulkan-Headers from externals" ON)
|
||||
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES "Use Vulkan-Utility-Libraries from externals" ON)
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES "Use Vulkan-Utility-Libraries from externals" ON)
|
||||
|
||||
option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF)
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS "Use SPIRV-Tools from externals" ON)
|
||||
else()
|
||||
set(YUZU_USE_EXTERNAL_VULKAN_HEADERS OFF)
|
||||
|
||||
option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF)
|
||||
set(YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES OFF)
|
||||
|
||||
set(YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS OFF)
|
||||
endif()
|
||||
|
||||
option(ENABLE_CUBEB "Enables the cubeb audio backend" ON)
|
||||
|
||||
option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF)
|
||||
|
||||
option(YUZU_NO_CPU_DEBUGGER "Do not build debugging code" OFF)
|
||||
|
||||
option(YUZU_TESTS "Compile tests" "${BUILD_TESTING}")
|
||||
|
||||
option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
|
||||
|
|
@ -54,9 +78,9 @@ option(YUZU_DOWNLOAD_ANDROID_VVL "Download validation layer binary for android"
|
|||
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_ROOM "Compile LDN room server" ON "NOT ANDROID" OFF)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile crash dump (Minidump) support" OFF "WIN32 OR LINUX" OFF)
|
||||
option(YUZU_CMD "Compile the -cmd executable (can disable if -cmd is unused)" ON)
|
||||
|
||||
option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}")
|
||||
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" ON)
|
||||
|
||||
|
|
@ -66,10 +90,72 @@ option(YUZU_DOWNLOAD_TIME_ZONE_DATA "Always download time zone binaries" OFF)
|
|||
|
||||
option(YUZU_ENABLE_PORTABLE "Allow yuzu to enable portable mode if a user folder is found in the CWD" ON)
|
||||
|
||||
option(YUZU_USE_LLVM_DEMANGLE "Use LLVM Demangle" ON)
|
||||
|
||||
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)
|
||||
|
||||
# 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} (${YUZU_MARCH})")
|
||||
|
||||
if (MSVC AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(YUZU_MARCH "SSE4.2" CACHE STRING "Compile for specified x86 arch (AVX, AVX2, etc.)")
|
||||
add_compile_options(/arch:${YUZU_MARCH})
|
||||
else()
|
||||
if (ARCHITECTURE STREQUAL "x86_64")
|
||||
set(YUZU_MARCH "x86-64-v2" CACHE STRING "Compile for specified x86 microarchitecture level (x86-64-v3, native, etc.)")
|
||||
add_compile_options(-march=${YUZU_MARCH})
|
||||
elseif (ARCHITECTURE STREQUAL "arm64")
|
||||
set(YUZU_MARCH "armv8-a" CACHE STRING "Compile for specified ARM architecture (armv8.1-a, native, etc.)")
|
||||
add_compile_options(-march=${YUZU_MARCH})
|
||||
else()
|
||||
message(WARNING "Architecture ${ARCHITECTURE} unknown, EXPECT THINGS TO GO WRONG.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
add_definitions(-DWIN32)
|
||||
endif()
|
||||
|
||||
set(DEFAULT_ENABLE_OPENSSL ON)
|
||||
if (ANDROID OR WIN32 OR APPLE)
|
||||
# - Windows defaults to the Schannel backend.
|
||||
|
|
@ -83,21 +169,26 @@ endif()
|
|||
option(ENABLE_OPENSSL "Enable OpenSSL backend for ISslConnection" ${DEFAULT_ENABLE_OPENSSL})
|
||||
|
||||
if (ANDROID AND YUZU_DOWNLOAD_ANDROID_VVL)
|
||||
set(vvl_version "sdk-1.3.261.1")
|
||||
set(vvl_version "1.4.304.1")
|
||||
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"
|
||||
"${vvl_zip_file}" SHOW_PROGRESS)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${vvl_zip_file}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
|
||||
endif()
|
||||
|
||||
# Copy the arm64 binary to src/android/app/main/jniLibs
|
||||
set(vvl_lib_path "${CMAKE_CURRENT_SOURCE_DIR}/src/android/app/src/main/jniLibs/arm64-v8a/")
|
||||
file(COPY "${CMAKE_BINARY_DIR}/externals/android-binaries-${vvl_version}/arm64-v8a/libVkLayer_khronos_validation.so"
|
||||
DESTINATION "${vvl_lib_path}")
|
||||
set(vvl_final_lib "${vvl_lib_path}/libVkLayer_khronos_validation.so")
|
||||
|
||||
if (NOT EXISTS "${vvl_final_lib}")
|
||||
# Download and extract validation layer release to externals directory
|
||||
if (NOT EXISTS "${vvl_zip_file}")
|
||||
set(vvl_base_url "https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases/download")
|
||||
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")
|
||||
endif()
|
||||
|
||||
# Copy the arm64 binary to src/android/app/main/jniLibs
|
||||
file(COPY "${CMAKE_BINARY_DIR}/externals/android-binaries-${vvl_version}/arm64-v8a/libVkLayer_khronos_validation.so"
|
||||
DESTINATION "${vvl_lib_path}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ANDROID)
|
||||
|
|
@ -126,7 +217,7 @@ if (YUZU_USE_BUNDLED_VCPKG)
|
|||
set(VCPKG_DOWNLOADS_PATH ${PROJECT_SOURCE_DIR}/externals/vcpkg/downloads)
|
||||
set(NASM_VERSION "2.16.01")
|
||||
set(NASM_DESTINATION_PATH ${VCPKG_DOWNLOADS_PATH}/nasm-${NASM_VERSION}-win64.zip)
|
||||
set(NASM_DOWNLOAD_URL "https://github.com/yuzu-emu/ext-windows-bin/raw/master/nasm/nasm-${NASM_VERSION}-win64.zip")
|
||||
set(NASM_DOWNLOAD_URL "https://github.com/litucks/ext-windows-bin/raw/master/nasm/nasm-${NASM_VERSION}-win64.zip")
|
||||
|
||||
if (NOT EXISTS ${NASM_DESTINATION_PATH})
|
||||
file(DOWNLOAD ${NASM_DOWNLOAD_URL} ${NASM_DESTINATION_PATH} SHOW_PROGRESS STATUS NASM_STATUS)
|
||||
|
|
@ -220,46 +311,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_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 (UNIX)
|
||||
add_definitions(-DYUZU_UNIX=1)
|
||||
|
|
@ -292,26 +343,222 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
|||
# =======================================================================
|
||||
|
||||
# Enforce the search mode of non-required packages for better and shorter failure messages
|
||||
find_package(Boost 1.79.0 REQUIRED context)
|
||||
find_package(enet 1.3 MODULE)
|
||||
find_package(fmt 9 REQUIRED)
|
||||
find_package(LLVM 17.0.2 MODULE COMPONENTS Demangle)
|
||||
find_package(lz4 REQUIRED)
|
||||
find_package(nlohmann_json 3.8 REQUIRED)
|
||||
find_package(Opus 1.3 MODULE)
|
||||
find_package(RenderDoc MODULE)
|
||||
find_package(SimpleIni MODULE)
|
||||
find_package(stb MODULE)
|
||||
find_package(VulkanMemoryAllocator CONFIG)
|
||||
find_package(ZLIB 1.2 REQUIRED)
|
||||
find_package(zstd 1.5 REQUIRED)
|
||||
if (NOT YUZU_USE_CPM)
|
||||
find_package(Boost 1.86.0 REQUIRED headers context system fiber)
|
||||
find_package(enet 1.3 MODULE)
|
||||
find_package(fmt REQUIRED)
|
||||
if (YUZU_USE_LLVM_DEMANGLE)
|
||||
find_package(LLVM 17.0.2 MODULE COMPONENTS Demangle)
|
||||
endif()
|
||||
find_package(lz4 REQUIRED)
|
||||
find_package(nlohmann_json 3.8 REQUIRED)
|
||||
find_package(Opus 1.3 MODULE)
|
||||
find_package(RenderDoc MODULE)
|
||||
find_package(SimpleIni MODULE)
|
||||
find_package(stb MODULE)
|
||||
find_package(VulkanMemoryAllocator CONFIG)
|
||||
find_package(ZLIB 1.2 REQUIRED)
|
||||
find_package(zstd 1.5 REQUIRED)
|
||||
else()
|
||||
include(CMakeModules/CPM.cmake)
|
||||
|
||||
# Disable tests in all externals supporting the standard option name
|
||||
set(BUILD_TESTING OFF)
|
||||
|
||||
# Some externals take these options instead
|
||||
set(BUILD_TESTS OFF)
|
||||
set(BUILD_TOOLS OFF)
|
||||
|
||||
# Build only static externals
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
|
||||
# Do not attempt to use Brotli in httplib since we're not downloading it
|
||||
set(HTTPLIB_USE_BROTLI_IF_AVAILABLE OFF)
|
||||
|
||||
# Configure Opus to not generate as much overhead
|
||||
set(OPUS_BUILD_TESTING OFF)
|
||||
set(OPUS_BUILD_PROGRAMS OFF)
|
||||
set(OPUS_INSTALL_PKG_CONFIG_MODULE OFF)
|
||||
set(OPUS_INSTALL_CMAKE_CONFIG_MODULE OFF)
|
||||
|
||||
message(STATUS "Downloading and extracting boost library sources. This will take some time...")
|
||||
CPMAddPackage(
|
||||
NAME boost
|
||||
URL "https://github.com/boostorg/boost/releases/download/boost-1.88.0/boost-1.88.0-cmake.7z"
|
||||
PATCHES boost-1.88.0-fix.patch
|
||||
VERSION 1.88.0
|
||||
)
|
||||
CPMAddPackage("gh:lsalzman/enet@1.3.18")
|
||||
CPMAddPackage("gh:fmtlib/fmt#11.1.4")
|
||||
CPMAddPackage(
|
||||
NAME lz4
|
||||
GIT_REPOSITORY https://github.com/lz4/lz4.git
|
||||
VERSION 1.10.0
|
||||
DOWNLOAD_ONLY YES
|
||||
)
|
||||
add_subdirectory(${lz4_SOURCE_DIR}/build/cmake lz4)
|
||||
CPMAddPackage("gh:nlohmann/json@3.8.0")
|
||||
CPMAddPackage("gh:xiph/opus@1.3.1")
|
||||
CPMAddPackage("gh:brofield/simpleini@4.22")
|
||||
CPMAddPackage("gh:GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator@3.2.1")
|
||||
CPMAddPackage("gh:madler/zlib@1.2.13")
|
||||
CPMAddPackage(
|
||||
NAME zstd
|
||||
GIT_REPOSITORY https://github.com/facebook/zstd.git
|
||||
VERSION 1.5.7
|
||||
DOWNLOAD_ONLY YES
|
||||
)
|
||||
add_subdirectory(${zstd_SOURCE_DIR}/build/cmake zstd)
|
||||
CPMAddPackage("gh:KhronosGroup/SPIRV-Headers#vulkan-sdk-1.3.280.0")
|
||||
CPMAddPackage("gh:yhirose/cpp-httplib@0.20.0")
|
||||
|
||||
# Set up required aliases
|
||||
add_library(Opus::opus ALIAS opus)
|
||||
add_library(lz4::lz4 ALIAS lz4)
|
||||
add_library(zstd::zstd ALIAS libzstd)
|
||||
if (NOT YUZU_BUILD_QT6)
|
||||
add_library(zstd::libzstd ALIAS libzstd)
|
||||
endif()
|
||||
add_library(nlohmann::json ALIAS nlohmann_json)
|
||||
|
||||
# Enet specific setup to add missing include dir
|
||||
add_library(enet_fixed INTERFACE)
|
||||
target_link_libraries(enet_fixed INTERFACE enet)
|
||||
target_include_directories(enet_fixed INTERFACE ${enet_SOURCE_DIR}/include)
|
||||
add_library(enet::enet ALIAS enet_fixed)
|
||||
endif()
|
||||
|
||||
if (YUZU_BUILD_QT6)
|
||||
set(QT_VERSION "6.9.1")
|
||||
set(QT_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/qt-install")
|
||||
set(QT_SOURCE_DIR "${CMAKE_BINARY_DIR}/qt-src")
|
||||
set(QT_TARBALL_PATH "${CMAKE_BINARY_DIR}/qt-${QT_VERSION}.tar.xz")
|
||||
|
||||
# Extract major and minor versions from QT_VERSION
|
||||
string(REPLACE "." ";" QT_VERSION_PARTS "${QT_VERSION}")
|
||||
list(GET QT_VERSION_PARTS 0 QT_MAJOR)
|
||||
list(GET QT_VERSION_PARTS 1 QT_MINOR)
|
||||
|
||||
set(QT_URL "https://download.qt.io/archive/qt/${QT_MAJOR}.${QT_MINOR}/${QT_VERSION}/single/qt-everywhere-src-${QT_VERSION}.tar.xz")
|
||||
|
||||
set(QT_SUBMODULES "qtbase,qttranslations")
|
||||
if (YUZU_USE_QT_MULTIMEDIA)
|
||||
set(QT_SUBMODULES "${QT_SUBMODULES},qtmultimedia")
|
||||
endif()
|
||||
|
||||
if (YUZU_BUILD_QT6_STATIC)
|
||||
set(QT_LIBTYPE "-static")
|
||||
else()
|
||||
set(QT_LIBTYPE "-shared")
|
||||
endif()
|
||||
|
||||
# Check prerequisites
|
||||
find_program(NINJA_EXECUTABLE ninja)
|
||||
if(NOT NINJA_EXECUTABLE)
|
||||
message(FATAL_ERROR "'ninja' executable not found. Install it or ensure it's in your PATH. It's required for building Qt6.")
|
||||
endif()
|
||||
|
||||
# Download Qt source
|
||||
if (NOT EXISTS ${QT_TARBALL_PATH})
|
||||
message(STATUS "Downloading Qt library sources. This will take some time...")
|
||||
file(DOWNLOAD
|
||||
${QT_URL}
|
||||
${QT_TARBALL_PATH}
|
||||
SHOW_PROGRESS
|
||||
STATUS download_status
|
||||
)
|
||||
|
||||
# Check download success
|
||||
list(GET download_status 0 status_code)
|
||||
if(NOT status_code EQUAL 0)
|
||||
list(GET download_status 1 error_msg)
|
||||
message(FATAL_ERROR "Download failed: ${error_msg}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Extract source
|
||||
if (NOT EXISTS "${QT_SOURCE_DIR}/qt-everywhere-src-${QT_VERSION}/CMakeLists.txt")
|
||||
message(STATUS "Extracting Qt library sources. This will take some time...")
|
||||
file(ARCHIVE_EXTRACT
|
||||
INPUT ${QT_TARBALL_PATH}
|
||||
DESTINATION ${QT_SOURCE_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Configure Qt
|
||||
message(STATUS "Configuring Qt library. This will take some time...")
|
||||
if (MSVC)
|
||||
set(QT_CONFIGURE_COMMAND "${QT_SOURCE_DIR}/qt-everywhere-src-${QT_VERSION}/configure.bat")
|
||||
else()
|
||||
set(QT_CONFIGURE_COMMAND "${QT_SOURCE_DIR}/qt-everywhere-src-${QT_VERSION}/configure")
|
||||
endif()
|
||||
message(STATUS "Configuring Qt library using ${QT_CONFIGURE_COMMAND}")
|
||||
file(MAKE_DIRECTORY "${QT_SOURCE_DIR}/build")
|
||||
execute_process(COMMAND ${QT_CONFIGURE_COMMAND}
|
||||
-opensource -confirm-license
|
||||
-prefix "${QT_INSTALL_PREFIX}"
|
||||
-release ${QT_LIBTYPE} -ltcg
|
||||
-submodules ${QT_SUBMODULES}
|
||||
-no-feature-vulkan
|
||||
-nomake examples -nomake tests
|
||||
-qt-doubleconversion -no-glib -qt-pcre -qt-zlib -qt-harfbuzz -qt-libpng -qt-libjpeg
|
||||
WORKING_DIRECTORY "${QT_SOURCE_DIR}/build"
|
||||
RESULT_VARIABLE ret
|
||||
)
|
||||
if (NOT ret EQUAL "0")
|
||||
message(FATAL_ERROR "Qt library failed to configure.")
|
||||
endif()
|
||||
|
||||
# Build and install Qt
|
||||
message(STATUS "Building Qt library. This will take some time...")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} --build "${QT_SOURCE_DIR}/build" --parallel
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
RESULT_VARIABLE ret
|
||||
)
|
||||
if (NOT ret EQUAL "0")
|
||||
message(FATAL_ERROR "Qt library failed to build.")
|
||||
endif()
|
||||
|
||||
message(STATUS "Installing Qt library. This will take some time...")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} --install "${QT_SOURCE_DIR}/build"
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
RESULT_VARIABLE ret
|
||||
)
|
||||
if (NOT ret EQUAL "0")
|
||||
message(FATAL_ERROR "Qt library failed to install.")
|
||||
endif()
|
||||
|
||||
# Add Qt installation to search path
|
||||
message(STATUS "Qt library installed to ${QT_INSTALL_PREFIX}")
|
||||
list(PREPEND CMAKE_PREFIX_PATH ${QT_INSTALL_PREFIX})
|
||||
list(PREPEND CMAKE_MODULE_PATH ${QT_INSTALL_PREFIX}/lib/cmake)
|
||||
set(Qt6_DIR "${QT_INSTALL_PREFIX}/lib/cmake/Qt6" CACHE PATH "" FORCE)
|
||||
set(QT_QMAKE_EXECUTABLE "${QT_INSTALL_PREFIX}/bin/qmake6" CACHE PATH "" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT YUZU_USE_EXTERNAL_VULKAN_HEADERS)
|
||||
find_package(VulkanHeaders 1.3.274 REQUIRED)
|
||||
if (NOT YUZU_USE_CPM)
|
||||
find_package(VulkanHeaders 1.3.274 REQUIRED)
|
||||
else()
|
||||
CPMAddPackage("gh:KhronosGroup/Vulkan-Headers@1.3.274")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES)
|
||||
find_package(VulkanUtilityLibraries REQUIRED)
|
||||
if (NOT YUZU_USE_CPM)
|
||||
find_package(VulkanUtilityLibraries REQUIRED)
|
||||
else()
|
||||
CPMAddPackage("gh:KhronosGroup/Vulkan-Utility-Libraries#fce11d52fee0344bb10a098b0a398dff42cb5d51")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS)
|
||||
if (NOT YUZU_USE_CPM)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(SPIRV-Tools REQUIRED SPIRV-Tools)
|
||||
else()
|
||||
CPMAddPackage("gh:KhronosGroup/SPIRV-Tools#dd4b663e13c07fea4fbb3f70c1c91c86731099f7") # This is tag v2024.2, but some weird but is preventing us from using it here
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ENABLE_LIBUSB)
|
||||
|
|
@ -319,7 +566,7 @@ if (ENABLE_LIBUSB)
|
|||
endif()
|
||||
|
||||
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
|
||||
find_package(xbyak 6 CONFIG)
|
||||
find_package(xbyak 7 CONFIG)
|
||||
endif()
|
||||
|
||||
if (ARCHITECTURE_arm64)
|
||||
|
|
@ -340,7 +587,6 @@ endif()
|
|||
|
||||
if (ENABLE_WEB_SERVICE)
|
||||
find_package(cpp-jwt 1.4 CONFIG)
|
||||
find_package(httplib 0.12 MODULE COMPONENTS OpenSSL)
|
||||
endif()
|
||||
|
||||
if (YUZU_TESTS)
|
||||
|
|
@ -361,10 +607,13 @@ if (UNIX AND NOT APPLE)
|
|||
endif()
|
||||
|
||||
# Please consider this as a stub
|
||||
if(ENABLE_QT6 AND Qt6_LOCATION)
|
||||
if(Qt6_LOCATION)
|
||||
list(APPEND CMAKE_PREFIX_PATH "${Qt6_LOCATION}")
|
||||
endif()
|
||||
|
||||
# QT6 searches for Vulkan::Headers, too, so we have to define it before QT6 has a chance to do it.
|
||||
add_subdirectory(externals)
|
||||
|
||||
function(set_yuzu_qt_components)
|
||||
# Best practice is to ask for all components at once, so they are from the same version
|
||||
set(YUZU_QT_COMPONENTS2 Core Widgets Concurrent)
|
||||
|
|
@ -388,153 +637,34 @@ endfunction(set_yuzu_qt_components)
|
|||
|
||||
# Qt5 requires that we find components, so it doesn't fit our pretty little find package function
|
||||
if(ENABLE_QT)
|
||||
set(QT_VERSION 5.15)
|
||||
set(QT_VERSION 6.3.1)
|
||||
# These are used to specify minimum versions
|
||||
set(QT5_VERSION 5.15)
|
||||
set(QT6_VERSION 6.3.1)
|
||||
|
||||
set_yuzu_qt_components()
|
||||
if (ENABLE_QT6)
|
||||
find_package(Qt6 ${QT6_VERSION} COMPONENTS ${YUZU_QT_COMPONENTS})
|
||||
endif()
|
||||
find_package(Qt6 ${QT6_VERSION} COMPONENTS ${YUZU_QT_COMPONENTS})
|
||||
if (Qt6_FOUND)
|
||||
message(STATUS "yuzu/CMakeLists.txt: Found Qt6 at ${Qt6_CONFIG} (widgets at ${Qt6Widgets_CONFIG})")
|
||||
message(STATUS "yuzu/CMakeLists.txt: Qt6Widgets_VERSION ${Qt6Widgets_VERSION}, setting QT_VERSION")
|
||||
set(QT_VERSION ${Qt6Widgets_VERSION})
|
||||
set(QT_MAJOR_VERSION 6)
|
||||
# Qt6 sets cxx_std_17 and we need to undo that
|
||||
set_target_properties(Qt6::Platform PROPERTIES INTERFACE_COMPILE_FEATURES "")
|
||||
else()
|
||||
message(STATUS "yuzu/CMakeLists.txt: Qt6 not found/not selected, trying for Qt5")
|
||||
# When Qt6 partially found, need this set to use Qt5 when not specifying version
|
||||
set(QT_DEFAULT_MAJOR_VERSION 5)
|
||||
set(QT_MAJOR_VERSION 5)
|
||||
|
||||
set(YUZU_USE_QT_MULTIMEDIA ON)
|
||||
# Check for system Qt on Linux, fallback to bundled Qt
|
||||
if (UNIX AND NOT APPLE)
|
||||
if (NOT YUZU_USE_BUNDLED_QT)
|
||||
find_package(Qt5 ${QT5_VERSION} COMPONENTS Widgets DBus Multimedia)
|
||||
endif()
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND (NOT Qt5_FOUND OR YUZU_USE_BUNDLED_QT))
|
||||
# Check for dependencies, then enable bundled Qt download
|
||||
|
||||
# Check that the system GLIBCXX version is compatible
|
||||
find_program(OBJDUMP objdump)
|
||||
if (NOT OBJDUMP)
|
||||
message(FATAL_ERROR "Required program `objdump` not found.")
|
||||
endif()
|
||||
find_library(LIBSTDCXX libstdc++.so.6)
|
||||
execute_process(
|
||||
COMMAND
|
||||
${OBJDUMP} -T ${LIBSTDCXX}
|
||||
COMMAND
|
||||
grep GLIBCXX_3.4.28
|
||||
COMMAND
|
||||
sed "s/[0-9a-f]*.* //"
|
||||
COMMAND
|
||||
sed "s/ .*//"
|
||||
COMMAND
|
||||
sort -u
|
||||
OUTPUT_VARIABLE
|
||||
GLIBCXX_MET
|
||||
)
|
||||
if (NOT GLIBCXX_MET)
|
||||
message(FATAL_ERROR "Qt too old or not found, and bundled Qt package is not \
|
||||
compatible with this system. Either install Qt ${QT_VERSION}, or provide the path \
|
||||
to Qt by setting the variable Qt5_ROOT.")
|
||||
endif()
|
||||
|
||||
# Check for headers
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(QT_DEP_GLU QUIET glu>=9.0.0)
|
||||
if (NOT QT_DEP_GLU_FOUND)
|
||||
message(FATAL_ERROR "Qt bundled package dependency `glu` not found. \
|
||||
Perhaps `libglu1-mesa-dev` needs to be installed?")
|
||||
endif()
|
||||
pkg_check_modules(QT_DEP_MESA QUIET dri>=20.0.8)
|
||||
if (NOT QT_DEP_MESA_FOUND)
|
||||
message(FATAL_ERROR "Qt bundled package dependency `dri` not found. \
|
||||
Perhaps `mesa-common-dev` needs to be installed?")
|
||||
endif()
|
||||
|
||||
# Check for X libraries
|
||||
set(BUNDLED_QT_REQUIREMENTS
|
||||
libxcb-icccm.so.4
|
||||
libxcb-image.so.0
|
||||
libxcb-keysyms.so.1
|
||||
libxcb-randr.so.0
|
||||
libxcb-render-util.so.0
|
||||
libxcb-render.so.0
|
||||
libxcb-shape.so.0
|
||||
libxcb-shm.so.0
|
||||
libxcb-sync.so.1
|
||||
libxcb-xfixes.so.0
|
||||
libxcb-xinerama.so.0
|
||||
libxcb-xkb.so.1
|
||||
libxcb.so.1
|
||||
libxkbcommon-x11.so.0
|
||||
libxkbcommon.so.0
|
||||
)
|
||||
set(UNRESOLVED_QT_DEPS "")
|
||||
foreach (REQUIREMENT ${BUNDLED_QT_REQUIREMENTS})
|
||||
find_library(BUNDLED_QT_${REQUIREMENT} ${REQUIREMENT})
|
||||
if (NOT BUNDLED_QT_${REQUIREMENT})
|
||||
set(UNRESOLVED_QT_DEPS ${UNRESOLVED_QT_DEPS} ${REQUIREMENT})
|
||||
endif()
|
||||
unset(BUNDLED_QT_${REQUIREMENT})
|
||||
endforeach()
|
||||
unset(BUNDLED_QT_REQUIREMENTS)
|
||||
|
||||
if (NOT "${UNRESOLVED_QT_DEPS}" STREQUAL "")
|
||||
message(FATAL_ERROR "Bundled Qt package missing required dependencies: ${UNRESOLVED_QT_DEPS}")
|
||||
endif()
|
||||
|
||||
set(YUZU_USE_BUNDLED_QT ON CACHE BOOL "Download bundled Qt" FORCE)
|
||||
endif()
|
||||
if (YUZU_USE_BUNDLED_QT)
|
||||
# Binary package currently does not support Qt webengine, so make sure it's disabled
|
||||
set(YUZU_USE_QT_WEB_ENGINE OFF CACHE BOOL "Use Qt Webengine" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(YUZU_QT_NO_CMAKE_SYSTEM_PATH)
|
||||
|
||||
if(YUZU_USE_BUNDLED_QT)
|
||||
if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
|
||||
set(QT_BUILD qt-5.15.2-msvc2019_64)
|
||||
elseif ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") AND NOT MINGW AND ARCHITECTURE_x86_64)
|
||||
set(QT_BUILD qt5_5_15_2)
|
||||
else()
|
||||
message(FATAL_ERROR "No bundled Qt binaries for your toolchain. Disable YUZU_USE_BUNDLED_QT and provide your own.")
|
||||
endif()
|
||||
|
||||
if (DEFINED QT_BUILD)
|
||||
download_bundled_external("qt/" ${QT_BUILD} QT_PREFIX)
|
||||
endif()
|
||||
|
||||
set(QT_PREFIX_HINT HINTS "${QT_PREFIX}")
|
||||
|
||||
set(YUZU_QT_NO_CMAKE_SYSTEM_PATH "NO_CMAKE_SYSTEM_PATH")
|
||||
# Binary package for Qt5 has Qt Multimedia
|
||||
set(YUZU_USE_QT_MULTIMEDIA ON CACHE BOOL "Use Qt Multimedia" FORCE)
|
||||
endif()
|
||||
|
||||
set_yuzu_qt_components()
|
||||
find_package(Qt5 ${QT5_VERSION} COMPONENTS ${YUZU_QT_COMPONENTS} ${QT_PREFIX_HINT} ${YUZU_QT_NO_CMAKE_SYSTEM_PATH})
|
||||
message(FATAL_ERROR "yuzu/CMakeLists.txt: Qt6 not found, but is now required")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
# find SDL2 exports a bunch of variables that are needed, so its easier to do this outside of the yuzu_find_package
|
||||
if (ENABLE_SDL2)
|
||||
if (YUZU_USE_BUNDLED_SDL2)
|
||||
# Detect toolchain and platform
|
||||
if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
|
||||
## if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
|
||||
if ((MSVC_VERSION GREATER_EQUAL 1920) AND ARCHITECTURE_x86_64)
|
||||
set(SDL2_VER "SDL2-2.28.2")
|
||||
else()
|
||||
message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own.")
|
||||
endif()
|
||||
|
||||
if (DEFINED SDL2_VER)
|
||||
download_bundled_external("sdl2/" ${SDL2_VER} SDL2_PREFIX)
|
||||
endif()
|
||||
|
|
@ -620,7 +750,7 @@ if (NOT CLANG_FORMAT)
|
|||
message(STATUS "Clang format not found! Downloading...")
|
||||
set(CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe")
|
||||
file(DOWNLOAD
|
||||
https://github.com/yuzu-emu/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe
|
||||
https://github.com/litucks/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe
|
||||
"${CLANG_FORMAT}" SHOW_PROGRESS
|
||||
STATUS DOWNLOAD_SUCCESS)
|
||||
if (NOT DOWNLOAD_SUCCESS EQUAL 0)
|
||||
|
|
@ -675,7 +805,10 @@ function(create_target_directory_groups target_name)
|
|||
endfunction()
|
||||
|
||||
# Prevent boost from linking against libs when building
|
||||
target_link_libraries(Boost::headers INTERFACE Boost::disable_autolinking)
|
||||
if (NOT TARGET Boost::headers)
|
||||
target_link_libraries(Boost::headers INTERFACE Boost::disable_autolinking)
|
||||
endif()
|
||||
|
||||
# Adjustments for MSVC + Ninja
|
||||
if (MSVC AND CMAKE_GENERATOR STREQUAL "Ninja")
|
||||
add_compile_options(
|
||||
|
|
@ -685,6 +818,59 @@ if (MSVC AND CMAKE_GENERATOR STREQUAL "Ninja")
|
|||
)
|
||||
endif()
|
||||
|
||||
# Adjustments for Clang-cl
|
||||
if (MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND ARCHITECTURE STREQUAL "x86_64")
|
||||
set(LLVM_MINGW_VERSION 20250402)
|
||||
|
||||
# Set download URL and library path within the ZIP
|
||||
set(ZIP_URL "https://github.com/mstorsjo/llvm-mingw/releases/download/${LLVM_MINGW_VERSION}/llvm-mingw-${LLVM_MINGW_VERSION}-ucrt-x86_64.zip")
|
||||
set(LIB_PATH "llvm-mingw-${LLVM_MINGW_VERSION}-ucrt-x86_64/lib/clang/20/lib/windows/libclang_rt.builtins-x86_64.a")
|
||||
|
||||
# Set paths for download and extraction
|
||||
set(DOWNLOAD_DIR "${CMAKE_BINARY_DIR}/llvm-mingw-download")
|
||||
set(ZIP_FILE "${DOWNLOAD_DIR}/llvm-mingw.zip")
|
||||
set(EXTRACTED_LIB "${DOWNLOAD_DIR}/${LIB_PATH}")
|
||||
|
||||
# Create download directory if it doesn't exist
|
||||
file(MAKE_DIRECTORY "${DOWNLOAD_DIR}")
|
||||
|
||||
# Download and extract if the library doesn't exist
|
||||
if(NOT EXISTS "${EXTRACTED_LIB}")
|
||||
message(STATUS "Downloading llvm-mingw runtime libraries...")
|
||||
|
||||
# Download the ZIP file
|
||||
file(DOWNLOAD
|
||||
${ZIP_URL}
|
||||
${ZIP_FILE}
|
||||
SHOW_PROGRESS
|
||||
# Uncomment and add EXPECTED_HASH if you know the SHA256 checksum
|
||||
EXPECTED_HASH SHA256=4edc13d878b4ec49c2f1a6e9161abb093bbaefc8b7d129f3b3f57a22a4a41d38
|
||||
)
|
||||
|
||||
message(STATUS "Extracting compiler-rt builtins library...")
|
||||
|
||||
# Extract the specific file from the ZIP
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xvf "${ZIP_FILE}" "${LIB_PATH}"
|
||||
WORKING_DIRECTORY "${DOWNLOAD_DIR}"
|
||||
RESULT_VARIABLE extraction_result
|
||||
)
|
||||
|
||||
if(NOT extraction_result EQUAL 0)
|
||||
message(FATAL_ERROR "Failed to extract library: ${extraction_result}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Create imported target for the library
|
||||
add_library(llvm-mingw-runtime STATIC IMPORTED)
|
||||
set_target_properties(llvm-mingw-runtime PROPERTIES
|
||||
IMPORTED_LOCATION "${EXTRACTED_LIB}"
|
||||
)
|
||||
|
||||
# Link the library to all executables in the project
|
||||
link_libraries(llvm-mingw-runtime)
|
||||
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.
|
||||
|
|
@ -692,15 +878,14 @@ if (YUZU_USE_FASTER_LD AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||
find_program(MOLD mold)
|
||||
|
||||
if (MOLD AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "12.1")
|
||||
message(NOTICE "Selecting mold as linker")
|
||||
message(STATUS "Selecting mold as linker")
|
||||
add_link_options("-fuse-ld=mold")
|
||||
elseif (LLD)
|
||||
message(NOTICE "Selecting lld as linker")
|
||||
message(STATUS "Selecting lld as linker")
|
||||
add_link_options("-fuse-ld=lld")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory(externals)
|
||||
add_subdirectory(src)
|
||||
|
||||
# Set yuzu project or yuzu-cmd project as default StartUp Project in Visual Studio depending on whether QT is enabled or not
|
||||
|
|
@ -720,13 +905,13 @@ endif()
|
|||
# https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
|
||||
# https://www.freedesktop.org/software/appstream/docs/
|
||||
if(ENABLE_QT AND UNIX AND NOT APPLE)
|
||||
install(FILES "dist/org.yuzu_emu.yuzu.desktop"
|
||||
install(FILES "dist/onion.torzu_emu.torzu.desktop"
|
||||
DESTINATION "share/applications")
|
||||
install(FILES "dist/yuzu.svg"
|
||||
DESTINATION "share/icons/hicolor/scalable/apps"
|
||||
RENAME "org.yuzu_emu.yuzu.svg")
|
||||
install(FILES "dist/org.yuzu_emu.yuzu.xml"
|
||||
RENAME "onion.torzu_emu.torzu.svg")
|
||||
install(FILES "dist/onion.torzu_emu.torzu.xml"
|
||||
DESTINATION "share/mime/packages")
|
||||
install(FILES "dist/org.yuzu_emu.yuzu.metainfo.xml"
|
||||
install(FILES "dist/onion.torzu_emu.torzu.metainfo.xml"
|
||||
DESTINATION "share/metainfo")
|
||||
endif()
|
||||
|
|
|
|||
1291
CMakeModules/CPM.cmake
Normal file
1291
CMakeModules/CPM.cmake
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -98,22 +98,22 @@ function(copy_yuzu_Qt5_deps target_dir)
|
|||
"${Qt5_XCBGLINTEGRATIONS_DIR}libqxcb-glx-integration.so"
|
||||
)
|
||||
foreach(LIB ${Qt5_DLLS})
|
||||
file(COPY ${LIB} DESTINATION "${DLL_DEST}/lib" FOLLOW_SYMLINK_CHAIN)
|
||||
file(COPY "${LIB}" DESTINATION "${DLL_DEST}/lib" FOLLOW_SYMLINK_CHAIN)
|
||||
endforeach()
|
||||
foreach(LIB ${Qt5_IMAGEFORMAT_DLLS})
|
||||
file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/imageformats/" FOLLOW_SYMLINK_CHAIN)
|
||||
file(COPY "${LIB}" DESTINATION "${DLL_DEST}plugins/imageformats/" FOLLOW_SYMLINK_CHAIN)
|
||||
endforeach()
|
||||
foreach(LIB ${Qt5_PLATFORMTHEME_DLLS})
|
||||
file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/platformthemes/" FOLLOW_SYMLINK_CHAIN)
|
||||
file(COPY "${LIB}" DESTINATION "${DLL_DEST}plugins/platformthemes/" FOLLOW_SYMLINK_CHAIN)
|
||||
endforeach()
|
||||
foreach(LIB ${Qt5_PLATFORM_DLLS})
|
||||
file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/platforms/" FOLLOW_SYMLINK_CHAIN)
|
||||
file(COPY "${LIB}" DESTINATION "${DLL_DEST}plugins/platforms/" FOLLOW_SYMLINK_CHAIN)
|
||||
endforeach()
|
||||
foreach(LIB ${Qt5_PLATFORMINPUTCONTEXT_DLLS})
|
||||
file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/platforminputcontexts/" FOLLOW_SYMLINK_CHAIN)
|
||||
file(COPY "${LIB}" DESTINATION "${DLL_DEST}plugins/platforminputcontexts/" FOLLOW_SYMLINK_CHAIN)
|
||||
endforeach()
|
||||
foreach(LIB ${Qt5_XCBGLINTEGRATION_DLLS})
|
||||
file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/xcbglintegrations/" FOLLOW_SYMLINK_CHAIN)
|
||||
file(COPY "${LIB}" DESTINATION "${DLL_DEST}plugins/xcbglintegrations/" FOLLOW_SYMLINK_CHAIN)
|
||||
endforeach()
|
||||
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
# prefix_var: name of a variable which will be set with the path to the extracted contents
|
||||
function(download_bundled_external remote_path lib_name prefix_var)
|
||||
|
||||
set(package_base_url "https://github.com/yuzu-emu/")
|
||||
set(package_base_url "https://github.com/litucks/")
|
||||
set(package_repo "no_platform")
|
||||
set(package_extension "no_platform")
|
||||
if (WIN32)
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
# 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()
|
||||
|
|
|
|||
35
FAQ.md
Normal file
35
FAQ.md
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# FAQ
|
||||
|
||||
**Q:** Will you fix game X?<br/>
|
||||
**A:** I would love to! Unfortunately my resources are severely limited as I'm a one-man team. I will give it a try, but if you can link me to a commit in any other fork fixing the game I'd be glad to cherry-pick it.
|
||||
|
||||
**Q:** Will you add feature X?<br/>
|
||||
**A:** Most likely, no. I hesitate from adding complex features that may jeopardize stability and introduce bugs. Such features would only be added behind a settings toggle.
|
||||
|
||||
**Q:** You're only doing this for fame/money/...<br/>
|
||||
**A:** At the moment I am not considering to take any donations. I won't need them anyways in the foreseeable future.
|
||||
About the fame thing, I kind of dislike the attention. It distracts me from doing actual work, and it makes me feel pressured. Read this if you'd like to know more: [https://www.reddit.com/r/EmulationOnAndroid/comments/1ckmdh7/comment/l36hru9/?utm\_source=share&utm\_medium=web3x&utm\_name=web3xcss&utm\_term=1&utm\_content=share\_button](https://www.reddit.com/r/EmulationOnAndroid/comments/1ckmdh7/comment/l36hru9/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)
|
||||
|
||||
**Q:** What happens if Nintendo DMCAs the repo?<br/>
|
||||
**A:** The main repository is on the Tor network. That means Nintendo can do no harm to it unless they manage to deanonymize me and send me a personal letter. I'm doing my best to avoid that.
|
||||
Whenever a mirror repository gets taken down, I'll just move on to another git service. Yes, they are finite but I've got enough to hopefully make them give up before I've depleted my list.
|
||||
|
||||
**Q:** But you're just stealing changes from other forks!<br/>
|
||||
**A:** This is a pretty normal thing to do in the open source world. Yes, a lot of the changes are cherry-picked from other forks. There is no point in duplicating work unnecessarily and keeping good additions out of the project just because they are not mine. Original contributors are always credited as commit author of course.
|
||||
Note however that all changes listed in the README file are the work of Torzu contributors and other forks should feel free to cherry-pick them!
|
||||
|
||||
**Q:** Will there ever be an Android version?<br/>
|
||||
**A:** Unfortunately I am pretty inexperienced in the Android world. This whole gradle stuff makes no sense to me and I've given up for now.
|
||||
Let's say, it'd be a nice bonus but it's very low priority. If you'd like to run Yuzu on Android you'd probably be better off with Sudachi. I'm [looking for people interested in helping out](http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/issues/20)!
|
||||
|
||||
**Q:** This fork is going to be abandoned very soon!<br/>
|
||||
**A:** I have committed myself to at the very least keep it updated enough to compile and run on modern systems for the next decade or so. If you don't see commits for a while it doesn't mean I've abandoned it.
|
||||
I have ADHD and need to shift my focus between different projects sometimes to stay motivated. Also, personal life is a thing. ~~Who knows maybe I'll be run over by a car tomorrow? Joking, that's not going to happen. Hopefully.~~
|
||||
|
||||
**Q:** Why don't you reply on Reddit?
|
||||
**A:** Reddit doesn't like the way I anonymize my connection and heavily restricts my actions. Whenever I post something, it's immediately flagged and deleted. The `r/torzu` subreddit isn't mine, I was just given moderator privileges to it.
|
||||
|
||||
Enjoy playing your favorite (and legally obtained) Nintendo games on whatever device and emulator you prefer!<br/>
|
||||
Don't let Nintendo pressure you into using their kind of terrible and overpriced hardware... I'm truly sorry if no emulator can currently play the game you want to play.
|
||||
|
||||
Finally, enjoy life, make the most of it, don't be a ~~couch~~ office chair potato like me. Tip, even if you are, a walk around the green city areas can be incredibly refreshing!
|
||||
98
README.md
98
README.md
|
|
@ -1,85 +1,71 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
||||
SPDX-FileCopyrightText: 2018 yuzu Emulator Project - 2024 torzu Emulator Project
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
-->
|
||||
|
||||
<h1 align="center">
|
||||
<br>
|
||||
<a href="https://yuzu-emu.org/"><img src="https://raw.githubusercontent.com/yuzu-emu/yuzu-assets/master/icons/icon.png" alt="yuzu" width="200"></a>
|
||||
<a href="http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu"><img src="https://notabug.org/litucks/torzu/raw/master/dist/yuzu.png" alt="torzu" width="200"></a>
|
||||
<br>
|
||||
<b>yuzu</b>
|
||||
<b>torzu</b>
|
||||
<br>
|
||||
</h1>
|
||||
|
||||
<h4 align="center"><b>yuzu</b> is the world's most popular, open-source, Nintendo Switch emulator — started by the creators of <a href="https://citra-emu.org" target="_blank">Citra</a>.
|
||||
<h4 align="center"><b>torzu</b> is a fork of yuzu, an open-source Nintendo Switch emulator.
|
||||
<br>
|
||||
It is written in C++ with portability in mind, and we actively maintain builds for Windows, Linux and Android.
|
||||
It is written in C++ with portability in mind and runs on Linux, Windows and Android
|
||||
</h4>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://dev.azure.com/yuzu-emu/yuzu/">
|
||||
<img src="https://dev.azure.com/yuzu-emu/yuzu/_apis/build/status/yuzu%20mainline?branchName=master"
|
||||
alt="Azure Mainline CI Build Status">
|
||||
</a>
|
||||
<a href="https://discord.com/invite/u77vRWY">
|
||||
<img src="https://img.shields.io/discord/398318088170242053?color=5865F2&label=yuzu&logo=discord&logoColor=white"
|
||||
alt="Discord">
|
||||
</a>
|
||||
</p>
|
||||
## Fake websites
|
||||
|
||||
<p align="center">
|
||||
<a href="#compatibility">Compatibility</a> |
|
||||
<a href="#development">Development</a> |
|
||||
<a href="#building">Building</a> |
|
||||
<a href="#download">Download</a> |
|
||||
<a href="#support">Support</a> |
|
||||
<a href="#license">License</a>
|
||||
</p>
|
||||
A lot of fake Torzu websites have popped up. These are not mine. **This project will not have a clearnet website for the foreseeable future!**
|
||||
I highly advice against downloading anything from these websites, specially if their intention is clearly to make money through advertisements.
|
||||
|
||||
## Compatibility
|
||||
|
||||
The emulator is capable of running most commercial games at full speed, provided you meet the [necessary hardware requirements](https://yuzu-emu.org/help/quickstart/#hardware-requirements).
|
||||
The emulator is capable of running most commercial games at full speed, provided you meet the [necessary hardware requirements](http://web.archive.org/web/20240130133811/https://yuzu-emu.org/help/quickstart/#hardware-requirements).
|
||||
|
||||
For a full list of games yuzu supports, please visit our [Compatibility page](https://yuzu-emu.org/game/).
|
||||
It runs most Nintendo Switch games released until the date of the Yuzu takedown.
|
||||
|
||||
Check out our [website](https://yuzu-emu.org/) for the latest news on exciting features, monthly progress reports, and more!
|
||||
## Goals
|
||||
|
||||
**Consider this project in feature freeze!** This means no new features are going to be added. All further updates are going to be focused on maintaining compatibility with modern systems.
|
||||
|
||||
I think this project has done a really good job with keeping regressions from Yuzu to the minimum. If a game runs on Yuzu, and on the current version of Torzu, it's extremely likely that it works just as well on all future versions of Torzu.
|
||||
|
||||
Regardless, I am very happy with how things are right now.
|
||||
If you're looking for a Yuzu fork that definitely runs the games the original Yuzu emulator did well without any regressions, Torzu is probably your best bet for now.
|
||||
|
||||
## Development
|
||||
|
||||
Most of the development happens on GitHub. It's also where [our central repository](https://github.com/yuzu-emu/yuzu) is hosted. For development discussion, please join us on [Discord](https://discord.com/invite/u77vRWY).
|
||||
All development happens on [Dark Git](http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/). It's also where [our central repository](http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu) is hosted.
|
||||
|
||||
If you want to contribute, please take a look at the [Contributor's Guide](https://github.com/yuzu-emu/yuzu/wiki/Contributing) and [Developer Information](https://github.com/yuzu-emu/yuzu/wiki/Developer-Information).
|
||||
You can also contact any of the developers on Discord in order to know about the current state of the emulator.
|
||||
To clone this git repository, use these commands (assuming tor is installed as a service and running):
|
||||
|
||||
If you want to contribute to the user interface translation project, please check out the [yuzu project on transifex](https://www.transifex.com/yuzu-emulator/yuzu). We centralize translation work there, and periodically upstream translations.
|
||||
```bash
|
||||
git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git
|
||||
cd torzu
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
Alternatively, you can clone from the [NotABug mirror repository](https://notabug.org/litucks/torzu):
|
||||
|
||||
```bash
|
||||
git clone --depth 1 https://notabug.org/litucks/torzu.git
|
||||
cd torzu
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
Note that above repository may be taken down any time. Do not rely on its existence in production. In case the NotABug mirror goes down, another mirror will be most likely be set up on Bitbucket.
|
||||
|
||||
This project incorporates several commits from the [Suyu](https://suyu.dev), [Sudachi](https://github.com/sudachi-emu/sudachi) and [Citron](https://github.com/ong19th/Citron) forks, as well as changes listed in **Changes**.
|
||||
|
||||
## Building
|
||||
|
||||
* __Windows__: [Windows Build](https://github.com/yuzu-emu/yuzu/wiki/Building-For-Windows)
|
||||
* __Linux__: [Linux Build](https://github.com/yuzu-emu/yuzu/wiki/Building-For-Linux)
|
||||
|
||||
## Download
|
||||
|
||||
You can download the latest releases automatically via the installer on our [downloads](https://yuzu-emu.org/downloads/) page.
|
||||
|
||||
|
||||
## Support
|
||||
|
||||
If you enjoy the project and want to support us financially, check out our Patreon!
|
||||
|
||||
<a href="https://www.patreon.com/yuzuteam">
|
||||
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
|
||||
</a>
|
||||
|
||||
Any donations received will go towards things like:
|
||||
* Switch consoles to explore and reverse-engineer the hardware
|
||||
* Switch games for testing, reverse-engineering, and implementing new features
|
||||
* Web hosting and infrastructure setup
|
||||
* Software licenses (e.g. Visual Studio, IDA Pro, etc.)
|
||||
* Additional hardware (e.g. GPUs as-needed to improve rendering support, other peripherals to add support for, etc.)
|
||||
|
||||
If you wish to support us a different way, please join our [Discord](https://discord.gg/u77vRWY) and talk to bunnei. You may also contact: donations@yuzu-emu.org.
|
||||
<!-- -->
|
||||
* [Android Build](http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/src/branch/master/build-for-android.md) (NotABug [alt](https://notabug.org/litucks/torzu/src/master/build-for-android.md))
|
||||
* [Linux Build](http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/src/branch/master/build-for-linux.md) (NotABug [alt](https://notabug.org/litucks/torzu/src/master/build-for-linux.md))
|
||||
* [Windows Build](http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/src/branch/master/build-for-windows.md) (NotABug [alt](https://notabug.org/litucks/torzu/src/master/build-for-windows.md))
|
||||
|
||||
## License
|
||||
|
||||
yuzu is licensed under the GPLv3 (or any later version). Refer to the [LICENSE.txt](https://github.com/yuzu-emu/yuzu/blob/master/LICENSE.txt) file.
|
||||
torzu is licensed under the GPLv3 (or any later version). Refer to the [LICENSE.txt](./LICENSE.txt) file.
|
||||
|
|
|
|||
16
blog/000-intro.md
Normal file
16
blog/000-intro.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Blog Entry 0: Intro
|
||||
|
||||
After a week of being unable to check on the project, I realized the onion site had gone down randomly and wouldn't get back up until I rebooted the server. Not ideal. But it's back up now.
|
||||
|
||||
Given the lack of innovation and time on my side, I thought it would be a good idea to at least write a short educational blog on the topic.
|
||||
In this blog, I'll mostly talk about the ins and outs of this emulator, with the hope that someone with more skill than me will eventually be able to pick up where the Yuzu project left off. I might also write about personal things, but don't worry—I'll try to keep it low (I've got to keep my anonymity). I'm keeping this blog post short for the sake of it being an intro.
|
||||
|
||||
One thing to note is that on this blog, I'll refer to "Yuzu" as parts of the emulator written by the original Yuzu team and as "Torzu" to the changes I've made and the project itself.
|
||||
|
||||
Here's an overview of some of the next topics I'd like to cover on this blog next:
|
||||
|
||||
- How I manage a project like this (I'll explain how I operate this project anonymously and what changes I've made to the code to improve its longevity)
|
||||
- The puzzle pieces (I'll explain the overall concept of the different components of Yuzu)
|
||||
- ARM emulation (I'll explain how Yuzu emulates the ARM CPU)
|
||||
|
||||
Make sure to also read the [original Yuzu blog](https://yuzu-mirror.github.io/entry/) if you're interested in this topic!
|
||||
BIN
blog/000-intro.md.sig
Normal file
BIN
blog/000-intro.md.sig
Normal file
Binary file not shown.
203
blog/001-arm-emulation.md
Normal file
203
blog/001-arm-emulation.md
Normal file
|
|
@ -0,0 +1,203 @@
|
|||
# Blog Entry 1: ARM CPU emulation
|
||||
|
||||
I've been studying the ARM recompiler used by Yuzu (Dynarmic) for quite a while now, and have learnt a lot on the way there.
|
||||
|
||||
This is going to be a rather technical post, but I hope it might help people like me understand what goes on under the hood.
|
||||
|
||||
## Native code execution
|
||||
|
||||
Let me start by giving a greatly simplified explaination of what happens on actual ARM hardware (like the Nintendo Switch) when an application is started:
|
||||
|
||||
1. Initial address space is set up
|
||||
2. Stack pointer and finally program counter and are set
|
||||
3. CPU goes into a loop where instructions are fetched, decoded, then executed
|
||||
|
||||
The first step includes loading the executable into memory and allocating stack space. The stack is basically a piece of memory that is used to store local variables and hold information about what address to return execution to when a routine ("function") finishes execution.
|
||||
The second step here sets (at least) 2 registers, the stack pointer which tells the CPU where the stack is and the program counter which tells the CPU where to execute code from. It would point to a specific routine inside the executable.
|
||||
The third step is to just let the CPU execute the application. In reality this step is much more complex but this explaination will do the job here.
|
||||
|
||||
Yuzu is able to run ARM64 code natively on ARM64 CPUs through "NCE", sidestepping the need for recompilation.
|
||||
|
||||
## Code recompilation
|
||||
|
||||
Now, what would this look like when emulating an ARM CPU with Dynarmic? In fact, the first 2 steps are exactly the same, except that the register values are stored in memory at first.
|
||||
But then it gets interesting since the instructions at the program counter can't be "just executed". Instead, they have to go through a transformation from the architecture that is being emulated (like ARM64) to the architecture of the host CPU (like x64).
|
||||
|
||||
Let's take a look at this function:
|
||||
```c
|
||||
unsigned long add(unsigned long a, unsigned long b) {
|
||||
return a + b;
|
||||
}
|
||||
```
|
||||
|
||||
When compiled to ARM64, it looks like this:
|
||||
```arm64
|
||||
add x0, x0, x1
|
||||
ret
|
||||
```
|
||||
|
||||
This could very easily be translated into x64 like this:
|
||||
```x64
|
||||
add rdi,rsi
|
||||
mov rax,rdi
|
||||
ret
|
||||
```
|
||||
|
||||
And further optimized down like this:
|
||||
```x64
|
||||
lea rax,[rdi+rsi*1]
|
||||
ret
|
||||
```
|
||||
|
||||
### Register mapping
|
||||
|
||||
#### Static register map
|
||||
|
||||
As you can see, I have directly mapped ARM64 registers to x64 registers:
|
||||
|
||||
- `x0` -> `rax`
|
||||
- `x1` -> `rdi`
|
||||
- `x2` -> `rsi`
|
||||
|
||||
But if you know the differences between ARM64 and x64 well enough, you've probably already notices that this won't always work!
|
||||
The reason is that ARM64 has *way more* general purpose registers than x64! This unfortunately throws up a number of issues.
|
||||
|
||||
#### Dynamic register map
|
||||
|
||||
The closest we get to a good solution is to **dynamically allocate** the registers on the host machine.
|
||||
This means that instead of creating a fixed mapping between registers, we do what C compilers do when there are more local variables in a function than registers available: Just store the least frequently used registers in memory instead and load them into a register (discarding *its* value into memory) as needed.
|
||||
|
||||
This sounds pretty cool, doesn't it? It's not that easy.
|
||||
Dynarmic operates in **blocks of code**. That means that instead of recompiling the whole application right from the start, only recently executed code is recompiled and kept in memory. There are multiple reasons for this:
|
||||
|
||||
1. Startup time (recompiling everything can take a long time)
|
||||
2. Memory usage (a limit for how much recompiled code to keep in memory can be defined)
|
||||
3. Dynamic code generation (the guest application could overwrite and replace its own code at any time)
|
||||
|
||||
It is what makes Dynarmic a **dynamic** recompiler.
|
||||
|
||||
This comes with a pitfall in combination with dynamic register allocation though: Each block must be able to pick up execution from where the previous block stopped. This means that all registers must be stored in a predefined (fixed) location so that a block can be entered from different places.
|
||||
For example, if block A expects the `x27` register to be in memory, but block B expects the same register to be in an actual register things would go horribly wrong.
|
||||
|
||||
This is typically solved by either storing all or a fixed set of registers at specific locations in memory and the rest of the registers in actual registers at the end of a block, and loading the registers back from memory into actual registers as needed at the start of another block.
|
||||
This brings quite an unfortunate performance penalty but there is no real way around this.
|
||||
|
||||
More details on that later.
|
||||
|
||||
### Intermediate representation
|
||||
|
||||
So far, I've made it seem like the code transformation happens *directly* from the guest to the host architecture. This isn't actually true: There is something called an "intermediate representation" (short "IR") inbetween.
|
||||
Pretty much all recompilers including Dynarmic have these 3 main components:
|
||||
|
||||
1. Frontend ("lifts" guest instructions into IR)
|
||||
2. Middleend (runs transformations like optimization, more on that later)
|
||||
3. Backend ("lowers" IR into host instructions)
|
||||
|
||||
This system has the major advantage that frontend and backend can be replaced individually and makes many different combinations possible.
|
||||
Dynarmic has 2 frontends:
|
||||
|
||||
- ARM32
|
||||
- ARM64
|
||||
|
||||
And 3 backend:
|
||||
|
||||
- ARM64
|
||||
- RISCV64
|
||||
- x64
|
||||
|
||||
Specifically the RISCV64 backend does not implement all IR instructions so it only works with the ARM32 backend.
|
||||
In theory there could be many more frontends and backends though, LLVM is great example for such a system but there are no frontends available that lift instructions to its IR, likely because its IR is too high level (too far away from machine instructions). Instead it has frontends for actual programming languages like C, C++ and Rust and many many backends, even some for GPUs.
|
||||
|
||||
Typically, one guest instruction turns into one or more IR instructions and a couple of IR instructions turn into one or more host instructions.
|
||||
|
||||
Let's take a look at the example from the beginning again:
|
||||
```arm64
|
||||
add x0, x0, x1
|
||||
ret
|
||||
```
|
||||
|
||||
And convert it as a whole block into IR:
|
||||
```c
|
||||
%0 = load_general_register 0
|
||||
%1 = load_general_register 1
|
||||
%2 = integer_add %0 %1
|
||||
store_general_register 0 %2
|
||||
%3 = load_general_register 30
|
||||
return branch_to(%3)
|
||||
```
|
||||
|
||||
This is not what any actual IR looks like but you can see the entire process of loading the register values into IR registers, performing the addition and storing the result back into a register. Finally, the block ends by performing a branch to the address in the `x30` register (which is what the `ret` instruction actually does).
|
||||
|
||||
#### Dynamic register allocation
|
||||
|
||||
You might've noticed that instead of "overwriting" the IR register `0`, a new IR register `2` is created. This is because IR registers are actually constant values and only a concept needed to generate human readable IR code. In reality, the `integer_add` instruction arguments here simply "use" the results of the `load_general_register` instructions.
|
||||
|
||||
The backend itself is then responsible for making sure the value returned by the used instruction is still available when the instruction user needs it. This can be achieved by either:
|
||||
|
||||
1. Just keeping the value in an available host register if possible
|
||||
2. Executing the instruction later, when it's actually needed
|
||||
3. Moving the value into memory until it's used
|
||||
|
||||
And this is actually how dynamic register allocation works under the hood! This concept of an intermediate representation makes it incredibly easy.
|
||||
|
||||
#### Optimization
|
||||
|
||||
One important optimization is known as "constant folding". This optimization pass figures out values at compile time. Take this piece of IR for example:
|
||||
```
|
||||
%0 = integer_add 3 4
|
||||
%1 = integer_sub %0 1
|
||||
store_general_register 7 %1
|
||||
```
|
||||
|
||||
Through constant folding, this IR can be optimized down to just:
|
||||
```
|
||||
store_general_register 7 6
|
||||
```
|
||||
|
||||
Another optimization pass known as "dead code elimination" is able to remove code that can be removed without changing the outcome. For example this piece of IR:
|
||||
```
|
||||
%0 = integer_add 3 4
|
||||
%1 = integer_sub %0 1
|
||||
store_general_register 7 %0
|
||||
```
|
||||
|
||||
Would be optimized into just:
|
||||
```
|
||||
%0 = integer_add 3 4
|
||||
store_general_register 7 %0
|
||||
```
|
||||
|
||||
By this pass.
|
||||
|
||||
There are a couple more optimization passes in Dynarmic that aren't as easy to explain, but I guess you get the point.
|
||||
Optimization passes are usually chained together to generate the most optimal code.
|
||||
|
||||
### Other issues
|
||||
|
||||
What happens if the backend architecture does not support an instruction the frontend architure does *at all*?
|
||||
One example for this is the **exclusive monitor**. It's a multithreading-related feature on ARM CPUs that can not be accurately replicated on x86_64 CPUs at all, and even the way Dynarmic implements it is extremely slow compared to an actual ARM CPU.
|
||||
|
||||
Sometimes, hard to emulate stuff like that can be emulated with less accurately to improve performance. In Torzu, such optimizations are enabled by setting the CPU accuracy to "unsafe". Some games may work fine with this, others may crash the entire emulator. Use at your own risk.
|
||||
|
||||
### Possible performance improvements in Dynarmic
|
||||
|
||||
#### Code caching
|
||||
|
||||
The idea is to cache generated IR on disk (and OS filesystem cache) to avoid reoptimizing the same blocks over and over again. This is not particularly useful for hot blocks (blocks with code that is executed very often in a loop) though since such blocks would most likely always stay in memory anyways.
|
||||
It would improve startup time though and generally works very similarly to the disk shader cache.
|
||||
|
||||
#### Branch caching
|
||||
|
||||
One other idea I've had to avoid calling into the recompiler while the game is running works very similar to **profile guided optimization**. Basically, all branches that can't be resolved at compile time could fill kind of a "branch cache" so that next time that branch is recompiled the path to previous branch locations could be shorter.
|
||||
|
||||
#### More optimization passes
|
||||
|
||||
LLVM has a big collection of optimization passes that may be worthwhile checking out.
|
||||
|
||||
## Conclusion
|
||||
|
||||
While Dynarmic is already very fast there are still possible improvements to be made.
|
||||
I'd love to get started with those right away, but the Dynarmic code base is quite complex and hard to learn and I don't want to dedicate *all* my time to Dynarmic.
|
||||
Who knows, maybe the mentioned optimizations are completely worthless? I'll keep you updated whenever something interesting happens!
|
||||
|
||||
If you see any mistakes in this post, please feel free to create an issue. I have only proofread this post myself since I am a one-man team.
|
||||
BIN
blog/001-arm-emulation.md.sig
Normal file
BIN
blog/001-arm-emulation.md.sig
Normal file
Binary file not shown.
99
blog/002-puzzle-pieces.md
Normal file
99
blog/002-puzzle-pieces.md
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
# Blog Entry 2: The puzzle pieces
|
||||
|
||||
I've been excited about this for a long time! Users typically think of applications as one big piece of software.
|
||||
In almost all cases this is not true.
|
||||
|
||||
In this post, I'd like to break Yuzu down into pieces for you. If you take a look at Torzu's `src/` directory, you'll see that there are several subdirectories. These are the main components, which are compiled as separate libraries (and then linked together). If you take a look at the `externals/` directory, you'll see a large list of other projects that Yuzu depends on.
|
||||
|
||||
I will focus on the `core` library here, as it contains most of the interesting stuff.
|
||||
|
||||
## ARM code execution
|
||||
|
||||
The `core/arm' directory is one of the most important: it is responsible for executing ARM instructions. It originally contained only code for dynamic integration, but was extended last year to include Native Code Execution (NCE).
|
||||
Interestingly, it doesn't have an ARM interpreter, which usually helps a lot when debugging JIT-related issues in other emulators. Although Dynarmic already has some debug-friendly options, it might be worthwhile to add an interpreter at some point.
|
||||
|
||||
## Crypto
|
||||
|
||||
Probably the most controversial part of Yuzu so far as it contains those "access-control circumvention measures". Not much to say about it, it is the core part of key derivation, ROM decryption, etc.
|
||||
|
||||
## Filesystem
|
||||
|
||||
There are file systems everywhere: Inside game ROMs, on the SD card, the internal flash, etc. `core/file_sys` is responsible for organizing them and their contents, as well as applying patches and overlays.
|
||||
|
||||
## Frontend
|
||||
|
||||
Despite the name, there is no actual frontend code here. It's just support code that can be used by different frontends.
|
||||
|
||||
There are currently 2 frontends that come with Yuzu:
|
||||
|
||||
- `yuzu`: Simply being called Yuzu, this is what you're interacting with most of the time. It is written in Qt Widgets.
|
||||
- `yuzu-cmd`: An SDL2 based frontend useful for light debugging. There's rarely a reason to use this.
|
||||
|
||||
## High-level emulation
|
||||
|
||||
Finally! This is where things get interesting.
|
||||
|
||||
Processes on an operating system can't do anything useful on their own. Typically, they can only access a small, predefined piece of RAM, and that's it. This is where the operating system APIs come in. Whenever a user process wants to access a file on a file system, query user input, or do just about anything else, it must use the operating system API to ask the operating system to perform that action on behalf of the process.
|
||||
|
||||
On modern operating systems, all of these things happen inside the operating system kernel. These kernels are called "monolithic kernels", but the operating system on the Nintendo Switch ("Horizon") doesn't work this way; it's called a "microkernel". Basically, instead of having the kernel handle hardware access, there are dedicated user processes called "services" that have direct access to the hardware they are responsible for. All the kernel does is manage memory, schedule tasks, and pass API calls to these services.
|
||||
|
||||
This is what a process accessing a driver would look like on a monolithic kernel like Linux or Windows:
|
||||
|
||||
```
|
||||
[Userspace ] [Kernel ]
|
||||
User process -> Kernel API -> Driver
|
||||
```
|
||||
|
||||
And this is what the same thing would look like on a microkernel like Horizon:
|
||||
|
||||
```
|
||||
[Userspace-] [Kernel------------------] [Userspace------]
|
||||
User process -> Kernel API -> Services API -> Service -> Driver
|
||||
```
|
||||
|
||||
As you can see, the path is much longer and therefore less efficient. Also note that each switch between userspace and kernel is quite slow, and that this path also has to be traversed backwards after the requested action is completed. However, this also means that if there is an exploit in a service, the rest of the system remains inaccessible to the attacker, and bugs can't bring down the kernel (which would kill the entire system).
|
||||
|
||||
Yes, Nintendo really did prioritize good security so that the Switch wouldn't be so easily hacked over performance on already weak hardware. Thanks, Nintendo.
|
||||
|
||||
Anyway, since Yuzu is a high-level emulator, it has to implement the kernel API and all those services itself. This is done in the `core/hle` directory. If you'd like to learn more, check out these Switchbrew pages:
|
||||
|
||||
- https://switchbrew.org/wiki/SVC: Kernel API
|
||||
- https://switchbrew.org/wiki/Services_API: Services API + Service list
|
||||
|
||||
## Internal network
|
||||
|
||||
This part of the code handles the lowest level of networking, as well as redirection to a multiplayer server (Did you know? Yuzu multiplayer servers work kind of like a VPN!). Nothing special or noteworthy here at all.
|
||||
|
||||
## Loader
|
||||
|
||||
This is where ROM files are loaded:
|
||||
|
||||
- Mapping of executable code and data to memory
|
||||
- Filesystem setup
|
||||
|
||||
## Memory
|
||||
|
||||
Nope, no memory management here. Not sure why this directory is called "memory" at all, since all it contains is the code responsible for applying cheats. Yes, cheats end up only interacting with memory, but it should have just been called "cheat".
|
||||
|
||||
Of note is the cheat VM, which is a nice, tiny cheat interpreter. Pretty cool!
|
||||
|
||||
## Tools
|
||||
|
||||
Here you'll find some debugging tools, including a "memory freezer" that allows you to silently prevent the game from changing data at certain memory addresses.
|
||||
|
||||
Quoting from `freezer.h`:
|
||||
|
||||
> This class allows the user to prevent an application from writing new values to certain memory
|
||||
> locations. This has a variety of uses when attempting to reverse a game.
|
||||
>
|
||||
> One example could be a cheat to prevent Mario from taking damage in SMO. One could freeze the
|
||||
> memory address that the game uses to store Mario's health so when he takes damage (and the game
|
||||
> tries to write the new health value to memory), the value won't change.
|
||||
|
||||
And then there's also RenderDoc integration for graphics debugging.
|
||||
|
||||
## Conclusion
|
||||
|
||||
There are many more components I could have listed here, especially outside the `core' directory, but I feel these are the most important ones, and I don't want this article to go on forever.
|
||||
|
||||
Thank you for reading and making it to the end. I welcome you to create issues for any mistgakes you find here!
|
||||
BIN
blog/002-puzzle-pieces.md.sig
Normal file
BIN
blog/002-puzzle-pieces.md.sig
Normal file
Binary file not shown.
24
boost-1.88.0-fix.patch
Normal file
24
boost-1.88.0-fix.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
diff -ruN boost-src/libs/cobalt/include/boost/cobalt/concepts.hpp boost-src-patched/libs/cobalt/include/boost/cobalt/concepts.hpp
|
||||
--- boost-src/libs/cobalt/include/boost/cobalt/concepts.hpp 2025-04-12 18:25:53.791233755 +0200
|
||||
+++ boost-src-patched/libs/cobalt/include/boost/cobalt/concepts.hpp 2025-04-12 18:29:50.304496166 +0200
|
||||
@@ -62,7 +62,7 @@
|
||||
template <typename T>
|
||||
concept with_get_executor = requires (T& t)
|
||||
{
|
||||
- {t.get_executor()} -> asio::execution::executor;
|
||||
+ t.get_executor();
|
||||
};
|
||||
|
||||
|
||||
diff -ruN boost-src/libs/context/CMakeLists.txt boost-src-patched/libs/context/CMakeLists.txt
|
||||
--- boost-src/libs/context/CMakeLists.txt 2025-04-12 18:25:53.847233801 +0200
|
||||
+++ boost-src-patched/libs/context/CMakeLists.txt 2025-04-12 18:29:33.436479899 +0200
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
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")
|
||||
+ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT MSVC)
|
||||
set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "-Wno-unused-command-line-argument")
|
||||
endif()
|
||||
|
||||
129
build-for-android.md
Normal file
129
build-for-android.md
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
## Using Android Studio
|
||||
|
||||
**Note: These build instructions are a work-in-progress.**
|
||||
|
||||
### Dependencies
|
||||
* [Android Studio](https://developer.android.com/studio)
|
||||
* [NDK 26.3.11579264 and CMake 3.22.1](https://developer.android.com/studio/projects/install-ndk#default-version)
|
||||
* [Git](https://git-scm.com/download)
|
||||
|
||||
#### 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.**
|
||||
* **[Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows)** - **Make sure to select Latest SDK.**
|
||||
|
||||
### Cloning yuzu with Git
|
||||
**from Codeberg repo (the `--recursive` option automatically clones the required Git submodules):**
|
||||
```
|
||||
git clone --depth 1 --recursive https://notabug.org/litucks/torzu.git
|
||||
cd torzu
|
||||
```
|
||||
**from Torzu repo (assuming Tor is installed as a service):**
|
||||
```
|
||||
git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git
|
||||
cd torzu
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
yuzu by default will be cloned into:
|
||||
* `C:\Users\<user-name>\torzu` on Windows
|
||||
* `~/torzu` on Linux
|
||||
* And wherever on macOS
|
||||
|
||||
### Building
|
||||
1. Start Android Studio, on the startup dialog select `Open`.
|
||||
2. Navigate to the `torzu/src/android` directory and click on `OK`.
|
||||
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'`.
|
||||
|
||||
### Additional Resources
|
||||
https://developer.android.com/studio/intro
|
||||
|
||||
## Using CLI
|
||||
|
||||
**Note: These build instructions are for building on Debian Bookworm or newer**
|
||||
|
||||
### Dependencies
|
||||
```
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y sdkmanager openjdk-21-jdk build-essential curl git pkg-config glslang-tools zip
|
||||
sudo sdkmanager "ndk;26.3.11579264" "platforms;android-35" "build-tools;35.0.0" "cmake;3.22.1" "platform-tools;35.0.2"
|
||||
sudo update-alternatives --config java # Select Java 21 here if possible
|
||||
```
|
||||
|
||||
### Cloning Yuzu with Git
|
||||
Follow clone instructions for Android Studio above
|
||||
|
||||
### Build
|
||||
```
|
||||
./externals/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
||||
export ANDROID_HOME=/opt/android-sdk
|
||||
cd src/android
|
||||
./gradlew assembleRelease
|
||||
```
|
||||
|
||||
The APK will be at `src/android/app/build/outputs/apk/mainline/release/app-mainline-release.apk`
|
||||
|
||||
## Building an installable turnip driver package
|
||||
|
||||
Adapted from the mesa documentation [here](https://docs.mesa3d.org/android.html#building-using-the-android-ndk) and the released zip in [this](https://github.com/K11MCH1/AdrenoToolsDrivers) GitHub repo.
|
||||
|
||||
### Dependencies
|
||||
|
||||
Follow the steps to setup a CLI build above and additionally run
|
||||
```
|
||||
sudo apt-get install -y python3-mako python3-yaml byacc flex
|
||||
```
|
||||
to install some additional required packages.
|
||||
|
||||
Create a file `~/.local/share/meson/cross/android-aarch64` with the following content:
|
||||
```
|
||||
[binaries]
|
||||
ar = '/opt/android-sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'
|
||||
c = ['/opt/android-sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang']
|
||||
cpp = ['/opt/android-sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '-static-libstdc++']
|
||||
c_ld = 'lld'
|
||||
cpp_ld = 'lld'
|
||||
strip = '/opt/android-sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip'
|
||||
pkg-config = ['env', 'PKG_CONFIG_LIBDIR=/opt/android-sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/python3/lib/pkgconfig', '/usr/bin/pkg-config']
|
||||
[host_machine]
|
||||
system = 'android'
|
||||
cpu_family = 'aarch64'
|
||||
cpu = 'armv8'
|
||||
endian = 'little'
|
||||
```
|
||||
This informs `meson` (the build system used by mesa) about the Android NDK tools.
|
||||
If you need to modify this file with newer versions you can use a command like `find /opt/android-sdk -name "aarch64-linux-android*-clang"` to find the new paths.
|
||||
|
||||
### Clone the mesa git repo
|
||||
```
|
||||
git clone https://gitlab.freedesktop.org/mesa/mesa.git
|
||||
```
|
||||
Then use `git checkout <version>` to checkout the version you want to build (for example `mesa-24.2.0`).
|
||||
|
||||
### Compiling the turnip driver
|
||||
```
|
||||
meson setup build-android-aarch64 --cross-file android-aarch64 -Dplatforms=android -Dplatform-sdk-version=30 -Dandroid-stub=true -Dgallium-drivers= -Dvulkan-drivers=freedreno -Dfreedreno-kmds=kgsl -Dbuildtype=release
|
||||
meson compile -C build-android-aarch64
|
||||
```
|
||||
|
||||
### Create an installable driver package
|
||||
Check the file `VERSION` for the Mesa version and the file `include/vulkan/vulkan_core.h` and look for `VK_HEADER_VERSION_COMPLETE` for the Vulkan version.
|
||||
|
||||
Create a file named `meta.json` with the following content (replacing the `<placeholders>`)
|
||||
```
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"name": "Mesa Turnip Driver <mesa_version>",
|
||||
"description": "Compiled from source.",
|
||||
"author": "<name>",
|
||||
"packageVersion": "1",
|
||||
"vendor": "Mesa",
|
||||
"driverVersion": "Vulkan <vulkan_version>",
|
||||
"minApi": 30,
|
||||
"libraryName": "libvulkan_freedreno.so"
|
||||
}
|
||||
```
|
||||
and run these commands to create the package
|
||||
```
|
||||
mv ./build-android-aarch64/src/freedreno/vulkan/libvulkan_freedreno.so libvulkan_freedreno.so
|
||||
zip turnip.zip meta.json libvulkan_freedreno.so
|
||||
```
|
||||
263
build-for-linux.md
Normal file
263
build-for-linux.md
Normal file
|
|
@ -0,0 +1,263 @@
|
|||
# Flatpak Build
|
||||
|
||||
**NOTE: Flatpaks are built with a wrapper repo, which downloads everything needed including the main torzu repo.**
|
||||
|
||||
First install `flatpak` and `flatpak-builder` for your specific distro:
|
||||
|
||||
* Arch / Manjaro:
|
||||
```bash
|
||||
sudo pacman -Syu --needed flatpak flatpak-builder
|
||||
```
|
||||
* Debian / Ubuntu / Linux Mint:
|
||||
```bash
|
||||
sudo apt-get install flatpak flatpak-builder
|
||||
```
|
||||
* Fedora:
|
||||
```bash
|
||||
sudo dnf install flatpak flatpak-builder
|
||||
```
|
||||
|
||||
Then install flatpak dependencies from within flatpak:
|
||||
|
||||
```bash
|
||||
flatpak install org.kde.Sdk//5.15-23.08 io.qt.qtwebengine.BaseApp//5.15-23.08
|
||||
```
|
||||
Clone the torzu-flatpak repo and dependencies **(assuming tor is installed as a service and running)**:
|
||||
```bash
|
||||
git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 --recursive http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/onion.torzu_emu.torzu torzuFlatpak
|
||||
```
|
||||
Alternatively, you can clone from the github repo:
|
||||
```bash
|
||||
git clone --depth 1 --recursive https://github.com/litucks/onion.torzu_emu.torzu.git torzuFlatpak
|
||||
```
|
||||
Enter the cloned directory and run the build script:
|
||||
```bash
|
||||
cd torzuFlatpak && ./build.sh
|
||||
```
|
||||
The resulting `torzu.flatpak` will be in the same directory as the build script.
|
||||
|
||||
To install:
|
||||
```bash
|
||||
flatpak install torzu.flatpak
|
||||
```
|
||||
---
|
||||
---
|
||||
---
|
||||
|
||||
# AppImage Build
|
||||
|
||||
The AppImage Builder is included in the main torzu repo.
|
||||
|
||||
First you must build a native linux version from the section below, with the resulting executables in the `torzu/build/bin` folder. Leave everything where it is.
|
||||
|
||||
After that you only have to run the following (assuming you're still in the `build` folder after running `ninja`):
|
||||
```bash
|
||||
cd .. && ./AppImage-build.sh
|
||||
```
|
||||
The script enters the `AppImageBuilder` folder and generates the AppImage executable.
|
||||
|
||||
The resulting `torzu.AppImage` file is moved back into the main root `torzu` folder where `AppImage-build.sh` is.
|
||||
|
||||
To run it:
|
||||
```bash
|
||||
./torzu.AppImage
|
||||
```
|
||||
***These steps are included as an option in the native build instructions below!***
|
||||
|
||||
**NOTE: the native binaries will still be in the `torzu/build/bin` folder, so you can archive them to have both versions.**
|
||||
|
||||
---
|
||||
---
|
||||
---
|
||||
|
||||
# Native Builds
|
||||
|
||||
### Dependencies (easy copy/paste commands provided after)
|
||||
|
||||
You'll need to download and install the following:
|
||||
|
||||
* [GCC](https://gcc.gnu.org/) v11+ (for C++20 support) & misc
|
||||
* This page is being updated as we transition to GCC 11
|
||||
* If GCC 12 is installed, [Clang](https://clang.llvm.org/) v14+ is required for compiling
|
||||
* [CMake](https://www.cmake.org/) 3.15+
|
||||
|
||||
The following are handled by torzu's externals:
|
||||
|
||||
* [FFmpeg](https://ffmpeg.org/)
|
||||
* [SDL2](https://www.libsdl.org/download-2.0.php) 2.0.18+
|
||||
* [opus](https://opus-codec.org/downloads/)
|
||||
|
||||
If version 5.15.2 is not already installed, pre-compiled binaries for Qt 5.15.2 will be downloaded from [here](https://github.com/litucks/ext-linux-bin) automatically by CMake:
|
||||
|
||||
* [Qt](https://qt-project.org/downloads) 5.15+
|
||||
|
||||
All other dependencies will be downloaded by [vcpkg](https://vcpkg.io/) if needed:
|
||||
|
||||
* [Boost](https://www.boost.org/users/download/) 1.86.0+
|
||||
* [Catch2](https://github.com/catchorg/Catch2) 2.13.7 - 2.13.9
|
||||
* [fmt](https://fmt.dev/) 8.0.1+
|
||||
* [lz4](http://www.lz4.org) 1.8+
|
||||
* [nlohmann_json](https://github.com/nlohmann/json) 3.8+
|
||||
* [OpenSSL](https://www.openssl.org/source/)
|
||||
* [ZLIB](https://www.zlib.net/) 1.2+
|
||||
* [zstd](https://facebook.github.io/zstd/) 1.5+
|
||||
|
||||
### Dependencies are listed here as commands that can be copied/pasted. Of course, they should be inspected before being run.
|
||||
|
||||
- All Distros
|
||||
|
||||
- If an ARM64 build is intended, export `VCPKG_FORCE_SYSTEM_BINARIES=1`.
|
||||
|
||||
- Arch / Manjaro:
|
||||
|
||||
```bash
|
||||
sudo pacman -Syu --needed base-devel boost catch2 cmake ffmpeg fmt git glslang libzip lz4 mbedtls ninja nlohmann-json openssl opus qt5 sdl2 unzip zip zlib zstd perl
|
||||
```
|
||||
- Building with QT Web Engine needs to be specified when running CMake with the param `-DCMAKE_CXX_FLAGS="-I/usr/include/qt/QtWebEngineWidgets"` with qt5-webengine installed.
|
||||
- GCC 11 or later is required.
|
||||
|
||||
- Debian / Ubuntu / Linux Mint:
|
||||
|
||||
```bash
|
||||
sudo apt-get install autoconf catch2 cmake g++-11 gcc-11 git glslang-tools libasound2 libavcodec-dev libavfilter-dev libboost-context-dev libfmt-dev libglu1-mesa-dev libhidapi-dev liblz4-dev libmbedtls-dev libpulse-dev libssl-dev libswscale-dev libtool libudev-dev libva-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxext-dev libxkbcommon-x11-0 libxxhash-dev libzstd-dev mesa-common-dev nasm ninja-build nlohmann-json3-dev qtbase5-dev qtbase5-private-dev qtmultimedia5-dev qttools5-dev qtwebengine5-dev shasum
|
||||
```
|
||||
- Debian 11 (Bullseye), Ubuntu 22.04, Linux Mint 20 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 GCC 11. This can be done by adding the parameters `-DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11` when running CMake. i.e.
|
||||
- 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`
|
||||
- ***example cmake without system SDL2 (swap into full build commands below):***
|
||||
```bash
|
||||
cmake .. -GNinja -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DYUZU_USE_QT_WEB_ENGINE=ON
|
||||
```
|
||||
- Fedora:
|
||||
|
||||
```bash
|
||||
sudo dnf install autoconf ccache cmake ffmpeg-devel fmt-devel gcc{,-c++} glslang hidapi-devel json-devel libtool libusb1-devel libXext-devel libzstd-devel lz4-devel nasm ninja-build openssl-devel pulseaudio-libs-devel qt5-linguist qt5-qtbase{-private,}-devel qt5-qtmultimedia-devel qt5-qtwebengine-devel shasum speexdsp-devel wayland-devel zlib-devel perl-Digest-SHA
|
||||
```
|
||||
- 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`
|
||||
- CMake arguments to force system libraries:
|
||||
- SDL2: `-DYUZU_USE_BUNDLED_SDL2=OFF -DYUZU_USE_EXTERNAL_SDL2=OFF`
|
||||
- FFmpeg: `-DYUZU_USE_EXTERNAL_FFMPEG=OFF`
|
||||
- [RPM Fusion](https://rpmfusion.org/) (free) is required to install `ffmpeg-devel`
|
||||
|
||||
- Gentoo:
|
||||
|
||||
- **\*\*Disclaimer\*\***: this dependency list was written by a novice Gentoo user who first set it up with a DE, and then based this list off of the Fedora dependency list. This may be missing some requirements, or includes too many. Caveat emptor.
|
||||
```bash
|
||||
emerge --ask app-arch/lz4 dev-libs/boost dev-libs/hidapi dev-libs/libzip dev-libs/openssl dev-qt/linguist dev-qt/qtconcurrent dev-qt/qtcore dev-util/cmake dev-util/glslang dev-vcs/git media-libs/alsa-lib media-libs/opus media-sound/pulseaudio media-video/ffmpeg net-libs/mbedtls sys-libs/zlib x11-libs/libXext
|
||||
```
|
||||
- GCC 11 or later is required.
|
||||
- Users may need to append `pulseaudio`, `bindist` and `context` to the `USE` flag.
|
||||
|
||||
# Building
|
||||
|
||||
### Clone the source with Git
|
||||
|
||||
**from Notabug repo:**
|
||||
```bash
|
||||
git clone --depth 1 https://notabug.org/litucks/torzu.git
|
||||
```
|
||||
|
||||
**from Torzu repo (assuming Tor is installed as a service, such as `sudo apt install tor` using default settings):**
|
||||
```bash
|
||||
git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git
|
||||
```
|
||||
|
||||
### Build in Release Mode (Optimized)
|
||||
|
||||
If you need to run ctests, you can disable `-DYUZU_TESTS=OFF` and install Catch2.
|
||||
|
||||
***Be sure to swap your above distro-specific commands into the line starting with*** `cmake` (the options already included below should still be used):
|
||||
|
||||
```bash
|
||||
cd torzu
|
||||
git submodule update --init --recursive
|
||||
mkdir build && cd build
|
||||
cmake .. -GNinja -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF
|
||||
ninja
|
||||
```
|
||||
|
||||
If building for the Steam Deck and you have LLVM 17 installed, you need to disable linking against it in the CMake command. The Steam Deck, as of SteamOS v3.6.20, includes `libLLVM-16`.
|
||||
|
||||
To verify which libraries your application is linking against, you can use the ldd command. For example:
|
||||
|
||||
```bash
|
||||
ldd torzu/build/bin/yuzu
|
||||
```
|
||||
|
||||
Look for entries related to `libLLVM` (or grep the ldd output). If it shows `libLLVM-17`, you need to adjust your configuration.
|
||||
|
||||
Use the following CMake command to disable linking against LLVM 17, instead of the one above:
|
||||
|
||||
```bash
|
||||
cmake .. -GNinja -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF -DYUZU_USE_LLVM_DEMANGLE=OFF
|
||||
ninja
|
||||
```
|
||||
|
||||
There should now be executable binaries located in the `torzu/build/bin` folder.
|
||||
|
||||
You can choose to (all starting from the `build` folder):
|
||||
|
||||
* **Make an AppImage** (the resulting `torzu.AppImage` will be in the `torzu` folder):
|
||||
```bash
|
||||
cd .. && ./AppImage-build.sh
|
||||
```
|
||||
|
||||
* **Install the binaries to your system with shortcuts**:
|
||||
```bash
|
||||
sudo ninja install
|
||||
```
|
||||
|
||||
* **Run them without installing**:
|
||||
```bash
|
||||
cd bin
|
||||
./yuzu
|
||||
# or
|
||||
./yuzu-cmd
|
||||
```
|
||||
|
||||
* **PORTABLE INSTALL** - use the native binaries (without being installed to the system) and add a `user` folder next to them (does not work with AppImage or Flatpak):
|
||||
```bash
|
||||
cd bin
|
||||
mkdir user
|
||||
./yuzu
|
||||
```
|
||||
All data usually in the `~/.local/share/yuzu` folder will now be located in the `user` folder instead, so you can easily archive and restore a working install.
|
||||
|
||||
Optionally, you can use `cmake-gui ..` instead to adjust various options (e.g. disable the Qt GUI).
|
||||
|
||||
---
|
||||
---
|
||||
---
|
||||
|
||||
### Build in Debug Mode (Slow)
|
||||
|
||||
Same as above, but add `-DCMAKE_BUILD_TYPE=Debug`:
|
||||
```bash
|
||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF
|
||||
```
|
||||
|
||||
### Build with debug symbols
|
||||
|
||||
Same as above, but use `-DCMAKE_BUILD_TYPE=RelWithDebInfo`:
|
||||
|
||||
```bash
|
||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF
|
||||
```
|
||||
|
||||
### Debugging
|
||||
|
||||
1. Enable CPU debugging
|
||||

|
||||
2. Disable both Host MMU emulation options
|
||||

|
||||
3. Run gdb
|
||||
|
||||
```bash
|
||||
cd data
|
||||
gdb ../build/bin/yuzu # Start GDB
|
||||
(gdb) handle SIGSEGV nostop # Disable SIGSEGV exceptions, which are used by yuzu for memory access
|
||||
(gdb) run # Run yuzu under GDB
|
||||
<crash>
|
||||
(gdb) bt # Print a backtrace of the entire callstack to see which codepath the crash occurred on
|
||||
38
build-for-macos.md
Normal file
38
build-for-macos.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# This article was written for developers. yuzu support for macOS is not ready for casual use.
|
||||
|
||||
# NOTE: yuzu officially discontinued support for MacOS when Apple deprecated OpenGL... this is provided as-is but may not work.
|
||||
---
|
||||
|
||||
Install dependencies from Homebrew:
|
||||
```sh
|
||||
brew install autoconf automake boost@1.76 ccache ffmpeg fmt glslang hidapi libtool libusb lz4 ninja nlohmann-json openssl pkg-config qt@5 sdl2 speexdsp zlib zlib zstd
|
||||
```
|
||||
|
||||
Build with debug symbols (vcpkg is not currently used due to broken boost-context library):
|
||||
```sh
|
||||
mkdir build && cd build
|
||||
export Qt5_DIR="/opt/homebrew/opt/qt@5/lib/cmake"
|
||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_USE_BUNDLED_VCPKG=OFF -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_LIBUSB=OFF
|
||||
ninja
|
||||
```
|
||||
|
||||
- TODO: use newer vcpkg. This fixes the boost context library, and allows using the web service
|
||||
- TODO: figure out what's up with libusb
|
||||
|
||||
Run the output:
|
||||
```
|
||||
bin/yuzu.app/Contents/MacOS/yuzu
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
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/yuzu.app/Contents/MacOS/yuzu
|
||||
```
|
||||
341
build-for-windows.md
Normal file
341
build-for-windows.md
Normal file
|
|
@ -0,0 +1,341 @@
|
|||
# Method I: MSVC Build for Windows (MS Visual Studio)
|
||||
|
||||
### MSVC: Overview
|
||||
|
||||
* Install Minimal Dependencies (details and setup below)
|
||||
* Visual Studio Community 2022
|
||||
* CMake
|
||||
* Vulkan SDK
|
||||
* Python
|
||||
* Git for Windows
|
||||
* Build via Command Line (simplest if dependencies are installed correctly)
|
||||
* (or) Build with GUI Tools (backup graphical interface)
|
||||
|
||||
|
||||
### MSVC: Install Minimal Dependencies
|
||||
|
||||
To build torzu on Windows with Visual Studio, you need to install:
|
||||
|
||||
* **[Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/)**
|
||||
* **Update to the latest version if already installed. (continued below)**
|
||||
|
||||

|
||||
|
||||
* **Visual Studio 2022 Community (continued)**
|
||||
* Be sure to select "Desktop development with C++"
|
||||
* Select the MSVC components outlined in red below (**especially VS 2019 build tools**.)
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
* **[CMake](https://cmake.org/download/)** - Used to generate Visual Studio project files. Choose 32-bit or 64-bit according to your system.
|
||||
* **If it asks to be added to your system PATH, say YES.**
|
||||
|
||||

|
||||
|
||||
* **[Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows)** - Make sure to select Latest SDK.
|
||||
* **If it asks to be added to your system PATH, say YES.**
|
||||
|
||||

|
||||
|
||||
* **[Python](https://www.python.org/downloads/windows/)** - Select latest stable Windows installer. Choose 32-bit or 64-bit according to your system.
|
||||
* **If it asks to be added to your system PATH, say YES.**
|
||||
|
||||

|
||||
|
||||
* **[Git for Windows](https://gitforwindows.org)** - (see next step)
|
||||
|
||||

|
||||
|
||||
* When installing Git, include it in your system PATH by choosing the "**Git from the command line and also from 3rd-party software**" option.
|
||||
|
||||

|
||||
|
||||
* **REBOOT YOUR SYSTEM, to be sure all dependencies are registered before proceeding.**
|
||||
|
||||
---
|
||||
---
|
||||
|
||||
## MSVC: Build from the Command Line
|
||||
|
||||
* Open a command line (cmd.exe), navigate to a directory where you want to download the repo, then pick one option to clone into a subdirectory named "torzu":
|
||||
|
||||
**from Notabug repo:**
|
||||
```
|
||||
git clone --depth 1 https://notabug.org/litucks/torzu.git
|
||||
```
|
||||
**from Torzu repo (assuming Tor is installed as a service):**
|
||||
```
|
||||
git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git
|
||||
```
|
||||
|
||||
* Assuming all dependencies were installed correctly, you should be able to continue from the above `git clone` and run the following commands to build:
|
||||
|
||||
```
|
||||
cd torzu
|
||||
git submodule update --init --recursive
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "Visual Studio 17 2022" -A x64 -DYUZU_TESTS=OFF -DYUZU_BUILD_QT6=ON
|
||||
cmake --build . --config Release
|
||||
```
|
||||
* You'll find the resulting files in the `build/bin/Release` folder. To make it a portable install with all AppData files local to the torzu folder, add a "user" folder:
|
||||
```
|
||||
cd bin
|
||||
cd Release
|
||||
mkdir user
|
||||
```
|
||||
|
||||
* **ERRORS:** If you get an error after running the first cmake command (such as a missing library or CMakeLists.txt), first try running `git submodule update --init --recursive` from inside "torzu" folder again. If that doesn't work, try deleting the whole "torzu" folder and recloning via git from the beginning (as sometimes submodules will be incomplete without throwing an error.)
|
||||
|
||||
---
|
||||
---
|
||||
|
||||
## MSVC: Build with GUI Tools (Graphical Interface)
|
||||
|
||||
* Open a command line (cmd.exe), navigate to a directory where you want to download the repo, then pick one option to clone into a subdirectory named "torzu":
|
||||
|
||||
**from Notabug repo:**
|
||||
```
|
||||
git clone --depth 1 https://notabug.org/litucks/torzu.git
|
||||
```
|
||||
**from Torzu repo (assuming Tor is installed as a service):**
|
||||
```
|
||||
git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git
|
||||
```
|
||||
then download dependencies with:
|
||||
```
|
||||
cd torzu
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
<!--* *(Note: yuzu by default downloads to `C:\Users\<user-name>\yuzu` (Master) or `C:\Users\<user-name>\yuzu-mainline` (Mainline)*-->
|
||||
|
||||
* Open the CMake GUI application and point it to the `torzu` directory (instead of `yuzu-canary`).
|
||||
|
||||

|
||||
|
||||
* Use a `/build` subdirectory inside the `torzu` 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.
|
||||
|
||||

|
||||
|
||||
* *(Note: If you used GitHub's own app to clone, run `git submodule update --init --recursive` to get the remaining dependencies)*
|
||||
|
||||
* **ERRORS:** If you get an error about missing packages, enable `YUZU_USE_BUNDLED_VCPKG`, and then click Configure again.
|
||||
|
||||
* *(You may also want to disable `YUZU_TESTS` in this case since Catch2 is not yet supported with this.)*
|
||||
|
||||

|
||||
|
||||
* **ERRORS:** If you get an error "Unable to find a valid Visual Studio instance", make sure that you installed the required MSVC components displayed above (**especially VS 2019 build tools**) and then try again.
|
||||
|
||||
* Click "Generate" to create the project files.
|
||||
|
||||

|
||||
|
||||
* Open the solution file `yuzu.sln` in Visual Studio 2022, which is located in the `build` directory.
|
||||
|
||||

|
||||
|
||||
* Select `yuzu` in the Solution Explorer, right-click and `Set as StartUp Project` (the yuzu, yuzu-cmd and yuzu-room executables will all be built.)
|
||||
|
||||
 
|
||||
|
||||
* Select the appropriate build type, Debug for debug purposes or Release for performance (in case of doubt choose Release).
|
||||
|
||||

|
||||
|
||||
* Right-click the project you want to build and press Build in the submenu or press F5.
|
||||
|
||||

|
||||
|
||||
* After build completed you can find the Torzu program files in a directory specified in the output log (usually `build\bin\Release`.)
|
||||
|
||||

|
||||
|
||||
---
|
||||
---
|
||||
---
|
||||
---
|
||||
---
|
||||
|
||||
# Method II: Clang-CL on Linux
|
||||
|
||||
Yet to be written. These loose snippets may help you:
|
||||
|
||||
https://github.com/mstorsjo/msvc-wine
|
||||
|
||||
https://apt.llvm.org
|
||||
|
||||
https://kb.firedaemon.com/support/solutions/articles/4000121705#Download-OpenSSL
|
||||
|
||||
https://github.com/clamwin/openssl
|
||||
|
||||
```
|
||||
# Probably not needed, use if include files can't be found
|
||||
exec bwrap --bind / / --tmpfs /usr/include --tmpfs /usr/lib/pkgconfig --tmpfs /usr/lib/x86_64-linux-gnu/pkgconfig --tmpfs /usr/lib/cmake --dev /dev /bin/bash
|
||||
```
|
||||
```
|
||||
# in build/linux
|
||||
../../configure -opensource -confirm-license -prefix ~/qt-everywhere-src-6.9.1/inst/linux -release ${QT_LIBTYPE} -ltcg -submodules qtbase,qttranslations,qtmultimedia -no-feature-vulkan -nomake examples -nomake tests -qt-doubleconversion -no-glib -qt-pcre -qt-zlib -qt-harfbuzz -qt-libpng -qt-libjpeg
|
||||
ninja install
|
||||
|
||||
# in build/windows
|
||||
cp -rv ../../qtmultimedia/src/multimedia/windows qtbase/include/QtMultimedia/private
|
||||
CC=clang-cl-19 CXX=clang-cl-19 CFLAGS="--target=x86_64-windows-msvc -fuse-ld=lld-link-19" CXXFLAGS="--target=x86_64-windows-msvc -fuse-ld=lld-link-19" ../../configure -opensource -confirm-license -prefix ~/qt-everywhere-src-6.9.1/inst/windows -release -static -ltcg -submodules qtbase,qtdeclarative,qtmultimedia -skip qtactiveqt -no-feature-vulkan -nomake examples -nomake tests -qt-doubleconversion -no-glib -qt-pcre -qt-zlib -qt-harfbuzz -qt-libpng -qt-libjpeg -platform win32-clang-msvc -qt-host-path ~/qt-everywhere-src-6.9.1/inst/linux -- -DCMAKE_SYSTEM_NAME=Windows
|
||||
ninja
|
||||
ninja install
|
||||
```
|
||||
```
|
||||
CC=clang-cl-19 CXX=clang-cl-19 cmake /tmp/torzu -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_ASM_FLAGS="--target=x86_64-windows-msvc" -DCMAKE_{C,CXX}_FLAGS:STRING="--target=x86_64-windows-msvc -DNOMINMAX /EHa -Wno-unused-command-line-argument -Wno-unknown-argument -flto=full -fdata-sections -ffunction-sections" -DCMAKE_EXE_LINKER_FLAGS="-Wl,--gc-sections" -DCMAKE_SYSTEM_NAME:STRING=Windows -DYUZU_USE_BUNDLED_VCPKG=OFF -DYUZU_USE_CPM=ON -DENABLE_OPENSSL=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_LIBUSB=OFF -DYUZU_TESTS=OFF -DQT_QMAKE_EXECUTABLE:FILEPATH=/home/user/qt-everywhere-src-6.9.1/inst/windows/bin/qmake -DCMAKE_PREFIX_PATH:PATH=/home/user/qt-everywhere-src-6.9.1/inst -GNinja
|
||||
```
|
||||
|
||||
---
|
||||
---
|
||||
---
|
||||
---
|
||||
---
|
||||
|
||||
# Method III: MinGW-w64 Build with MSYS2
|
||||
|
||||
## Prerequisites to install
|
||||
|
||||
* [MSYS2](https://www.msys2.org)
|
||||
* [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.
|
||||
|
||||
## Install other dependencies
|
||||
* 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-qt5 mingw-w64-x86_64-toolchain`
|
||||
|
||||
## Setup environment variables
|
||||
```
|
||||
export PATH="<Absolute path to the Bin folder in Vulkan SDK>:$PATH"
|
||||
export VCPKG_DEFAULT_HOST_TRIPLET=x64-mingw-static
|
||||
export VCPKG_DEFAULT_TRIPLET=x64-mingw-static
|
||||
```
|
||||
We have to manually set some VCPKG variables for some reason.
|
||||
This issue probably already exists in the original Yuzu.
|
||||
|
||||
## Clone the torzu repository with Git
|
||||
|
||||
Navigate to a directory where you want the repo, then use one option below to clone into a subdirectory named "torzu":
|
||||
|
||||
<!---->
|
||||
|
||||
**from NotABug repo:**
|
||||
```
|
||||
git clone --depth 1 https://notabug.org/litucks/torzu.git
|
||||
```
|
||||
**from Torzu repo (assuming Tor is installed as a service):**
|
||||
```
|
||||
git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git
|
||||
```
|
||||
then download the submodule dependencies with:
|
||||
```
|
||||
cd torzu
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
## Generating makefile
|
||||
```
|
||||
mkdir build && cd build
|
||||
cmake -G "MSYS Makefiles" -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF -DVCPKG_TARGET_TRIPLET=x64-mingw-static ..
|
||||
```
|
||||
`DVCPKG_TARGET_TRIPLET` has to be overriden to `x64-mingw-static` here to generate a static build that doesn't require extra DLLs to be packaged.
|
||||
|
||||
## Build torzu
|
||||
```
|
||||
make -j$(nproc) yuzu
|
||||
```
|
||||
The reason we are not using `make all` is that linker will fail.
|
||||
This is because Yuzu developer didn't set linker flags properly in their `CMakeLists.txt` for some reason. So we have add something manually.
|
||||
```
|
||||
VERBOSE=1 make yuzu
|
||||
```
|
||||
This will shows the exact link command, should be something like:
|
||||
```
|
||||
cd ***/src/yuzu && /mingw64/bin/c++.exe -O3 -DNDEBUG -Wl,--subsystem,windows -Wl,--whole-archive ...
|
||||
```
|
||||
Copy the command line and add the following arguments:
|
||||
```
|
||||
-static-libstdc++ -lws2_32 -s -Wl,--Map,../../bin/yuzu.map
|
||||
```
|
||||
Explanation of the extra arguments:
|
||||
- `-static-libstdc++`: Force usage of static libstdc++, without this argument the binary will have no entrypoint.
|
||||
- `-lws2_32`: Link the ws2_32.a provided by mingw.
|
||||
- `-s`: Optional, strip the symbols from the output binary.
|
||||
- `-Wl,--Map,../../bin/yuzu.map`: Optional, output a separated linker map to `../../bin/yuzu.map`
|
||||
Please note that `-lw2_32` is already added, but the order is not correct and hence cause linking fails.
|
||||
|
||||
Now the built executable should work properly. Repeating step 4 should build `yuzu-cmd` as well.
|
||||
Some DLLs (e.g., Qt) are still required as they cannot being linked statically. Copying those DLLs from the latest release is one option.
|
||||
|
||||
## Building without Qt (Optional)
|
||||
|
||||
Doesn't require the rather large Qt dependency, but you will lack a GUI frontend:
|
||||
|
||||
* Pass the `-DENABLE_QT=NO` flag to cmake
|
||||
|
||||
---
|
||||
---
|
||||
---
|
||||
---
|
||||
---
|
||||
|
||||
# Method IV: CLion Environment Setup
|
||||
|
||||
## Minimal Dependencies
|
||||
|
||||
To build yuzu, you need to install the following:
|
||||
|
||||
* [CLion](https://www.jetbrains.com/clion/) - This IDE is not free; for a free alternative, check Method I
|
||||
* [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows) - Make sure to select the Latest SDK.
|
||||
|
||||
## Cloning yuzu with CLion
|
||||
|
||||
* Clone the Repository:
|
||||
|
||||

|
||||
|
||||
* using `https://notabug.org/litucks/torzu.git` (instead of the shown yuzu repo):
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
|
||||
## Building & Setup
|
||||
|
||||
* Once Cloned, You will be taken to a prompt like the image below:
|
||||
|
||||

|
||||
|
||||
* 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`
|
||||
|
||||

|
||||
|
||||
* 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 yuzu
|
||||
* In the top right, click on the drop-down menu, select all configurations, then select yuzu
|
||||
|
||||

|
||||
|
||||
* Now run by clicking the play button or pressing Shift+F10, and yuzu will auto-launch once built.
|
||||
|
||||

|
||||
|
||||
6
dist/72-yuzu-input.rules
vendored
6
dist/72-yuzu-input.rules
vendored
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
# Switch Pro Controller (USB/Bluetooth)
|
||||
KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="2009", MODE="0660", TAG+="uaccess"
|
||||
KERNEL=="hidraw*", KERNELS=="*057e:2009*", MODE="0660", TAG+="uaccess"
|
||||
KERNEL=="hidraw*", KERNELS=="*057E:2009*", MODE="0660", TAG+="uaccess"
|
||||
|
||||
# Joy-Con L (Bluetooth)
|
||||
KERNEL=="hidraw*", KERNELS=="*057e:2006*", MODE="0660", TAG+="uaccess"
|
||||
KERNEL=="hidraw*", KERNELS=="*057E:2006*", MODE="0660", TAG+="uaccess"
|
||||
|
||||
# Joy-Con R (Bluetooth)
|
||||
KERNEL=="hidraw*", KERNELS=="*057e:2007*", MODE="0660", TAG+="uaccess"
|
||||
KERNEL=="hidraw*", KERNELS=="*057E:2007*", MODE="0660", TAG+="uaccess"
|
||||
|
||||
# Joy-Con Charging Grip (USB)
|
||||
KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="200e", MODE="0660", TAG+="uaccess"
|
||||
|
|
|
|||
4
dist/languages/ar.ts
vendored
4
dist/languages/ar.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/ca.ts
vendored
4
dist/languages/ca.ts
vendored
|
|
@ -752,7 +752,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/cs.ts
vendored
4
dist/languages/cs.ts
vendored
|
|
@ -752,7 +752,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/da.ts
vendored
4
dist/languages/da.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/de.ts
vendored
4
dist/languages/de.ts
vendored
|
|
@ -753,7 +753,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/el.ts
vendored
4
dist/languages/el.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue