forked from cobaltgit/yuzu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 61e832e
Showing
3,701 changed files
with
922,923 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/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 ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/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}/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/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}/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/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 ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/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 ./ |
Oops, something went wrong.