uengine-runner/uengine-runner-applist-laun...

28 lines
1.2 KiB
Bash
Raw Normal View History

2022-06-20 22:29:10 +08:00
#!/bin/bash
2022-07-07 14:35:44 +08:00
cd `dirname $0`
dir=`pwd`
2022-06-20 22:29:10 +08:00
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
2022-07-07 14:35:44 +08:00
"$dir/uengine-runner-applist-launch.sh" deepin-terminal -C "pkexec apt install uengine -y"
2022-06-20 22:29:10 +08:00
fi
else
2022-06-21 10:01:24 +08:00
echo "非 Deepin/UOS 系统,使用 shenmo 提供的脚本安装\n暂未保证此安装脚本一定安装成功"
zenity --question --text="您还未安装 UEngine是否现在安装\n将会使用 shenmo 提供的脚本进行安装\n暂未保证此安装脚本一定安装成功" --no-wrap
2022-06-20 22:29:10 +08:00
if [[ $? = 0 ]]; then
deepin-terminal -C "bash /opt/apps/com.gitee.uengine.runner.spark/files/uengine-installer"
fi
fi
fi