Compare commits

...

97 Commits

Author SHA1 Message Date
MNCHL
ce987eeade Update UpdateManager.kt 2023-12-28 13:04:30 +08:00
MNCHL
3cdd07459e Merge pull request #38 from MNCHL/MNCHL-patch-39
Update UpdateManager.kt
2023-12-28 12:50:03 +08:00
MNCHL
2f127551a5 Update UpdateManager.kt 2023-12-28 12:49:33 +08:00
MNCHL
c7fa4df8f5 Merge pull request #37 from MNCHL/MNCHL-patch-38
Update file_paths.xml
2023-12-28 00:38:19 +08:00
MNCHL
2ef7fb9c3d Update file_paths.xml 2023-12-28 00:38:04 +08:00
MNCHL
1cddd4a42c Update UpdateManager.kt 2023-12-28 00:34:42 +08:00
MNCHL
147ad6396a Merge pull request #36 from MNCHL/MNCHL-patch-37
Update AndroidManifest.xml
2023-12-27 23:58:47 +08:00
MNCHL
c8906d600b Update AndroidManifest.xml 2023-12-27 23:58:35 +08:00
MNCHL
46578fe106 Update file_paths.xml 2023-12-27 23:56:01 +08:00
MNCHL
d44dd65562 Merge pull request #35 from MNCHL/MNCHL-patch-36
Update UpdateManager.kt
2023-12-27 22:40:29 +08:00
MNCHL
5e03439d5e Update UpdateManager.kt 2023-12-27 22:39:34 +08:00
MNCHL
6b4479cedd Merge pull request #34 from MNCHL/MNCHL-patch-35
Update UpdateManager.kt
2023-12-27 22:17:01 +08:00
MNCHL
f1e9f91a53 Update UpdateManager.kt 2023-12-27 22:16:44 +08:00
MNCHL
430a8f5be3 Merge pull request #33 from MNCHL/MNCHL-patch-34
Update UpdateManager.kt
2023-12-27 21:19:11 +08:00
MNCHL
30aa6d8ba7 Update UpdateManager.kt 2023-12-27 21:18:53 +08:00
MNCHL
e17eed09ac Merge pull request #32 from MNCHL/MNCHL-patch-33
Update UpdateManager.kt
2023-12-27 20:53:52 +08:00
MNCHL
73df564b86 Update UpdateManager.kt 2023-12-27 20:53:41 +08:00
MNCHL
68bd670bd6 Merge pull request #31 from MNCHL/MNCHL-patch-32
Update MainActivity.kt
2023-12-27 20:46:51 +08:00
MNCHL
eb362e0d23 Update MainActivity.kt 2023-12-27 20:46:37 +08:00
MNCHL
44c020c7c2 Update UpdateManager.kt 2023-12-27 20:45:40 +08:00
MNCHL
7cee2f4e1a Update AndroidManifest.xml 2023-12-27 20:42:38 +08:00
MNCHL
15cf5ce353 Merge pull request #30 from MNCHL/MNCHL-patch-31
Update MainActivity.kt
2023-12-27 19:53:27 +08:00
MNCHL
f5cfcd7c51 Update MainActivity.kt 2023-12-27 19:53:14 +08:00
MNCHL
9f326cbc80 Merge pull request #29 from MNCHL/MNCHL-patch-30
Update UpdateManager.kt
2023-12-27 18:35:44 +08:00
MNCHL
cee3c6aad4 Update UpdateManager.kt 2023-12-27 18:35:31 +08:00
MNCHL
83fd0fdf5b Merge pull request #28 from MNCHL/MNCHL-patch-29
Update MainActivity.kt
2023-12-27 14:30:36 +08:00
MNCHL
f3c0a79682 Update MainActivity.kt 2023-12-27 14:30:23 +08:00
MNCHL
ee31ec923c Update UpdateManager.kt 2023-12-27 14:29:08 +08:00
MNCHL
308963d0da Merge pull request #27 from MNCHL/MNCHL-patch-28
Update MainActivity.kt
2023-12-27 13:25:35 +08:00
MNCHL
3441576908 Update MainActivity.kt 2023-12-27 13:25:22 +08:00
MNCHL
0112bae0e2 Merge pull request #26 from MNCHL/MNCHL-patch-27
Update file_paths.xml
2023-12-27 13:03:23 +08:00
MNCHL
ea216ab8a9 Update file_paths.xml 2023-12-27 13:03:10 +08:00
MNCHL
7bcca32c83 Update UpdateManager.kt 2023-12-27 12:59:07 +08:00
MNCHL
2db81e6a2b Merge pull request #25 from MNCHL/MNCHL-patch-26
Delete src/android/app/src/main/java/org/yuzu/yuzu_emu/DownloadComple…
2023-12-26 23:45:37 +08:00
MNCHL
ef6b300237 Delete src/android/app/src/main/java/org/yuzu/yuzu_emu/DownloadCompleteReceiver.kt 2023-12-26 23:45:25 +08:00
MNCHL
e595baf861 Merge pull request #24 from MNCHL/MNCHL-patch-25
Update DownloadCompleteReceiver.kt
2023-12-26 23:37:14 +08:00
MNCHL
885ddf55a2 Update DownloadCompleteReceiver.kt 2023-12-26 23:37:01 +08:00
MNCHL
26b93265b2 Merge pull request #23 from MNCHL/MNCHL-patch-24
Create file_paths.xml
2023-12-26 23:23:57 +08:00
MNCHL
3e75ceccb9 Create file_paths.xml 2023-12-26 23:23:38 +08:00
MNCHL
a496e6cceb Update AndroidManifest.xml 2023-12-26 23:21:01 +08:00
MNCHL
063355ef3b Update DownloadCompleteReceiver.kt 2023-12-26 23:19:12 +08:00
MNCHL
525f16fdd3 Update UpdateManager.kt 2023-12-26 23:18:25 +08:00
MNCHL
412d0b331d Create DownloadCompleteReceiver.kt 2023-12-26 23:17:44 +08:00
MNCHL
752e58d84e Update UpdateManager.kt 2023-12-26 23:16:40 +08:00
MNCHL
535bd6c064 Merge pull request #22 from MNCHL/MNCHL-patch-23
Update UpdateManager.kt
2023-12-26 21:23:05 +08:00
MNCHL
09bf7588be Update UpdateManager.kt 2023-12-26 21:22:53 +08:00
MNCHL
d76ca96efa Merge pull request #21 from MNCHL/MNCHL-patch-22
Update UpdateManager.kt
2023-12-26 21:15:40 +08:00
MNCHL
de4148e246 Update UpdateManager.kt 2023-12-26 21:15:27 +08:00
MNCHL
e110aa6c2b Update UpdateManager.kt 2023-12-26 21:10:41 +08:00
MNCHL
a20ccffab6 Merge pull request #20 from MNCHL/MNCHL-patch-21
Update UpdateManager.kt
2023-12-26 20:25:03 +08:00
MNCHL
7a4c2616b5 Update UpdateManager.kt 2023-12-26 20:24:47 +08:00
MNCHL
9d69c94e63 Merge pull request #19 from MNCHL/MNCHL-patch-20
Update UpdateManager.kt
2023-12-26 01:27:41 +08:00
MNCHL
a56773e749 Update UpdateManager.kt 2023-12-26 01:27:10 +08:00
MNCHL
1abfcb6d4d Merge pull request #18 from MNCHL/MNCHL-patch-19
Update network_security_config.xml
2023-12-26 01:06:56 +08:00
MNCHL
1523955532 Update network_security_config.xml 2023-12-26 01:06:42 +08:00
MNCHL
5b5781f928 Merge pull request #17 from MNCHL/MNCHL-patch-18
Create network_security_config.xml
2023-12-26 00:29:55 +08:00
MNCHL
14da61a2ec Create network_security_config.xml 2023-12-26 00:29:22 +08:00
MNCHL
e9b3762491 Update AndroidManifest.xml 2023-12-26 00:27:03 +08:00
MNCHL
9629cdf9cd Merge pull request #16 from MNCHL/MNCHL-patch-17
Update MainActivity.kt
2023-12-26 00:19:08 +08:00
MNCHL
98df63b316 Update MainActivity.kt 2023-12-26 00:18:54 +08:00
MNCHL
bf4a56b77f Update UpdateManager.kt 2023-12-26 00:16:52 +08:00
MNCHL
638bc25218 Merge pull request #15 from MNCHL/MNCHL-patch-16
Update MainActivity.kt
2023-12-25 23:18:29 +08:00
MNCHL
5d321a8b0a Update MainActivity.kt 2023-12-25 23:18:15 +08:00
MNCHL
48e6c84b15 Merge pull request #14 from MNCHL/MNCHL-patch-15
Update MainActivity.kt
2023-12-25 23:08:41 +08:00
MNCHL
5e7561e2dd Update MainActivity.kt 2023-12-25 23:08:28 +08:00
MNCHL
c433ff597c Merge pull request #13 from MNCHL/MNCHL-patch-14
Update UpdateManager.kt
2023-12-25 21:43:12 +08:00
MNCHL
b1ff659e75 Update UpdateManager.kt 2023-12-25 21:42:56 +08:00
MNCHL
8fb3d753aa Merge pull request #12 from MNCHL/MNCHL-patch-13
Update UpdateManager.kt
2023-12-25 21:16:21 +08:00
MNCHL
260f9ee848 Update UpdateManager.kt 2023-12-25 21:16:08 +08:00
MNCHL
c42b4a59de Merge pull request #11 from MNCHL/MNCHL-patch-12
Update UpdateManager.kt
2023-12-25 20:45:44 +08:00
MNCHL
e9b0a43416 Update UpdateManager.kt 2023-12-25 20:45:21 +08:00
MNCHL
32030270d7 Update build.gradle.kts 2023-12-25 20:42:39 +08:00
MNCHL
aba3d7698a Merge pull request #10 from MNCHL/MNCHL-patch-11
Update UpdateManager.kt
2023-12-25 20:20:43 +08:00
MNCHL
a641543fdc Update UpdateManager.kt 2023-12-25 20:19:47 +08:00
MNCHL
53a1e16c65 Merge pull request #9 from MNCHL/MNCHL-patch-10
Update UpdateManager.kt
2023-12-25 19:52:01 +08:00
MNCHL
a36eeed043 Update UpdateManager.kt 2023-12-25 19:51:45 +08:00
MNCHL
bae583129f Merge pull request #8 from MNCHL/MNCHL-patch-9
Update UpdateManager.kt
2023-12-25 19:42:59 +08:00
MNCHL
0bdb674d80 Update UpdateManager.kt 2023-12-25 19:42:44 +08:00
MNCHL
ed8e7efea9 Merge pull request #7 from MNCHL/MNCHL-patch-7
Update UpdateManager.kt
2023-12-25 19:17:25 +08:00
MNCHL
970f291612 Update UpdateManager.kt 2023-12-25 19:16:50 +08:00
MNCHL
ce8f601765 Merge pull request #6 from MNCHL/MNCHL-patch-6
Update UpdateManager.kt
2023-12-25 18:54:14 +08:00
MNCHL
8cb9d35cfa Update UpdateManager.kt 2023-12-25 18:54:00 +08:00
MNCHL
7b6d9c1747 Merge pull request #5 from MNCHL/MNCHL-patch-5
Delete .ci/scripts/linux directory
2023-12-25 18:45:38 +08:00
MNCHL
ca5cf617ed Delete .ci/scripts/linux directory 2023-12-25 18:45:24 +08:00
MNCHL
ff9adc3550 Delete .ci/scripts/windows directory 2023-12-25 18:45:04 +08:00
MNCHL
87dc2c9ada Update UpdateManager.kt 2023-12-25 18:44:31 +08:00
MNCHL
45ea3db64a Merge pull request #4 from MNCHL/MNCHL-patch-4
Update UpdateManager.kt
2023-12-25 13:51:00 +08:00
MNCHL
75c7ea9287 Update UpdateManager.kt 2023-12-25 13:50:47 +08:00
MNCHL
14ca4a7eac Merge pull request #3 from MNCHL/MNCHL-patch-3
Update build.gradle.kts
2023-12-25 13:45:41 +08:00
MNCHL
232e235fdd Update build.gradle.kts 2023-12-25 13:45:30 +08:00
MNCHL
1aaf393cbe Merge pull request #2 from MNCHL/MNCHL-patch-2
Update UpdateManager.kt
2023-12-25 13:20:22 +08:00
MNCHL
b475ed6019 Update UpdateManager.kt 2023-12-25 13:20:08 +08:00
MNCHL
46787790a4 Merge pull request #1 from MNCHL/MNCHL-patch-1
Update build.gradle.kts
2023-12-25 13:07:50 +08:00
MNCHL
d7d4e17758 Update build.gradle.kts 2023-12-25 13:07:36 +08:00
MNCHL
d8f50935fe Update MainActivity.kt 2023-12-25 13:04:34 +08:00
MNCHL
c412e3f7f8 Create UpdateManager.kt 2023-12-25 13:02:00 +08:00
yuzubot
7a8a8b3f31 Android #171 2023-12-25 00:57:24 +00:00
16 changed files with 208 additions and 521 deletions

View File

@@ -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

View File

@@ -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 ./

View File

@@ -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

View File

@@ -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/ ';'

View File

@@ -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 ./

View File

@@ -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
}

View File

@@ -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()

View File

@@ -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"
}

View File

@@ -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

View File

@@ -1,3 +1,11 @@
| Pull Request | Commit | Title | Author | Merged? |
|----|----|----|----|----|
End of merge log. You can find the original README.md below the break.
-----
<!--
SPDX-FileCopyrightText: 2018 yuzu Emulator Project
SPDX-License-Identifier: GPL-2.0-or-later

View File

@@ -208,6 +208,8 @@ ktlint {
}
dependencies {
implementation("com.squareup.okhttp3:okhttp:4.9.1")
implementation("org.json:json:20210307")
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.recyclerview:recyclerview:1.3.1")

View File

@@ -16,6 +16,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:name="org.yuzu.yuzu_emu.YuzuApplication"
@@ -27,6 +31,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
android:isGame="true"
android:appCategory="game"
android:banner="@drawable/tv_banner"
android:networkSecurityConfig="@xml/network_security_config">
android:fullBackupContent="@xml/data_extraction_rules"
android:dataExtractionRules="@xml/data_extraction_rules_api_31"
android:enableOnBackInvokedCallback="true">
@@ -92,6 +97,16 @@ SPDX-License-Identifier: GPL-3.0-or-later
</intent-filter>
</provider>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>

View File

@@ -0,0 +1,167 @@
package org.yuzu.yuzu_emu
import android.app.ProgressDialog
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Build
import android.os.Environment
import android.util.Log
import androidx.appcompat.app.AlertDialog
import androidx.core.content.FileProvider
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import okhttp3.*
import org.json.JSONObject
import java.io.File
import java.io.IOException
object UpdateManager {
private val client = OkHttpClient()
fun checkAndInstallUpdate(context: Context) {
GlobalScope.launch(Dispatchers.IO) {
val currentVersion = context.packageManager
.getPackageInfo(context.packageName, 0).versionName
val latestVersion = getLatestVersionFromServer()
withContext(Dispatchers.Main) {
if (isUpdateAvailable(currentVersion, latestVersion)) {
showUpdateDialog(context)
} else {
showNoUpdateMessage(context)
}
}
}
}
private suspend fun getLatestVersionFromServer(): String {
val request = Request.Builder()
.url("http://mkoc.cn/aip/version.php")
.build()
return try {
val response = client.newCall(request).execute()
val responseBody = response.body?.string() ?: ""
JSONObject(responseBody).getString("versionName")
} catch (e: IOException) {
Log.e("UpdateManager", "检查更新时出错: ${e.message}")
""
}
}
private fun isUpdateAvailable(currentVersion: String, latestVersion: String): Boolean {
return latestVersion > currentVersion
}
private fun showUpdateDialog(context: Context) {
val downloadDirectory =
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)
val apkFile = File(downloadDirectory, "yuzu.apk")
AlertDialog.Builder(context)
.setTitle("有新版本可用")
.setMessage("有新版本可用。现在更新吗?")
.setPositiveButton("更新") { dialog, which ->
downloadAndInstallUpdate(context, apkFile)
}
.setNegativeButton("稍后") { dialog, which ->
// 处理稍后更新的逻辑
}
.show()
}
private fun showNoUpdateMessage(context: Context) {
// 显示没有更新的消息
}
private fun downloadAndInstallUpdate(context: Context, apkFile: File) {
val downloadUrl = "http://mkoc.cn/app/yuzu.apk"
val request = Request.Builder()
.url(downloadUrl)
.build()
val progressDialog = ProgressDialog(context)
progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL)
progressDialog.setTitle("下载中") // 设置对话框标题
progressDialog.setMessage("请稍候...")
progressDialog.isIndeterminate = false
progressDialog.setCancelable(false)
progressDialog.max = 100
progressDialog.show()
client.newCall(request).enqueue(object : Callback {
override fun onFailure(call: Call, e: IOException) {
Log.e("UpdateManager", "下载失败: ${e.message}")
progressDialog.dismiss()
// 处理下载失败
}
override fun onResponse(call: Call, response: Response) {
if (response.isSuccessful) {
val inputStream = response.body?.byteStream()
val totalSize = response.body?.contentLength() ?: 0
try {
inputStream?.use { input ->
apkFile.outputStream().use { output ->
val buffer = ByteArray(8192)
var bytesRead: Int
var totalBytesRead: Long = 0
while (input.read(buffer).also { bytesRead = it } != -1) {
output.write(buffer, 0, bytesRead)
totalBytesRead += bytesRead.toLong()
val progress = (totalBytesRead * 100 / totalSize).toInt()
progressDialog.progress = progress
// 更新下载进度消息
val progressMessage = "下载进度: $progress%"
progressDialog.setMessage(progressMessage)
}
}
}
progressDialog.dismiss()
installUpdate(context, apkFile)
} catch (e: IOException) {
Log.e("UpdateManager", "复制文件时出错: ${e.message}")
progressDialog.dismiss()
// 处理文件复制错误
}
} else {
Log.e("UpdateManager", "下载失败: HTTP ${response.code}")
progressDialog.dismiss()
// 处理下载失败
}
}
})
}
private fun installUpdate(context: Context, apkFile: File) {
val uri = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
FileProvider.getUriForFile(context, "${context.packageName}.provider", apkFile)
} else {
Uri.fromFile(apkFile)
}
val installIntent = Intent(Intent.ACTION_INSTALL_PACKAGE)
installIntent.data = uri
installIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
installIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
// 添加此标志来启用AppInstallAuthentication
installIntent.putExtra(Intent.EXTRA_INSTALLER_PACKAGE_NAME, context.packageName)
// 需要检查是否具有安装权限
if (context.packageManager.canRequestPackageInstalls()) {
context.startActivity(installIntent)
} else {
// 如果没有安装权限,则需要请求权限
val installPermissionIntent = Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES)
installPermissionIntent.data = Uri.parse("package:${context.packageName}")
context.startActivity(installPermissionIntent)
}
}

View File

@@ -50,6 +50,7 @@ import java.io.BufferedInputStream
import java.io.BufferedOutputStream
import java.util.zip.ZipEntry
import java.util.zip.ZipInputStream
import org.yuzu.yuzu_emu.UpdateManager
class MainActivity : AppCompatActivity(), ThemeProvider {
private lateinit var binding: ActivityMainBinding
@@ -62,6 +63,7 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
override var themeId: Int = 0
override fun onCreate(savedInstanceState: Bundle?) {
UpdateManager.checkAndInstallUpdate(this)
val splashScreen = installSplashScreen()
splashScreen.setKeepOnScreenCondition { !DirectoryInitialization.areDirectoriesReady }

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<paths>
<external-path
name="external_download"
path="Download/" />
</paths>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<!-- Add your trusted certificate authorities here -->
</trust-anchors>
</base-config>
</network-security-config>