mirror of
https://github.com/godotengine/godot-cpp-template.git
synced 2026-01-04 14:09:57 +03:00
Update to 4.3 and support for GDExtension docs system
This commit is contained in:
@@ -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 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`).
|
* 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/`)
|
* 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
|
## Usage - Template
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,13 @@ env = SConscript("godot-cpp/SConstruct", {"env": env, "customs": customs})
|
|||||||
env.Append(CPPPATH=["src/"])
|
env.Append(CPPPATH=["src/"])
|
||||||
sources = Glob("src/*.cpp")
|
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"])
|
file = "{}{}{}".format(libname, env["suffix"], env["SHLIBSUFFIX"])
|
||||||
|
|
||||||
if env["platform"] == "macos" or env["platform"] == "ios":
|
if env["platform"] == "macos" or env["platform"] == "ios":
|
||||||
|
|||||||
Submodule godot-cpp updated: 54136ee835...fbbf9ec4ef
Reference in New Issue
Block a user