diff --git a/LoadingBinder/uengine b/LoadingBinder/uengine
new file mode 100644
index 0000000..5b36a5e
--- /dev/null
+++ b/LoadingBinder/uengine
@@ -0,0 +1,7 @@
+#!/bin/bash
+export XDG_SESSION_TYPE=x11
+export QT_QPA_PLATFORM=xcb
+unset WAYLAND_DISPLAYCOPY
+XDG_CURRENT_DESKTOP="Deepin"
+export LD_LIBRARY_PATH=/usr/share/uengine/lib64/
+uengine-session "$@" -platformtheme=deepin
\ No newline at end of file
diff --git a/LoadingBinder/uengine-wayland-install.sh b/LoadingBinder/uengine-wayland-install.sh
new file mode 100644
index 0000000..ef78cbe
--- /dev/null
+++ b/LoadingBinder/uengine-wayland-install.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+programPath=$(cd $(dirname $0); pwd)
+if [[ ! -f /usr/bin/uengine ]]; then
+ echo 未安装uengine,请先安装!
+ exit 1
+fi
+if [[ -f /usr/bin/uengine-session ]] ;then
+ echo 已经安装补丁,无需重复安装!
+ exit 1
+fi
+sudo mv /usr/bin/uengine /usr/bin/uengine-session
+sudo cp "$programPath/uengine" /usr/bin/uengine
+sudo chmod +x /usr/bin/uengine
+sudo systemctl restart uengine-session.service
+echo 补丁安装完成!
\ No newline at end of file
diff --git a/LoadingBinder/uengine-wayland-uninstall.sh b/LoadingBinder/uengine-wayland-uninstall.sh
new file mode 100644
index 0000000..fb2f06f
--- /dev/null
+++ b/LoadingBinder/uengine-wayland-uninstall.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+programPath=$(cd $(dirname $0); pwd)
+if [[ ! -f /usr/bin/uengine ]]; then
+ echo 未安装uengine,请先安装!
+ exit 1
+fi
+if [[ ! -f /usr/bin/uengine-session ]] ;then
+ echo 未安装补丁,无需卸载!
+ exit 1
+fi
+rm -fv /usb/bin/uengine
+sudo mv /usr/bin/uengine-session /usr/bin/uengine
+sudo chmod +x /usr/bin/uengine
+sudo systemctl restart uengine-session.service
+echo 补丁卸载完成!
\ No newline at end of file
diff --git a/README.md b/README.md
index cb879a2..60f8cdf 100755
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-UEngine 运行器 2.1.2
+UEngine 运行器 2.2.0
@@ -83,6 +83,24 @@ sudo apt upgrade
![image.png](https://storage.deepin.org/thread/202205220801513371_image.png)
### 更新内容
+#### V2.2.0(2023年01月30日)
+**※1、支持 deepin 23,不需要强制依赖 aapt**
+**※2、修复 deepin 23 安装的 APK 无法正常在启动器显示图标的问题**
+**※3、新增 ARM 架构非飞腾 CPU 识别防止破坏鲲鹏 kbox 环境**
+**※4、修复部分系统在使用程序的一些功能时发生崩溃的问题**
+**※5、新增 UEngine For Wayland 补丁**
+6、优化安装量统计机制
+7、关于窗口新增赞助页
+8、新增 QQ 交流群入口
+9、内置 Via 浏览器
+
+![截图_选择区域_20240130111917.png](https://storage.deepin.org/thread/20240130031926574_截图_选择区域_20240130111917.png)
+
+
+
+
+
+
#### V2.1.2(2023年08月14日)
**※1、修复 https://gitee.com/gfdgd-xi/uengine-runner/issues/I6ZRZX**
**※2、修复添加应用图标时activity名称错误的问题**
diff --git a/information.json b/information.json
index ae2c064..5bb03db 100755
--- a/information.json
+++ b/information.json
@@ -27,10 +27,11 @@
"※2、修复 deepin 23 安装的 APK 无法正常在启动器显示图标的问题",
"※3、新增 ARM 架构非飞腾 CPU 识别防止破坏鲲鹏 kbox 环境",
"※4、修复部分系统在使用程序的一些功能时发生崩溃的问题",
- "5、优化安装量统计机制",
- "6、关于窗口新增赞助页",
- "7、新增 QQ 交流群入口",
- "8、内置 Via 浏览器",
+ "※5、新增 UEngine For Wayland 补丁",
+ "6、优化安装量统计机制",
+ "7、关于窗口新增赞助页",
+ "8、新增 QQ 交流群入口",
+ "9、内置 Via 浏览器",
"",
"V2.1.2:",
"※1、修复 https://gitee.com/gfdgd-xi/uengine-runner/issues/I6ZRZX",
diff --git a/mainwindow.py b/mainwindow.py
index e2a6342..82713f8 100755
--- a/mainwindow.py
+++ b/mainwindow.py
@@ -1570,6 +1570,26 @@ def BackAPK(choice):
global choose
choose = choice
+def InstallUEnginePatchForWayland():
+ if os.system("which uengine"):
+ QtWidgets.QMessageBox.critical(window, "错误", "未安装UEngine,请先安装UEngine")
+ return
+ if os.path.exists("/usr/bin/uengine-session"):
+ QtWidgets.QMessageBox.critical(window, "提示", "已安装该补丁,请勿重复安装")
+ return
+ os.system(f"pkexec bash '{programPath}/LoadingBinder/uengine-wayland-install.sh'")
+ QtWidgets.QMessageBox.information(window, "提示", "安装成功!重启电脑后生效")
+
+def RemoveUEnginePatchForWayland():
+ if os.system("which uengine"):
+ QtWidgets.QMessageBox.critical(window, "错误", "未安装UEngine,请先安装UEngine")
+ return
+ if not os.path.exists("/usr/bin/uengine-session"):
+ QtWidgets.QMessageBox.critical(window, "提示", "已卸载该补丁,无需卸载")
+ return
+ os.system(f"pkexec bash '{programPath}/LoadingBinder/uengine-wayland-uninstall.sh'")
+ QtWidgets.QMessageBox.information(window, "提示", "卸载成功!重启电脑后生效")
+
###########################
# 程序信息
###########################
@@ -1876,10 +1896,19 @@ if not os.path.exists("/usr/bin/uengine"):
OpenTerminal(f"bash '{programPath}/uengine-installer'")
sys.exit(0)
+
+
+
+
###########################
# 窗口创建
###########################
window = QtWidgets.QMainWindow()
+# 判断系统是不是 Deepin 23、有没有安装 Wayland 补丁、是不是 Wayland 环境
+if not os.path.exists("/usr/bin/uengine-session") and isDeepin23 and os.getenv("XDG_SESSION_TYPE") == "wayland":
+ # 如果是
+ if QtWidgets.QMessageBox.question(None, "提示", "检测到您使用的是 Deepin 23 + Wayland 环境,建议安装 UEngine For Wayland 补丁以便能正常使用 UEngine,是否安装?") == QtWidgets.QMessageBox.Yes:
+ InstallUEnginePatchForWayland()
widget = QtWidgets.QWidget()
widgetLayout = QtWidgets.QGridLayout()
# 权重
@@ -2025,6 +2054,8 @@ uengineUbuntuRemove = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"
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")
+installUEnginePatchForWayland = QtWidgets.QAction("安装 UEngine For Wayland 补丁")
+uninstallUEnginePatchForWayland = QtWidgets.QAction("卸载 UEngine For Wayland 补丁")
uengine.addAction(uengineOpenDebBuilder)
uengine.addAction(uengineOpenDebBuilderMore)
uengine.addAction(uengineKeyboardToMouse)
@@ -2052,6 +2083,9 @@ uengine.addAction(uengineReinstall)
uengineRoot = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Name"])
uengine.addSeparator()
uengine.addAction(uengineInstallVia)
+uengine.addSeparator()
+uengine.addAction(installUEnginePatchForWayland)
+uengine.addAction(uninstallUEnginePatchForWayland)
#uengineUbuntuInstall.setDisabled(True)
# 绑定信号
@@ -2067,6 +2101,8 @@ uengineUbuntuInstallRoot.triggered.connect(UengineUbuntuInstallRoot)
uengineDeleteUengineCheck.triggered.connect(DelUengineCheck)
uengineReinstall.triggered.connect(ReinstallUengine)
uengineWindowSizeSetting.triggered.connect(UengineWindowSizeSetting.ShowWindow)
+installUEnginePatchForWayland.triggered.connect(InstallUEnginePatchForWayland)
+uninstallUEnginePatchForWayland.triggered.connect(RemoveUEnginePatchForWayland)
def InstallVia():
ComboInstallPath.setCurrentText(f"{programPath}/APK/Via.apk")
diff --git a/new-deb-build/DEBIAN/control b/new-deb-build/DEBIAN/control
index f83f2a7..6d78e45 100755
--- a/new-deb-build/DEBIAN/control
+++ b/new-deb-build/DEBIAN/control
@@ -4,7 +4,7 @@ Replaces: spark-uengine-runner, com.gitee.uengine.runner.spark.ubuntu
Version: 2.2.0
Architecture: all
Section: utils
-Installed-Size: 2920
+Installed-Size: 9384
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
diff --git a/new-deb-build/DEBIAN/postrm b/new-deb-build/DEBIAN/postrm
index 53fb90f..ddb8e2a 100755
--- a/new-deb-build/DEBIAN/postrm
+++ b/new-deb-build/DEBIAN/postrm
@@ -27,6 +27,11 @@ rm -f /usr/bin/uengine-runner-auto-install-bash
# 加判断是为了怕 reinstall 后程序就再也打不开了(除非卸载后重新安装)
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
rm -rf /opt/apps/com.gitee.uengine.runner.spark
+ # 移除 UEngine For 23 Wayland 补丁
+ if [[ -f /usr/bin/uengine-session ]]; then
+ rm -fv /usb/bin/uengine
+ mv -v /usr/bin/uengine-session /usr/bin/uengine
+ fi
fi
# 删除软件配置文件(只限“purge”)
# 配置目录:~/.config/uengine-runner
diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/LoadingBinder/uengine b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/LoadingBinder/uengine
new file mode 100644
index 0000000..5b36a5e
--- /dev/null
+++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/LoadingBinder/uengine
@@ -0,0 +1,7 @@
+#!/bin/bash
+export XDG_SESSION_TYPE=x11
+export QT_QPA_PLATFORM=xcb
+unset WAYLAND_DISPLAYCOPY
+XDG_CURRENT_DESKTOP="Deepin"
+export LD_LIBRARY_PATH=/usr/share/uengine/lib64/
+uengine-session "$@" -platformtheme=deepin
\ No newline at end of file
diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/LoadingBinder/uengine-wayland-install.sh b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/LoadingBinder/uengine-wayland-install.sh
new file mode 100644
index 0000000..ef78cbe
--- /dev/null
+++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/LoadingBinder/uengine-wayland-install.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+programPath=$(cd $(dirname $0); pwd)
+if [[ ! -f /usr/bin/uengine ]]; then
+ echo 未安装uengine,请先安装!
+ exit 1
+fi
+if [[ -f /usr/bin/uengine-session ]] ;then
+ echo 已经安装补丁,无需重复安装!
+ exit 1
+fi
+sudo mv /usr/bin/uengine /usr/bin/uengine-session
+sudo cp "$programPath/uengine" /usr/bin/uengine
+sudo chmod +x /usr/bin/uengine
+sudo systemctl restart uengine-session.service
+echo 补丁安装完成!
\ No newline at end of file
diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/LoadingBinder/uengine-wayland-uninstall.sh b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/LoadingBinder/uengine-wayland-uninstall.sh
new file mode 100644
index 0000000..fb2f06f
--- /dev/null
+++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/LoadingBinder/uengine-wayland-uninstall.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+programPath=$(cd $(dirname $0); pwd)
+if [[ ! -f /usr/bin/uengine ]]; then
+ echo 未安装uengine,请先安装!
+ exit 1
+fi
+if [[ ! -f /usr/bin/uengine-session ]] ;then
+ echo 未安装补丁,无需卸载!
+ exit 1
+fi
+rm -fv /usb/bin/uengine
+sudo mv /usr/bin/uengine-session /usr/bin/uengine
+sudo chmod +x /usr/bin/uengine
+sudo systemctl restart uengine-session.service
+echo 补丁卸载完成!
\ No newline at end of file
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 5280f4c..a182224 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
@@ -27,10 +27,11 @@
"※2、修复 deepin 23 安装的 APK 无法正常在启动器显示图标的问题",
"※3、新增 ARM 架构非飞腾 CPU 识别防止破坏鲲鹏 kbox 环境",
"※4、修复部分系统在使用程序的一些功能时发生崩溃的问题",
- "5、优化安装量统计机制",
- "6、关于窗口新增赞助页",
- "7、新增 QQ 交流群入口",
- "8、内置 Via 浏览器",
+ "※5、新增 UEngine For Wayland 补丁",
+ "6、优化安装量统计机制",
+ "7、关于窗口新增赞助页",
+ "8、新增 QQ 交流群入口",
+ "9、内置 Via 浏览器",
"",
"V2.1.2:",
"※1、修复 https://gitee.com/gfdgd-xi/uengine-runner/issues/I6ZRZX",
@@ -273,7 +274,7 @@
"11、deepin 终端",
"……"
],
- "Time": "2024-01-30 10:09:22 Linux-6.1.32-amd64-desktop-hwe-x86_64-with-glibc2.35",
+ "Time": "2024-01-30 11:09:35 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/run-program-without-wayland.sh b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/run-program-without-wayland.sh
index 2ffe898..c5ee14e 100644
--- a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/run-program-without-wayland.sh
+++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/run-program-without-wayland.sh
@@ -2,3 +2,6 @@
export XDG_SESSION_TYPE=x11
export QT_QPA_PLATFORM=xcb
unset WAYLAND_DISPLAYCOPY
+XDG_CURRENT_DESKTOP="Deepin"
+export LD_LIBRARY_PATH=/usr/share/uengine/lib64/
+"$@"
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 b6c677a..82713f8 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
@@ -1570,6 +1570,26 @@ def BackAPK(choice):
global choose
choose = choice
+def InstallUEnginePatchForWayland():
+ if os.system("which uengine"):
+ QtWidgets.QMessageBox.critical(window, "错误", "未安装UEngine,请先安装UEngine")
+ return
+ if os.path.exists("/usr/bin/uengine-session"):
+ QtWidgets.QMessageBox.critical(window, "提示", "已安装该补丁,请勿重复安装")
+ return
+ os.system(f"pkexec bash '{programPath}/LoadingBinder/uengine-wayland-install.sh'")
+ QtWidgets.QMessageBox.information(window, "提示", "安装成功!重启电脑后生效")
+
+def RemoveUEnginePatchForWayland():
+ if os.system("which uengine"):
+ QtWidgets.QMessageBox.critical(window, "错误", "未安装UEngine,请先安装UEngine")
+ return
+ if not os.path.exists("/usr/bin/uengine-session"):
+ QtWidgets.QMessageBox.critical(window, "提示", "已卸载该补丁,无需卸载")
+ return
+ os.system(f"pkexec bash '{programPath}/LoadingBinder/uengine-wayland-uninstall.sh'")
+ QtWidgets.QMessageBox.information(window, "提示", "卸载成功!重启电脑后生效")
+
###########################
# 程序信息
###########################
@@ -1876,10 +1896,19 @@ if not os.path.exists("/usr/bin/uengine"):
OpenTerminal(f"bash '{programPath}/uengine-installer'")
sys.exit(0)
+
+
+
+
###########################
# 窗口创建
###########################
window = QtWidgets.QMainWindow()
+# 判断系统是不是 Deepin 23、有没有安装 Wayland 补丁、是不是 Wayland 环境
+if not os.path.exists("/usr/bin/uengine-session") and isDeepin23 and os.getenv("XDG_SESSION_TYPE") == "wayland":
+ # 如果是
+ if QtWidgets.QMessageBox.question(None, "提示", "检测到您使用的是 Deepin 23 + Wayland 环境,建议安装 UEngine For Wayland 补丁以便能正常使用 UEngine,是否安装?") == QtWidgets.QMessageBox.Yes:
+ InstallUEnginePatchForWayland()
widget = QtWidgets.QWidget()
widgetLayout = QtWidgets.QGridLayout()
# 权重
@@ -2024,6 +2053,9 @@ 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")
+installUEnginePatchForWayland = QtWidgets.QAction("安装 UEngine For Wayland 补丁")
+uninstallUEnginePatchForWayland = QtWidgets.QAction("卸载 UEngine For Wayland 补丁")
uengine.addAction(uengineOpenDebBuilder)
uengine.addAction(uengineOpenDebBuilderMore)
uengine.addAction(uengineKeyboardToMouse)
@@ -2049,6 +2081,12 @@ 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)
+uengine.addSeparator()
+uengine.addAction(installUEnginePatchForWayland)
+uengine.addAction(uninstallUEnginePatchForWayland)
+
#uengineUbuntuInstall.setDisabled(True)
# 绑定信号
uengineAllowOrDisallowUpdateAndroidApp.triggered.connect(AllowOrDisallowUpdateAndroidApp)
@@ -2063,6 +2101,14 @@ uengineUbuntuInstallRoot.triggered.connect(UengineUbuntuInstallRoot)
uengineDeleteUengineCheck.triggered.connect(DelUengineCheck)
uengineReinstall.triggered.connect(ReinstallUengine)
uengineWindowSizeSetting.triggered.connect(UengineWindowSizeSetting.ShowWindow)
+installUEnginePatchForWayland.triggered.connect(InstallUEnginePatchForWayland)
+uninstallUEnginePatchForWayland.triggered.connect(RemoveUEnginePatchForWayland)
+
+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])
diff --git a/run-program-without-wayland.sh b/run-program-without-wayland.sh
index 2ffe898..c5ee14e 100644
--- a/run-program-without-wayland.sh
+++ b/run-program-without-wayland.sh
@@ -2,3 +2,6 @@
export XDG_SESSION_TYPE=x11
export QT_QPA_PLATFORM=xcb
unset WAYLAND_DISPLAYCOPY
+XDG_CURRENT_DESKTOP="Deepin"
+export LD_LIBRARY_PATH=/usr/share/uengine/lib64/
+"$@"