diff options
| author | Juan Linietsky <reduzio@gmail.com> | 2015-12-08 17:04:24 -0300 |
|---|---|---|
| committer | Juan Linietsky <reduzio@gmail.com> | 2015-12-08 17:04:24 -0300 |
| commit | eff81965af5a7c8180889d55eb55992680e896a4 (patch) | |
| tree | 0b2992a510ee9bb68da08be8773378509807ceef /platform/osx/export/export.cpp | |
| parent | a6ac1fcd94c6433776d6f8c3fba4c48f36a4d8dd (diff) | |
| parent | e1d02e4831fdec372771956aa2ac70954ab3fe7b (diff) | |
Merge pull request #2956 from est31/add_system_wide_export_path
Add way to look for templates at system wide level too
Diffstat (limited to 'platform/osx/export/export.cpp')
| -rw-r--r-- | platform/osx/export/export.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index 79ee91bc61..0bece6ec76 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -251,15 +251,19 @@ Error EditorExportPlatformOSX::export_project(const String& p_path, bool p_debug EditorProgress ep("export","Exporting for OSX",104); - String pkg_path = EditorSettings::get_singleton()->get_settings_path()+"/templates/osx.zip"; - - if (p_debug) { - - src_pkg=custom_debug_package!=""?custom_debug_package:pkg_path; - } else { - - src_pkg=custom_release_package!=""?custom_release_package:pkg_path; + if (p_debug) + src_pkg=custom_debug_package; + else + src_pkg=custom_release_package; + + if (src_pkg=="") { + String err; + src_pkg=find_export_template("osx.zip", &err); + if (src_pkg=="") { + EditorNode::add_io_error(err); + return ERR_FILE_NOT_FOUND; + } } @@ -464,9 +468,8 @@ bool EditorExportPlatformOSX::can_export(String *r_error) const { bool valid=true; String err; - String exe_path = EditorSettings::get_singleton()->get_settings_path()+"/templates/"; - if (!FileAccess::exists(exe_path+"osx.zip")) { + if (!exists_export_template("osx.zip")) { valid=false; err+="No export templates found.\nDownload and install export templates.\n"; } |