summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp29
1 files changed, 8 insertions, 21 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 246a26025c..97794ece1a 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -371,11 +371,6 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print(" --no-docbase Disallow dumping the base types (used with --doctool).\n");
OS::get_singleton()->print(" --build-solutions Build the scripting solutions (e.g. for C# projects). Implies --editor and requires a valid project to edit.\n");
OS::get_singleton()->print(" --dump-extension-api Generate JSON dump of the Godot API for GDExtension bindings named 'extension_api.json' in the current folder.\n");
-#ifdef DEBUG_METHODS_ENABLED
- // TODO: Should be removed together with nativescript eventually.
- OS::get_singleton()->print(" --gdnative-generate-json-api <path> Generate JSON dump of the Godot API for GDNative bindings and save it on the file specified in <path>.\n");
- OS::get_singleton()->print(" --gdnative-generate-json-builtin-api <path> Generate JSON dump of the Godot API of the builtin Variant types and utility functions for GDNative bindings and save it on the file specified in <path>.\n");
-#endif
#ifdef TESTS_ENABLED
OS::get_singleton()->print(" --test [--help] Run unit tests. Use --test --help for more information.\n");
#endif
@@ -425,6 +420,7 @@ Error Main::test_setup() {
ResourceLoader::load_path_remaps();
register_scene_types();
+ register_driver_types();
#ifdef TOOLS_ENABLED
ClassDB::set_current_api(ClassDB::API_EDITOR);
@@ -435,7 +431,6 @@ Error Main::test_setup() {
register_platform_apis();
register_module_types();
- register_driver_types();
// Theme needs modules to be initialized so that sub-resources can be loaded.
initialize_theme();
@@ -458,13 +453,13 @@ void Main::test_cleanup() {
ResourceLoader::remove_custom_loaders();
ResourceSaver::remove_custom_savers();
- unregister_driver_types();
#ifdef TOOLS_ENABLED
EditorNode::unregister_editor_types();
#endif
unregister_module_types();
unregister_platform_apis();
+ unregister_driver_types();
unregister_scene_types();
unregister_server_types();
@@ -946,15 +941,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
auto_build_solutions = true;
editor = true;
cmdline_tool = true;
-#ifdef DEBUG_METHODS_ENABLED
- } else if (I->get() == "--gdnative-generate-json-api" || I->get() == "--gdnative-generate-json-builtin-api") {
- // Register as an editor instance to use low-end fallback if relevant.
- editor = true;
- cmdline_tool = true;
- // We still pass it to the main arguments since the argument handling itself is not done in this function,
- // it's done in nativescript init code.
- main_args.push_back(I->get());
-#endif
} else if (I->get() == "--dump-extension-api") {
// Register as an editor instance to use low-end fallback if relevant.
editor = true;
@@ -1890,6 +1876,10 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
register_scene_types();
+ MAIN_PRINT("Main: Load Driver Types");
+
+ register_driver_types();
+
#ifdef TOOLS_ENABLED
ClassDB::set_current_api(ClassDB::API_EDITOR);
EditorNode::register_editor_types();
@@ -1925,14 +1915,12 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
camera_server = CameraServer::create();
- MAIN_PRINT("Main: Load Physics, Drivers, Scripts");
+ MAIN_PRINT("Main: Load Physics");
initialize_physics();
initialize_navigation_server();
register_server_singletons();
- register_driver_types();
-
// This loads global classes, so it must happen before custom loaders and savers are registered
ScriptServer::init_languages();
@@ -2816,8 +2804,6 @@ void Main::cleanup(bool p_force) {
xr_server->set_primary_interface(Ref<XRInterface>());
}
- unregister_driver_types();
-
#ifdef TOOLS_ENABLED
EditorNode::unregister_editor_types();
#endif
@@ -2826,6 +2812,7 @@ void Main::cleanup(bool p_force) {
unregister_module_types();
unregister_platform_apis();
+ unregister_driver_types();
unregister_scene_types();
unregister_server_types();