summaryrefslogtreecommitdiff
path: root/core/extension
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2022-07-20 19:05:49 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-08-08 19:30:34 +0200
commit27a072c8845c3919b49426d161f83c360c0bfe6f (patch)
tree4d07aa3b0de32633f47666f6547d8148d42e5c97 /core/extension
parent862dedcefee5d22449eca711aa9af33c4377d31a (diff)
Print expected `os.arch` tuple for current platform in GDExtension error
This also adds `Engine.get_architecture_name()` to get the name of the CPU architecture the Godot binary was built for.
Diffstat (limited to 'core/extension')
-rw-r--r--core/extension/native_extension.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/extension/native_extension.cpp b/core/extension/native_extension.cpp
index b69859b441..a085df874e 100644
--- a/core/extension/native_extension.cpp
+++ b/core/extension/native_extension.cpp
@@ -372,7 +372,7 @@ Ref<Resource> NativeExtensionResourceLoader::load(const String &p_path, const St
}
if (err != OK) {
- ERR_PRINT("Error loading GDExtension config file: " + p_path);
+ ERR_PRINT("Error loading GDExtension configuration file: " + p_path);
return Ref<Resource>();
}
@@ -380,7 +380,7 @@ Ref<Resource> NativeExtensionResourceLoader::load(const String &p_path, const St
if (r_error) {
*r_error = ERR_INVALID_DATA;
}
- ERR_PRINT("GDExtension config file must contain 'configuration.entry_symbol' key: " + p_path);
+ ERR_PRINT("GDExtension configuration file must contain a \"configuration/entry_symbol\" key: " + p_path);
return Ref<Resource>();
}
@@ -413,7 +413,8 @@ Ref<Resource> NativeExtensionResourceLoader::load(const String &p_path, const St
if (r_error) {
*r_error = ERR_FILE_NOT_FOUND;
}
- ERR_PRINT("No GDExtension library found for current architecture; in config file " + p_path);
+ const String os_arch = OS::get_singleton()->get_name().to_lower() + "." + Engine::get_singleton()->get_architecture_name();
+ ERR_PRINT(vformat("No GDExtension library found for current OS and architecture (%s) in configuration file: %s", os_arch, p_path));
return Ref<Resource>();
}