-
Notifications
You must be signed in to change notification settings - Fork 453
feat: add macOS PlayCover/MaaTools support #1720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,12 +6,13 @@ | |
| # from module.device.method.wsa import WSA | ||
| from module.logger import logger | ||
|
|
||
|
|
||
| class AppControl(Adb, Uiautomator2): | ||
| hierarchy: etree._Element | ||
| _app_u2_family = ['uiautomator2', 'minitouch', 'scrcpy'] | ||
|
|
||
| def app_is_running(self) -> bool: | ||
| if self.is_playcover: | ||
| return True | ||
| method = self.config.script.device.control_method | ||
| # if self.is_wsa: | ||
| # package = self.app_current_wsa() | ||
|
Comment on lines
+14
to
18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (bug_risk): 对于 PlayCover,从 函数签名和文档字符串承诺返回 Original comment in Englishissue (bug_risk): Returning The signature and docstring promise an |
||
|
|
@@ -25,6 +26,8 @@ def app_is_running(self) -> bool: | |
| return package == self.package | ||
|
|
||
| def app_start(self): | ||
| if self.is_playcover: | ||
| return | ||
| method = self.config.script.device.screenshot_method | ||
| logger.info(f'App start: {self.package}') | ||
| # if self.config.Emulator_Serial == 'wsa-0': | ||
|
|
@@ -35,6 +38,8 @@ def app_start(self): | |
| self.app_start_adb() | ||
|
|
||
| def app_stop(self): | ||
| if self.is_playcover: | ||
| return | ||
| method = self.config.script.device.screenshot_method | ||
| logger.info(f'App stop: {self.package}') | ||
| if method in AppControl._app_u2_family: | ||
|
|
@@ -47,6 +52,8 @@ def dump_hierarchy(self) -> etree._Element: | |
| Returns: | ||
| etree._Element: Select elements with `self.hierarchy.xpath('//*[@text="Hermit"]')` for example. | ||
| """ | ||
| if self.is_playcover: | ||
| return None | ||
| method = self.config.script.device.screenshot_method | ||
| if method in AppControl._app_u2_family: | ||
| self.hierarchy = self.dump_hierarchy_uiautomator2() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: runhey/OnmyojiAutoScript
Length of output: 21602
补齐 OASX app 和本地 OAS 服务的可执行使用说明。
README 现在仅说明 PR 不分发 OASX 二进制,并给出 Python 依赖安装与 PlayCover 配置。但没有经过验证的 OASX 构建/获取入口,也没有启动本地 OAS 服务的命令和配置确认;当前说明无法让用户实际到达选择
MacPlayTools前的环境准备状态。请补充构建或获取步骤,以及 OAS 服务的启动与配置方式;若仅为开发者验证流程,请在中英文说明中明确标注范围。🤖 Prompt for AI Agents