更新installsh

This commit is contained in:
gfdgd_xi 2023-01-19 12:56:05 +08:00
parent 952e2c2567
commit 01d73eb2ab
2 changed files with 17 additions and 1 deletions

View File

@ -3,5 +3,10 @@ find . -name '*.deb' | xargs sudo dpkg -i
sudo apt-mark hold lxc lxc-templates liblxc1 liblxc-common lxc-utils
sudo apt install -f -y
sudo apt install libdframeworkdbus2 screen libnotify-bin -y
which uengine
if [[ $? != 0 ]]; then
echo UEngine 安装失败!
sudo rm -v /usr/bin/uengine-loading-ubuntu
exit
fi
echo "请重启并换成5.17内核然后运行launch_uengine.sh即可启动"

View File

@ -14,9 +14,20 @@ unset WAYLAND_DISPLAYCOPY
XDG_CURRENT_DESKTOP="Deepin"
export LD_LIBRARY_PATH=/usr/share/uengine/lib64/
# 判断 UEngine 是否被正确安装
which uengine
if [[ $? != 0 ]]; then
notify-send -i /opt/apps/com.gitee.uengine.runner.spark/files/icon.png "未安装 UEngine结束" -a uengine-runner
exit
fi
notify-send -i /opt/apps/com.gitee.uengine.runner.spark/files/icon.png "UEngine 服务启动完成" -a uengine-runner
# 守护进程,防止异常退出
while [[ true ]]; do
uengine session-manager -platformtheme=deepin
# 让用户可以强制结束
if [[ -f "/tmp/uengine-loading-ubuntu-end" ]]; then
rm /tmp/uengine-loading-ubuntu-end
notify-send -i /opt/apps/com.gitee.uengine.runner.spark/files/icon.png "UEngine 服务异常崩溃,不再重启服务" -a uengine-runner
break
fi
notify-send -i /opt/apps/com.gitee.uengine.runner.spark/files/icon.png "UEngine 服务异常结束,重新启动" -a uengine-runner
done