mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-01 05:48:37 +03:00
Allow submitting documentation to the Godot editor
This commit is contained in:
@@ -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(
|
||||
|
||||
25
test/doc_classes/Example.xml
Normal file
25
test/doc_classes/Example.xml
Normal file
@@ -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>
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user