新增启动脚本

This commit is contained in:
gfdgd xi 2022-06-20 09:22:23 +08:00
parent 176025a3c5
commit acaa13e8ae
2 changed files with 26 additions and 2 deletions

View File

@ -41,7 +41,6 @@ import tkinter.simpledialog as simpledialog
from getxmlimg import getsavexml from getxmlimg import getsavexml
win = tk.Tk() # 创建窗口 win = tk.Tk() # 创建窗口
win.tk.call('tk', 'scaling', 1.25)
# 卸载程序 # 卸载程序
def UninstallProgram(package: "apk 包名")->"卸载程序": def UninstallProgram(package: "apk 包名")->"卸载程序":

25
uengine-launch.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
FILE=/usr/bin/uengine
if [ -f "$FILE" ]; then
echo "$FILE 存在,正常打开菜单"
/usr/bin/uengine launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
else
echo "$FILE 不存在,没有安装 UEngine询问是否安装 UEngine"
# 读取系统版本
version=`sed -n '/^NAME/s/NAME="//Ip' /etc/os-release | sed -n 's/\"//Ip'`
declare -l versionLower=$version
echo "系统:$version"
if [ "$versionLower" = "deepin" ] || [ "$versionLower" = "uos" ]; then
echo "此系统为 Deepin/UOS使用 apt 安装"
zenity --question --text="您还未安装 UEngine是否现在安装" --no-wrap
if [[ $? = 0 ]]; then
deepin-terminal -C "pkexec apt install uengine"
fi
else
echo "非 Deepin/UOS 系统,使用 shenmo 提供的脚本安装"
zenity --question --text="您还未安装 UEngine是否现在安装\n将会使用 shenmo 提供的脚本进行安装" --no-wrap
if [[ $? = 0 ]]; then
deepin-terminal -C "bash /opt/apps/com.gitee.uengine.runner.spark/files/uengine-installer"
fi
fi
fi