Skip to content

feat(templates): a Live2D application on every row, through one dependency - #8

Open
Sunrisepeak wants to merge 1 commit into
mcpp-six-platformsfrom
mcpp-live2d-template
Open

Sunrisepeak wants to merge 1 commit into
mcpp-six-platformsfrom
mcpp-live2d-template

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Sep 13, 2026 •

Copy link
Copy Markdown
Owner

中文

三个 PR 中的 C,基于 #7(A):huxerui create app <name> --build mcpp --template live2d 生成一个在六个平台上显示 Live2D 模型的应用。应用写 import huxerui.live2d; 和一行 huxerui.live2d 依赖,里面没有任何 Cubism 相关内容。钉 A 的 commit 和 Lib-Live2D B(Sunrisepeak/Lib-Live2D#2)的 commit;base 是 mcpp-six-platforms,A 合并后自动落到 main。

做了什么

  • templates/live2d/: 与 A 的应用模板同一程序模型。
    • mcpp.toml.in:huxerui.live2d 钉 B,HuxerUI 钉 A。整张图只有一个 HuxerUI,所以两行都是 git 版本。
    • 一行 HuxerUI 依赖,无 runner 表;下限 macOS 12.0 / iOS 15.0 / Android API 23;c++20,并在 macOS / iOS 行声明 llvm.libcxx 22.1.8.3。
    • 带 windows/installer:Setup.exe 的自绘安装界面,依赖同一个 HuxerUI 版本,经 windows-installer feature 只在打包时构建(与 A 的应用模板相同)。
    • 另有 build.mcpp.in(bundle id / applicationId = {{project.id}})、src/main.cpp.in、src/app.cppm.in(CharacterView,import app.resources;),以及 Cubism 示例模型 Mao 和它的许可证(4.3 MB,diff 的主体)。
  • CLI: 自己钉版本的模板保留原来的依赖行,Windows 安装界面子包同样保留(HuxerUICliSelectsTheLive2DTemplate)。
  • CI 与文档: templates CI job 生成 Live2DDemo 并构建;mcpp/README.md 与设计文档各加一段。

对 CMake 构建体系的影响

无。 没有 CMake 文件被改动;模板只在 --build mcpp 下渲染。

验证

CI:templates job 构建生成的项目;A 的 mcpp job 与一致性验证在本分支上再跑一遍。


English

C of three, on top of #7 (A): --template live2d renders an application that shows a Live2D model on all six platforms. The application writes import huxerui.live2d; and one huxerui.live2d dependency line, with nothing about Cubism in it. It pins A's commit and Lib-Live2D's B (Sunrisepeak/Lib-Live2D#2); the base is mcpp-six-platforms, so it retargets to main once A merges.

What

  • templates/live2d/: the same program model as A's application template.
    • mcpp.toml.in: huxerui.live2d pinned to B and HuxerUI to A, both by git revision because the graph has one HuxerUI.
    • One HuxerUI dependency line, no runner tables; floors macOS 12.0 / iOS 15.0 / Android API 23; c++20, declaring llvm.libcxx 22.1.8.3 on macOS and iOS.
    • A windows/installer package: the Setup.exe's own interface, on the same HuxerUI revision, built for a package only through the windows-installer feature (as A's application template).
    • Also build.mcpp.in (bundle id / application id = {{project.id}}), src/main.cpp.in, src/app.cppm.in (a CharacterView, import app.resources;), and Cubism's sample model Mao with its licences (4.3 MB, the bulk of the diff).
  • CLI: a template that pins its own graph keeps its dependency lines, the installer package's included (HuxerUICliSelectsTheLive2DTemplate).
  • CI and docs: the templates job creates Live2DDemo and builds it; one paragraph each in mcpp/README.md and the design record.

Impact on the CMake build

None. No CMake file is touched; the template is rendered only for --build mcpp.

Verification

CI: the templates job builds the generated project; A's mcpp jobs and the conformance check run again on this branch.

@Sunrisepeak
Sunrisepeak force-pushed the mcpp-live2d-template branch 2 times, most recently from 8fafc09 to e85849c Compare September 13, 2026 10:23
@Sunrisepeak
Sunrisepeak force-pushed the mcpp-live2d-template branch 2 times, most recently from 95e8703 to e2fbe3d Compare September 13, 2026 11:13
…dency

`huxerui create app <name> --build mcpp --template live2d` renders an
application that shows a Live2D model (Cubism's sample "Mao", under its
own licence in `resources/raw/Mao/model_licenses/`) on Linux, Windows,
macOS, iOS, Android and the Web: `import huxerui.live2d;`, one
`huxerui.live2d` dependency, nothing about Cubism in the application.

The template has A's program model (one HuxerUI line, no runners, the
floors, c++20 with `llvm.libcxx` on the Apple rows, the Windows installer
package built for a package only through the `windows-installer`
feature) and pins HuxerUI and Lib-Live2D by git revision -- one HuxerUI
for the whole graph -- so the CLI leaves its dependency lines alone
(`HuxerUICliSelectsTheLive2DTemplate`), and the templates CI job creates
and builds it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant