Compare commits

..

18 Commits

Author SHA1 Message Date
DLmaster
c7072da81d 同步“启动MAA后直接最小化”字段 2024-12-27 20:48:54 +08:00
DLmaster
4c9b9fb74a tips文案更新 2024-12-25 23:03:29 +08:00
DLmaster
feb4b516a4 修复初始设置的异常 2024-12-24 22:28:40 +08:00
DLmaster
d50191c6b8 添加psutil库 2024-12-23 21:19:24 +08:00
DLmaster
3db3fa4e1f 后台静默代理功能上线 2024-12-23 20:30:12 +08:00
DLmaster
ad31961c2b 修正使用方法适配最新版本 2024-12-19 17:52:16 +08:00
DLmaster
ccdaefeb61 统一标点符号 2024-12-18 02:51:54 +08:00
DLmaster
8c9bcba198 修正更新器的若干问题 2024-12-18 02:41:40 +08:00
DLmaster
a273af0abe 更新器优化;添加邮件仅推送异常信息选项 2024-12-18 02:04:40 +08:00
DLmaster
05a063b001 修改配置方法 2024-12-14 13:41:15 +08:00
DLmaster
8487195512 调整通知停留时长 2024-12-10 20:48:09 +08:00
DLmaster
250c47ccb7 添加托盘中止任务选项 2024-12-10 19:59:12 +08:00
DLmaster
e5aeb4f3a7 添加托盘名称 2024-12-05 22:12:57 +08:00
DLmaster
eab8d984e6 Merge branch 'main' of https://github.com/DLmaster361/AUTO_MAA 2024-12-05 21:37:14 +08:00
DLmaster
6b3f19a618 修复浅色模式下UI异常 2024-12-05 21:35:32 +08:00
DLmaster
d5f8871064 重构MainTimer逻辑 2024-12-05 17:21:39 +08:00
DLmaster
77e899957c Merge pull request #11 from ClozyA/patch-1
fix: MAA项目地址
2024-12-04 15:54:23 +08:00
AoXuan
dd3515305c fix: MAA项目地址 2024-12-04 15:17:49 +08:00
8 changed files with 1236 additions and 771 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -66,7 +66,7 @@ MAA多账号管理与自动化软件
### 下载MAA
- 什么是MAA [官网](https://maa.plus/)/[GitHub](https://github.com/CHNZYX/Auto_Simulated_Universe/archive/refs/heads/main.zip)
- 什么是MAA [官网](https://maa.plus/)/[GitHub](https://github.com/MaaAssistantArknights/MaaAssistantArknights)
- MAA下载地址 [GitHub下载](https://github.com/MaaAssistantArknights/MaaAssistantArknights/releases)
@@ -134,7 +134,7 @@ MAA多账号管理与自动化软件
- `AUTO_MAA启动时禁止电脑休眠`:仅阻止电脑自动休眠,不会影响屏幕是否熄灭。
- `启动AUTO_MAA后直接代理`在AUTO_MAA启动后立即执行代理任务。
- `通过邮件通知结果`在AUTO_MAA完成任务后将结果发送至用户指定邮箱。
- `检查版本更新`从GitHub获取版本更新要求网络能够访问GitHub。获取版本信息时若遇网络不稳定主程序有概率未响应稍等片刻后恢复
- `检查版本更新`从GitHub镜像源获取版本更新信息,并调起更新器完成程序更新,更新器已支持多个代理地址
- `修改管理密钥`:修改管理密钥,当用户列表中无用户时,将跳过验证旧管理密钥。
#### 设置用户配置
@@ -142,9 +142,6 @@ MAA多账号管理与自动化软件
本项目已基本完成GUI开发您可以直接在用户管理页配置用户相关信息页面简介如下
- `新建``删除`:新建一个用户到当前用户配置列表、删除当前所选第一行所对应的用户。
- `转为高级/简洁`:将当前所选第一行所对应的用户转为高级/简洁配置模式。
- `修改配置`:修改更深层的用户配置信息,当前支持该项的有`简洁用户配置列表的自定义基建栏目``高级用户配置列表的日常、剿灭栏目`,详解如下:
- `简洁用户配置列表的自定义基建栏目`获取自定义基建的JSON文件。
- `高级用户配置列表的日常、剿灭栏目`打开MAA进行具体的任务配置配置方法参见上文。注意此时你还需要确保所要执行的任务被勾选。
- `显示密码`:输入管理密钥以显示用户密码,仅当管理密钥正确时能够修改`密码栏目`
- `刷新`:清除临时保存的管理密钥。
- `简洁用户配置列表`仅支持核心代理选项的设置其它设置选项沿用MAA的全局设置部分代理核心功能选项由程序托管。
@@ -159,7 +156,7 @@ MAA多账号管理与自动化软件
- `关卡``备选关卡-1``备选关卡-2`:关卡号。
- `日常`单独设定是否进行日常代理的日常部分可进一步配置MAA的具体代理任务该配置与全局MAA配置相互独立。
- `剿灭`单独设定是否进行日常代理的剿灭部分高级配置模式下可进一步配置MAA的具体代理任务该配置与全局MAA配置相互独立。
- `自定义基建`:是否启用自定义基建功能,进一步配置自定义基建文件,该配置与其他用户相互独立。
- `自定义基建`:是否启用自定义基建功能,需要进一步配置自定义基建文件,该配置与其他用户相互独立。
- `密码`:仅用于登记用户的密码,可留空。
- `备注`:用于备注用户信息。
@@ -234,4 +231,4 @@ MAA多账号管理与自动化软件
如果喜欢这个项目的话,给作者来杯咖啡吧!
![payid](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/payid.png "payid")
![payid](https://github.com/DLmaster361/AUTO_MAA/blob/main/res/README/payid.png "payid")

View File

@@ -31,6 +31,7 @@ import json
import zipfile
import requests
import subprocess
import time
from PySide6.QtWidgets import (
QApplication,
@@ -42,6 +43,8 @@ from PySide6.QtWidgets import (
from PySide6.QtGui import QIcon
from PySide6.QtCore import QObject, QThread, Signal
from package import version_text
class UpdateProcess(QThread):
@@ -49,15 +52,17 @@ class UpdateProcess(QThread):
progress = Signal(int, int, int)
accomplish = Signal()
def __init__(self, app_path, name, download_url, version):
def __init__(self, app_path, name, main_version, updater_version):
super(UpdateProcess, self).__init__()
self.app_path = app_path
self.name = name
self.download_url = download_url
self.version = version
self.download_path = f"{app_path}/AUTO_MAA_Update.zip" # 临时下载文件的路径
self.version_path = f"{app_path}/res/version.json"
self.main_version = main_version
self.updater_version = updater_version
self.download_path = os.path.normpath(
f"{app_path}/AUTO_MAA_Update.zip"
) # 临时下载文件的路径
self.version_path = os.path.normpath(f"{app_path}/res/version.json")
def run(self):
@@ -67,23 +72,70 @@ class UpdateProcess(QThread):
except FileNotFoundError:
pass
# 下载
self.info.emit("正在获取下载链接")
url_list = self.get_download_url()
# 验证下载地址并获取文件大小
for i in range(len(url_list)):
try:
self.info.emit(f"正在验证下载地址:{url_list[i]}")
response = requests.get(url_list[i], stream=True)
if response.status_code != 200:
self.info.emit(
f"连接失败,错误代码 {response.status_code} ,正在切换代理({i+1}/{len(url_list)}"
)
time.sleep(1)
continue
file_size = response.headers.get("Content-Length")
break
except requests.RequestException:
self.info.emit(f"请求超时,正在切换代理({i+1}/{len(url_list)}")
time.sleep(1)
else:
self.info.emit(f"连接失败,已尝试所有{len(url_list)}个代理")
return None
if file_size is None:
file_size = 1
else:
file_size = int(file_size)
try:
response = requests.get(self.download_url, stream=True)
file_size = response.headers.get("Content-Length")
if file_size is None:
file_size = 1
else:
file_size = int(file_size)
# 下载文件
with open(self.download_path, "wb") as f:
downloaded_size = 0
last_download_size = 0
speed = 0
last_time = time.time()
for chunk in response.iter_content(chunk_size=8192):
# 写入已下载数据
f.write(chunk)
downloaded_size += len(chunk)
self.info.emit(
f"正在下载:{self.name} 已下载: {downloaded_size / 1048576:.2f}/{file_size / 1048576:.2f} MB ({downloaded_size / file_size * 100:.2f}%)"
)
# 计算下载速度
if time.time() - last_time >= 1.0:
speed = (
(downloaded_size - last_download_size)
/ (time.time() - last_time)
/ 1024
)
last_download_size = downloaded_size
last_time = time.time()
# 更新下载进度
if speed >= 1024:
self.info.emit(
f"正在下载:{self.name} 已下载:{downloaded_size / 1048576:.2f}/{file_size / 1048576:.2f} MB {downloaded_size / file_size * 100:.2f}% 下载速度:{speed / 1024:.2f} MB/s",
)
else:
self.info.emit(
f"正在下载:{self.name} 已下载:{downloaded_size / 1048576:.2f}/{file_size / 1048576:.2f} MB {downloaded_size / file_size * 100:.2f}% 下载速度:{speed:.2f} KB/s",
)
self.progress.emit(0, 100, int(downloaded_size / file_size * 100))
except Exception as e:
e = str(e)
e = "\n".join([e[_ : _ + 75] for _ in range(0, len(e), 75)])
@@ -92,10 +144,17 @@ class UpdateProcess(QThread):
# 解压
try:
self.info.emit("正在解压更新文件")
self.progress.emit(0, 0, 0)
with zipfile.ZipFile(self.download_path, "r") as zip_ref:
zip_ref.extractall(self.app_path)
while True:
try:
self.info.emit("正在解压更新文件")
self.progress.emit(0, 0, 0)
with zipfile.ZipFile(self.download_path, "r") as zip_ref:
zip_ref.extractall(self.app_path)
break
except PermissionError:
self.info.emit("解压出错AUTO_MAA正在运行正在等待其关闭")
time.sleep(1)
self.info.emit("正在删除临时文件")
self.progress.emit(0, 0, 0)
@@ -103,7 +162,9 @@ class UpdateProcess(QThread):
self.info.emit(f"{self.name}更新成功!")
self.progress.emit(0, 100, 100)
except Exception as e:
e = str(e)
e = "\n".join([e[_ : _ + 75] for _ in range(0, len(e), 75)])
self.info.emit(f"解压更新时出错:\n{e}")
@@ -113,22 +174,78 @@ class UpdateProcess(QThread):
with open(self.version_path, "r", encoding="utf-8") as f:
version_info = json.load(f)
if self.name == "AUTO_MAA更新器":
version_info["updater_version"] = self.version
version_info["updater_version"] = ".".join(map(str, self.updater_version))
elif self.name == "AUTO_MAA主程序":
version_info["main_version"] = self.version
version_info["main_version"] = ".".join(map(str, self.main_version))
with open(self.version_path, "w", encoding="utf-8") as f:
json.dump(version_info, f, indent=4)
# 主程序更新完成后打开AUTO_MAA
if self.name == "AUTO_MAA主程序":
subprocess.Popen(
f"{self.app_path}/AUTO_MAA.exe",
os.path.normpath(f"{self.app_path}/AUTO_MAA.exe"),
shell=True,
creationflags=subprocess.CREATE_NO_WINDOW,
)
self.accomplish.emit()
def get_download_url(self):
"""获取下载链接"""
try_num = 3
for i in range(try_num):
try:
response = requests.get(
"https://gitee.com/DLmaster_361/AUTO_MAA/raw/main/res/version.json"
)
if response.status_code != 200:
self.info.emit(
f"连接失败,错误代码 {response.status_code} ,正在重试({i+1}/{try_num}"
)
time.sleep(0.1)
continue
version_remote = response.json()
PROXY_list = version_remote["proxy_list"]
break
except requests.RequestException:
self.info.emit(f"请求超时,正在重试({i+1}/{try_num}")
time.sleep(0.1)
except KeyError:
self.info.emit(f"未找到远端代理网址项,正在重试({i+1}/{try_num}")
time.sleep(0.1)
else:
self.info.emit("获取远端代理信息失败,将使用默认代理地址")
PROXY_list = [
"",
"https://gitproxy.click/",
"https://cdn.moran233.xyz/",
"https://gh.llkk.cc/",
"https://github.akams.cn/",
"https://www.ghproxy.cn/",
"https://ghp.ci/",
]
time.sleep(1)
url_list = []
if self.name == "AUTO_MAA主程序":
url_list.append(
f"https://gitee.com/DLmaster_361/AUTO_MAA/releases/download/{version_text(self.main_version)}/AUTO_MAA_{version_text(self.main_version)}.zip"
)
for i in range(len(PROXY_list)):
url_list.append(
f"{PROXY_list[i]}https://github.com/DLmaster361/AUTO_MAA/releases/download/{version_text(self.main_version)}/AUTO_MAA_{version_text(self.main_version)}.zip"
)
elif self.name == "AUTO_MAA更新器":
url_list.append(
f"https://gitee.com/DLmaster_361/AUTO_MAA/releases/download/{version_text(self.main_version)}/Updater_{version_text(self.updater_version)}.zip"
)
for i in range(len(PROXY_list)):
url_list.append(
f"{PROXY_list[i]}https://github.com/DLmaster361/AUTO_MAA/releases/download/{version_text(self.main_version)}/Updater_{version_text(self.updater_version)}.zip"
)
return url_list
class Updater(QObject):
@@ -137,8 +254,10 @@ class Updater(QObject):
self.ui = QDialog()
self.ui.setWindowTitle("AUTO_MAA更新器")
self.ui.resize(500, 70)
self.ui.setWindowIcon(QIcon(f"{app_path}/gui/ico/AUTO_MAA_Updater.ico"))
self.ui.resize(700, 70)
self.ui.setWindowIcon(
QIcon(os.path.normpath(f"{app_path}/gui/ico/AUTO_MAA_Updater.ico"))
)
# 创建垂直布局
self.Layout_v = QVBoxLayout(self.ui)
@@ -176,11 +295,13 @@ class AUTO_MAA_Updater(QApplication):
if __name__ == "__main__":
# 获取软件自身的路径
app_path = os.path.dirname(os.path.realpath(sys.argv[0])).replace("\\", "/")
app_path = os.path.normpath(os.path.dirname(os.path.realpath(sys.argv[0])))
# 从本地版本信息文件获取当前版本信息
if os.path.exists(f"{app_path}/res/version.json"):
with open(f"{app_path}/res/version.json", "r", encoding="utf-8") as f:
if os.path.exists(os.path.normpath(f"{app_path}/res/version.json")):
with open(
os.path.normpath(f"{app_path}/res/version.json"), "r", encoding="utf-8"
) as f:
version_current = json.load(f)
main_version_current = list(
map(int, version_current["main_version"].split("."))
@@ -189,18 +310,28 @@ if __name__ == "__main__":
main_version_current = [0, 0, 0, 0]
# 从远程服务器获取最新版本信息
response = requests.get(
"https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/blob/main/res/version.json"
)
version_remote = response.json()
main_version_remote = list(map(int, version_remote["main_version"].split(".")))
for _ in range(3):
try:
response = requests.get(
"https://gitee.com/DLmaster_361/AUTO_MAA/raw/main/res/version.json"
)
version_remote = response.json()
main_version_remote = list(
map(int, version_remote["main_version"].split("."))
)
break
except Exception as e:
err = e
time.sleep(0.1)
else:
sys.exit(f"获取版本信息时出错:\n{err}")
# 启动更新线程
if main_version_remote > main_version_current:
app = AUTO_MAA_Updater(
app_path,
"AUTO_MAA主程序",
version_remote["main_download_url"],
version_remote["main_version"],
main_version_remote,
"",
)
sys.exit(app.exec())

View File

@@ -59,13 +59,6 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_changeset">
<property name="text">
<string>修改配置</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@@ -106,7 +99,7 @@
<x>0</x>
<y>0</y>
<width>1156</width>
<height>546</height>
<height>542</height>
</rect>
</property>
<attribute name="label">
@@ -1055,84 +1048,7 @@
<property name="title">
<string>AUTO_MAA设置</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QFrame" name="frame_routine_3">
<property name="frameShape">
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_19">
<item>
<widget class="QCheckBox" name="checkBox_ifselfstart">
<property name="text">
<string>开机自动启动AUTO_MAA</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_14">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2">
<widget class="QFrame" name="frame_routine_2">
<property name="frameShape">
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_18">
<item>
<widget class="QCheckBox" name="checkBox_ifsleep">
<property name="text">
<string>AUTO_MAA启动时禁止电脑休眠</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_13">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="3">
<spacer name="horizontalSpacer_7">
<property name="orientation">
@@ -1146,6 +1062,136 @@
</property>
</spacer>
</item>
<item row="2" column="0" colspan="2">
<widget class="QFrame" name="frame_routine_5">
<property name="frameShape">
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_22" stretch="0,1,3">
<item>
<widget class="QCheckBox" name="checkBox_silence">
<property name="text">
<string>后台静默代理</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_16">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_boss">
<property name="placeholderText">
<string>安卓模拟器老板键</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="1">
<spacer name="horizontalSpacer_11">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>231</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="2" colspan="2">
<widget class="QFrame" name="frame_routine_6">
<property name="frameShape">
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_26" stretch="0,1,3,0">
<item>
<widget class="QCheckBox" name="checkBox_ifsendmail">
<property name="text">
<string>通过邮件通知结果</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_24">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_mailaddress">
<property name="placeholderText">
<string>收信邮箱地址</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_ifonlyerror">
<property name="text">
<string>仅推送异常信息</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="2">
<widget class="QFrame" name="frame_iftotray">
<property name="frameShape">
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_23">
<item>
<widget class="QCheckBox" name="checkBox_iftotray">
<property name="text">
<string>最小化到托盘</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_17">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>149</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QFrame" name="frame_routine_4">
<property name="frameShape">
@@ -1178,37 +1224,37 @@
</layout>
</widget>
</item>
<item row="1" column="1">
<spacer name="horizontalSpacer_11">
<item row="3" column="1">
<spacer name="horizontalSpacer_23">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>231</width>
<width>32</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="2" colspan="2">
<widget class="QFrame" name="frame_routine_5">
<item row="0" column="0">
<widget class="QFrame" name="frame_routine_3">
<property name="frameShape">
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_22" stretch="0,1,3">
<layout class="QHBoxLayout" name="horizontalLayout_19">
<item>
<widget class="QCheckBox" name="checkBox_ifsendmail">
<widget class="QCheckBox" name="checkBox_ifselfstart">
<property name="text">
<string>通过邮件通知结果</string>
<string>开机自动启动AUTO_MAA</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_16">
<spacer name="horizontalSpacer_14">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
@@ -1220,36 +1266,33 @@
</property>
</spacer>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_mailaddress"/>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QFrame" name="frame_iftotray">
<item row="0" column="2">
<widget class="QFrame" name="frame_routine_2">
<property name="frameShape">
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_23">
<layout class="QHBoxLayout" name="horizontalLayout_18">
<item>
<widget class="QCheckBox" name="checkBox_iftotray">
<widget class="QCheckBox" name="checkBox_ifsleep">
<property name="text">
<string>最小化到托盘</string>
<string>AUTO_MAA启动时禁止电脑休眠</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_17">
<spacer name="horizontalSpacer_13">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>149</width>
<width>40</width>
<height>20</height>
</size>
</property>
@@ -1258,7 +1301,7 @@
</layout>
</widget>
</item>
<item row="2" column="1">
<item row="1" column="3">
<spacer name="horizontalSpacer_12">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
@@ -1271,7 +1314,78 @@
</property>
</spacer>
</item>
<item row="2" column="2">
<item row="0" column="1">
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0">
<widget class="QFrame" name="frame_changePASSWORD">
<property name="frameShape">
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_25">
<item>
<spacer name="horizontalSpacer_21">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton_changePASSWORD">
<property name="text">
<string>修改管理密钥</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_22">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="3" column="3">
<spacer name="horizontalSpacer_25">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="2">
<widget class="QFrame" name="frame_check_update">
<property name="frameShape">
<enum>QFrame::Shape::StyledPanel</enum>
@@ -1316,35 +1430,6 @@
</layout>
</widget>
</item>
<item row="2" column="3">
<spacer name="horizontalSpacer_19">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>管理密钥</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QPushButton" name="pushButton_changePASSWORD">
<property name="text">
<string>修改管理密钥</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -1368,15 +1453,15 @@ li.checked::marker { content: &quot;\2612&quot;; }
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; 使用本程序前请先仔细阅读README.md。&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; 您可以通过设置AUTO_MAA定时执行并勾选最小化到托盘同时勾选MAA的启动MAA后直接最小化与最小化时隐藏至托盘来减少日常代理对电脑使用的影响但此时设置MAA时需要自行前往托盘区打开MAA界面。&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; 对于B服用户由于我们无权替您同意用户协议若出现用户协议弹窗您需要自行完成确认否则可能造成MAA卡死代理任务失败。&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; 由于用户与项目贡献者的稀缺,我们无法确保正式版足够完善,还望谅解。遇到严重漏洞,请先确保当前为最新版本。&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; 由于用户与项目贡献者的稀缺,我们无法确保正式版足够完善,还望谅解。遇到问题时请先更新到最新版本试试。若仍无法解决请在官方仓库发布Issues求助。&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; 您还可以通过官方仓库 &lt;a href=&quot;https://github.com/DLmaster361/AUTO_MAA/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007ad6;&quot;&gt;DLmaster361/AUTO_MAA&lt;/span&gt;&lt;/a&gt; 发布Issues求助。&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; 官方仓库&lt;a href=&quot;https://github.com/DLmaster361/AUTO_MAA/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#004194;&quot;&gt;DLmaster361/AUTO_MAA&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; 官方QQ交流群957750551&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; 官方QQ交流群&lt;a href=&quot;https://qm.qq.com/cgi-bin/qm/qr?k=EET-OL_o52KPlDLEmbzaNkKUXuyQ4WZY&amp;amp;jump_from=webapi&amp;amp;authKey=6NxGwEu9JAOLHqfdEmNfrZy4tUvC/3ar2j5+Go7Hgf3j+ntAK1VS6SUOLOjYVKTt&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#004194;&quot;&gt;957750551&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; 友情推荐项目:&lt;a href=&quot;https://git.zhaozuohong.vip/mower-ng&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#004194;&quot;&gt;zhaozuohong/mower-ng&lt;/span&gt;&lt;/a&gt; 、 &lt;a href=&quot;https://github.com/AegirTech/ArkLights&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#004194;&quot;&gt;AegirTech/ArkLights&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;right&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;DLmaster&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
@@ -1385,7 +1470,7 @@ li.checked::marker { content: &quot;\2612&quot;; }
<item>
<widget class="QLabel" name="label_notice">
<property name="text">
<string>注意:在用户管理页与设置页执行的所有更改,不会对正在执行的任务生效。</string>
<string>注意:在设置页执行的所有更改,不会对正在执行的任务生效;正在执行任务时,用户管理页无法编辑。</string>
</property>
</widget>
</item>

View File

@@ -38,29 +38,31 @@ def version_text(version_numb):
return version
with open("res/version.json", "r", encoding="utf-8") as f:
version = json.load(f)
if __name__ == "__main__":
main_version_numb = list(map(int, version["main_version"].split(".")))
updater_version_numb = list(map(int, version["updater_version"].split(".")))
with open("res/version.json", "r", encoding="utf-8") as f:
version = json.load(f)
main_info = f"# UTF-8\n#\nVSVersionInfo(\n ffi=FixedFileInfo(\n # filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)\n # Set not needed items to zero 0.\n filevers=({', '.join(str(_) for _ in main_version_numb)}),\n prodvers=(0, 0, 0, 0),\n # Contains a bitmask that specifies the valid bits 'flags'r\n mask=0x3f,\n # Contains a bitmask that specifies the Boolean attributes of the file.\n flags=0x0,\n # The operating system for which this file was designed.\n # 0x4 - NT and there is no need to change it.\n OS=0x4,\n # The general type of file.\n # 0x1 - the file is an application.\n fileType=0x1,\n # The function of the file.\n # 0x0 - the function is not defined for this fileType\n subtype=0x0,\n # Creation date and time stamp.\n date=(0, 0)\n ),\n kids=[\n VarFileInfo([VarStruct('Translation', [0, 1200])]), \n StringFileInfo(\n [\n StringTable(\n '000004b0',\n [StringStruct('Comments', 'https://github.com/DLmaster361/AUTO_MAA/'),\n StringStruct('CompanyName', 'AUTO_MAA Team'),\n StringStruct('FileDescription', 'AUTO_MAA Component'),\n StringStruct('FileVersion', '{version["main_version"]}'),\n StringStruct('InternalName', 'AUTO_MAA'),\n StringStruct('LegalCopyright', 'Copyright © 2024 DLmaster361'),\n StringStruct('OriginalFilename', 'AUTO_MAA.py'),\n StringStruct('ProductName', 'AUTO_MAA'),\n StringStruct('ProductVersion', 'v{version["main_version"]}'),\n StringStruct('Assembly Version', 'v{version["main_version"]}')])\n ])\n ]\n)"
updater_info = f"# UTF-8\n#\nVSVersionInfo(\n ffi=FixedFileInfo(\n # filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)\n # Set not needed items to zero 0.\n filevers=({', '.join(str(_) for _ in updater_version_numb)}),\n prodvers=(0, 0, 0, 0),\n # Contains a bitmask that specifies the valid bits 'flags'r\n mask=0x3f,\n # Contains a bitmask that specifies the Boolean attributes of the file.\n flags=0x0,\n # The operating system for which this file was designed.\n # 0x4 - NT and there is no need to change it.\n OS=0x4,\n # The general type of file.\n # 0x1 - the file is an application.\n fileType=0x1,\n # The function of the file.\n # 0x0 - the function is not defined for this fileType\n subtype=0x0,\n # Creation date and time stamp.\n date=(0, 0)\n ),\n kids=[\n VarFileInfo([VarStruct('Translation', [0, 1200])]), \n StringFileInfo(\n [\n StringTable(\n '000004b0',\n [StringStruct('Comments', 'https://github.com/DLmaster361/AUTO_MAA/'),\n StringStruct('CompanyName', 'AUTO_MAA Team'),\n StringStruct('FileDescription', 'AUTO_MAA Component'),\n StringStruct('FileVersion', '{version["updater_version"]}'),\n StringStruct('InternalName', 'AUTO_MAA_Updater'),\n StringStruct('LegalCopyright', 'Copyright © 2024 DLmaster361'),\n StringStruct('OriginalFilename', 'Updater.py'),\n StringStruct('ProductName', 'AUTO_MAA_Updater'),\n StringStruct('ProductVersion', 'v{version["updater_version"]}'),\n StringStruct('Assembly Version', 'v{version["updater_version"]}')])\n ])\n ]\n)"
main_version_numb = list(map(int, version["main_version"].split(".")))
updater_version_numb = list(map(int, version["updater_version"].split(".")))
with open("AUTO_MAA_info.txt", "w", encoding="utf-8") as f:
print(main_info, end="", file=f)
with open("Updater_info.txt", "w", encoding="utf-8") as f:
print(updater_info, end="", file=f)
main_info = f"# UTF-8\n#\nVSVersionInfo(\n ffi=FixedFileInfo(\n # filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)\n # Set not needed items to zero 0.\n filevers=({', '.join(str(_) for _ in main_version_numb)}),\n prodvers=(0, 0, 0, 0),\n # Contains a bitmask that specifies the valid bits 'flags'r\n mask=0x3f,\n # Contains a bitmask that specifies the Boolean attributes of the file.\n flags=0x0,\n # The operating system for which this file was designed.\n # 0x4 - NT and there is no need to change it.\n OS=0x4,\n # The general type of file.\n # 0x1 - the file is an application.\n fileType=0x1,\n # The function of the file.\n # 0x0 - the function is not defined for this fileType\n subtype=0x0,\n # Creation date and time stamp.\n date=(0, 0)\n ),\n kids=[\n VarFileInfo([VarStruct('Translation', [0, 1200])]), \n StringFileInfo(\n [\n StringTable(\n '000004b0',\n [StringStruct('Comments', 'https://github.com/DLmaster361/AUTO_MAA/'),\n StringStruct('CompanyName', 'AUTO_MAA Team'),\n StringStruct('FileDescription', 'AUTO_MAA Component'),\n StringStruct('FileVersion', '{version["main_version"]}'),\n StringStruct('InternalName', 'AUTO_MAA'),\n StringStruct('LegalCopyright', 'Copyright © 2024 DLmaster361'),\n StringStruct('OriginalFilename', 'AUTO_MAA.py'),\n StringStruct('ProductName', 'AUTO_MAA'),\n StringStruct('ProductVersion', 'v{version["main_version"]}'),\n StringStruct('Assembly Version', 'v{version["main_version"]}')])\n ])\n ]\n)"
updater_info = f"# UTF-8\n#\nVSVersionInfo(\n ffi=FixedFileInfo(\n # filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)\n # Set not needed items to zero 0.\n filevers=({', '.join(str(_) for _ in updater_version_numb)}),\n prodvers=(0, 0, 0, 0),\n # Contains a bitmask that specifies the valid bits 'flags'r\n mask=0x3f,\n # Contains a bitmask that specifies the Boolean attributes of the file.\n flags=0x0,\n # The operating system for which this file was designed.\n # 0x4 - NT and there is no need to change it.\n OS=0x4,\n # The general type of file.\n # 0x1 - the file is an application.\n fileType=0x1,\n # The function of the file.\n # 0x0 - the function is not defined for this fileType\n subtype=0x0,\n # Creation date and time stamp.\n date=(0, 0)\n ),\n kids=[\n VarFileInfo([VarStruct('Translation', [0, 1200])]), \n StringFileInfo(\n [\n StringTable(\n '000004b0',\n [StringStruct('Comments', 'https://github.com/DLmaster361/AUTO_MAA/'),\n StringStruct('CompanyName', 'AUTO_MAA Team'),\n StringStruct('FileDescription', 'AUTO_MAA Component'),\n StringStruct('FileVersion', '{version["updater_version"]}'),\n StringStruct('InternalName', 'AUTO_MAA_Updater'),\n StringStruct('LegalCopyright', 'Copyright © 2024 DLmaster361'),\n StringStruct('OriginalFilename', 'Updater.py'),\n StringStruct('ProductName', 'AUTO_MAA_Updater'),\n StringStruct('ProductVersion', 'v{version["updater_version"]}'),\n StringStruct('Assembly Version', 'v{version["updater_version"]}')])\n ])\n ]\n)"
os.system(
"pyinstaller -F --version-file AUTO_MAA_info.txt -w --icon=gui/ico/AUTO_MAA.ico AUTO_MAA.py --hidden-import plyer.platforms.win.notification"
)
os.system(
"pyinstaller -F --version-file Updater_info.txt -w --icon=gui/ico/AUTO_MAA_Updater.ico Updater.py"
)
with open("AUTO_MAA_info.txt", "w", encoding="utf-8") as f:
print(main_info, end="", file=f)
with open("Updater_info.txt", "w", encoding="utf-8") as f:
print(updater_info, end="", file=f)
with open("update_info.txt", "w", encoding="utf-8") as f:
print(
f"{version_text(main_version_numb)}\n{version_text(updater_version_numb)}{version["announcement"]}",
file=f,
os.system(
"pyinstaller -F --version-file AUTO_MAA_info.txt -w --icon=gui/ico/AUTO_MAA.ico AUTO_MAA.py --hidden-import plyer.platforms.win.notification"
)
os.system(
"pyinstaller -F --version-file Updater_info.txt -w --icon=gui/ico/AUTO_MAA_Updater.ico Updater.py"
)
with open("update_info.txt", "w", encoding="utf-8") as f:
print(
f"{version_text(main_version_numb)}\n{version_text(updater_version_numb)}{version["announcement"]}",
file=f,
)

View File

@@ -1,5 +1,8 @@
plyer
PySide6
psutil
pywin32
pyautogui
pycryptodome
pyinstaller
requests

View File

@@ -36,4 +36,7 @@
"VersionUpdate.AutoInstallUpdatePackage": "True" #自动安装更新包
"Start.RunDirectly": "True" #启动MAA后直接运行
"Start.MinimizeDirectly": "True" #启动MAA后直接最小化
"Start.OpenEmulatorAfterLaunch": "True" #启动MAA后自动开启模拟器
"Start.OpenEmulatorAfterLaunch": "True" #启动MAA后自动开启模拟器
"GUI.UseTray": "True" #显示托盘图标
"GUI.MinimizeToTray": "False" #最小化时隐藏至托盘
"Start.EmulatorPath" #模拟器路径

View File

@@ -1,7 +1,14 @@
{
"main_version": "4.1.3.1",
"main_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.3_beta/AUTO_MAA_v4.1.3_beta.zip",
"updater_version": "1.0.5.0",
"updater_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.3_beta/Updater_v1.0.5.zip",
"announcement": "\n## 新增功能\n- 暂无\n## 修复BUG\n- 修复深色模式下UI异常 #10\n## 程序优化\n- 暂无"
"main_version": "4.1.4.0",
"updater_version": "1.0.5.2",
"announcement": "\n## 新增功能\n- 添加托盘中止当前任务选项\n- 添加邮件仅推送异常信息选项\n- 后台静默代理功能上线\n## 修复BUG\n- 修复深色模式下UI异常 #10\n- 同步MAA`启动MAA后直接最小化`字段修改\n## 程序优化\n- MainTimer逻辑实现优化\n- 修改配置方法优化\n- 代理逻辑优化\n- 更新器添加更多代理地址,更新流程优化,可获取远端代理地址\n- 路径跨平台适配",
"proxy_list":[
"",
"https://gitproxy.click/",
"https://cdn.moran233.xyz/",
"https://gh.llkk.cc/",
"https://github.akams.cn/",
"https://www.ghproxy.cn/",
"https://ghp.ci/"
]
}