aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/project_export.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2014-02-15 02:01:39 -0300
committerJuan Linietsky2014-02-15 02:02:41 -0300
commit9afdb3e0ad5bfbdafe307212f5d4ebcc7c3ac852 (patch)
treed25ef63dfe50d59987b4a611c1d1773185a3e35d /tools/editor/project_export.cpp
parentb0870e487c6cc68bb0a2cef7174f3f5697667a2e (diff)
downloadgodot-9afdb3e0ad5bfbdafe307212f5d4ebcc7c3ac852.tar.gz
godot-9afdb3e0ad5bfbdafe307212f5d4ebcc7c3ac852.tar.zst
godot-9afdb3e0ad5bfbdafe307212f5d4ebcc7c3ac852.zip
-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.
Diffstat (limited to 'tools/editor/project_export.cpp')
-rw-r--r--tools/editor/project_export.cpp18
1 files changed, 18 insertions, 0 deletions
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;