添加启动AUTO_MAA后直接代理功能
This commit is contained in:
23
AUTO_MAA.py
23
AUTO_MAA.py
@@ -1084,7 +1084,6 @@ class Main(QWidget):
|
|||||||
]
|
]
|
||||||
|
|
||||||
self.ui = uiLoader.load(self.app_path + "/gui/ui/main.ui")
|
self.ui = uiLoader.load(self.app_path + "/gui/ui/main.ui")
|
||||||
self.ui.setWindowTitle("AUTO_MAA")
|
|
||||||
self.ui.setWindowIcon(QIcon(self.app_path + "/res/AUTO_MAA.ico"))
|
self.ui.setWindowIcon(QIcon(self.app_path + "/res/AUTO_MAA.ico"))
|
||||||
# 检查文件完整性
|
# 检查文件完整性
|
||||||
self.initialize()
|
self.initialize()
|
||||||
@@ -1162,6 +1161,11 @@ class Main(QWidget):
|
|||||||
self.if_sleep = self.ui.findChild(QCheckBox, "checkBox_ifsleep")
|
self.if_sleep = self.ui.findChild(QCheckBox, "checkBox_ifsleep")
|
||||||
self.if_sleep.stateChanged.connect(self.change_config)
|
self.if_sleep.stateChanged.connect(self.change_config)
|
||||||
|
|
||||||
|
self.if_proxy_directly = self.ui.findChild(
|
||||||
|
QCheckBox, "checkBox_ifproxydirectly"
|
||||||
|
)
|
||||||
|
self.if_proxy_directly.stateChanged.connect(self.change_config)
|
||||||
|
|
||||||
self.check_update = self.ui.findChild(QPushButton, "pushButton_check_update")
|
self.check_update = self.ui.findChild(QPushButton, "pushButton_check_update")
|
||||||
self.check_update.clicked.connect(self.check_version)
|
self.check_update.clicked.connect(self.check_version)
|
||||||
|
|
||||||
@@ -1222,6 +1226,9 @@ class Main(QWidget):
|
|||||||
self.update_config()
|
self.update_config()
|
||||||
self.change_userlist_method()
|
self.change_userlist_method()
|
||||||
|
|
||||||
|
if self.config["Default"]["SelfSet.IfProxyDirectly"] == "True":
|
||||||
|
self.routine_starter()
|
||||||
|
|
||||||
def initialize(self):
|
def initialize(self):
|
||||||
"""初始化程序的配置文件"""
|
"""初始化程序的配置文件"""
|
||||||
# 检查目录
|
# 检查目录
|
||||||
@@ -1299,6 +1306,7 @@ class Main(QWidget):
|
|||||||
["TimesLimit.run", 3],
|
["TimesLimit.run", 3],
|
||||||
["SelfSet.IfSelfStart", "False"],
|
["SelfSet.IfSelfStart", "False"],
|
||||||
["SelfSet.IfSleep", "False"],
|
["SelfSet.IfSleep", "False"],
|
||||||
|
["SelfSet.IfProxyDirectly", "False"],
|
||||||
]
|
]
|
||||||
# 导入配置文件
|
# 导入配置文件
|
||||||
with open(self.config_path, "r", encoding="utf-8") as f:
|
with open(self.config_path, "r", encoding="utf-8") as f:
|
||||||
@@ -1710,6 +1718,10 @@ class Main(QWidget):
|
|||||||
bool(self.config["Default"]["SelfSet.IfSleep"] == "True")
|
bool(self.config["Default"]["SelfSet.IfSleep"] == "True")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.if_proxy_directly.setChecked(
|
||||||
|
bool(self.config["Default"]["SelfSet.IfProxyDirectly"] == "True")
|
||||||
|
)
|
||||||
|
|
||||||
for i in range(10):
|
for i in range(10):
|
||||||
self.start_time[i][0].setChecked(
|
self.start_time[i][0].setChecked(
|
||||||
bool(self.config["Default"]["TimeSet.set" + str(i + 1)] == "True")
|
bool(self.config["Default"]["TimeSet.set" + str(i + 1)] == "True")
|
||||||
@@ -2093,6 +2105,7 @@ class Main(QWidget):
|
|||||||
"""将GUI中发生修改的程序配置同步至self.config变量"""
|
"""将GUI中发生修改的程序配置同步至self.config变量"""
|
||||||
if not self.if_update_config:
|
if not self.if_update_config:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
self.config["Default"]["MaaSet.path"] = self.maa_path.text().replace("\\", "/")
|
self.config["Default"]["MaaSet.path"] = self.maa_path.text().replace("\\", "/")
|
||||||
if not self.check_maa_path():
|
if not self.check_maa_path():
|
||||||
self.config["Default"]["MaaSet.path"] = ""
|
self.config["Default"]["MaaSet.path"] = ""
|
||||||
@@ -2103,6 +2116,7 @@ class Main(QWidget):
|
|||||||
self.ui, "错误", "未找到MAA.exe或MAA配置文件,请重新设置MAA路径!"
|
self.ui, "错误", "未找到MAA.exe或MAA配置文件,请重新设置MAA路径!"
|
||||||
)
|
)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
self.config["Default"]["TimeLimit.routine"] = self.routine.value()
|
self.config["Default"]["TimeLimit.routine"] = self.routine.value()
|
||||||
self.config["Default"]["TimeLimit.annihilation"] = self.annihilation.value()
|
self.config["Default"]["TimeLimit.annihilation"] = self.annihilation.value()
|
||||||
self.config["Default"]["TimesLimit.run"] = self.num.value()
|
self.config["Default"]["TimesLimit.run"] = self.num.value()
|
||||||
@@ -2117,6 +2131,11 @@ class Main(QWidget):
|
|||||||
else:
|
else:
|
||||||
self.config["Default"]["SelfSet.IfSelfStart"] = "False"
|
self.config["Default"]["SelfSet.IfSelfStart"] = "False"
|
||||||
|
|
||||||
|
if self.if_proxy_directly.isChecked():
|
||||||
|
self.config["Default"]["SelfSet.IfProxyDirectly"] = "True"
|
||||||
|
else:
|
||||||
|
self.config["Default"]["SelfSet.IfProxyDirectly"] = "False"
|
||||||
|
|
||||||
for i in range(10):
|
for i in range(10):
|
||||||
if self.start_time[i][0].isChecked():
|
if self.start_time[i][0].isChecked():
|
||||||
self.config["Default"]["TimeSet.set" + str(i + 1)] = "True"
|
self.config["Default"]["TimeSet.set" + str(i + 1)] = "True"
|
||||||
@@ -2124,8 +2143,10 @@ class Main(QWidget):
|
|||||||
self.config["Default"]["TimeSet.set" + str(i + 1)] = "False"
|
self.config["Default"]["TimeSet.set" + str(i + 1)] = "False"
|
||||||
time = self.start_time[i][1].time().toString("HH:mm")
|
time = self.start_time[i][1].time().toString("HH:mm")
|
||||||
self.config["Default"]["TimeSet.run" + str(i + 1)] = time
|
self.config["Default"]["TimeSet.run" + str(i + 1)] = time
|
||||||
|
|
||||||
with open(self.config_path, "w", encoding="utf-8") as f:
|
with open(self.config_path, "w", encoding="utf-8") as f:
|
||||||
json.dump(self.config, f, indent=4)
|
json.dump(self.config, f, indent=4)
|
||||||
|
|
||||||
self.update_config()
|
self.update_config()
|
||||||
|
|
||||||
def change_userlist_method(self):
|
def change_userlist_method(self):
|
||||||
|
|||||||
102
gui/ui/main.ui
102
gui/ui/main.ui
@@ -189,8 +189,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1156</width>
|
<width>88</width>
|
||||||
<height>546</height>
|
<height>74</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="label">
|
<attribute name="label">
|
||||||
@@ -1037,8 +1037,8 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>AUTO_MAA设置</string>
|
<string>AUTO_MAA设置</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_20">
|
<layout class="QGridLayout" name="gridLayout_4" rowstretch="1,1" columnstretch="1,1,1,1">
|
||||||
<item>
|
<item row="0" column="0">
|
||||||
<widget class="QFrame" name="frame_routine_3">
|
<widget class="QFrame" name="frame_routine_3">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::Shape::StyledPanel</enum>
|
<enum>QFrame::Shape::StyledPanel</enum>
|
||||||
@@ -1054,10 +1054,23 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<spacer name="horizontalSpacer_6">
|
<spacer name="horizontalSpacer_6">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
@@ -1070,7 +1083,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="2">
|
||||||
<widget class="QFrame" name="frame_routine_2">
|
<widget class="QFrame" name="frame_routine_2">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::Shape::StyledPanel</enum>
|
<enum>QFrame::Shape::StyledPanel</enum>
|
||||||
@@ -1086,10 +1099,23 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="3">
|
||||||
<spacer name="horizontalSpacer_7">
|
<spacer name="horizontalSpacer_7">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
@@ -1102,7 +1128,52 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<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">
|
<widget class="QFrame" name="frame_check_update">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::Shape::StyledPanel</enum>
|
<enum>QFrame::Shape::StyledPanel</enum>
|
||||||
@@ -1147,6 +1218,19 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -1184,8 +1268,6 @@ li.checked::marker { content: "\2612"; }
|
|||||||
</style></head><body style=" font-family:'Microsoft YaHei UI'; font-size:9pt; font-weight:400; font-style:normal;">
|
</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=" 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="-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.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;"> 使用本程序前,请先仔细阅读README.md。</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="-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>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ VSVersionInfo(
|
|||||||
ffi=FixedFileInfo(
|
ffi=FixedFileInfo(
|
||||||
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
|
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
|
||||||
# Set not needed items to zero 0.
|
# Set not needed items to zero 0.
|
||||||
filevers=(4, 1, 1, 0),
|
filevers=(4, 1, 1, 1),
|
||||||
prodvers=(0, 0, 0, 0),
|
prodvers=(0, 0, 0, 0),
|
||||||
# Contains a bitmask that specifies the valid bits 'flags'r
|
# Contains a bitmask that specifies the valid bits 'flags'r
|
||||||
mask=0x3f,
|
mask=0x3f,
|
||||||
@@ -31,13 +31,13 @@ VSVersionInfo(
|
|||||||
[StringStruct('Comments', 'https://github.com/DLmaster361/AUTO_MAA/'),
|
[StringStruct('Comments', 'https://github.com/DLmaster361/AUTO_MAA/'),
|
||||||
StringStruct('CompanyName', 'AUTO_MAA Team'),
|
StringStruct('CompanyName', 'AUTO_MAA Team'),
|
||||||
StringStruct('FileDescription', 'AUTO_MAA Component'),
|
StringStruct('FileDescription', 'AUTO_MAA Component'),
|
||||||
StringStruct('FileVersion', '4.1.1.0'),
|
StringStruct('FileVersion', '4.1.1.1'),
|
||||||
StringStruct('InternalName', 'AUTO_MAA'),
|
StringStruct('InternalName', 'AUTO_MAA'),
|
||||||
StringStruct('LegalCopyright', 'Copyright © 2024 DLmaster361'),
|
StringStruct('LegalCopyright', 'Copyright © 2024 DLmaster361'),
|
||||||
StringStruct('OriginalFilename', 'AUTO_MAA.py'),
|
StringStruct('OriginalFilename', 'AUTO_MAA.py'),
|
||||||
StringStruct('ProductName', 'AUTO_MAA'),
|
StringStruct('ProductName', 'AUTO_MAA'),
|
||||||
StringStruct('ProductVersion', 'v4.1.1.0'),
|
StringStruct('ProductVersion', 'v4.1.1.1'),
|
||||||
StringStruct('Assembly Version', 'v4.1.1.0')])
|
StringStruct('Assembly Version', 'v4.1.1.1')])
|
||||||
])
|
])
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"main_version": "4.1.1.0",
|
"main_version": "4.1.1.1",
|
||||||
"main_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.1/AUTO_MAA_v4.1.1.zip",
|
"main_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.1_beta/AUTO_MAA_v4.1.1_beta.zip",
|
||||||
"updater_version": "1.0.0.0",
|
"updater_version": "1.0.0.0",
|
||||||
"updater_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.1/Updater_v1.0.0.zip",
|
"updater_download_url": "https://ghp.ci/https://github.com/DLmaster361/AUTO_MAA/releases/download/v4.1.1_beta/Updater_v1.0.0.zip",
|
||||||
"announcement": "\n## 修复BUG\n- 适配MAA的`启动MAA后自动开启模拟器`字段更改"
|
"announcement": "\n# 开发中的版本!非开发者勿直接更新!!否则后果自负!!!\n## 新增功能\n- 添加`启动AUTO_MAA后直接代理`功能"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user