2023-01-16 13:43:30 +08:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
# 使用系统默认的 bash 运行
|
|
|
|
|
#################################################################################################################
|
2023-04-24 21:53:08 +08:00
|
|
|
|
# 作者:gfdgd xi
|
2023-01-16 13:43:30 +08:00
|
|
|
|
# 版本:2.0.0
|
|
|
|
|
# 更新时间:2022年01月16日
|
|
|
|
|
# 基于 bash
|
|
|
|
|
#################################################################################################################
|
2021-08-19 14:08:05 +08:00
|
|
|
|
# 删除软链接
|
2022-08-30 21:26:04 +08:00
|
|
|
|
rm -f /usr/bin/uengine-runner
|
|
|
|
|
rm -f /usr/bin/uengine-apk-builder
|
|
|
|
|
rm -f /usr/bin/uengine-app-uninstall
|
|
|
|
|
rm -f /usr/bin/uengine-app-install
|
|
|
|
|
rm -f /usr/bin/uengine-clean
|
|
|
|
|
rm -f /usr/bin/uengine-runner-about
|
|
|
|
|
rm -f /usr/bin/uengine-keyboard
|
|
|
|
|
rm -f /usr/bin/uengine-useadb
|
|
|
|
|
rm -f /usr/bin/uengine-runner-launch.sh
|
|
|
|
|
rm -f /usr/bin/uengine-runner-update-bug
|
|
|
|
|
rm -f /usr/bin/uengine-root
|
|
|
|
|
rm -fr /opt/apps/com.gitee.uengine.runner.spark/files/api/__pycache__
|
|
|
|
|
rm -fr /opt/apps/com.gitee.uengine.runner.spark/files/__pycache__
|
|
|
|
|
rm -f /usr/bin/uengine-runner-applist-launch.sh
|
2023-01-16 13:43:30 +08:00
|
|
|
|
rm -f /usr/bin/uengine-runner-auto-install-bash
|
2023-07-06 11:28:09 +08:00
|
|
|
|
#rm -f /usr/bin/uengine-loading-ubuntu
|
2023-01-16 13:43:30 +08:00
|
|
|
|
# 删除软件残留,简单粗暴一点直接全部删掉,防止出现警告
|
|
|
|
|
# 加判断是为了怕 reinstall 后程序就再也打不开了(除非卸载后重新安装)
|
|
|
|
|
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
|
|
|
|
|
rm -rf /opt/apps/com.gitee.uengine.runner.spark
|
2024-01-30 11:19:53 +08:00
|
|
|
|
# 移除 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
|
2023-01-16 13:43:30 +08:00
|
|
|
|
fi
|
2022-09-10 18:33:31 +08:00
|
|
|
|
# 删除软件配置文件(只限“purge”)
|
|
|
|
|
# 配置目录:~/.config/uengine-runner
|
|
|
|
|
if [ "$1" = "purge" ]; then
|
|
|
|
|
|
|
|
|
|
echo "清理程序配置文件"
|
|
|
|
|
|
|
|
|
|
for username in $(ls /home); do
|
|
|
|
|
echo /home/$username
|
|
|
|
|
if [ -d "/home/$username/.config/uengine-runner/" ]; then
|
|
|
|
|
rm -rf "/home/$username/.config/uengine-runner/"
|
2023-01-19 22:21:47 +08:00
|
|
|
|
# 删除 QWebEngine 记录
|
2023-01-18 15:55:10 +08:00
|
|
|
|
rm -rf "/home/$username/.local/share/uengine-runner"
|
|
|
|
|
rm -rf "/home/$username/.local/share/AutoConfig.py"
|
2023-01-19 22:21:47 +08:00
|
|
|
|
rm -rf "/home/$username/.config/share/uengine-runner"
|
|
|
|
|
rm -rf "/home/$username/.config/share/AutoConfig.py"
|
|
|
|
|
rm -rf "/home/$username/.cache/share/uengine-runner"
|
|
|
|
|
rm -rf "/home/$username/.cache/share/AutoConfig.py"
|
2022-09-10 18:33:31 +08:00
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
# 清理 root 用户的配置文件
|
|
|
|
|
echo /root
|
|
|
|
|
if [ -d "/root/.config/uengine-runner/" ]; then
|
|
|
|
|
rm -rf "/root/.config/uengine-runner/"
|
2023-01-19 22:21:47 +08:00
|
|
|
|
rm -rf "/root/.local/share/uengine-runner"
|
|
|
|
|
rm -rf "/root/.local/share/AutoConfig.py"
|
|
|
|
|
rm -rf "/root/.config/share/uengine-runner"
|
|
|
|
|
rm -rf "/root/.config/share/AutoConfig.py"
|
|
|
|
|
rm -rf "/root/.cache/share/uengine-runner"
|
|
|
|
|
rm -rf "/root/.cache/share/AutoConfig.py"
|
2022-09-10 18:33:31 +08:00
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
echo "非 purge,跳过清理"
|
|
|
|
|
fi
|
2024-01-30 10:15:14 +08:00
|
|
|
|
# 自动卸载 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
|
2021-10-05 18:16:50 +08:00
|
|
|
|
# 刷新图标缓存
|
2022-06-19 21:20:28 +08:00
|
|
|
|
# 因为 Ubuntu 的问题,省略
|
2022-06-22 12:18:26 +08:00
|
|
|
|
gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true
|