You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Merge pull request #97118 from mihe/patch-exports
Add ability to export patch packs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user