Repository navigation
mcpp: build the library and its preview on six platforms, beside the CMake build - #1
Open
Sunrisepeak wants to merge 4 commits into
Open
Sunrisepeak wants to merge 4 commits into
Sunrisepeak wants to merge 4 commits into
Conversation
Sunrisepeak
force-pushed
the
feat/mcpp-six-platforms
branch
9 times, most recently
from
September 13, 2026 05:32
13c695b to
edea2db
Compare
Beside the CMake build and without changing it. `mcpp.toml` describes the library's sources per platform the way CMakeLists.txt does; `build.mcpp` selects the sources through huxerui.rules, embeds the renderer's GLSL and HLSL as cmake/EmbeddedShaders.cmake does, and on the Web bundles platform/web/bridge.ts with the Cubism Web Framework through esbuild and deploys the WebGL shaders beside the page -- tools/build_web.mjs, cmake/Web.cmake and the `npm install` step, without node. `src/live2d.cppm` is the module a consumer imports: `import huxerui.live2d;` names the same entities as the header. The Cubism SDK for Native is a package of its own (mcpp/cubism): its Framework's Objective-C++ is written without ARC while this library's is written with it, and a package has one flag set. That package walks the `xim:cubism-sdk-native` payload for the renderer the row uses, links the Core slice the row needs (cmake/Cubism.cmake's table), compiles GLEW in from its source payload on Linux, and on macOS and iOS compiles the 477 Metal shader libraries as build edges deployed under FrameworkMetallibs/, the directory the Framework loads by name. The Web row does not depend on it. The preview is three files beside its CMake project (mcpp.toml, build.mcpp, src/main.cpp) and compiles the same src/app.cpp and resources/. Every payload -- the two Cubism SDKs, esbuild, GLEW, the NDK, emsdk, the JDK -- is installed by mcpp on first use; nothing is fetched by hand. HuxerUI is taken from Sunrisepeak/HuxerUI at the revision whose mcpp build serves six rows (PR #6); a published version replaces the git table. Verified on Linux: the library and the preview build; the preview runs to its smoke exit and packs as a 33 MB AppImage; the Web directory carries the page, the launcher with the bundled Framework and Core, the wasm, the preload data and live2d-shaders/; the x86_64 APK carries liblive2d_preview.so, the resource package with the Mao model and a signature. macOS, iOS, Windows and a device are CI's to verify.
Sunrisepeak
force-pushed
the
feat/mcpp-six-platforms
branch
from
September 13, 2026 06:51
edea2db to
754486e
Compare
…e bridge goes openxlings/xim-pkgindex#834 is merged and published (index f8c6801).
HuxerUI 4130a23 moves the mcpp:plugins floor to 0.9.1: dist-apk links the application's res/ as its base, so the preview's APK gets the SDK's launcher icon, and the two-versions warning on the Android row is gone. CI: `xlings install -y --use` activates the pinned mcpp in one line.
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.
Lib-Live2D becomes an mcpp package beside its CMake build — six platforms from
mcpp.toml+build.mcpp, the Cubism SDK as a payload instead of a fetched.cache/, the TypeScript bridge bundled without node, the shaders reaching every packaged application through the library's own build program — and the CMake build is not touched. This is the ecosystem-library case for Sunrisepeak/HuxerUI#6, and depends on it:huxerui.huxeruiis a git dependency on that PR's head.What is here (one commit)
mcpp.tomlhuxerui.live2d, six platforms, per-platform sources mirroringCMakeLists.txt, the payloads (xim:cubism-sdk-native,xim:cubism-sdk-web,xim:esbuild,xim:glew).build.mcpphuxerui.rules; the Cubism headers; GLSL/HLSL embedded ascmake/EmbeddedShaders.cmakedoes; on the Web,platform/web/bridge.tsbundled by esbuild with the Cubism Web Framework (--alias:@cubism=…, replacingtools/build_web.mjs,cmake/Web.cmakeandnpm install), the Core script and the bundle as--extern-pre-js, the WebGL shaders deployed underlive2d-shaders/.mcpp/cubism/huxerui.live2d-cubism: no sources of its own —build.mcppwalks the SDK payload for the row's renderer, links the Core slice (cmake/Cubism.cmake's table), compiles GLEW in on Linux, on Windows compilesCubismRenderer_D3D11.cppfrom a copy with MSVC's__m128member access spelled as a vector subscript (clang has no such members), and on macOS/iOS the 477 Metal shader libraries as build edges deployed underFrameworkMetallibs/. A separate package because the Framework's Objective-C++ is MRC and the library's is ARC.modules/live2d.cppmimport huxerui.live2d;— the header's names, hand-listed; outsidesrc/because it is API, as HuxerUI'smodules/is.mcpp/README.mdexamples/preview/{mcpp.toml, build.mcpp, src/main.cpp}src/app.cppandresources/as the CMake project..github/workflows/mcpp.ymlREADME.mdWhat the consumer sees
No
live2d_configure_app(), noLIVE2D_CUBISM_*_ROOT, nonpm install; every formatmcpp packproduces carries the shaders because the library deployed them.Verified locally (Linux)
mcpp build— library +live2d-cubism+ HuxerUI, 23 s after payloads.examples/preview:mcpp build; the executable runs toHUXERUI_SMOKE_EXIT_MS(exit 0, marker printed);mcpp pack --format appimage→ 32.8 MB.mcpp pack --target wasm32-emscripten --format web→index.html,live2d_preview.js(bundledCubismFramework+Live2DCubismCore),.wasm(magic checked), 13.7 MB.data,live2d-shaders/(13 files — a dependency'smcpp::deployreaches the application's stage).mcpp pack --target x86_64-linux-android --format apk→lib/x86_64/liblive2d_preview.so,assets/huxerui/resources.bin,assets/huxerui/app/raw/Mao/Mao.model3.json,classes.dex, signed.CI, honestly
Green: Linux (build, smoke run through the runtime's own quit, AppImage), Web (page + bundled Framework/Core +
live2d-shaders/), Android (signed APK), Windows (library + preview + MSI whose File table carries the executable), iOS simulator (builds and bundles with the llvm@20.1.7 pin from HuxerUI#6), macOS (library + preview, 477 metallibs compiled).What the green does not cover: the macOS and iOS bundles hold the executable only — mcpp 2026.9.13.1 refuses to stage a Mach-O program in every
--mode, so neither the metallibs nor HuxerUI's resources reach.app. Both jobs say which state the run is in and assert the bundle contents the day the engine stages.Not verified / known
aarch64-ios) links but is not signed or installed.xim:glew,xim:esbuildandxim:android-platform@36-r2are in feat(pkg): esbuild 0.25.12, glew 2.2.0 and android-platform 36-r2 openxlings/xim-pkgindex#834 and not yet in the published index; the Linux, Web and Android jobs bridge them into the synced index copy in a step marked temporary.resources/strings) is not merged into an application's package under mcpp (not read by the library's code today).tests/(macOS host-contract probes on HuxerUI::testing) stay CMake-only.