feat: 优化更新方式

This commit is contained in:
DLmaster361
2025-05-09 14:54:09 +08:00
parent 890886d62d
commit fbfdc6aa12
12 changed files with 158 additions and 344 deletions

View File

@@ -28,7 +28,6 @@ v4.3
from loguru import logger
from PySide6.QtWidgets import QApplication, QSystemTrayIcon
from qfluentwidgets import (
qconfig,
Action,
SystemTrayMenu,
SplashScreen,
@@ -182,7 +181,7 @@ class AUTO_MAA(MSFluentWindow):
Action(
FluentIcon.POWER_BUTTON,
"退出主程序",
triggered=lambda: (self.window().close(), QApplication.quit()),
triggered=lambda: System.set_power("KillSelf"),
)
)
@@ -247,10 +246,10 @@ class AUTO_MAA(MSFluentWindow):
# 清理旧日志
self.clean_old_logs()
# 清理临时更新器
if (Config.app_path / "AUTO_Updater.active.exe").exists():
# 清理安装包
if (Config.app_path / "AUTO_MAA-Setup.exe").exists():
try:
(Config.app_path / "AUTO_Updater.active.exe").unlink()
(Config.app_path / "AUTO_MAA-Setup.exe").unlink()
except Exception:
pass