summaryrefslogtreecommitdiff
path: root/platform/bb10/export/export.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-12-08 17:48:03 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-12-08 17:48:03 -0300
commitc650d4e19c1f1fffc2f798db3d18a1ad1a58ab8b (patch)
tree4b9280503112055e2431344547001db59702e69c /platform/bb10/export/export.cpp
parent09ff4571859b012b64876883e186bb7dfaca0c8c (diff)
parente176bb6a7c736e8f2fe7fb96f2a4ecbb296dced0 (diff)
Merge branch 'master' of https://github.com/godotengine/godot
Diffstat (limited to 'platform/bb10/export/export.cpp')
-rw-r--r--platform/bb10/export/export.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/platform/bb10/export/export.cpp b/platform/bb10/export/export.cpp
index 434aaff414..2acd920f31 100644
--- a/platform/bb10/export/export.cpp
+++ b/platform/bb10/export/export.cpp
@@ -275,10 +275,16 @@ Error EditorExportPlatformBB10::export_project(const String& p_path, bool p_debu
EditorProgress ep("export","Exporting for BlackBerry 10",104);
- String template_path = EditorSettings::get_singleton()->get_settings_path()+"/templates/";
-
- String src_template=custom_package!=""?custom_package:template_path.plus_file("bb10.zip");
-
+ String src_template=custom_package;
+
+ if (src_template=="") {
+ String err;
+ src_template = find_export_template("bb10.zip", &err);
+ if (src_template=="") {
+ EditorNode::add_io_error(err);
+ return ERR_FILE_NOT_FOUND;
+ }
+ }
FileAccess *src_f=NULL;
zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
@@ -733,9 +739,7 @@ bool EditorExportPlatformBB10::can_export(String *r_error) const {
err+="Blackberry host tools not configured in editor settings.\n";
}
- String exe_path = EditorSettings::get_singleton()->get_settings_path()+"/templates/";
-
- if (!FileAccess::exists(exe_path+"bb10.zip")) {
+ if (!exists_export_template("bb10.zip")) {
valid=false;
err+="No export template found.\nDownload and install export templates.\n";
}