mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Add GDNative JSON generator for the builtin API
Which can be used by language bindings to generate code statically. This is generated as a different file from the class API because it has different requirements (the builtin types have constructors and don't have signals), so bindings can better make use of each JSON file without extra parsing. This also cleans up a bit the old API generator, mainly initializing structs and renaming "instanciable" to the more correct "instantiable". The argument description in help text was updated to better reflect how it should be used. The <path> argument is mandatory.
This commit is contained in:
parent
a4aaead346
commit
8a8dbd76b1
4 changed files with 462 additions and 75 deletions
|
@ -1257,6 +1257,15 @@ void NativeScriptLanguage::init() {
|
|||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
E = args.find("--gdnative-generate-json-builtin-api");
|
||||
|
||||
if (E && E->next()) {
|
||||
if (generate_c_builtin_api(E->next()->get()) != OK) {
|
||||
ERR_PRINT("Failed to generate C builtin API\n");
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue