refactor(pi): 拆分 CLI 并支持独立构建 - #1466
Open
Craun718 wants to merge 11 commits into
Open
Conversation
将 ProjectInterface 解析与配置实现移动到 MaaPiCli,并改用公开 C API 访问框架运行时。 导出 MaaUtils 与 meojson 的安装信息,补充安装包消费者测试和 CI 覆盖。 Refs MaaXYZ#1465.
Craun718
force-pushed
the
refactor/split-maapicli
branch
from
August 27, 2026 06:26
9d9a4e3 to
6702c06
Compare
在桌面平台和 Windows ARM64 安装包构建流程中,基于已安装的 MaaFramework 单独配置并链接 MaaPiCli。
Craun718
marked this pull request as ready for review
August 27, 2026 19:51
Contributor
There was a problem hiding this comment.
您好——我发现了 1 个问题
面向 AI 代理的提示
请处理本次代码审查中的评论:
## 单独评论
### 评论 1
<location path="source/MaaPiCli/CMakeLists.txt" line_range="25" />
<code_context>
+ Impl/Parser.cpp
+ Impl/Runner.cpp)
+
+add_library(MaaPiCliCore STATIC ${maa_pi_cli_core_src} ${maa_pi_cli_header})
+
+target_include_directories(
</code_context>
<issue_to_address>
**issue (bug_risk):** 可复用的 `MaaPiCliCore` 静态库及其 `ProjectInterface` 头文件从未被安装或导出;`cmake --install` 只会安装 `MaaPiCli` 可执行文件。因此,下游项目无法从独立安装中使用所宣传的可复用核心库。
**触发条件:** 当使用者安装独立的 MaaPiCli 项目并尝试链接可复用核心库时。
**建议修复:** 安装并导出 `MaaPiCliCore`,同时安装 `include/ProjectInterface` 头文件,并提供适当的包配置。
</issue_to_address>帮助我变得更有用!请在每条评论上点击 👍 或 👎,我会利用您的反馈来改进审查结果。
Original comment in English
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="source/MaaPiCli/CMakeLists.txt" line_range="25" />
<code_context>
+ Impl/Parser.cpp
+ Impl/Runner.cpp)
+
+add_library(MaaPiCliCore STATIC ${maa_pi_cli_core_src} ${maa_pi_cli_header})
+
+target_include_directories(
</code_context>
<issue_to_address>
**issue (bug_risk):** The reusable `MaaPiCliCore` static library and its `ProjectInterface` headers are never installed or exported; `cmake --install` installs only the `MaaPiCli` executable. A downstream project therefore cannot consume the advertised reusable core from the standalone installation.
**Triggers:** When a consumer installs the standalone MaaPiCli project and attempts to link against the reusable core.
**Suggested fix:** Install and export `MaaPiCliCore`, and install the `include/ProjectInterface` headers alongside an appropriate package configuration.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
主 MAA 包不再构建或安装 MaaPiCli,standalone 项目导出 Core 目标,并由 CI 生成独立平台包。
Contributor
Author
|
@sourcery-ai review |
Contributor
There was a problem hiding this comment.
你好——我已经审阅了你的更改,看起来非常棒!
帮助我变得更有用!请在每条评论上点击 👍 或 👎,我会利用这些反馈来改进评审。
Original comment in English
Hey - I've reviewed your changes and they look great!
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
MistEO
reviewed
Sep 2, 2026
|
|
||
| ## 获取 | ||
|
|
||
| 从 MaaFramework Release 下载对应平台的 `MAA-PiCli-<os>-<arch>` 独立包。`MaaPiCli` 不再包含在 `MAA-*` 主包中。 |
Member
There was a problem hiding this comment.
MaaPiCli 啦,名字统一一哈(也包括文件名),其他地方也康康
Member
|
话说 cli 都拆出去了,构建流程还要放在 maafw 这边么。我想的是直接作为一个独立 UI,跟 maafw 没关系了,可能只有文档提一句 |
Contributor
Author
当前提交的ci只是为了验证这两者独立编译打包后是否能正常运行,只是为了测会不会出问题。如果你想更激进一点的话的话,也可以继续推进。 |
Member
|
对的对的,直接整吧( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Notes
This branch is based on upstream/main and intentionally excludes the welcome feature stack.
Tests
Sourcery 总结
将 MaaPiCli 重构为可独立构建的静态核心库和可执行文件,同时改进已安装软件包的使用方式。
新功能:
增强:
构建:
CI:
测试:
Original summary in English
Sourcery 总结
将 MaaPiCli 重构为可独立构建的静态核心库和可执行文件,同时改进已安装软件包的使用方式。
新功能:
增强:
构建:
CI:
测试:
Original summary in English
Sourcery 摘要
将 MaaPiCli 重构为可独立构建的可复用组件,并改进已安装软件包的使用方式。
新功能:
增强功能:
构建:
CI:
测试:
Original summary in English
Sourcery 总结
将 MaaPiCli 重构为独立且可复用的组件,并改进已安装 MaaFramework 软件包的使用方式。
新功能:
增强:
构建:
CI:
测试:
Original summary in English
Sourcery 总结
将 MaaPiCli 重构为可独立构建的可复用组件,并改进已安装软件包的使用体验。
新功能:
增强功能:
构建:
CI:
测试:
Original summary in English
Sourcery 摘要
将 MaaPiCli 重构为独立且可复用的组件,并改进已安装 MaaFramework 软件包的使用方式。
新功能:
增强功能:
构建:
CI:
测试:
Original summary in English
Sourcery 摘要
将 MaaPiCli 重构为可独立构建的可复用组件,并改进 MaaFramework 软件包的使用方式。
新功能:
增强功能:
构建:
持续集成:
测试:
Original summary in English
Sourcery 摘要
将 MaaPiCli 重构为可独立构建的可复用组件,同时改进 MaaFramework 软件包的使用方式。
新功能:
改进:
构建:
CI:
测试:
Original summary in English
Sourcery 总结
将 MaaPiCli 与主构建流程解耦,并将其作为独立、可复用的组件进行分发,同时添加包使用者验证。
新功能:
增强功能:
构建:
CI:
文档:
测试:
Original summary in English
Sourcery 总结
将 MaaPiCli 与主 MaaFramework 构建流程分离,并将其作为独立、可复用的组件进行分发,同时添加软件包使用者验证。
新功能:
增强:
构建:
CI:
部署:
文档:
测试:
Original summary in English
Sourcery 摘要
将 MaaPiCli 与 MaaFramework 主构建流程解耦,并将其打包为可独立复用的组件,同时验证下游使用情况。
新功能:
增强功能:
构建:
CI:
部署:
文档:
测试:
Original summary in English
Sourcery 总结
将 MaaPiCli 与主 MaaFramework 构建流程解耦,并将其打包为可复用的独立组件,同时增加下游使用者验证。
新功能:
增强功能:
构建:
CI:
部署:
文档:
测试:
Original summary in English
Summary by Sourcery
Decouple MaaPiCli from the main MaaFramework build and package it as a reusable standalone component with downstream consumer validation.
New Features:
Enhancements:
Build:
CI:
Deployment:
Documentation:
Tests: