summaryrefslogtreecommitdiffstats
path: root/editor/export/editor_export_plugin.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2024-04-17 10:44:44 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2024-08-28 10:29:01 +0300
commit07e986f728bea30787a2411a11d64c158e640015 (patch)
tree2672d40632a5164dff2dfdf522914e7364f79502 /editor/export/editor_export_plugin.cpp
parentdb24ed4eadf233f75cb1ebbf7552d396fb8b4b80 (diff)
downloadredot-engine-07e986f728bea30787a2411a11d64c158e640015.tar.gz
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);