fix(ci): 适配新下载站模式

This commit is contained in:
DLmaster361
2025-05-06 17:42:24 +08:00
parent fd75dda2b1
commit 890886d62d
7 changed files with 113 additions and 133 deletions

View File

@@ -15,7 +15,7 @@
AppId={{D116A92A-E174-4699-B777-61C5FD837B19}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
AppVerName={#MyAppName}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
@@ -71,7 +71,7 @@ var
function InitializeUninstall: Boolean;
begin
DeleteDataQuestion := MsgBox('您是否要移除所有用户数据文件与子组件?', mbConfirmation, MB_YESNO) = IDYES;
DeleteDataQuestion := MsgBox('您确认要完全移除 AUTO_MAA 的所有用户数据文件与子组件', mbConfirmation, MB_YESNO) = IDYES;
Result := True;
end;
@@ -79,15 +79,11 @@ procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
if CurUninstallStep = usPostUninstall then
begin
if DeleteDataQuestion then
begin
DelTree(ExpandConstant('{app}\config'), True, True, True);
DelTree(ExpandConstant('{app}\data'), True, True, True);
DelTree(ExpandConstant('{app}\debug'), True, True, True);
DelTree(ExpandConstant('{app}\history'), True, True, True);
DelTree(ExpandConstant('{app}\script'), True, True, True);
end;
DelTree(ExpandConstant('{app}\app'), True, True, True);
DelTree(ExpandConstant('{app}\resources'), True, True, True);
if DeleteDataQuestion then
begin
DelTree(ExpandConstant('{app}'), True, True, True);
end;
end;
end;

View File

@@ -266,14 +266,14 @@ class DownloadManager(QDialog):
def run(self) -> None:
if self.name == "MAA":
self.download_task1()
elif self.name == "AUTO_MAA":
if self.name == "AUTO_MAA":
if self.config["mode"] == "Proxy":
self.test_speed_task1()
self.speed_test_accomplish.connect(self.download_task1)
elif self.config["mode"] == "MirrorChyan":
self.download_task1()
elif self.config["mode"] == "MirrorChyan":
self.download_task1()
def get_download_url(self, mode: str) -> Union[str, Dict[str, str]]:
"""获取下载链接"""
@@ -300,23 +300,6 @@ class DownloadManager(QDialog):
elif mode == "下载":
if self.name == "MAA":
if self.config["mode"] == "Proxy":
return f"https://jp-download.fearr.xyz/MAA/MAA-{version_text(self.version)}-win-x64.zip"
elif self.config["mode"] == "MirrorChyan":
with requests.get(
self.config["url"],
allow_redirects=True,
timeout=10,
stream=True,
) as response:
if response.status_code == 200:
return response.url
if self.name == "AUTO_MAA":
if self.config["mode"] == "Proxy":
@@ -349,6 +332,14 @@ class DownloadManager(QDialog):
if response.status_code == 200:
return response.url
elif self.config["mode"] == "MirrorChyan":
with requests.get(
self.config["url"], allow_redirects=True, timeout=10, stream=True
) as response:
if response.status_code == 200:
return response.url
def test_speed_task1(self) -> None:
if self.isInterruptionRequested: