Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@

### Added

- **compat.slint 声明它以 `dlopen` 加载的库。** libslint_cpp 的 winit 与 femtovg 后端加载的 X11、xcb、Xcursor、Xi、Xrender、
xkbcommon、Wayland、EGL 与 GL 的 soname 记为运行期的必需(`runtime.dlopen_libs`),能力为 `display` 与 `opengl.egl.driver`;
mcpp 按发起加载的对象判定它们可达。声明宿主能力的程序不能以 `--mode self-contained` 打包;已安装模板的部署检查在 mcpp
按此拒绝时改用 `--mode vendored`(tests/mwrap/check_installed_template.py)。
- **第四段的两种含义写入封装说明**(docs/mwrap.md):上游的四段版本与封装修订;命令行的 `@<版本>` 按书写的前缀选择,`@=` 指名一个键。
- **mtest 0.11.2(mcpplibs.mtest、.manifest、.gtest、.capi、.doctest)。** 只作为选中用例的作用域运行的用例,其函数体中的
`step`、`exercise`、`artifact`、`metric` 与 `fixture` 事件不指名用例;运行器不再把它记为没有结束的用例。成员
tests/examples/mtest-doctest 移到 0.11.2。
- **mtest 0.11.1(mcpplibs.mtest、.manifest、.gtest、.capi、.doctest)。** `time_left()` 给出用例余下的时间(其自身与外层作用域的
`timeout` 中最早结束者);`e2e::run` 让一条命令在此之内结束,扣除结束命令所需与留给用例报告的时间。成员 tests/examples/mtest-doctest
移到 0.11.1。
Expand Down
7 changes: 7 additions & 0 deletions docs/mwrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ pins. A wrapper revision does not excuse undocumented breaking interface changes
Non-numeric/prerelease upstream schemes need an explicit mapping preserving
their meaning. Build metadata (`+...`) is not a sortable wrapper revision.

A fourth segment has two meanings in this index: an upstream version of four
parts (the Vulkan SDK's `1.4.321.0`) and a wrapper revision (`1.19.0.2`). The
command line reads both by the written prefix (mcpp 2026.11.21.1 and later):
`--template mcpplibs.mwrap.slint@1.19.0` selects the newest `1.19.0.x`, and
`@=1.19.0.1` selects that one key. A revision only increases and is never
reused for other bytes.

## Public interfaces and macros

Prefer exporting the upstream entities with `export using`. Each entity has one
Expand Down
3 changes: 3 additions & 0 deletions docs/zh/mwrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ openkal-musl、mingw-w64)。`mcpplibs.mwrap.libc` 不链接任何实现;版
metadata 与上游锁文件仍明确记录来源。破坏性模块/API 变化必须附迁移说明。
非数字或预发布上游版本需要明确映射规则,保持原版本含义。

第四段在本索引中有两种含义:上游本身的四段版本(Vulkan SDK 的 `1.4.321.0`)与封装修订(`1.19.0.2`)。命令行按书写的前缀读二者
(mcpp 2026.11.21.1 起):`--template mcpplibs.mwrap.slint@1.19.0` 选最新的 `1.19.0.x`,`@=1.19.0.1` 选这一个键。修订只递增,不为另一份字节复用。

新 mwrap 身份首发直接使用上游版本,不追加封装修订尾号;旧身份与历史发布保持原字节。
仓库 tag 统一采用独立 `mwrap-${version}` 序列,例如 `mwrap-8.1.2`,包版本仍为 `8.1.2`。
不移动旧 tag;updater 精确选择新序列,不依赖 GitHub latest。
Expand Down
10 changes: 10 additions & 0 deletions pkgs/c/compat.slint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,20 @@ int mcpp_compat_slint_anchor() { return 0; }
},
sources = { "mcpp_generated/slint_sdk.cpp" },

-- libslint_cpp dlopen()s its windowing and GL libraries (the sonames
-- its winit and femtovg backends name, read from the library itself);
-- they are required at run time, and xim:slint declares the packages
-- that provide them, so its DT_RUNPATH reaches them.
linux = { runtime = {
libraries = { "slint_cpp" },
link_library_dirs = { "mcpp_generated/slint/lib" },
runtime_search_dirs = { "mcpp_generated/slint/lib" },
dlopen_libs = {
"libX11.so.6", "libX11-xcb.so.1", "libxcb.so.1", "libXcursor.so.1", "libXi.so.6",
"libXrender.so.1", "libxkbcommon.so.0", "libxkbcommon-x11.so.0",
"libwayland-client.so.0", "libwayland-egl.so.1", "libEGL.so.1", "libGL.so.1",
},
capabilities = { "display", "opengl.egl.driver" },
} },
macosx = { ldflags = { "-Wl,-rpath,@loader_path" }, runtime = {
libraries = { "slint_cpp" },
Expand Down
21 changes: 21 additions & 0 deletions pkgs/m/mcpplibs.mtest.capi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ package = {

xpm = {
linux = {
["0.11.2"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.2/mtest-v0.11.2.tar.gz",
},
sha256 = "1236da4c4529faaf1c4524611e653f89c7fa43868d279357ade85cf7e3fcbc4c",
},
["0.11.1"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.1.tar.gz",
Expand Down Expand Up @@ -170,6 +177,13 @@ package = {
},
},
macosx = {
["0.11.2"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.2/mtest-v0.11.2.tar.gz",
},
sha256 = "1236da4c4529faaf1c4524611e653f89c7fa43868d279357ade85cf7e3fcbc4c",
},
["0.11.1"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.1.tar.gz",
Expand Down Expand Up @@ -319,6 +333,13 @@ package = {
},
},
windows = {
["0.11.2"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.2/mtest-v0.11.2.tar.gz",
},
sha256 = "1236da4c4529faaf1c4524611e653f89c7fa43868d279357ade85cf7e3fcbc4c",
},
["0.11.1"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.1.tar.gz",
Expand Down
21 changes: 21 additions & 0 deletions pkgs/m/mcpplibs.mtest.doctest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ package = {

xpm = {
linux = {
["0.11.2"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.2/mtest-v0.11.2.tar.gz",
},
sha256 = "1236da4c4529faaf1c4524611e653f89c7fa43868d279357ade85cf7e3fcbc4c",
},
["0.11.1"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.1.tar.gz",
Expand All @@ -37,6 +44,13 @@ package = {
},
},
macosx = {
["0.11.2"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.2/mtest-v0.11.2.tar.gz",
},
sha256 = "1236da4c4529faaf1c4524611e653f89c7fa43868d279357ade85cf7e3fcbc4c",
},
["0.11.1"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.1.tar.gz",
Expand All @@ -53,6 +67,13 @@ package = {
},
},
windows = {
["0.11.2"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.2/mtest-v0.11.2.tar.gz",
},
sha256 = "1236da4c4529faaf1c4524611e653f89c7fa43868d279357ade85cf7e3fcbc4c",
},
["0.11.1"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.1.tar.gz",
Expand Down
21 changes: 21 additions & 0 deletions pkgs/m/mcpplibs.mtest.gtest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ package = {

xpm = {
linux = {
["0.11.2"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.2/mtest-v0.11.2.tar.gz",
},
sha256 = "1236da4c4529faaf1c4524611e653f89c7fa43868d279357ade85cf7e3fcbc4c",
},
["0.11.1"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.1.tar.gz",
Expand Down Expand Up @@ -169,6 +176,13 @@ package = {
},
},
macosx = {
["0.11.2"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.2/mtest-v0.11.2.tar.gz",
},
sha256 = "1236da4c4529faaf1c4524611e653f89c7fa43868d279357ade85cf7e3fcbc4c",
},
["0.11.1"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.1.tar.gz",
Expand Down Expand Up @@ -318,6 +332,13 @@ package = {
},
},
windows = {
["0.11.2"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.2/mtest-v0.11.2.tar.gz",
},
sha256 = "1236da4c4529faaf1c4524611e653f89c7fa43868d279357ade85cf7e3fcbc4c",
},
["0.11.1"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.1.tar.gz",
Expand Down
21 changes: 21 additions & 0 deletions pkgs/m/mcpplibs.mtest.manifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ package = {

xpm = {
linux = {
["0.11.2"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.2/mtest-v0.11.2.tar.gz",
},
sha256 = "1236da4c4529faaf1c4524611e653f89c7fa43868d279357ade85cf7e3fcbc4c",
},
["0.11.1"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.1.tar.gz",
Expand Down Expand Up @@ -157,6 +164,13 @@ package = {
},
},
macosx = {
["0.11.2"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.2/mtest-v0.11.2.tar.gz",
},
sha256 = "1236da4c4529faaf1c4524611e653f89c7fa43868d279357ade85cf7e3fcbc4c",
},
["0.11.1"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.1.tar.gz",
Expand Down Expand Up @@ -292,6 +306,13 @@ package = {
},
},
windows = {
["0.11.2"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.2/mtest-v0.11.2.tar.gz",
},
sha256 = "1236da4c4529faaf1c4524611e653f89c7fa43868d279357ade85cf7e3fcbc4c",
},
["0.11.1"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.1.tar.gz",
Expand Down
24 changes: 24 additions & 0 deletions pkgs/m/mtest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
--
-- 0.11.1 holds a command an end-to-end case runs to what its case has left of its time
-- (`time_left()`).
--
-- 0.11.2: what a case that runs only as the scope of a selected case does (a step, an
-- exercise, an artifact, a metric, a fixture) names no case.
package = {
spec = "1",
namespace = "mcpplibs",
Expand All @@ -78,6 +81,13 @@ package = {

xpm = {
linux = {
["0.11.2"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.2/mtest-v0.11.2.tar.gz",
},
sha256 = "1236da4c4529faaf1c4524611e653f89c7fa43868d279357ade85cf7e3fcbc4c",
},
["0.11.1"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.1.tar.gz",
Expand Down Expand Up @@ -227,6 +237,13 @@ package = {
},
},
macosx = {
["0.11.2"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.2/mtest-v0.11.2.tar.gz",
},
sha256 = "1236da4c4529faaf1c4524611e653f89c7fa43868d279357ade85cf7e3fcbc4c",
},
["0.11.1"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.1.tar.gz",
Expand Down Expand Up @@ -376,6 +393,13 @@ package = {
},
},
windows = {
["0.11.2"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.2/mtest-v0.11.2.tar.gz",
},
sha256 = "1236da4c4529faaf1c4524611e653f89c7fa43868d279357ade85cf7e3fcbc4c",
},
["0.11.1"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.1.tar.gz",
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/mtest-doctest/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ version = "0.1.0"
# Use the complete candidate built-in index prepared by tests/run_members.sh.

[dev-dependencies]
mcpplibs.mtest.doctest = "0.11.1"
mcpplibs.mtest.doctest = "0.11.2"
19 changes: 17 additions & 2 deletions tests/mwrap/check_installed_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,20 @@ def main():
command = [args.mcpp, "pack", "--toolchain", args.toolchain, "--mode", mode,
"--pkg-format", "dir", "--output", "deployment-audit"]
print("+", " ".join(command), flush=True)
subprocess.run(command, cwd=project, env=env, check=True)
packed = subprocess.run(command, cwd=project, env=env, text=True,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
print(packed.stdout, end="", flush=True)
# A program whose packages state what the host provides (`[runtime] capabilities`,
# a display and a GL driver for compat.slint) cannot carry everything: the refusal
# names them, and the vendored form is the one that holds.
if packed.returncode != 0 and mode == "self-contained" \
and "cannot be used by a program that needs the host to provide" in packed.stdout:
mode = "vendored"
command[command.index("--mode") + 1] = mode
print("+", " ".join(command), flush=True)
subprocess.run(command, cwd=project, env=env, check=True)
elif packed.returncode != 0:
raise subprocess.CalledProcessError(packed.returncode, command, packed.stdout)
bundle = project / "target/dist/deployment-audit"
relocated = temporary / "relocated/bundle"
shutil.copytree(bundle, relocated, symlinks=True)
Expand Down Expand Up @@ -504,6 +517,7 @@ def main():
runtime_env.update(HOME=str(empty_home), USERPROFILE=str(empty_home))
if sys.platform.startswith("linux"):
runtime_env["PATH"] = "/usr/bin:/bin"
if mode == "self-contained":
launcher = relocated / "run.sh"
else:
filename = "installed-quickstart" + (".exe" if os.name == "nt" else "")
Expand All @@ -514,7 +528,8 @@ def main():
system_root = os.environ.get("SystemRoot", r"C:\Windows")
runtime_env["PATH"] = os.pathsep.join([system_root, str(Path(system_root) / "System32")])
subprocess.run([str(launcher)], cwd=empty_home, env=runtime_env, check=True)
if sys.platform.startswith("linux"):
# The loader travels only with a self-contained bundle.
if mode == "self-contained":
loader = relocated / "lib/ld-linux-x86-64.so.2"
listing = subprocess.run([str(loader), "--library-path", str(relocated / "lib"),
"--list", str(relocated / "bin/installed-quickstart")],
Expand Down
Loading