diff options
| author | David Snopek <dsnopek@gmail.com> | 2024-01-25 08:54:58 -0600 |
|---|---|---|
| committer | David Snopek <dsnopek@gmail.com> | 2024-05-07 11:08:18 -0500 |
| commit | a434850069212b2d2dbe70fd82c4e5774b739040 (patch) | |
| tree | dc624f2af43e2033fb7304e879f5d8348feac7d8 /test | |
| parent | 54fe2f9891525891a52c47ffbd190d15c38cccab (diff) | |
| download | redot-cpp-a434850069212b2d2dbe70fd82c4e5774b739040.tar.gz | |
Allow submitting documentation to the Godot editor
Diffstat (limited to 'test')
| -rw-r--r-- | test/SConstruct | 4 | ||||
| -rw-r--r-- | test/doc_classes/Example.xml | 25 | ||||
| -rw-r--r-- | test/project/project.godot | 2 |
3 files changed, 30 insertions, 1 deletions
diff --git a/test/SConstruct b/test/SConstruct index 9c25917..7cb25be 100644 --- a/test/SConstruct +++ b/test/SConstruct @@ -16,6 +16,10 @@ env = SConscript("../SConstruct") env.Append(CPPPATH=["src/"]) sources = Glob("src/*.cpp") +if env["target"] in ["editor", "template_debug"]: + doc_data = env.GodotCPPDocData("src/gen/doc_data.gen.cpp", source=Glob("doc_classes/*.xml")) + sources.append(doc_data) + if env["platform"] == "macos": library = env.SharedLibrary( "project/bin/libgdexample.{}.{}.framework/libgdexample.{}.{}".format( diff --git a/test/doc_classes/Example.xml b/test/doc_classes/Example.xml new file mode 100644 index 0000000..457709d --- /dev/null +++ b/test/doc_classes/Example.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Example" inherits="Control" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd"> + <brief_description> + A test control defined in GDExtension. + </brief_description> + <description> + A control used for the automated GDExtension tests. + </description> + <tutorials> + </tutorials> + <methods> + <method name="simple_func"> + <return type="void" /> + <description> + Tests a simple function call. + </description> + </method> + </methods> + <members> + </members> + <signals> + </signals> + <constants> + </constants> +</class> diff --git a/test/project/project.godot b/test/project/project.godot index 4f51c07..df3dd70 100644 --- a/test/project/project.godot +++ b/test/project/project.godot @@ -12,7 +12,7 @@ config_version=5 config/name="GDExtension Test Project" run/main_scene="res://main.tscn" -config/features=PackedStringArray("4.2") +config/features=PackedStringArray("4.3") config/icon="res://icon.png" [native_extensions] |
