From 9afdb3e0ad5bfbdafe307212f5d4ebcc7c3ac852 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 15 Feb 2014 02:01:39 -0300 Subject: -fixed bug in Button now exporting font property -made GUI Theme editor usable -editor does not allow to export or create .pck in the same path as a project -changed .pck format (lacked support for versioning so couldn't change it), previous was causing crashes and is now incompatible, just re-export. -will not look for .pck files recursively, was causing unexpected behaviors -fixed execution of Godot in paths with non unicode characters in Windows, OSX and Linux. --- tools/editor/project_export.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tools/editor/project_export.cpp') diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp index fd2580e00..070f8d1ba 100644 --- a/tools/editor/project_export.cpp +++ b/tools/editor/project_export.cpp @@ -374,6 +374,24 @@ void ProjectExportDialog::_export_mode_changed(int p_idx) { void ProjectExportDialog::_export_action(const String& p_file) { + String location = Globals::get_singleton()->globalize_path(p_file).get_base_dir().replace("\\","/"); + + while(true) { + + print_line("TESTING: "+location.plus_file("engine.cfg")); + if (FileAccess::exists(location.plus_file("engine.cfg"))) { + + error->set_text("Please export outside the project folder!"); + error->popup_centered(Size2(300,70));; + return; + } + String nl = (location+"/..").simplify_path(); + if (nl.find("/")==location.find_last("/")) + break; + location=nl; + } + + TreeItem *selected = platforms->get_selected(); if (!selected) return; -- cgit v1.2.3-70-g09d2