summaryrefslogtreecommitdiff
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
authorKonstantin Zaitsev <konstantin.zaitsev@xored.com>2017-11-01 14:39:20 +0700
committerKonstantin Zaitsev <konstantin.zaitsev@xored.com>2017-11-01 14:39:20 +0700
commit56b25b5fc8d078cc4f30afe34323a6437a683ee1 (patch)
tree5d777ef352aac32f5e7d8fc34b2f3fa2d7ab58f9 /editor/editor_node.cpp
parent7a5594bdb79f0859ce67166b7fb6ed89098e5bcc (diff)
Add command line support to export pck or zip
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 3513126a9b..292dcb31c9 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -378,7 +378,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);
+ }
}
}