diff --git a/README.md b/README.md index 3f55221..3d5d9ca 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ MAA多账号管理与自动化软件 [![GitHub Issues](https://img.shields.io/github/issues/DLmaster361/AUTO_MAA?style=flat-square)](https://github.com/DLmaster361/AUTO_MAA/issues) [![GitHub Contributors](https://img.shields.io/github/contributors/DLmaster361/AUTO_MAA?style=flat-square)](https://github.com/DLmaster361/AUTO_MAA/graphs/contributors) [![GitHub License](https://img.shields.io/github/license/DLmaster361/AUTO_MAA?style=flat-square)](https://github.com/DLmaster361/AUTO_MAA/blob/main/LICENSE) +[![mirrorc](https://img.shields.io/badge/Mirror%E9%85%B1-%239af3f6?logo=countingworkspro&logoColor=4f46e5)](https://mirrorchyan.com/zh/projects?rid=AUTO_MAA) ## 软件介绍 diff --git a/app/core/config.py b/app/core/config.py index bae7513..7bd4886 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -609,7 +609,7 @@ class MaaUserConfig(QConfig): class AppConfig(GlobalConfig): - VERSION = "4.3.4.0" + VERSION = "4.3.5.1" gameid_refreshed = Signal() PASSWORD_refreshed = Signal() diff --git a/app/models/MAA.py b/app/models/MAA.py index 8b5f254..dcbead7 100644 --- a/app/models/MAA.py +++ b/app/models/MAA.py @@ -28,11 +28,12 @@ v4.3 from loguru import logger from PySide6.QtCore import QObject, Signal, QEventLoop, QFileSystemWatcher, QTimer import json -from datetime import datetime, timedelta import subprocess import shutil import time import re +import win32com.client +from datetime import datetime, timedelta from pathlib import Path from jinja2 import Environment, FileSystemLoader from typing import Union, List, Dict @@ -287,6 +288,41 @@ class MaaManager(QObject): self.emulator_arguments = set["Configurations"]["Default"][ "Start.EmulatorAddCommand" ].split() + # 如果是快捷方式,进行解析 + if ( + self.emulator_path.suffix == ".lnk" + and self.emulator_path.exists() + ): + try: + shell = win32com.client.Dispatch("WScript.Shell") + shortcut = shell.CreateShortcut(str(self.emulator_path)) + self.emulator_path = Path(shortcut.TargetPath) + self.emulator_arguments = shortcut.Arguments.split() + except Exception as e: + logger.error( + f"{self.name} | 解析快捷方式时出现异常:{e}" + ) + self.push_info_bar.emit( + "error", + "解析快捷方式时出现异常", + "请检查快捷方式", + -1, + ) + self.if_open_emulator = True + break + elif not self.emulator_path.exists(): + logger.error( + f"{self.name} | 模拟器快捷方式不存在:{self.emulator_path}" + ) + self.push_info_bar.emit( + "error", + "启动模拟器时出现异常", + "模拟器快捷方式不存在", + -1, + ) + self.if_open_emulator = True + break + self.ADB_path = Path( set["Configurations"]["Default"]["Connect.AdbPath"] ) diff --git a/resources/version.json b/resources/version.json index b0097fc..7d77e6e 100644 --- a/resources/version.json +++ b/resources/version.json @@ -1,93 +1,11 @@ { - "main_version": "4.3.4.0", + "main_version": "4.3.5.1", "updater_version": "1.0.0.0", "announcement": "\n## 新增功能\n- 屏蔽MuMu模拟器开屏广告功能上线\n- 更新器支持多线程下载\n- 添加强制关闭ADB与模拟器等增强任务项\n## 修复BUG\n- 修复统计信息HTML模板公招匹配错误\n- 修复密码显示按钮动画异常\n- 修复`检测到MAA未能实际执行任务`报错被异常屏蔽\n- 修复MAA超时判定异常失效\n## 程序优化\n- 关机等电源操作添加100s倒计时\n- 人工排查弹窗方法优化\n- 人工排查时自动屏蔽静默操作\n- 公告样式优化", "version_info": { - "4.3.4.0": { - "修复BUG": [ - "同步到MAAv5.15.4的tasks目录结构变化" - ] - }, - "4.3.4.7": { - "新增功能": [ - "主调度台支持直接启动多开调度台" - ], + "4.3.5.1": { "程序优化": [ - "历史记录保留时间选项扩展" - ] - }, - "4.3.4.6": { - "新增功能": [ - "历史记录添加`按周合并`、`按月合并`功能", - "新增MAA稳定版更新提醒" - ], - "修复BUG": [ - "修复历史记录选项卡无法回收的问题" - ], - "程序优化": [ - "历史记录添加`选中最近一月`、`选中最近一周`选项与打开日志文件所在目录功能", - "MAA报错判定结果文案拆分优化" - ] - }, - "4.3.4.5": { - "修复BUG": [ - "修复启动时运行主任务的历史记录与完成后任务异常" - ], - "程序优化": [ - "历史记录转为自行搜索", - "历史记录时间条目排序规则优化" - ] - }, - "4.3.4.4": { - "修复BUG": [ - "修复更新时主程序退出不彻底" - ], - "程序优化": [ - "ADB路径与模拟器路径添加报错提示", - "ADB路径兼容相对路径" - ] - }, - "4.3.4.3": { - "修复BUG": [ - "修复更新器使用mirrorc下载时删除已弃用的文件卡死" - ] - }, - "4.3.4.2": { - "程序优化": [ - "调度队列历史记录归入配置类管理", - "添加.gitignore", - "工作流删除冗余部分", - "自动代理与人工排查结束后MAA恢复到全局配置 #40", - "网络相关操作由子线程执行" - ] - }, - "4.3.4.1": { - "新增功能": [ - "开始任务前自动释放ADB端口" - ], - "程序优化": [ - "request 添加超时限制", - "用户任务运行流程改进", - "自动代理中模拟器改由AUTO_MAA控制", - "修正部分配置项文案" - ] - }, - "4.3.3.0": { - "修复BUG": [ - "修复更新器无法下载MAA的异常" - ], - "程序优化": [ - "自动发版改为手动触发" - ] - }, - "4.3.2.0": { - "修复BUG": [ - "修复更新器无法启动的异常" - ] - }, - "4.3.1.0": { - "修复BUG": [ - "覆盖规避v4.3.0错误包" + "模拟器路径适配快捷方式" ] } },