From 87f07bf95c806698b14e3a7076e9875f89d32e2c Mon Sep 17 00:00:00 2001 From: DLmaster Date: Sat, 2 Nov 2024 23:57:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8F=82=E6=95=B0=E9=80=82?= =?UTF-8?q?=E9=85=8D=E4=B8=BB=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/python-app.yml | 4 +-- AUTO_MAA.py | 2 +- README.md | 2 ++ Updater.py | 2 +- gui/ui/main.ui | 48 ++++++++++++++++++++++++-------- res/AUTO_MAA_info.txt | 8 +++--- res/Updater_info.txt | 8 +++--- res/version.json | 6 ++-- 8 files changed, 54 insertions(+), 26 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index b1bcb36..3e289b6 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -22,12 +22,12 @@ name: Build AUTO_MAA on: push: - branches: [ "main","Updater" ] + branches: [ "main" ] paths-ignore: - '**.md' - 'LICENSE' pull_request: - branches: [ "main","Updater" ] + branches: [ "main" ] paths-ignore: - '**.md' - 'LICENSE' diff --git a/AUTO_MAA.py b/AUTO_MAA.py index 1d5a8d9..9e44069 100644 --- a/AUTO_MAA.py +++ b/AUTO_MAA.py @@ -2347,7 +2347,7 @@ class Main(QWidget): # 从远程服务器获取最新版本信息 try: response = requests.get( - "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/blob/Updater/res/version.json" + "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/blob/main/res/version.json" ) except Exception as e: QMessageBox.critical( diff --git a/README.md b/README.md index 612e454..471fd28 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,7 @@ MAA多账号管理与自动化软件 - `运行失败重试次数上限`:对于每一用户,若超过该次数限制仍未完成代理,视为代理失败。 - `开机自动启动AUTO_MAA`:实现AUTO_MAA的自启动。 - `AUTO_MAA启动时禁止电脑休眠`:仅阻止电脑自动休眠,不会影响屏幕是否熄灭。 +- `检查版本更新`:从GitHub上获取版本更新,要求网络能够访问GitHub。获取版本信息时若遇网络不稳定,主程序有概率未响应,稍等片刻后恢复。 - `修改管理密钥`:修改管理密钥,当用户列表中无用户时,将跳过验证旧管理密钥。 #### 设置用户配置 @@ -182,6 +183,7 @@ MAA多账号管理与自动化软件 - [x] 支持B服 - [x] 支持完全自定义MAA配置 +- [x] 支持程序版本更新 - [ ] 支持对MAA运行状况的进一步识别 - [ ] 支持宽幅ADB连接适配 - [ ] 添加更多通知手段 diff --git a/Updater.py b/Updater.py index f3aff75..1009a9e 100644 --- a/Updater.py +++ b/Updater.py @@ -146,7 +146,7 @@ if __name__ == "__main__": main_version_current = list(map(int, version_current["main_version"].split("."))) # 从远程服务器获取最新版本信息 response = requests.get( - "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/blob/Updater/res/version.json" + "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("."))) diff --git a/gui/ui/main.ui b/gui/ui/main.ui index 6281af9..2ce015a 100644 --- a/gui/ui/main.ui +++ b/gui/ui/main.ui @@ -6,8 +6,8 @@ 0 0 - 1200 - 700 + 1218 + 718 @@ -105,8 +105,8 @@ 0 0 - 1138 - 528 + 1156 + 546 @@ -1111,13 +1111,39 @@ QFrame::Shadow::Raised + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + - 检查版本更新 + 检查版本更新 + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + @@ -1158,21 +1184,21 @@ 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_v4.0_beta,服务器切换与用户高级配置功能上线。</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 这是AUTO_MAA_v4.1.0,版本更新程序上线。</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;"> 在用户高级配置列表中选中需要配置的用户的“日常”或“剿灭”项,单击“修改配置”,即可呼出MAA进行配置的自定义。关闭MAA窗口后将自动保存您的修改。为保证程序正常运行,我们仍会接管部分MAA的设置项,您无须担心。</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;"> 如果是B服用户,由于我们无权替您同意用户协议,若出现用户协议弹窗,您需要自行完成确认,否则可能造成MAA卡死,代理任务失败。</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;"> 老用户请务必备份原有数据,此次更新的代码改动较大,可能有数据遗失的风险。</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;"> 由于用户与项目贡献者的稀缺,我们无法确保正式版足够完善,还望谅解。</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=" 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=" 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> diff --git a/res/AUTO_MAA_info.txt b/res/AUTO_MAA_info.txt index 481f489..22ef9a5 100644 --- a/res/AUTO_MAA_info.txt +++ b/res/AUTO_MAA_info.txt @@ -4,7 +4,7 @@ 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=(4, 0, 1, 0), + filevers=(4, 1, 0, 0), prodvers=(0, 0, 0, 0), # Contains a bitmask that specifies the valid bits 'flags'r mask=0x3f, @@ -31,13 +31,13 @@ VSVersionInfo( [StringStruct('Comments', 'https://github.com/DLmaster361/AUTO_MAA/'), StringStruct('CompanyName', 'AUTO_MAA Team'), StringStruct('FileDescription', 'AUTO_MAA Component'), - StringStruct('FileVersion', '4.0.1.0'), + StringStruct('FileVersion', '4.1.0.0'), StringStruct('InternalName', 'AUTO_MAA'), StringStruct('LegalCopyright', 'Copyright © 2024 DLmaster361'), StringStruct('OriginalFilename', 'AUTO_MAA.py'), StringStruct('ProductName', 'AUTO_MAA'), - StringStruct('ProductVersion', 'v4.0.1.0'), - StringStruct('Assembly Version', 'v4.0.1.0')]) + StringStruct('ProductVersion', 'v4.1.0.0'), + StringStruct('Assembly Version', 'v4.1.0.0')]) ]) ] ) \ No newline at end of file diff --git a/res/Updater_info.txt b/res/Updater_info.txt index 361d7a8..850b1f5 100644 --- a/res/Updater_info.txt +++ b/res/Updater_info.txt @@ -4,7 +4,7 @@ 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=(0, 1, 0, 1), + filevers=(1, 0, 0, 0), prodvers=(0, 0, 0, 0), # Contains a bitmask that specifies the valid bits 'flags'r mask=0x3f, @@ -31,13 +31,13 @@ VSVersionInfo( [StringStruct('Comments', 'https://github.com/DLmaster361/AUTO_MAA/'), StringStruct('CompanyName', 'AUTO_MAA Team'), StringStruct('FileDescription', 'AUTO_MAA Component'), - StringStruct('FileVersion', '0.1.0.1'), + StringStruct('FileVersion', '1.0.0.0'), StringStruct('InternalName', 'AUTO_MAA_Updater'), StringStruct('LegalCopyright', 'Copyright © 2024 DLmaster361'), StringStruct('OriginalFilename', 'Updater.py'), StringStruct('ProductName', 'AUTO_MAA_Updater'), - StringStruct('ProductVersion', 'v0.1.0.1'), - StringStruct('Assembly Version', 'v0.1.0.1')]) + StringStruct('ProductVersion', 'v1.0.0.0'), + StringStruct('Assembly Version', 'v1.0.0.0')]) ]) ] ) \ No newline at end of file diff --git a/res/version.json b/res/version.json index 5fdd933..c8df7b2 100644 --- a/res/version.json +++ b/res/version.json @@ -1,7 +1,7 @@ { "main_version": "4.1.0.0", "main_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.0/AUTO_MAA_v4.1.0.zip", - "updater_version": "0.1.0.0", - "updater_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.0/Updater_v0.1.0.zip", - "announcement": "\n测试版本,一般用户请下载v4.0_beta" + "updater_version": "1.0.0.0", + "updater_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.0/Updater_v1.0.0.zip", + "announcement": "\n## 新增功能\n- 版本更新功能上线,程序可进行版本更新" } \ No newline at end of file