summaryrefslogtreecommitdiffstats
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-09-26 12:45:42 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-09-26 12:45:42 +0200
commit2912cb99756dede609548503eeb3f6f1a2f2dfbf (patch)
treeb1c092f0ae2943ae5cfa1161f1442d2cbd91102f /editor/editor_node.cpp
parent991e6c92abd26435169ad7ea0df2622685cac6d1 (diff)
parentd3be030ea6f3e295603ccf6cc9080a1d32051332 (diff)
downloadredot-engine-2912cb99756dede609548503eeb3f6f1a2f2dfbf.tar.gz
Merge pull request #97118 from mihe/patch-exports
Add ability to export patch packs
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 f248d03140..665255b9b2 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;
@@ -5149,12 +5157,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;
}