Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c4e5eb5cc | ||
|
|
cd42f45a1f | ||
|
|
ec38895765 | ||
|
|
fc30579bbc | ||
|
|
3e6223e4e5 | ||
|
|
27c71124ff | ||
|
|
3a8a8a36f5 | ||
|
|
ed6de5e806 | ||
|
|
bf8a5befa3 | ||
|
|
a3fe641f6b | ||
|
|
f4f99c25db | ||
|
|
640d80e334 | ||
|
|
4f196b516f | ||
|
|
87f07bf95c | ||
|
|
1bfd7891b5 | ||
|
|
472eb0ee52 | ||
|
|
7638c67da6 | ||
|
|
7a0c143b5b | ||
|
|
fff8e11524 | ||
|
|
af24208cf3 | ||
|
|
85bccea2dd | ||
|
|
f7c8cac6ec | ||
|
|
97a5ac5bb0 | ||
|
|
1d57076010 | ||
|
|
d298ac872c | ||
|
|
c0581e781c | ||
|
|
6befd6341a | ||
|
|
504ef8dd68 | ||
|
|
127500d890 | ||
|
|
ab94173df7 | ||
|
|
e50697aae1 | ||
|
|
c71389fc0b | ||
|
|
732129ba34 | ||
|
|
77dfc895ed |
51
.github/workflows/python-app.yml
vendored
@@ -41,6 +41,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Repo Check
|
||||
id: repo_check
|
||||
run: |
|
||||
if [[ "$GITHUB_REPOSITORY" != "DLmaster361/AUTO_MAA" ]]; then
|
||||
echo "When forking this repository to make your own builds, you have to adjust this check."
|
||||
@@ -69,21 +70,39 @@ jobs:
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
- name: Built with pyinstaller
|
||||
id: built_with_pyinstaller
|
||||
run: |
|
||||
pyinstaller -F --version-file res/info.txt -w --icon=res/AUTO_MAA.ico AUTO_MAA.py
|
||||
python package.py
|
||||
- name: Read version
|
||||
id: read_version
|
||||
run: |
|
||||
$VERSION=(Get-Content -Path "更新说明.txt" -TotalCount 1).Trim()
|
||||
"version=$VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
$MAIN_VERSION=(Get-Content -Path "update_info.txt" -TotalCount 1).Trim()
|
||||
"AUTO_MAA_version=$MAIN_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
$UPDATER_VERSION=(Get-Content -Path "update_info.txt" -TotalCount 2 | Select-Object -Index 1).Trim()
|
||||
"updater_version=$UPDATER_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append
|
||||
- name: Create Zip
|
||||
id: create_zip
|
||||
run: |
|
||||
Compress-Archive -Path data,gui,res,AUTO_MAA.py,dist/AUTO_MAA.exe,requirements.txt,README.md,LICENSE,更新说明.txt -DestinationPath AUTO_MAA_${{ env.version }}.zip
|
||||
move gui\ui\updater.ui .\
|
||||
move gui\ico\AUTO_MAA_Updater.ico .\
|
||||
Compress-Archive -Path gui,res,AUTO_MAA.py,Updater.py,package.py,dist/AUTO_MAA.exe,requirements.txt,README.md,LICENSE -DestinationPath AUTO_MAA_${{ env.AUTO_MAA_version }}.zip
|
||||
del gui\ui\main.ui
|
||||
del gui\ico\AUTO_MAA.ico
|
||||
move updater.ui gui\ui
|
||||
move AUTO_MAA_Updater.ico gui\ico
|
||||
Compress-Archive -Path gui,dist/Updater.exe -DestinationPath Updater_${{ env.updater_version }}.zip
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: AUTO_MAA_${{ env.version }}
|
||||
path: AUTO_MAA_${{ env.version }}.zip
|
||||
name: AUTO_MAA_${{ env.AUTO_MAA_version }}
|
||||
path: |
|
||||
AUTO_MAA_${{ env.AUTO_MAA_version }}.zip
|
||||
Updater_${{ env.updater_version }}.zip
|
||||
- name: Upload Update_Info Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: update_info
|
||||
path: update_info.txt
|
||||
publish_release:
|
||||
name: Publish release
|
||||
needs: build_AUTO_MAA
|
||||
@@ -97,10 +116,15 @@ jobs:
|
||||
pattern: AUTO_MAA_*
|
||||
merge-multiple: true
|
||||
path: artifacts
|
||||
- name: Download Update_Info
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: update_info
|
||||
path: ./
|
||||
- name: Check if release exists
|
||||
id: check_if_release_exists
|
||||
run: |
|
||||
release_id=$(gh release view $(head -n 1 更新说明.txt) --json id --jq .id || true)
|
||||
release_id=$(gh release view $(sed 's/\r$//g' <(head -n 1 update_info.txt)) --json id --jq .id || true)
|
||||
if [[ -z $release_id ]]; then
|
||||
echo "release_exists=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
@@ -114,22 +138,23 @@ jobs:
|
||||
run: |
|
||||
set -xe
|
||||
shopt -s nullglob
|
||||
NAME="$(head -n 1 更新说明.txt)"
|
||||
TAGNAME="$(head -n 1 更新说明.txt)"
|
||||
NOTES_MAIN="$(tail -n +2 更新说明.txt)"
|
||||
NAME="$(sed 's/\r$//g' <(head -n 1 update_info.txt))"
|
||||
TAGNAME="$(sed 's/\r$//g' <(head -n 1 update_info.txt))"
|
||||
NOTES_MAIN="$(sed 's/\r$//g' <(tail -n +3 update_info.txt))"
|
||||
NOTES_TAIL="\`\`\`本release通过GitHub Actions自动构建\`\`\`"
|
||||
NOTES="$NOTES_MAIN<br><br>$NOTES_TAIL"
|
||||
gh release create "$TAGNAME" --target "main" --title "$NAME" --notes "$NOTES" artifacts/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
|
||||
- name: Update release
|
||||
id: update_release
|
||||
if: steps.check_if_release_exists.outputs.release_exists == 'true'
|
||||
run: |
|
||||
set -xe
|
||||
shopt -s nullglob
|
||||
NAME="$(head -n 1 更新说明.txt)"
|
||||
TAGNAME="$(head -n 1 更新说明.txt)"
|
||||
NOTES_MAIN="$(tail -n +2 更新说明.txt)"
|
||||
NAME="$(sed 's/\r$//g' <(head -n 1 update_info.txt))"
|
||||
TAGNAME="$(sed 's/\r$//g' <(head -n 1 update_info.txt))"
|
||||
NOTES_MAIN="$(sed 's/\r$//g' <(tail -n +3 update_info.txt))"
|
||||
NOTES_TAIL="\`\`\`本release通过GitHub Actions自动构建\`\`\`"
|
||||
NOTES="$NOTES_MAIN<br><br>$NOTES_TAIL"
|
||||
gh release delete "$TAGNAME" --yes
|
||||
|
||||
2621
AUTO_MAA.py
177
README.md
@@ -1,9 +1,10 @@
|
||||
# AUTO_MAA
|
||||
|
||||
MAA多账号管理与自动化软件
|
||||
|
||||

|
||||
|
||||
----------------------------------------------------------------------------------------------
|
||||
---
|
||||
|
||||
</h1>
|
||||
|
||||
@@ -15,88 +16,136 @@ MAA多账号管理与自动化软件
|
||||
</div>
|
||||
|
||||
## 重要声明
|
||||
|
||||
本软件是一个外部工具,旨在优化MAA多账号功能体验,并通过一些方法解决MAA项目未能解决的部分问题,改善代理的稳定性。该软件包可以存储明日方舟多账号数据,并通过修改MAA配置文件、读取MAA日志等行为自动完成多账号代理。本开发团队承诺,不会修改明日方舟游戏本体与相关配置文件。
|
||||
|
||||
本项目使用GPL开源,相关细则如下:
|
||||
|
||||
- **作者:** AUTO_MAA软件作者为DLmaster、DLmaster361或DLmaster_361,以上均指代同一人。
|
||||
- **使用:** AUTO_MAA使用者可以按自己的意愿自由使用本软件。依据GPL,对于由此可能产生的损失,AUTO_MAA项目组不负任何责任
|
||||
- **分发:** AUTO_MAA允许任何人自由分发本软件,包括进行商业活动牟利。但所有分发者必须遵循GPL向接收者提供本软件项目地址、完整的软件源码与GPL协议原文(件),违反者可能会被追究法律责任
|
||||
- **传播:** AUTO_MAA原则上允许传播者自由传播本软件。但由于软件性质,项目组不希望发现任何人在明日方舟官方媒体(包括官方媒体账号与森空岛社区等)或明日方舟游戏相关内容(包括同好群、线下活动与游戏内容讨论等)下提及AUTO_MAA或MAA,希望各位理解
|
||||
- **衍生:** AUTO_MAA允许任何人对软件本体或软件部分代码进行二次开发或利用。但依据GPL,相关成果也必须使用GPL开源
|
||||
- **授权:** 如果希望在使用AUTO_MAA的相关成果后仍保持自己的项目闭源,请在Issues中说明来意。得到项目组认可后,我们可以提供另一份使用不同协议的代码,此协议主要内容如下:被授权者可以自由使用该代码并维持闭源;被授权者必须定期为AUTO_MAA作出贡献
|
||||
- **贡献:** 不论是直接参与软件的维护编写,或是撰写文档、测试、反馈BUG、给出建议、参与讨论,都为AUTO_MAA项目的发展完善做出了不可忽视的贡献。项目组提倡各位贡献者遵照GitHub开源社区惯例,发布Issues参与项目。避免私信或私发邮件(安全性漏洞或敏感问题除外),以帮助更多用户
|
||||
- **使用:** AUTO_MAA使用者可以按自己的意愿自由使用本软件。依据GPL,对于由此可能产生的损失,AUTO_MAA项目组不负任何责任。
|
||||
- **分发:** AUTO_MAA允许任何人自由分发本软件,包括进行商业活动牟利。但所有分发者必须遵循GPL向接收者提供本软件项目地址、完整的软件源码与GPL协议原文(件),违反者可能会被追究法律责任。
|
||||
- **传播:** AUTO_MAA原则上允许传播者自由传播本软件。但由于软件性质,项目组不希望发现任何人在明日方舟官方媒体(包括官方媒体账号与森空岛社区等)或明日方舟游戏相关内容(包括同好群、线下活动与游戏内容讨论等)下提及AUTO_MAA或MAA,希望各位理解。
|
||||
- **衍生:** AUTO_MAA允许任何人对软件本体或软件部分代码进行二次开发或利用。但依据GPL,相关成果也必须使用GPL开源。
|
||||
- **授权:** 如果希望在使用AUTO_MAA的相关成果后仍保持自己的项目闭源,请在Issues中说明来意。得到项目组认可后,我们可以提供另一份使用不同协议的代码,此协议主要内容如下:被授权者可以自由使用该代码并维持闭源;被授权者必须定期为AUTO_MAA作出贡献。
|
||||
- **贡献:** 不论是直接参与软件的维护编写,或是撰写文档、测试、反馈BUG、给出建议、参与讨论,都为AUTO_MAA项目的发展完善做出了不可忽视的贡献。项目组提倡各位贡献者遵照GitHub开源社区惯例,发布Issues参与项目。避免私信或私发邮件(安全性漏洞或敏感问题除外),以帮助更多用户。
|
||||
|
||||
以上细则是本项目对GPL的相关补充与强调。未提及的以GPL为准,发生冲突的以本细则为准。如有不清楚的部分,请发Issues询问。若发生纠纷,相关内容也没有在Issues上提及的,项目组拥有最终解释权
|
||||
以上细则是本项目对GPL的相关补充与强调。未提及的以GPL为准,发生冲突的以本细则为准。如有不清楚的部分,请发Issues询问。若发生纠纷,相关内容也没有在Issues上提及的,项目组拥有最终解释权。
|
||||
|
||||
**注意**
|
||||
- 由于本软件有修改其它目录JSON文件等行为,使用前请将AUTO_MAA添加入Windows Defender信任区以及防病毒软件的信任区或开发者目录,避免被误杀
|
||||
|
||||
- 由于本软件有修改其它目录JSON文件等行为,使用前请将AUTO_MAA添加入Windows Defender信任区以及防病毒软件的信任区或开发者目录,避免被误杀。
|
||||
|
||||
---
|
||||
|
||||
# 使用方法
|
||||
|
||||
## 安装与配置MAA
|
||||
## 安装软件
|
||||
|
||||
```
|
||||
本软件是MAA的外部工具,需要安装配置MAA后才能使用。
|
||||
本软件是MAA的外部工具,需要安装MAA后才能使用。
|
||||
```
|
||||
|
||||
### MAA安装
|
||||
### 下载MAA
|
||||
|
||||
- 什么是MAA? [官网](https://maa.plus/)/[GitHub](https://github.com/CHNZYX/Auto_Simulated_Universe/archive/refs/heads/main.zip)
|
||||
|
||||
- MAA下载地址 [GitHub下载](https://github.com/MaaAssistantArknights/MaaAssistantArknights/releases)
|
||||
|
||||
### MAA配置
|
||||
### 安装MAA
|
||||
|
||||
1. 完成MAA的adb配置等基本配置
|
||||
- 将MAA压缩包解压至任意普通文件夹即可。
|
||||
|
||||
2. 确保当前配置名为“Default”,取消所有“定时执行”
|
||||
- 若为首次安装MAA,请双击`MAA.exe`启动MAA程序以生成MAA配置文件。
|
||||
|
||||

|
||||
|
||||
3. 取消勾选“开机自启动MAA”,勾选“启动MAA后直接运行”和“启动MAA后自动开启模拟器”。配置自己模拟器所在的位置并根据实际情况填写“等待模拟器启动时间”(建议预留10s以防意外)。如果是多开用户,需要填写“附加命令”,具体填写值参见多开模拟器对应快捷方式路径(如“-v 1”)。
|
||||
|
||||

|
||||
|
||||
4. 勾选“定时检查更新”、“自动下载更新包”和“自动安装更新包”
|
||||
|
||||

|
||||
|
||||
## 下载AUTO_MAA [](https://github.com/DLmaster361/AUTO_MAA/releases)
|
||||
### 下载AUTO_MAA [](https://github.com/DLmaster361/AUTO_MAA/releases)
|
||||
|
||||
- GitHub下载地址 [GitHub下载](https://github.com/DLmaster361/AUTO_MAA/releases)
|
||||
|
||||
## 配置AUTO_MAA
|
||||
### 安装AUTO_MAA
|
||||
|
||||
- 将AUTO_MAA压缩包解压至任意普通文件夹即可。
|
||||
|
||||
## 配置AUTO_MAA
|
||||
|
||||
### 启动AUTO_MAA
|
||||
|
||||
- 双击`AUTO_MAA.exe`以启动软件
|
||||
- 双击`AUTO_MAA.exe`以启动软件。
|
||||
|
||||
```
|
||||
注意:
|
||||
|
||||
首次启动时会要求设置管理密钥。
|
||||
首次启动时会要求设置管理密钥。
|
||||
|
||||
管理密钥是解密用户密码的唯一凭证,与数据库绑定。
|
||||
密钥丢失或data/key/目录下任一文件损坏都将导致解密无法正常进行。
|
||||
管理密钥是解密用户密码的唯一凭证,与数据库绑定。
|
||||
密钥丢失或data/key/目录下任一文件损坏都将导致解密无法正常进行。
|
||||
|
||||
本项目采用自主开发的混合加密模式,项目组也无法找回您的管理密钥或修复data/key/目录下的文件。
|
||||
如果不幸的事发生,建议您删除data/key/目录与data/data.db文件后重新录入信息。
|
||||
本项目采用自主开发的混合加密模式,项目组也无法找回您的管理密钥或修复data/key/目录下的文件。
|
||||
如果不幸的事发生,建议您删除data/key/目录与data/data.db文件后重新录入信息。
|
||||
```
|
||||
|
||||
### 配置信息
|
||||
|
||||
- 本项目已初步完成GUI开发,您可以在用户管理页与设置页配置信息。
|
||||
#### 设置MAA
|
||||
|
||||
```
|
||||
特别的:
|
||||
1. 通过`浏览`绑定MAA后,单击`设置MAA`进行MAA全局设置。
|
||||
|
||||
你可以自定义关卡号替换方案。
|
||||
程序会读取data/gameid.txt中的数据,依据此进行关卡号的替换,便于常用关卡的使用。
|
||||
gameid.txt在初始已经存储了一些常用资源本的替代方案。
|
||||
```
|
||||
2. 在打开的MAA界面完成`性能设置`、`游戏设置`、`连接设置`、`启动设置`、`界面设置`、`软件更新`等基本配置以及代理任务的详细配置。
|
||||
|
||||
3. 完成基本配置后,关闭MAA页面,AUTO_MAA会自动保存您的配置。
|
||||
|
||||
- 注意:在MAA的设置过程中,若MAA要求`立刻重启应用更改`,请选择`稍后`。否则,MAA重启后的一切更改都不会被程序记录。
|
||||
|
||||
- 特别的,您需要确保自己:
|
||||
- 取消勾选`开机自启动MAA`。
|
||||
- 配置自己模拟器所在的位置并根据实际情况填写`等待模拟器启动时间`(建议预留10s以防意外)。
|
||||
- 如果是模拟器多开用户,还需要填写`附加命令`,具体填写值参见多开模拟器对应快捷方式路径(如`-v 1`)。
|
||||
|
||||

|
||||
|
||||
#### 设置AUTO_MAA
|
||||
|
||||
本项目已基本完成GUI开发,您可以直接在设置页配置AUTO_MAA相关信息,页面简介如下:
|
||||
- `MAA路径`:该项无法直接编辑,仅用于展示当前程序所绑定MAA的路径。
|
||||
- `浏览`:选择MAA文件夹。
|
||||
- `设置MAA`:编辑MAA全局配置,具体使用方法参见前文。
|
||||
- `日常限制`:执行日常代理的日常部分时的超时阈值,当MAA日志无变化时间超过阈值时,视为超时。
|
||||
- `剿灭限制`:执行日常代理的剿灭部分时的超时阈值,当MAA日志无变化时间超过阈值时,视为超时。
|
||||
- `运行失败重试次数上限`:对于每一用户,若超过该次数限制仍未完成代理,视为代理失败。
|
||||
- `开机自动启动AUTO_MAA`:实现AUTO_MAA的自启动。
|
||||
- `AUTO_MAA启动时禁止电脑休眠`:仅阻止电脑自动休眠,不会影响屏幕是否熄灭。
|
||||
- `检查版本更新`:从GitHub上获取版本更新,要求网络能够访问GitHub。获取版本信息时若遇网络不稳定,主程序有概率未响应,稍等片刻后恢复。
|
||||
- `修改管理密钥`:修改管理密钥,当用户列表中无用户时,将跳过验证旧管理密钥。
|
||||
|
||||
#### 设置用户配置
|
||||
|
||||
本项目已基本完成GUI开发,您可以直接在用户管理页配置用户相关信息,页面简介如下:
|
||||
- `新建`、`删除`:新建一个用户到当前用户配置列表、删除当前所选第一行所对应的用户。
|
||||
- `转为高级/简洁`:将当前所选第一行所对应的用户转为高级/简洁配置模式。
|
||||
- `修改配置`:修改更深层的用户配置信息,当前支持该项的有`简洁用户配置列表的自定义基建栏目`、`高级用户配置列表的日常、剿灭栏目`,详解如下:
|
||||
- `简洁用户配置列表的自定义基建栏目`:获取自定义基建的JSON文件。
|
||||
- `高级用户配置列表的日常、剿灭栏目`:打开MAA进行具体的任务配置,配置方法参见上文。注意,此时你还需要确保所要执行的任务被勾选。
|
||||
- `显示密码`:输入管理密钥以显示用户密码,仅当管理密钥正确时能够修改`密码栏目`。
|
||||
- `刷新`:清除临时保存的管理密钥。
|
||||
- `简洁用户配置列表`:仅支持核心代理选项的设置,其它设置选项沿用MAA的全局设置,部分代理核心功能选项由程序托管。
|
||||
- `高级用户配置列表`:支持几乎所有代理选项的设置,通过`修改配置`进行MAA自定义,仅部分代理核心功能选项由程序托管。
|
||||
- `用户配置列表栏目`:详解如下:
|
||||
- `用户名`:展示在执行界面的用户名,用于区分不同用户。
|
||||
- `账号ID`:MAA进行账号切换所需的凭据,官服用户请输入手机号码、B服请输入B站ID。
|
||||
- `服务器`:当前支持官服、B服。
|
||||
- `代理天数`:剩余需要进行代理的天数,输入`任意负数`可设置为无限代理天数,当剩余天数为0时不再代理或排查。
|
||||
- `状态`:用户的状态,禁用时将不再对其进行代理或排查。
|
||||
- `执行情况`:当日执行情况,不可编辑。
|
||||
- `关卡`、`备选关卡-1`、`备选关卡-2`:关卡号。
|
||||
- `日常`:单独设定是否进行日常代理的日常部分,可进一步配置MAA的具体代理任务,该配置与全局MAA配置相互独立。
|
||||
- `剿灭`:单独设定是否进行日常代理的剿灭部分,高级配置模式下可进一步配置MAA的具体代理任务,该配置与全局MAA配置相互独立。
|
||||
- `自定义基建`:是否启用自定义基建功能,可进一步配置自定义基建文件,该配置与其他用户相互独立。
|
||||
- `密码`:仅用于登记用户的密码,可留空。
|
||||
- `备注`:用于备注用户信息。
|
||||
|
||||
- 特别的:
|
||||
- 对于`简洁用户配置列表的关卡、备选关卡-1、备选关卡-2栏目`您可以自定义关卡号替换方案。
|
||||
- 程序会读取`data/gameid.txt`中的数据,依据此进行关卡号的替换,便于常用关卡的使用。
|
||||
- `gameid.txt`会在程序首次运行时生成,其中将预置一些常用资源本的替换方案。
|
||||
|
||||

|
||||
|
||||
@@ -104,42 +153,42 @@ gameid.txt在初始已经存储了一些常用资源本的替代方案。
|
||||
|
||||
### 直接运行
|
||||
|
||||
- 在执行页单击`立即执行`直接运行
|
||||
- 在执行页单击`立即执行`直接运行。
|
||||
|
||||
### 定时运行
|
||||
|
||||
- 在执行页的`定时执行`栏设置时间
|
||||
- 在执行页的`定时执行`栏设置时间。
|
||||
|
||||
- 保持软件打开,软件会在设定的时间自动运行
|
||||
- 保持软件打开,软件会在设定的时间自动运行。
|
||||
|
||||
## 人工排查代理结果
|
||||
|
||||
### 直接开始人工排查
|
||||
|
||||
- 在执行页单击`开始排查`启动排查进程
|
||||
- 在执行页单击`开始排查`启动排查进程。
|
||||
|
||||
- 软件将调起MAA,依次登录各用户的账号
|
||||
- 软件将调起MAA,依次登录各用户的账号。
|
||||
|
||||
- 检查代理情况,可以手动完成未代理的任务
|
||||
- 完成PRTS登录后,请人工检查代理情况,可以手动完成未代理的任务。
|
||||
|
||||
- 在对话框中单击对应账号的代理情况
|
||||
- 在对话框中单击对应账号的代理情况。
|
||||
|
||||
- 结束人工排查后,相关排查情况将被写入用户管理页的`备注`
|
||||
- 结束人工排查后,相应排查情况将被写入用户管理页的`备注栏目`。
|
||||
|
||||
---
|
||||
|
||||
# 关于
|
||||
|
||||
欢迎加入AUTO_MAA项目组,欢迎反馈bug
|
||||
## 未来开发方向
|
||||
|
||||
QQ群:957750551
|
||||
- [x] 支持B服
|
||||
- [x] 支持完全自定义MAA配置
|
||||
- [x] 支持程序版本更新
|
||||
- [ ] 支持对MAA运行状况的进一步识别
|
||||
- [ ] 支持宽幅ADB连接适配
|
||||
- [ ] 添加更多通知手段
|
||||
- [ ] GUI界面美化
|
||||
|
||||
----------------------------------------------------------------------------------------------
|
||||
|
||||
如果喜欢这个项目,可以打赏作者一杯咖啡吗?
|
||||
|
||||

|
||||
|
||||
----------------------------------------------------------------------------------------------
|
||||
## 贡献者
|
||||
|
||||
感谢以下贡献者对本项目做出的贡献
|
||||
@@ -154,4 +203,16 @@ QQ群:957750551
|
||||
|
||||
## Star History
|
||||
|
||||
[](https://star-history.com/#DLmaster361/AUTO_MAA&Date)
|
||||
[](https://star-history.com/#DLmaster361/AUTO_MAA&Date)
|
||||
|
||||
## 交流与赞助
|
||||
|
||||
欢迎加入AUTO_MAA项目组,欢迎反馈bug
|
||||
|
||||
- QQ群:957750551
|
||||
|
||||
---
|
||||
|
||||
如果喜欢这个项目的话,给作者来杯咖啡吧!
|
||||
|
||||

|
||||
176
Updater.py
Normal file
@@ -0,0 +1,176 @@
|
||||
# <AUTO_MAA:A MAA Multi Account Management and Automation Tool>
|
||||
# Copyright © <2024> <DLmaster361>
|
||||
|
||||
# This file is part of AUTO_MAA.
|
||||
|
||||
# AUTO_MAA is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published
|
||||
# by the Free Software Foundation, either version 3 of the License,
|
||||
# or (at your option) any later version.
|
||||
|
||||
# AUTO_MAA is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
|
||||
# the GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with AUTO_MAA. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# DLmaster_361@163.com
|
||||
|
||||
"""
|
||||
AUTO_MAA
|
||||
AUTO_MAA更新器
|
||||
v1.0
|
||||
作者:DLmaster_361
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import zipfile
|
||||
import requests
|
||||
|
||||
from PySide6.QtWidgets import (
|
||||
QApplication,
|
||||
QLabel,
|
||||
QProgressBar,
|
||||
)
|
||||
from PySide6.QtGui import QIcon
|
||||
from PySide6.QtCore import QObject, QThread, Signal
|
||||
from PySide6.QtUiTools import QUiLoader
|
||||
|
||||
uiLoader = QUiLoader()
|
||||
|
||||
|
||||
class UpdateProcess(QThread):
|
||||
|
||||
info = Signal(str)
|
||||
progress = Signal(int, int, int)
|
||||
accomplish = Signal()
|
||||
|
||||
def __init__(self, app_path, name, download_url, version):
|
||||
super(UpdateProcess, self).__init__()
|
||||
|
||||
self.app_path = app_path
|
||||
self.name = name
|
||||
self.download_url = download_url
|
||||
self.version = version
|
||||
self.download_path = app_path + "/AUTO_MAA_Update.zip" # 临时下载文件的路径
|
||||
self.version_path = app_path + "/res/version.json"
|
||||
|
||||
def run(self):
|
||||
|
||||
# 下载
|
||||
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
|
||||
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}%)"
|
||||
)
|
||||
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)])
|
||||
self.info.emit(f"下载{self.name}时出错:\n{e}")
|
||||
return None
|
||||
# 解压
|
||||
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)
|
||||
|
||||
self.info.emit("正在删除临时文件")
|
||||
self.progress.emit(0, 0, 0)
|
||||
os.remove(self.download_path)
|
||||
|
||||
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}")
|
||||
|
||||
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
|
||||
elif self.name == "AUTO_MAA主程序":
|
||||
version_info["main_version"] = self.version
|
||||
with open(self.version_path, "w", encoding="utf-8") as f:
|
||||
json.dump(version_info, f, indent=4)
|
||||
|
||||
self.accomplish.emit()
|
||||
|
||||
|
||||
class Updater(QObject):
|
||||
|
||||
def __init__(self, app_path, name, download_url, version):
|
||||
super().__init__()
|
||||
|
||||
self.ui = uiLoader.load(app_path + "/gui/ui/updater.ui")
|
||||
self.ui.setWindowTitle("AUTO_MAA更新器")
|
||||
self.ui.setWindowIcon(QIcon(app_path + "/gui/ico/AUTO_MAA_Updater.ico"))
|
||||
|
||||
self.info = self.ui.findChild(QLabel, "label")
|
||||
self.info.setText("正在初始化")
|
||||
|
||||
self.progress = self.ui.findChild(QProgressBar, "progressBar")
|
||||
self.progress.setRange(0, 0)
|
||||
|
||||
self.update_process = UpdateProcess(app_path, name, download_url, version)
|
||||
|
||||
self.update_process.info.connect(self.update_info)
|
||||
self.update_process.progress.connect(self.update_progress)
|
||||
|
||||
self.update_process.start()
|
||||
|
||||
def update_info(self, text):
|
||||
self.info.setText(text)
|
||||
|
||||
def update_progress(self, begin, end, current):
|
||||
self.progress.setRange(begin, end)
|
||||
self.progress.setValue(current)
|
||||
|
||||
|
||||
class AUTO_MAA_Updater(QApplication):
|
||||
def __init__(self, app_path, name, download_url, version):
|
||||
super().__init__()
|
||||
|
||||
self.main = Updater(app_path, name, download_url, version)
|
||||
self.main.ui.show()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# 获取软件自身的路径
|
||||
app_path = os.path.dirname(os.path.realpath(sys.argv[0])).replace("\\", "/")
|
||||
# 从本地版本信息文件获取当前版本信息
|
||||
with open(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(".")))
|
||||
# 从远程服务器获取最新版本信息
|
||||
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(".")))
|
||||
|
||||
if main_version_remote > main_version_current:
|
||||
app = AUTO_MAA_Updater(
|
||||
app_path,
|
||||
"AUTO_MAA主程序",
|
||||
version_remote["main_download_url"],
|
||||
version_remote["main_version"],
|
||||
)
|
||||
sys.exit(app.exec())
|
||||
@@ -1,5 +0,0 @@
|
||||
龙门币:CE-6
|
||||
技能:CA-5
|
||||
红票:AP-5
|
||||
经验:LS-6
|
||||
剿灭模式:Annihilation
|
||||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
BIN
gui/ico/AUTO_MAA_Updater.ico
Normal file
|
After Width: | Height: | Size: 21 KiB |
410
gui/ui/main.ui
@@ -6,12 +6,12 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1280</width>
|
||||
<height>697</height>
|
||||
<width>1218</width>
|
||||
<height>718</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
<string>AUTO_MAA</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_13">
|
||||
<item>
|
||||
@@ -52,6 +52,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_switch">
|
||||
<property name="text">
|
||||
<string>转为</string>
|
||||
</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">
|
||||
@@ -82,67 +96,153 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget_userlist">
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>用户名</string>
|
||||
<widget class="QToolBox" name="toolBox_userset">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1156</width>
|
||||
<height>546</height>
|
||||
</rect>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>手机号码</string>
|
||||
<attribute name="label">
|
||||
<string>简洁</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_16">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget_userlist_simple">
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>用户名</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>账号ID</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>服务器</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>代理天数</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>状态</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>执行情况</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>关卡</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>备选关卡-1</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>备选关卡-2</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>剿灭</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>自定义基建</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>密码</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>备注</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>98</width>
|
||||
<height>74</height>
|
||||
</rect>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>代理天数</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>状态</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>执行情况</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>关卡</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>备选关卡-1</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>备选关卡-2</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>剿灭</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>自定义基建</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>密码</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>备注</string>
|
||||
</property>
|
||||
</column>
|
||||
<attribute name="label">
|
||||
<string>高级</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_17">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget_userlist_beta">
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>用户名</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>代理天数</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>状态</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>执行情况</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>日常</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>剿灭</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>密码</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>备注</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -543,9 +643,9 @@
|
||||
<property name="title">
|
||||
<string>调度台</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3" stretch="2,5">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_9" stretch="1,1,3,3,2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_9" stretch="0,1,3,3,2">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_main">
|
||||
<property name="frameShape">
|
||||
@@ -732,7 +832,7 @@
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Shadow::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4" stretch="0,20,2,1,2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
@@ -743,6 +843,33 @@
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_MAApath"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_getMAApath">
|
||||
<property name="text">
|
||||
<string>浏览</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<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_setMAA">
|
||||
<property name="text">
|
||||
<string>设置MAA</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -910,8 +1037,8 @@
|
||||
<property name="title">
|
||||
<string>AUTO_MAA设置</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_20">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_4" columnstretch="1,1,1,1">
|
||||
<item row="0" column="0">
|
||||
<widget class="QFrame" name="frame_routine_3">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Shape::StyledPanel</enum>
|
||||
@@ -927,10 +1054,23 @@
|
||||
</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>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
@@ -943,7 +1083,7 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QFrame" name="frame_routine_2">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Shape::StyledPanel</enum>
|
||||
@@ -959,10 +1099,23 @@
|
||||
</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>
|
||||
<item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
@@ -975,6 +1128,109 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QFrame" name="frame_routine_4">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Shape::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Shadow::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_20">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_ifproxydirectly">
|
||||
<property name="text">
|
||||
<string>启动AUTO_MAA后直接代理</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_15">
|
||||
<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="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="1" column="2">
|
||||
<widget class="QFrame" name="frame_check_update">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Shape::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Shadow::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_21">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<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_check_update">
|
||||
<property name="text">
|
||||
<string> 检查版本更新 </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_10">
|
||||
<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="1" column="3">
|
||||
<spacer name="horizontalSpacer_12">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>311</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -1012,13 +1268,19 @@ li.checked::marker { content: "\2612"; }
|
||||
</style></head><body style=" font-family:'Microsoft YaHei UI'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">致用户:</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 这是AUTO_MAA_v3.1.1,项目基本完成可视化。</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 使用本程序前,请先仔细阅读README.md。</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 正式版去除了命令行窗口,但这不意味着BUG不会出现。由于用户与项目贡献者的稀缺,我们无法确保正式版足够完善,还望谅解。</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 对于B服用户,由于我们无权替您同意用户协议,若出现用户协议弹窗,您需要自行完成确认,否则可能造成MAA卡死,代理任务失败。</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 您可以通过官方仓库 <a href="https://github.com/DLmaster361/AUTO_MAA/"><span style=" text-decoration: underline; color:#007ad6;">DLmaster361/AUTO_MAA</span></a> 发布Issues求助。</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 老用户请务必备份原有数据,此次更新的代码改动较大,可能有数据遗失的风险。</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 官方QQ群:957750551</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 由于用户与项目贡献者的稀缺,我们无法确保正式版足够完善,还望谅解。</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 当遇到严重漏洞,请先确保当前为最新版本。</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 您还可以通过官方仓库 <a href="https://github.com/DLmaster361/AUTO_MAA/"><span style=" text-decoration: underline; color:#007ad6;">DLmaster361/AUTO_MAA</span></a> 发布Issues求助。</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 官方QQ交流群:957750551</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p align="right" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">DLmaster</p></body></html></string>
|
||||
</property>
|
||||
|
||||
35
gui/ui/updater.ui
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Dialog</class>
|
||||
<widget class="QDialog" name="Dialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>AUTO_MAA更新器</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="value">
|
||||
<number>24</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
66
package.py
Normal file
@@ -0,0 +1,66 @@
|
||||
# <AUTO_MAA:A MAA Multi Account Management and Automation Tool>
|
||||
# Copyright © <2024> <DLmaster361>
|
||||
|
||||
# This file is part of AUTO_MAA.
|
||||
|
||||
# AUTO_MAA is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published
|
||||
# by the Free Software Foundation, either version 3 of the License,
|
||||
# or (at your option) any later version.
|
||||
|
||||
# AUTO_MAA is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
|
||||
# the GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with AUTO_MAA. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# DLmaster_361@163.com
|
||||
|
||||
"""
|
||||
AUTO_MAA
|
||||
AUTO_MAA打包程序
|
||||
v4.1
|
||||
作者:DLmaster_361
|
||||
"""
|
||||
|
||||
import os
|
||||
import json
|
||||
|
||||
|
||||
def version_text(version_numb):
|
||||
"""将版本号列表转为可读的文本信息"""
|
||||
if version_numb[3] == 0:
|
||||
version = f"v{'.'.join(str(_) for _ in version_numb[0:3])}"
|
||||
else:
|
||||
version = f"v{'.'.join(str(_) for _ in version_numb[0:3])}_beta"
|
||||
return version
|
||||
|
||||
|
||||
with open("res/version.json", "r", encoding="utf-8") as f:
|
||||
version = json.load(f)
|
||||
|
||||
main_version_numb = list(map(int, version["main_version"].split(".")))
|
||||
updater_version_numb = list(map(int, version["updater_version"].split(".")))
|
||||
|
||||
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)"
|
||||
|
||||
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)
|
||||
|
||||
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,
|
||||
)
|
||||
@@ -1,3 +1,5 @@
|
||||
plyer
|
||||
PySide6
|
||||
pycryptodome
|
||||
pyinstaller
|
||||
pyinstaller
|
||||
requests
|
||||
BIN
res/README/MAA配置.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 21 KiB |
43
res/info.txt
@@ -1,43 +0,0 @@
|
||||
# UTF-8
|
||||
#
|
||||
VSVersionInfo(
|
||||
ffi=FixedFileInfo(
|
||||
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
|
||||
# Set not needed items to zero 0.
|
||||
filevers=(3, 1, 3, 0),
|
||||
prodvers=(0, 0, 0, 0),
|
||||
# Contains a bitmask that specifies the valid bits 'flags'r
|
||||
mask=0x3f,
|
||||
# Contains a bitmask that specifies the Boolean attributes of the file.
|
||||
flags=0x0,
|
||||
# The operating system for which this file was designed.
|
||||
# 0x4 - NT and there is no need to change it.
|
||||
OS=0x4,
|
||||
# The general type of file.
|
||||
# 0x1 - the file is an application.
|
||||
fileType=0x1,
|
||||
# The function of the file.
|
||||
# 0x0 - the function is not defined for this fileType
|
||||
subtype=0x0,
|
||||
# Creation date and time stamp.
|
||||
date=(0, 0)
|
||||
),
|
||||
kids=[
|
||||
VarFileInfo([VarStruct('Translation', [0, 1200])]),
|
||||
StringFileInfo(
|
||||
[
|
||||
StringTable(
|
||||
'000004b0',
|
||||
[StringStruct('Comments', 'https://github.com/DLmaster361/AUTO_MAA/'),
|
||||
StringStruct('CompanyName', 'AUTO_MAA Team'),
|
||||
StringStruct('FileDescription', 'AUTO_MAA Component'),
|
||||
StringStruct('FileVersion', '3.1.3.0'),
|
||||
StringStruct('InternalName', 'AUTO_MAA'),
|
||||
StringStruct('LegalCopyright', 'Copyright © 2024 DLmaster361'),
|
||||
StringStruct('OriginalFilename', 'AUTO_MAA.py'),
|
||||
StringStruct('ProductName', 'AUTO_MAA'),
|
||||
StringStruct('ProductVersion', 'v3.1.3.0'),
|
||||
StringStruct('Assembly Version', 'v3.1.3.0')])
|
||||
])
|
||||
]
|
||||
)
|
||||
12
res/set.txt
@@ -1,6 +1,5 @@
|
||||
#主界面
|
||||
"MainFunction.ActionAfterCompleted": "ExitEmulatorAndSelf" #完成后(旧)
|
||||
"MainFunction.PostActions": "12" #完成后(新)
|
||||
"MainFunction.PostActions": "12" #完成后
|
||||
"TaskQueue.WakeUp.IsChecked": "True" #开始唤醒
|
||||
"TaskQueue.Recruiting.IsChecked": "True" #自动公招
|
||||
"TaskQueue.Base.IsChecked": "True" #基建换班
|
||||
@@ -30,5 +29,12 @@
|
||||
"Infrast.IsCustomInfrastFileReadOnly": "False" #自定义基建配置文件只读
|
||||
"Infrast.CustomInfrastFile": "" #自定义基建配置文件地址
|
||||
#设置
|
||||
"Start.ClientType": "Bilibili"、 "Official" #服务器
|
||||
"Timer.Timer1": "False" #时间设置1
|
||||
"VersionUpdate.ScheduledUpdateCheck": "True" #定时检查更新
|
||||
"VersionUpdate.AutoDownloadUpdatePackage": "True" #自动下载更新包
|
||||
"VersionUpdate.AutoInstallUpdatePackage": "True" #自动安装更新包
|
||||
"Start.RunDirectly": "True" #启动MAA后直接运行
|
||||
"Start.StartEmulator": "True" #启动MAA后自动开启模拟器
|
||||
"Start.MinimizeDirectly": "True" #启动MAA后直接最小化
|
||||
"Start.OpenEmulatorAfterLaunch": "True" #启动MAA后自动开启模拟器
|
||||
"Start.MinimizingStartup": "True" #最小化启动模拟器
|
||||
7
res/version.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"main_version": "4.1.2.0",
|
||||
"main_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.1_beta/AUTO_MAA_v4.1.2.zip",
|
||||
"updater_version": "1.0.2.0",
|
||||
"updater_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.1_beta/Updater_v1.0.2.zip",
|
||||
"announcement": "\n# 公测版,若出现问题请及时反馈给项目组!\n## 新增功能\n- 添加`启动AUTO_MAA后直接代理`功能\n- 添加无限代理天数模式\n## 修复BUG\n- 尝试解决卡日志情况\n## 程序优化\n- Updater.exe图标更换\n- 更新逻辑优化"
|
||||
}
|
||||
25
toexe.py
@@ -1,25 +0,0 @@
|
||||
# <AUTO_MAA:A MAA Multi Account Management and Automation Tool>
|
||||
# Copyright © <2024> <DLmaster361>
|
||||
|
||||
# This file is part of AUTO_MAA.
|
||||
|
||||
# AUTO_MAA is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published
|
||||
# by the Free Software Foundation, either version 3 of the License,
|
||||
# or (at your option) any later version.
|
||||
|
||||
# AUTO_MAA is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
|
||||
# the GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with AUTO_MAA. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# DLmaster_361@163.com
|
||||
|
||||
import os
|
||||
|
||||
os.system(
|
||||
"pyinstaller -F --version-file res/info.txt -w --icon=res/AUTO_MAA.ico AUTO_MAA.py"
|
||||
)
|
||||
15
更新说明.txt
@@ -1,15 +0,0 @@
|
||||
v3.1.3
|
||||
## 新增功能
|
||||
- 人工排查功能上线
|
||||
## 修复BUG
|
||||
- 添加对内部任务失败的识别
|
||||
- 修复未完成用户无法正确加载的问题
|
||||
## 程序优化
|
||||
- 优化log文件读取策略,可以读取无时间戳的日志
|
||||
- 优化MAA运行判定,为后续开发打基础
|
||||
## 更新说明
|
||||
- 项目初始阶段,不会提供专门的版本更新程序,您需要手动更新程序。
|
||||
- v2.1.5及以前的用户,由于新版本采用全新的架构,您需要手动输入之前的信息。
|
||||
- v3.0_Beta版用户,直接用`AUTO_MAA.exe`替代`gui.exe`后,将原文件夹下的`gui文件夹`用新版本对应文件替换,重新设置每个用户的`自定义基建`选项(输入`-`以关闭该功能,输入自定义基建配置文件地址以开启该功能)。
|
||||
- v3.1~v3.1.2版用户,将原文件夹下除`data文件夹`和`config文件夹`外的内容用新版本对应文件替换即可。
|
||||
- 新用户请忽略本说明。
|
||||