diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-11-20 15:19:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-20 15:19:06 +0100 |
commit | 4784e9506b4c116c08c5b1a4418aa1833afbf6a4 (patch) | |
tree | 43d9d3ac6b9073fb263dd05bc352a5ef32ac57f3 | |
parent | 89fc4536693a2b31ed1423998525cfd03fbfec16 (diff) | |
parent | 56b25b5fc8d078cc4f30afe34323a6437a683ee1 (diff) |
Merge pull request #12555 from kosz78/export-pck
Add command line support to export pck or zip
-rw-r--r-- | editor/editor_node.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 6559048172..817e6affbd 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -401,7 +401,15 @@ void EditorNode::_fs_changed() { // ensures export_project does not loop infinitely, because notifications may // come during the export export_defer.preset = ""; - platform->export_project(preset, export_defer.debug, export_defer.path, /*p_flags*/ 0); + if (!preset->is_runnable() && (export_defer.path.ends_with(".pck") || export_defer.path.ends_with(".zip"))) { + if (export_defer.path.ends_with(".zip")) { + platform->save_zip(preset, export_defer.path); + } else if (export_defer.path.ends_with(".pck")) { + platform->save_pack(preset, export_defer.path); + } + } else { + platform->export_project(preset, export_defer.debug, export_defer.path, /*p_flags*/ 0); + } } } |