From 5952c207bb5f4b2c85a06f9ef990e72707397a5c Mon Sep 17 00:00:00 2001 From: Patrick Exner Date: Fri, 16 Aug 2024 20:39:39 +0200 Subject: [PATCH] Update to 4.3 and support for GDExtension docs system --- README.md | 1 + SConstruct | 7 +++++++ godot-cpp | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8cd795e..87d4e4a 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ This repository serves as a quickstart template for GDExtension development with * GitHub CI/CD workflows to publish your library packages when creating a release (`.github/workflows/builds.yml`) * GitHub CI/CD actions to build (`.github/actions/build/action.yml`) and to sign Mac frameworks (`.github/actions/build/sign.yml`). * preconfigured source files for C++ development of the GDExtension (`src/`) +* setup to automatically generate `.xml` files in a `doc_classes/` directory to be parsed by Godot as [GDExtension built-in documentation](https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/gdextension_docs_system.html) ## Usage - Template diff --git a/SConstruct b/SConstruct index 5fb32d2..da01c27 100644 --- a/SConstruct +++ b/SConstruct @@ -53,6 +53,13 @@ env = SConscript("godot-cpp/SConstruct", {"env": env, "customs": customs}) env.Append(CPPPATH=["src/"]) sources = Glob("src/*.cpp") +if env["target"] in ["editor", "template_debug"]: + try: + doc_data = env.GodotCPPDocData("src/gen/doc_data.gen.cpp", source=Glob("doc_classes/*.xml")) + sources.append(doc_data) + except AttributeError: + print("Not including class reference as we're targeting a pre-4.3 baseline.") + file = "{}{}{}".format(libname, env["suffix"], env["SHLIBSUFFIX"]) if env["platform"] == "macos" or env["platform"] == "ios": diff --git a/godot-cpp b/godot-cpp index 54136ee..fbbf9ec 160000 --- a/godot-cpp +++ b/godot-cpp @@ -1 +1 @@ -Subproject commit 54136ee8357c5140a3775c54f08db5f7deda2058 +Subproject commit fbbf9ec4efd8f1055d00edb8d926eef8ba4c2cce