Skip to content

Commit 3ab1b75

Browse files
committed
[GDExtension] Improve error messages during export.
1 parent 2e14492 commit 3ab1b75

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

editor/export/editor_export_platform_pc.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,15 @@ Error EditorExportPlatformPC::export_project_data(const Ref<EditorExportPreset>
222222
err = da->make_dir_recursive(target_path);
223223
if (err == OK) {
224224
err = da->copy_dir(src_path, target_path, -1, true);
225+
if (err != OK) {
226+
add_message(EXPORT_MESSAGE_ERROR, TTR("GDExtension"), TTR(vformat("Failed to copy shared object \"%s\".", src_path)));
227+
}
225228
}
226229
} else {
227230
err = da->copy(src_path, target_path);
231+
if (err != OK) {
232+
add_message(EXPORT_MESSAGE_ERROR, TTR("GDExtension"), TTR(vformat("Failed to copy shared object \"%s\".", src_path)));
233+
}
228234
if (err == OK) {
229235
err = sign_shared_object(p_preset, p_debug, target_path);
230236
}

editor/plugins/gdextension_export_plugin.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ void GDExtensionExportPlugin::_export_file(const String &p_path, const String &p
127127
for (const String &E : p_features) {
128128
features_vector.append(E);
129129
}
130-
ERR_FAIL_MSG(vformat("No suitable library found for GDExtension: %s. Possible feature flags for your platform: %s", p_path, String(", ").join(features_vector)));
130+
if (get_export_platform().is_valid()) {
131+
get_export_platform()->add_message(EditorExportPlatform::EXPORT_MESSAGE_WARNING, TTR("GDExtension"), vformat(TTR("No suitable library found for GDExtension: \"%s\". Possible feature flags for your platform: %s"), p_path, String(", ").join(features_vector)));
132+
}
133+
return;
131134
}
132135

133136
Vector<SharedObject> dependencies_shared_objects = GDExtensionLibraryLoader::find_extension_dependencies(p_path, config, [p_features](String p_feature) { return p_features.has(p_feature); });

0 commit comments

Comments
 (0)