summaryrefslogtreecommitdiffstats
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 184176391a..9654cd3157 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -1007,9 +1007,17 @@ void EditorNode::_fs_changed() {
export_preset->update_value_overrides();
if (export_defer.pack_only) { // Only export .pck or .zip data pack.
if (export_path.ends_with(".zip")) {
- err = platform->export_zip(export_preset, export_defer.debug, export_path);
+ if (export_defer.patch) {
+ err = platform->export_zip_patch(export_preset, export_defer.debug, export_path, export_defer.patches);
+ } else {
+ err = platform->export_zip(export_preset, export_defer.debug, export_path);
+ }
} else if (export_path.ends_with(".pck")) {
- err = platform->export_pack(export_preset, export_defer.debug, export_path);
+ if (export_defer.patch) {
+ err = platform->export_pack_patch(export_preset, export_defer.debug, export_path, export_defer.patches);
+ } else {
+ err = platform->export_pack(export_preset, export_defer.debug, export_path);
+ }
} else {
ERR_PRINT(vformat("Export path \"%s\" doesn't end with a supported extension.", export_path));
err = FAILED;
@@ -5147,12 +5155,14 @@ void EditorNode::_begin_first_scan() {
requested_first_scan = true;
}
-Error EditorNode::export_preset(const String &p_preset, const String &p_path, bool p_debug, bool p_pack_only, bool p_android_build_template) {
+Error EditorNode::export_preset(const String &p_preset, const String &p_path, bool p_debug, bool p_pack_only, bool p_android_build_template, bool p_patch, const Vector<String> &p_patches) {
export_defer.preset = p_preset;
export_defer.path = p_path;
export_defer.debug = p_debug;
export_defer.pack_only = p_pack_only;
export_defer.android_build_template = p_android_build_template;
+ export_defer.patch = p_patch;
+ export_defer.patches = p_patches;
cmdline_export_mode = true;
return OK;
}