Browse Source

Merge pull request #1761 from est31/master

Fix headless exporting bugs
Juan Linietsky 10 years ago
parent
commit
744f778707
2 changed files with 6 additions and 0 deletions
  1. 1 0
      tools/editor/editor_settings.cpp
  2. 5 0
      tools/editor/project_export.cpp

+ 1 - 0
tools/editor/editor_settings.cpp

@@ -264,6 +264,7 @@ void EditorSettings::create() {
 
 
 	singleton = Ref<EditorSettings>( memnew( EditorSettings ) );
 	singleton = Ref<EditorSettings>( memnew( EditorSettings ) );
 	singleton->config_file_path=config_file_path;
 	singleton->config_file_path=config_file_path;
+	singleton->settings_path=config_path+"/"+config_dir;
 	singleton->_load_defaults();
 	singleton->_load_defaults();
 	singleton->scan_plugins();
 	singleton->scan_plugins();
 
 

+ 5 - 0
tools/editor/project_export.cpp

@@ -479,6 +479,11 @@ Error ProjectExportDialog::export_platform(const String& p_platform, const Strin
 	if (err!=OK) {
 	if (err!=OK) {
 		error->set_text("Error exporting project!");
 		error->set_text("Error exporting project!");
 		error->popup_centered_minsize();
 		error->popup_centered_minsize();
+		ERR_PRINT("Exporting failed!");
+		if (p_quit_after) {
+			OS::get_singleton()->set_exit_code(255);
+			get_tree()->quit();
+		}
 		return ERR_CANT_CREATE;
 		return ERR_CANT_CREATE;
 	} else {
 	} else {
 		if (p_quit_after) {
 		if (p_quit_after) {