新增移除在 Ubuntu 上安装的 UEngine 及其附属脚本
This commit is contained in:
parent
eace52cc35
commit
091ed12f53
2
Makefile
2
Makefile
|
@ -51,6 +51,8 @@ build:
|
|||
cp -rv run-program-without-wayland.sh new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv ProgramFen.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv Icon new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv CompareVersion.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv uengine-remove.sh new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
rm -rfv new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Help/information
|
||||
python3 RemovePycacheFile.py #new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv new-deb-build /tmp/uengine-runner-builder
|
||||
|
|
|
@ -1981,6 +1981,7 @@ uengineCheckCpu = QtWidgets.QAction(QtGui.QIcon.fromTheme("cpu"), langFile[lang]
|
|||
uengineDeleteUengineCheck = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][9])
|
||||
uengineReinstall = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][10])
|
||||
uengineUbuntuInstall = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][14])
|
||||
uengineUbuntuRemove = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), "移除在 Ubuntu 上安装的 UEngine 及其附属脚本")
|
||||
uengineUbuntuInstallRoot = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), "在 Ubuntu 上安装 UEngine(SuperSU 镜像)")
|
||||
uengineWindowSizeSetting = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][16])
|
||||
uengine.addAction(uengineOpenDebBuilder)
|
||||
|
@ -1990,6 +1991,7 @@ uengine.addAction(uengineCheckCpu)
|
|||
uengine.addSeparator()
|
||||
uengine.addAction(uengineUbuntuInstall)
|
||||
uengine.addAction(uengineUbuntuInstallRoot)
|
||||
uengine.addAction(uengineUbuntuRemove)
|
||||
uengine.addSeparator()
|
||||
uengine.addAction(uengineWindowSizeSetting)
|
||||
uengine.addSeparator()
|
||||
|
@ -2011,6 +2013,7 @@ uengineRoot = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["M
|
|||
# 绑定信号
|
||||
uengineAllowOrDisallowUpdateAndroidApp.triggered.connect(AllowOrDisallowUpdateAndroidApp)
|
||||
uengineSetHttpProxy.triggered.connect(SetHttpProxy)
|
||||
uengineUbuntuRemove.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"bash '{programPath}/uengine-remove.sh'"]).start())
|
||||
uengineOpenDebBuilder.triggered.connect(OpenUengineDebBuilder)
|
||||
uengineOpenDebBuilderMore.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/uengine-apk-builder-more'"]).start())
|
||||
uengineKeyboardToMouse.triggered.connect(KeyboardToMouse)
|
||||
|
|
|
@ -23,6 +23,7 @@ ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-applist-laun
|
|||
# 移除安装错误的 UEngine Ubuntu 补丁
|
||||
which uengine
|
||||
if [[ $? != 0 ]] && [[ -f /usr/bin/uengine-loading-ubuntu ]]; then
|
||||
echo 移除错误的 UEngine Ubuntu 补丁
|
||||
# 移除补丁
|
||||
rm /usr/share/applications/uengine-loading-ubuntu.desktop
|
||||
rm /etc/xdg/autostart/uengine-loading-ubuntu.desktop
|
||||
|
@ -30,11 +31,12 @@ if [[ $? != 0 ]] && [[ -f /usr/bin/uengine-loading-ubuntu ]]; then
|
|||
for username in $(ls /home)
|
||||
do
|
||||
echo /home/$username
|
||||
sudo rm /home/$username/uengine-launch/run_daemon.sh
|
||||
rm /home/$username/uengine-launch/run_daemon.sh
|
||||
done
|
||||
fi
|
||||
# 更新 uengine-loading-ubuntu(如果存在)
|
||||
if [[ -f /usr/bin/uengine-loading-ubuntu ]]; then
|
||||
echo 更新 uengine-loading-ubuntu
|
||||
if [ -f /tmp/upgrade-uengine-loading-ubuntu ]; then
|
||||
rm /tmp/upgrade-uengine-loading-ubuntu
|
||||
fi
|
||||
|
@ -42,8 +44,14 @@ if [[ -f /usr/bin/uengine-loading-ubuntu ]]; then
|
|||
aria2c -x 16 -s 16 -d /tmp -o upgrade-uengine-loading-ubuntu https://code.gitlink.org.cn/gfdgd_xi/uengine-installer-bak/raw/branch/master/run_daemon.sh
|
||||
if [ $? == 0 ]; then
|
||||
# 替换
|
||||
sudo cp /tmp/upgrade-uengine-loading-ubuntu /usr/bin/uengine-loading-ubuntu
|
||||
sudo chmod 755 /usr/bin/uengine-loading-ubuntu
|
||||
cp /tmp/upgrade-uengine-loading-ubuntu /usr/bin/uengine-loading-ubuntu
|
||||
chmod 755 /usr/bin/uengine-loading-ubuntu
|
||||
for username in $(ls /home)
|
||||
do
|
||||
echo /home/$username
|
||||
cp /usr/bin/uengine-loading-ubuntu /home/$username/uengine-launch/run_daemon.sh
|
||||
chmod 755 /home/$username/uengine-launch/run_daemon.sh
|
||||
done
|
||||
fi
|
||||
rm /tmp/upgrade-uengine-loading-ubuntu
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue