完成主程序更新后打开AUTO_MAA

This commit is contained in:
DLmaster
2024-11-10 01:46:38 +08:00
parent 2c9a7c443f
commit 179b33387e
2 changed files with 9 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ import sys
import json
import zipfile
import requests
import subprocess
from PySide6.QtWidgets import (
QApplication,
@@ -118,6 +119,13 @@ class UpdateProcess(QThread):
with open(self.version_path, "w", encoding="utf-8") as f:
json.dump(version_info, f, indent=4)
if self.name == "AUTO_MAA主程序":
subprocess.Popen(
f"{self.app_path}/AUTO_MAA.exe",
shell=True,
creationflags=subprocess.CREATE_NO_WINDOW,
)
self.accomplish.emit()