[DRAFT] Generate GDExtension interface header and loader from JSON
This is the first step towards "godot-cpp v10" as described in this proposal.
It does a bunch of things:
- Generates the
gdextension_interface.hfromgdextension_interface.json - Replaces most of the code that loads the GDExtension interface functions with code also generated from
gdextension_interface.json - Adds a
deprecated=nooption for SCons to prevent loading deprecated GDExtension interface functions - Puts the loaded functions under
godot::gdextension_interfacerather thangodot::internal, making them officially part of the API - Allows working with both Godot 4.5 or 4.6, depending on which version generated the
extension_api.json - Standardizes on using fully qualified namespaces for
::godot::gdextension_interfaceand::godot::internal
~~There's one important thing this it does NOT do, which is cmake support for the build system changes. That's something I've still got to figure out.~~
Marking as DRAFT because it now depends on Godot PR https://github.com/godotengine/godot/pull/113697
Hrm. MSVC is having issues with using interface as a namespace, but only when building with CMake? That's odd...
I ended up renaming interface to gdextension_interface, which I think I like better anyway :-)
Now that PR https://github.com/godotengine/godot/pull/113697 is merged, I've updated it to match the latest in Godot master, and taken it out of DRAFT