diff --git a/APK/Via.apk b/APK/Via.apk
new file mode 100644
index 0000000..f67a2cd
Binary files /dev/null and b/APK/Via.apk differ
diff --git a/Makefile b/Makefile
index 9ddaede..ee0b09b 100755
--- a/Makefile
+++ b/Makefile
@@ -60,6 +60,7 @@ build:
cp -rv pkexec new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv LoadingBinder new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv aapt new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
+ cp -rv APK new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
rm -rfv new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Help/information
python3 UpdateTime.py
python3 RemovePycacheFile.py #new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
diff --git a/information.json b/information.json
index 5d5c294..ae2c064 100755
--- a/information.json
+++ b/information.json
@@ -30,6 +30,7 @@
"5、优化安装量统计机制",
"6、关于窗口新增赞助页",
"7、新增 QQ 交流群入口",
+ "8、内置 Via 浏览器",
"",
"V2.1.2:",
"※1、修复 https://gitee.com/gfdgd-xi/uengine-runner/issues/I6ZRZX",
diff --git a/mainwindow.py b/mainwindow.py
index b6c677a..e2a6342 100755
--- a/mainwindow.py
+++ b/mainwindow.py
@@ -2024,6 +2024,7 @@ uengineUbuntuInstall = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon
uengineUbuntuRemove = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), "移除在 Ubuntu/Debian 上安装的 UEngine 及其附属脚本")
uengineUbuntuInstallRoot = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), "在 Ubuntu/Debian 上安装 UEngine(SuperSU 镜像)")
uengineWindowSizeSetting = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][16])
+uengineInstallVia = QtWidgets.QAction("安装 Via")
uengine.addAction(uengineOpenDebBuilder)
uengine.addAction(uengineOpenDebBuilderMore)
uengine.addAction(uengineKeyboardToMouse)
@@ -2049,6 +2050,9 @@ uengine.addSeparator()
uengine.addAction(uengineDeleteUengineCheck)
uengine.addAction(uengineReinstall)
uengineRoot = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Name"])
+uengine.addSeparator()
+uengine.addAction(uengineInstallVia)
+
#uengineUbuntuInstall.setDisabled(True)
# 绑定信号
uengineAllowOrDisallowUpdateAndroidApp.triggered.connect(AllowOrDisallowUpdateAndroidApp)
@@ -2064,6 +2068,12 @@ uengineDeleteUengineCheck.triggered.connect(DelUengineCheck)
uengineReinstall.triggered.connect(ReinstallUengine)
uengineWindowSizeSetting.triggered.connect(UengineWindowSizeSetting.ShowWindow)
+def InstallVia():
+ ComboInstallPath.setCurrentText(f"{programPath}/APK/Via.apk")
+ Button3Install()
+
+uengineInstallVia.triggered.connect(InstallVia)
+
uengineStart = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][0])
uengineStop = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][1])
uengineRestart = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][2])
diff --git a/new-deb-build/DEBIAN/postinst b/new-deb-build/DEBIAN/postinst
index e7bfe6e..d1a898f 100755
--- a/new-deb-build/DEBIAN/postinst
+++ b/new-deb-build/DEBIAN/postinst
@@ -59,6 +59,13 @@ if [[ -f /usr/bin/uengine-loading-ubuntu ]] || [[ -f /usr/bin/uengine-loading-bi
done
rm -f /tmp/upgrade-uengine-loading-ubuntu
fi
+# 自动往 UEngine 安装 Via(如果 UEngine 已存在)
+if [[ -f /usr/bin/uengine-session-launch-helper ]]; then
+ # 忽略错误进行安装
+ cp /opt/apps/com.gitee.uengine.runner.spark/files/APK/Via.apk /tmp/Via.apk | true
+ /usr/bin/uengine-session-launch-helper -- uengine install --apk=/tmp/Via.apk | true
+ rm -f /tmp/Via.apk | true
+fi
# 刷新图标缓存
# 因为 Ubuntu 的问题,省略
gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true
diff --git a/new-deb-build/DEBIAN/postrm b/new-deb-build/DEBIAN/postrm
index a978397..53fb90f 100755
--- a/new-deb-build/DEBIAN/postrm
+++ b/new-deb-build/DEBIAN/postrm
@@ -61,7 +61,11 @@ if [ "$1" = "purge" ]; then
else
echo "非 purge,跳过清理"
fi
-
+# 自动卸载 UEngine 的 Via(如果 UEngine 已存在)
+if [[ -f /usr/bin/uengine-session-launch-helper ]]; then
+ # 忽略错误进行安装
+ /usr/bin/uengine-session-launch-helper -- uengine uninstall --pkg=mark.via | true
+fi
# 刷新图标缓存
# 因为 Ubuntu 的问题,省略
gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true
\ No newline at end of file
diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/APK/Via.apk b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/APK/Via.apk
new file mode 100644
index 0000000..f67a2cd
Binary files /dev/null and b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/APK/Via.apk differ
diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/Program/about-background.png b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/Program/about-background.png
new file mode 100755
index 0000000..f6a957c
Binary files /dev/null and b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/Program/about-background.png differ
diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/Program/about-icon.png b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/Program/about-icon.png
new file mode 100755
index 0000000..9ff3fd9
Binary files /dev/null and b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/Program/about-icon.png differ
diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/aapt/run-aapt.sh b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/aapt/run-aapt.sh
index 4b9c12e..4bd5a9f 100755
--- a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/aapt/run-aapt.sh
+++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/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/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/information.json b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/information.json
index 42c4433..5280f4c 100755
--- a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/information.json
+++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/information.json
@@ -4,7 +4,7 @@
"https://gitee.com/gfdgd-xi/uengine-runner",
"https://github.com/gfdgd-xi/uengine-runner"
],
- "Version": "2.1.2",
+ "Version": "2.2.0",
"System": "Linux(deepin/UOS/Ubuntu/Debian)",
"Tips": [
"更多可见:https://gitee.com/gfdgd-xi/uengine-runner/wikis 或程序的更多帮助",
@@ -22,6 +22,16 @@
"5、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)"
],
"Update": [
+ "V2.2.0:",
+ "※1、支持 deepin 23,不需要强制依赖 aapt",
+ "※2、修复 deepin 23 安装的 APK 无法正常在启动器显示图标的问题",
+ "※3、新增 ARM 架构非飞腾 CPU 识别防止破坏鲲鹏 kbox 环境",
+ "※4、修复部分系统在使用程序的一些功能时发生崩溃的问题",
+ "5、优化安装量统计机制",
+ "6、关于窗口新增赞助页",
+ "7、新增 QQ 交流群入口",
+ "8、内置 Via 浏览器",
+ "",
"V2.1.2:",
"※1、修复 https://gitee.com/gfdgd-xi/uengine-runner/issues/I6ZRZX",
"※2、修复添加应用图标时activity名称错误的问题",
@@ -263,7 +273,7 @@
"11、deepin 终端",
"……"
],
- "Time": "2024-01-29 19:04:32 Linux-6.1.32-amd64-desktop-hwe-x86_64-with-glibc2.35",
+ "Time": "2024-01-30 10:09:22 Linux-6.1.32-amd64-desktop-hwe-x86_64-with-glibc2.35",
"Contribute": [
"感谢以下用户提供的问题、建议、图标、代码等,如果有遗漏,请及时与开发者联系添加,以及如果侵犯到您的合法权益,也及时与开发者联系:
",
"
",
diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner
index 59fa6d1..b6c677a 100755
--- a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner
+++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner
@@ -89,8 +89,8 @@ class UninstallProgram(QtCore.QThread):
self.error.emit("疑似卸载失败,请检查 UEngine 是否正常安装、运行以及 APK 文件或包名是否正确、完整")
DisabledAndEnbled(False)
return
- if os.path.exists("{}/.local/share/applications/uengine/{}.desktop".format(get_home(), package)):
- os.remove("{}/.local/share/applications/uengine/{}.desktop".format(get_home(), package))
+ if os.path.exists("{}/{}.desktop".format(desktopFilePath, package)):
+ os.remove("{}/{}.desktop".format(desktopFilePath, package))
if os.path.exists("{}/{}.desktop".format(get_desktop_path(), package)):
os.remove("{}/{}.desktop".format(get_desktop_path(), package))
findApkHistory.append(ComboInstallPath.currentText())
@@ -174,9 +174,9 @@ class InstallApk(QtCore.QThread):
try:
if not os.path.exists("/tmp/uengine-runner"):
os.makedirs("/tmp/uengine-runner")
- if not os.path.exists("{}/.local/share/applications/uengine/".format(get_home())):
+ if not os.path.exists(desktopFilePath):
print("Mkdir")
- os.makedirs("{}/.local/share/applications/uengine/".format(get_home()))
+ os.makedirs(desktopFilePath)
# 读取设置
setting = json.loads(readtxt(get_home() + "/.config/uengine-runner/setting.json"))
# 安装应用
@@ -246,7 +246,7 @@ logicalHeight {verticalHeighe}
"{}/{}.desktop".format(get_desktop_path(), GetApkPackageName(path)))
print("start install apk3")
BuildUengineDesktop(GetApkPackageName(path), GetApkActivityName(path), GetApkChineseLabel(path), iconSavePath,
- "{}/.local/share/applications/uengine/{}.desktop".format(get_home(), GetApkPackageName(path)))
+ "{}/{}.desktop".format(desktopFilePath, GetApkPackageName(path)))
print("\nprint install complete")
if quit:
return
@@ -266,7 +266,7 @@ def InstallBuildDesktop(iconSavePath):
"{}/{}.desktop".format(get_desktop_path(), GetApkPackageName(path)), choose)
print("start install apk3")
BuildUengineDesktop(GetApkPackageName(path), GetApkActivityName(path), GetApkChineseLabel(path), iconSavePath,
- "{}/.local/share/applications/uengine/{}.desktop".format(get_home(), GetApkPackageName(path)), choose)
+ "{}/{}.desktop".format(desktopFilePath, GetApkPackageName(path)), choose)
print("\nprint install complete")
def UpdateCombobox(tmp):
@@ -587,8 +587,8 @@ def BackUengineClean()->"清空 uengine 数据":
if QtWidgets.QMessageBox.warning(widget, "警告", "清空后数据将会完全丢失,确定要继续吗?", QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel, QtWidgets.QMessageBox.Cancel) == QtWidgets.QMessageBox.Ok:
DisabledAndEnbled(True)
try:
- if os.path.exists("{}/.local/share/applications/uengine/".format(get_home())):
- shutil.rmtree("{}/.local/share/applications/uengine/".format(get_home()))
+ if os.path.exists(desktopFilePath):
+ shutil.rmtree(desktopFilePath)
except:
traceback.print_exc()
QtWidgets.QMessageBox.critical(widget, "错误", traceback.format_exc())
@@ -1004,7 +1004,7 @@ class UengineWindowSizeSetting:
i.setChecked(True)
UengineWindowSizeSetting.setting.setWindowTitle(f"设置 Android 应用的窗口大小缩放设置")
UengineWindowSizeSetting.setting.show()
- UengineWindowSizeSetting.setting.resize(UengineWindowSizeSetting.setting.frameSize().width() * 1.3, UengineWindowSizeSetting.setting.frameSize().height())
+ UengineWindowSizeSetting.setting.resize(int(UengineWindowSizeSetting.setting.frameSize().width() * 1.3), int(UengineWindowSizeSetting.setting.frameSize().height()))
def ReadSetting():
file = open(f"/usr/share/uengine/appetc/{UengineWindowSizeSetting.package}.txt")
@@ -1191,7 +1191,7 @@ class UpdateWindow():
UpdateWindow.update.setCentralWidget(updateWidget)
UpdateWindow.update.setWindowTitle("检查 UEngine 运行器更新")
UpdateWindow.update.setWindowIcon(QtGui.QIcon(iconPath))
- UpdateWindow.update.resize(updateWidget.frameGeometry().width(), int(updateWidget.frameGeometry().height() * 1.5))
+ UpdateWindow.update.resize(int(updateWidget.frameGeometry().width()), int(updateWidget.frameGeometry().height() * 1.5))
UpdateWindow.update.show()
def Update():
@@ -1410,7 +1410,7 @@ class ShowTextTipsWindow():
ShowTextTipsWindow.messageWindow.setWindowTitle("提示")
ShowTextTipsWindow.messageWindow.setWindowIcon(QtGui.QIcon(iconPath))
ShowTextTipsWindow.messageWindow.show()
- ShowTextTipsWindow.messageWindow.resize(ShowTextTipsWindow.messageWindow.frameSize().width() * 2, ShowTextTipsWindow.messageWindow.frameSize().height() * 1.5)
+ ShowTextTipsWindow.messageWindow.resize(int(ShowTextTipsWindow.messageWindow.frameSize().width() * 2), int(ShowTextTipsWindow.messageWindow.frameSize().height() * 1.5))
return
# 添加/删除 uengine 应用快捷方式
@@ -1462,7 +1462,7 @@ class AddNewUengineDesktopLink():
# 添加快捷方式
def SaveDesktopLink():
try:
- if os.path.exists("{}/.local/share/applications/uengine/{}.desktop".format(get_home(), packageName.text())):
+ if os.path.exists("{}/{}.desktop".format(desktopFilePath, packageName.text())):
if QtWidgets.QMessageBox.question(widget, "提示", "文件已存在,是否要覆盖?") == QtWidgets.QMessageBox.No:
return
if not os.path.exists("{}/.local/share/icons/hicolor/256x256/apps/".format(get_home())):
@@ -1471,7 +1471,7 @@ class AddNewUengineDesktopLink():
iconSavePath = "{}/.local/share/icons/hicolor/256x256/apps/{}.png".format(get_home(), packageName.text())
shutil.copy(programPath + "/defult.png", iconSavePath)
BuildUengineDesktop(packageName.text(), activityName.text(), packageName.text(), iconSavePath,
- "{}/.local/share/applications/uengine/{}.desktop".format(get_home(), packageName.text()))
+ "{}/{}.desktop".format(desktopFilePath, packageName.text()))
BuildUengineDesktop(packageName.text(), activityName.text(), packageName.text(), iconSavePath,
"{}/{}.desktop".format(get_desktop_path(), packageName.text()))
AddNewUengineDesktopLink.SaveHistory()
@@ -1485,13 +1485,13 @@ class AddNewUengineDesktopLink():
def DelDesktopLink():
try:
global packageName
- if not os.path.exists("{}/.local/share/applications/uengine/{}.desktop".format(get_home(), packageName.text())):
- QtWidgets.QMessageBox.critical(widget, "错误", "此包名对应的 UEngine 桌面快捷方式不存在!")
+ if not os.path.exists("{}/{}.desktop".format(desktopFilePath, packageName.text())):
+ QtWidgets.QMessageBox.critical(widget, "错误", "此包名对应的 UEngine 快捷方式不存在!")
return
if QtWidgets.QMessageBox.warning(widget, "警告", "你确定要删除吗?删除后将无法恢复!", QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel, QtWidgets.QMessageBox.Cancel) == QtWidgets.QMessageBox.Cancel:
return
try:
- os.remove("{}/.local/share/applications/uengine/{}.desktop".format(get_home(), packageName.text()))
+ os.remove("{}/{}.desktop".format(desktopFilePath, packageName.text()))
AddNewUengineDesktopLink.SaveHistory()
QtWidgets.QMessageBox.information(widget, "提示", "已删除")
except:
@@ -1585,8 +1585,7 @@ goodRunSystem = information["System"]
aaptVersion = GetCommandReturn(f"'{programPath}/aapt/run-aapt.sh' version")
SystemVersion = GetSystemVersion()
iconPath = "{}/runner.svg".format(os.path.split(os.path.realpath(__file__))[0])
-about = f'''
-介绍:虽然通过Deepin/UOS应用商店已经能够安装部分安卓应用,但对于安卓应用爱好者来说,不能自由地安装任意APK软件包实在是不尽如人意。本软件可以实现在Deepin/UOS上安装任意APK软件包,并能将其启动图标发送到系统桌面或启动器中,方便用户快速启动它。
+about = f'''介绍:虽然通过Deepin/UOS应用商店已经能够安装部分安卓应用,但对于安卓应用爱好者来说,不能自由地安装任意APK软件包实在是不尽如人意。本软件可以实现在Deepin/UOS上安装任意APK软件包,并能将其启动图标发送到系统桌面或启动器中,方便用户快速启动它。
程序开源许可证:GPLV3
版本:{version}
适用平台:{goodRunSystem}
@@ -1594,10 +1593,22 @@ about = f'''
程序官网:{programUrl}
系统版本:{SystemVersion}
安装包构建时间:{information['Time']}
+QQ 交流群:872491938
©2021-{time.strftime("%Y")} gfdgd xi
'''
updateThingsString = ""
tips = ""
contribute = ""
+appreciate = f"""请作者喝杯茶
+如果您觉得 UEngine 运行器对你有帮助,可以请作者喝杯茶
+
+
+
+
+
+
+广告
+支付宝官方活动,扫描获得支付红包!
+
"""
for i in information["Tips"]:
tips += f"{i}
"
for i in information["Update"]:
@@ -1611,13 +1622,25 @@ desktop = programPath + "/UengineAndroidProgramList.desktop"
desktopName = "UengineAndroidProgramList.desktop"
useProgram = ""
threading.Thread(target=UseProgram).start()
+isDeepin23=False
+# 判断是不是 Deepin23
+if os.path.exists("/etc/deepin_version"):
+ try:
+ with open(f"/etc/deepin_version") as file:
+ isDeepin23 = "23" in file.read()
+ except:
+ traceback.print_exc()
+desktopFilePath = f"{get_home()}/.local/share/applications/uengine/"
+if isDeepin23:
+ desktopFilePath = f"{get_home()}/.local/share/applications/"
+
###########################
# 加载配置
###########################
app = QtWidgets.QApplication(sys.argv)
-if not os.path.exists("{}/.local/share/applications/uengine/".format(get_home())):
- os.makedirs("{}/.local/share/applications/uengine/".format(get_home()))
+if not os.path.exists(desktopFilePath):
+ os.makedirs(desktopFilePath)
if not os.path.exists(get_home() + "/.config/uengine-runner"): # 如果没有配置文件夹
os.makedirs(get_home() + "/.config/uengine-runner") # 创建配置文件夹
if not os.path.exists(get_home() + "/.config/uengine-runner/FindApkHistory.json"): # 如果没有配置文件
@@ -1745,7 +1768,16 @@ def showhelp():
def ChgLog():
HelpStr.setHtml(updateThingsString)
def ChgAbout(event):
- HelpStr.setHtml(about)
+ HelpStr.setHtml(f"
\n" + about)
+ def OpenUrl(url):
+ print(url.url())
+ if url.url() == "https://www.gfdgdxi.top/ChangeIcon":
+ ChgAboutChangeIcon()
+ return
+ webbrowser.open_new_tab(url.url())
+
+ def ChgAboutChangeIcon():
+ HelpStr.setHtml(f"
\n" + about)
def ChgDep():
if useProgram == "":
BtnZujian.setDisabled(True)
@@ -1755,7 +1787,8 @@ def showhelp():
HelpStr.setHtml(contribute)
def ChgTips():
HelpStr.setHtml(tips)
-
+ def ChgAppreciate():
+ HelpStr.setHtml(appreciate)
def ChgGPLV3():
try:
with open(f"{programPath}/LICENSE", "r") as file:
@@ -1778,7 +1811,12 @@ def showhelp():
BtnDownN = QtWidgets.QPushButton("程序下载量")
BtnOpenN = QtWidgets.QPushButton("程序打开量")
BtnGPLV3 = QtWidgets.QPushButton("程序开源许可证")
+ appreciateButton = QtWidgets.QPushButton("赞赏作者")
HelpStr = QtWidgets.QTextBrowser()
+ HelpStr.setOpenLinks(False)
+ HelpStr.setHtml(about)
+ HelpStr.setOpenExternalLinks(False)
+ HelpStr.anchorClicked.connect(OpenUrl)
# 此功能从 2.0.0 后不再隐藏
#BtnDownN.setEnabled("--彩蛋" in sys.argv)
BtnReadme.clicked.connect(ChgTips)
@@ -1789,6 +1827,7 @@ def showhelp():
BtnDownN.clicked.connect(Download)
BtnGPLV3.clicked.connect(ChgGPLV3)
BtnOpenN.clicked.connect(Open)
+ appreciateButton.clicked.connect(ChgAppreciate)
ChgTips()
@@ -1799,14 +1838,18 @@ def showhelp():
helpLayout.addWidget(BtnDownN, 4, 0, 1, 1)
helpLayout.addWidget(BtnOpenN, 5, 0, 1, 1)
helpLayout.addWidget(BtnGPLV3, 6, 0, 1, 1)
- helpLayout.addWidget(BtnAbout, 7, 0, 1, 1)
- helpLayout.addWidget(HelpStr, 0, 1, 10, 1)
+ helpLayout.addWidget(appreciateButton, 7, 0, 1, 1)
+ helpLayout.addWidget(BtnAbout, 8, 0, 1, 1)
+ helpLayout.addWidget(HelpStr, 0, 1, 11, 1)
helpWidget.setLayout(helpLayout)
helpWindow.setCentralWidget(helpWidget)
helpWindow.setFixedSize(int(helpWindow.frameSize().width() * 0.9), int(helpWindow.frameSize().height() * 1.5))
helpWindow.setWindowTitle("帮助")
helpWindow.setWindowIcon(QtGui.QIcon(iconPath))
+ # 设置背景
+ helpWindow.setObjectName("helpWindow")
+ helpWindow.setStyleSheet(f"QWidget#helpWindow {{background: url({programPath}/Icon/Program/about-background.png) no-repeat;background-position: left bottom;}}")
helpWindow.show()
return
@@ -1816,6 +1859,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/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 012cec2..8a20ffa 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,11 +13,6 @@ 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"