From 3fbfb38a53193e8d39dc0be8d4ce4a36f34d4184 Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Mon, 29 Jan 2024 21:27:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EARM=E6=9E=B6=E6=9E=84?= =?UTF-8?q?=E9=9D=9E=E9=A3=9E=E8=85=BECPU=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aapt/run-aapt.sh | 9 +++++++-- information.json | 5 +++-- mainwindow.py | 3 +++ new-deb-build/DEBIAN/control | 2 +- .../files/uengine-runner-applist-launch.sh | 5 +++++ 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/aapt/run-aapt.sh b/aapt/run-aapt.sh index 4b9c12e..4bd5a9f 100755 --- a/aapt/run-aapt.sh +++ b/aapt/run-aapt.sh @@ -3,8 +3,13 @@ cat /etc/deepin_version | grep 23 if [[ $? != 0 ]]; then # 如果不是 - aapt "$@" - exit $? + # 判断系统是否有安装 aapt + which aapt > /dev/null + if [[ $? == 0 ]]; then + # 如果有安装 + aapt "$@" + exit $? + fi fi # 如果是 programPath=$(cd $(dirname $0); pwd) diff --git a/information.json b/information.json index 63f9bbe..66b8724 100755 --- a/information.json +++ b/information.json @@ -25,8 +25,9 @@ "V2.2.0:", "※1、支持 deepin 23,不需要强制依赖 aapt", "※2、修复 deepin 23 安装的 APK 无法正常在启动器显示图标的问题", - "3、优化安装量统计机制", - "4、关于窗口新增赞助页", + "※3、新增 ARM 架构非飞腾 CPU 识别防止破坏鲲鹏 kbox 环境", + "4、优化安装量统计机制", + "5、关于窗口新增赞助页", "", "V2.1.2:", "※1、修复 https://gitee.com/gfdgd-xi/uengine-runner/issues/I6ZRZX", diff --git a/mainwindow.py b/mainwindow.py index 09965e2..9d2a2a7 100755 --- a/mainwindow.py +++ b/mainwindow.py @@ -1858,6 +1858,9 @@ def showhelp(): if not os.path.exists("/usr/bin/uengine"): # Deepin/UOS 用户 if "deepin" in SystemVersion.lower() or "uos" in SystemVersion.lower() or subprocess.getoutput("arch").replace("\n", "").replace(" ", "") != "x86_64": + if not "ft-" in GetCommandReturn("lscpu").lower() and GetCommandReturn("lscpu").replace(" ", "").replace("\n", "") == "aarch64": + QtWidgets.QMessageBox.critical(None, "错误", "UEngine 运行器不支持非飞腾 CPU") + sys.exit(1) if QtWidgets.QMessageBox.question(None, "提示", "您的电脑没有安装 UEngine,是否安装 UEngine 以便更好的使用\n安装完后重新启动该程序即可") == QtWidgets.QMessageBox.Yes: OpenTerminal(f"pkexec apt install uengine -y") sys.exit(0) diff --git a/new-deb-build/DEBIAN/control b/new-deb-build/DEBIAN/control index c5bd458..f83f2a7 100755 --- a/new-deb-build/DEBIAN/control +++ b/new-deb-build/DEBIAN/control @@ -9,6 +9,6 @@ Maintainer: gfdgd xi <3025613752@qq.com> Depends: python3, python3-tk, python3-pip, python3-setuptools, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal, curl, python3-pil, python3-requests, adb, fonts-noto-cjk, python3-numpy, wget, inotify-tools, aria2, python3-pyqt5, python3-matplotlib, python3-urllib3, zenity, python3-pil.imagetk Recommends: uengine, deepin-elf-verify, python3-pyqt5.qtwebengine, aapt Priority: optional -Conflicts: spark-uengine-apk-builder, com.gitee.uengine.runner.spark.ubuntu +Conflicts: spark-uengine-apk-builder, com.gitee.uengine.runner.spark.ubuntu, kbox Homepage: https://gitee.com/gfdgd-xi/uengine-runner Description: 新版本Deepin/UOS发布后,可以在应用商店安装部分官方已适配的安卓应用,对爱好者来说,不能自己安装APK软件包始终差点意思,本程序可以为Deepin/UOS上的Uengine安卓运行环境安装/卸载/打包自定义APK软件包,并能发送安装的APK包启动菜单到桌面或系统菜单。 diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-applist-launch.sh b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-applist-launch.sh index 8a20ffa..012cec2 100755 --- a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-applist-launch.sh +++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-applist-launch.sh @@ -13,6 +13,11 @@ else echo "系统:$version" if [ "$versionLower" = "deepin" ] || [ "$versionLower" = "uos" ]; then echo "此系统为 Deepin/UOS,使用 apt 安装" + lscpu | grep "FT-" + if [[ $? != 0 ]] && [[ `arch` == "aarch64" ]]; then + zenity --info --text="UEngine 运行器暂不支持非飞腾CPU" + exit + fi zenity --question --text="您还未安装 UEngine,是否现在安装?" --no-wrap if [[ $? == 0 ]]; then "$dir/launch.sh" deepin-terminal -C "pkexec apt install uengine -y"