summaryrefslogtreecommitdiffstats
path: root/editor/export/editor_export_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-08-30 09:58:52 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-08-30 09:58:52 +0200
commit66dd06837ccd427201e1d591f069e44930eb628e (patch)
tree4b9f779539050e33c088b8b6aa02a9a15a5eddcd /editor/export/editor_export_plugin.cpp
parentd5385491f6a758759f88a26ed76786b03b191886 (diff)
parent07e986f728bea30787a2411a11d64c158e640015 (diff)
downloadredot-engine-66dd06837ccd427201e1d591f069e44930eb628e.tar.gz
Merge pull request #90782 from bruvzg/export_platform_extension
Allow adding custom export platforms using scripts / GDExtension.
Diffstat (limited to 'editor/export/editor_export_plugin.cpp')
-rw-r--r--editor/export/editor_export_plugin.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/editor/export/editor_export_plugin.cpp b/editor/export/editor_export_plugin.cpp
index 28d0750d5a..f56dd61e3b 100644
--- a/editor/export/editor_export_plugin.cpp
+++ b/editor/export/editor_export_plugin.cpp
@@ -48,6 +48,14 @@ Ref<EditorExportPreset> EditorExportPlugin::get_export_preset() const {
return export_preset;
}
+Ref<EditorExportPlatform> EditorExportPlugin::get_export_platform() const {
+ if (export_preset.is_valid()) {
+ return export_preset->get_platform();
+ } else {
+ return Ref<EditorExportPlatform>();
+ }
+}
+
void EditorExportPlugin::add_file(const String &p_path, const Vector<uint8_t> &p_file, bool p_remap) {
ExtraFile ef;
ef.data = p_file;
@@ -321,6 +329,9 @@ void EditorExportPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("skip"), &EditorExportPlugin::skip);
ClassDB::bind_method(D_METHOD("get_option", "name"), &EditorExportPlugin::get_option);
+ ClassDB::bind_method(D_METHOD("get_export_preset"), &EditorExportPlugin::get_export_preset);
+ ClassDB::bind_method(D_METHOD("get_export_platform"), &EditorExportPlugin::get_export_platform);
+
GDVIRTUAL_BIND(_export_file, "path", "type", "features");
GDVIRTUAL_BIND(_export_begin, "features", "is_debug", "path", "flags");
GDVIRTUAL_BIND(_export_end);