diff --git a/README.md b/README.md index d5c9cac..e499ece 100644 --- a/README.md +++ b/README.md @@ -25,14 +25,14 @@ Keep `ImGui::` APIs. Core, backend contracts and the optional app facade remain ## Getting started ```sh -mcpp new ui --template mcpplibs.mwrap.imgui@1.92.8 +mcpp new ui --template mcpplibs.mwrap.imgui@1.92.8.1 cd ui mcpp run ``` ```toml [dependencies] -mcpplibs.mwrap.imgui = "1.92.8" +mcpplibs.mwrap.imgui = "1.92.8.1" ``` ```cpp diff --git a/README.zh.md b/README.zh.md index 01459c8..a87426b 100644 --- a/README.zh.md +++ b/README.zh.md @@ -25,14 +25,14 @@ ## 快速开始 ```sh -mcpp new ui --template mcpplibs.mwrap.imgui@1.92.8 +mcpp new ui --template mcpplibs.mwrap.imgui@1.92.8.1 cd ui mcpp run ``` ```toml [dependencies] -mcpplibs.mwrap.imgui = "1.92.8" +mcpplibs.mwrap.imgui = "1.92.8.1" ``` ```cpp diff --git a/docs/usage.md b/docs/usage.md index 120949e..d055be1 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -105,12 +105,12 @@ cd examples/docking && mcpp run ## Current-client quickstart candidate -The wrapper revision is `1.92.8`; the upstream C/C++ API and published module +The wrapper revision is `1.92.8.1`; the upstream C/C++ API and published module identity stay unchanged. Development tooling uses mcpp `2026.10.24.1`. Templates -now write one qualified dependency from `self.name`, without repeating a namespace. +write one qualified dependency from `self.name`, unquoted, without repeating a namespace. ```sh -mcpp new quickstart --template mcpplibs.mwrap.imgui@1.92.8:window +mcpp new quickstart --template mcpplibs.mwrap.imgui@1.92.8.1:window cd quickstart mcpp run ``` @@ -125,6 +125,6 @@ bounds the render loop and still performs normal renderer/window cleanup. The candidate index supplies the shared X11 adapter corrections; Linux rendering validation uses a virtual display. A successful build alone does not verify GLX. -The package default is `headless`: `mcpp new quickstart --template mcpplibs.mwrap.imgui@1.92.8` +The package default is `headless`: `mcpp new quickstart --template mcpplibs.mwrap.imgui@1.92.8.1` creates a CPU-only frame example that checks real draw vertices and needs no desktop session. `:window` and `:docking` remain explicit desktop templates. diff --git a/mcpp.toml b/mcpp.toml index e5cfed1..c253976 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -2,7 +2,7 @@ [package] namespace = "mcpplibs.mwrap" name = "imgui" -version = "1.92.8" +version = "1.92.8.1" description = "Dear ImGui 1.92.8 core and GLFW/OpenGL3 backend modules for mcpp" license = "Apache-2.0" authors = ["mcpp-community"] diff --git a/templates/docking/mcpp.toml.in b/templates/docking/mcpp.toml.in index 9ed092b..4c22613 100644 --- a/templates/docking/mcpp.toml.in +++ b/templates/docking/mcpp.toml.in @@ -3,4 +3,4 @@ name = "{{project.name}}" version = "0.1.0" [dependencies] -"{{self.name}}" = { version = "{{self.version}}", features = ["docking-full", "app"] } +{{self.name}} = { version = "{{self.version}}", features = ["docking-full", "app"] } diff --git a/templates/headless/mcpp.toml.in b/templates/headless/mcpp.toml.in index 00381f1..8903f52 100644 --- a/templates/headless/mcpp.toml.in +++ b/templates/headless/mcpp.toml.in @@ -3,4 +3,4 @@ name = "{{project.name}}" version = "0.1.0" [dependencies] -"{{self.name}}" = "{{self.version}}" +{{self.name}} = "{{self.version}}" diff --git a/templates/window/mcpp.toml.in b/templates/window/mcpp.toml.in index e010548..051863a 100644 --- a/templates/window/mcpp.toml.in +++ b/templates/window/mcpp.toml.in @@ -3,4 +3,4 @@ name = "{{project.name}}" version = "0.1.0" [dependencies] -"{{self.name}}" = { version = "{{self.version}}", features = ["app"] } +{{self.name}} = { version = "{{self.version}}", features = ["app"] } diff --git a/tools/test_template.py b/tools/test_template.py index 81ea805..07f1ca6 100644 --- a/tools/test_template.py +++ b/tools/test_template.py @@ -48,7 +48,10 @@ def main(): project = temporary / "quickstart" manifest = project / "mcpp.toml" text = manifest.read_text() - dependency = tomllib.loads(text)["dependencies"][identity] + # The key is unquoted, so TOML reads it as one table per segment. + dependency = tomllib.loads(text)["dependencies"] + for segment in identity.split("."): + dependency = dependency[segment] options = {"version": dependency} if isinstance(dependency, str) else dependency assert options["version"] == version, options replacement = '{ path = ' + json.dumps(package.as_posix()) @@ -56,9 +59,9 @@ def main(): replacement += ', features = ' + json.dumps(options["features"]) replacement += ' }' lines = text.splitlines() - matches = [i for i, line in enumerate(lines) if line.startswith(json.dumps(identity) + " =")] - assert len(matches) == 1, "Expected exactly one qualified dependency from self.name" - lines[matches[0]] = json.dumps(identity) + " = " + replacement + matches = [i for i, line in enumerate(lines) if line.startswith(identity + " =")] + assert len(matches) == 1, "Expected exactly one unquoted qualified dependency from self.name" + lines[matches[0]] = identity + " = " + replacement manifest.write_text("\n".join(lines) + "\n") if args.index: candidate_index = args.index.resolve()