summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/editor_export.cpp41
-rw-r--r--tools/editor/editor_export.h18
-rw-r--r--tools/editor/io_plugins/editor_export_scene.cpp2
-rw-r--r--tools/editor/io_plugins/editor_scene_import_plugin.cpp2
-rw-r--r--tools/editor/io_plugins/editor_texture_import_plugin.cpp2
-rw-r--r--tools/editor/plugins/line_2d_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/line_2d_editor_plugin.h9
-rw-r--r--tools/editor/plugins/sample_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/sample_library_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp4
10 files changed, 67 insertions, 19 deletions
diff --git a/tools/editor/editor_export.cpp b/tools/editor/editor_export.cpp
index 9483fa84ac..a67b583868 100644
--- a/tools/editor/editor_export.cpp
+++ b/tools/editor/editor_export.cpp
@@ -326,7 +326,7 @@ Error EditorExportPlatform::_save_zip_file(void *p_userdata,const String& p_path
String EditorExportPlatform::find_export_template(String template_file_name, String *err) const {
String user_file = EditorSettings::get_singleton()->get_settings_path()
- +"/templates/"+template_file_name;
+ +"/templates/"+itos(VERSION_MAJOR)+"."+itos(VERSION_MINOR)+"."+_MKSTR(VERSION_STATUS)+"/"+template_file_name;
String system_file=OS::get_singleton()->get_installed_templates_path();
bool has_system_path=(system_file!="");
system_file+=template_file_name;
@@ -891,15 +891,27 @@ Ref<Texture> EditorExportPlatformPC::get_logo() const {
return logo;
}
-bool EditorExportPlatformPC::can_export(String *r_error) const {
- return true;
+bool EditorExportPlatformPC::can_export(const Ref<EditorExportPreset>& p_preset,String &r_error, bool &r_missing_templates) const {
+
+ r_missing_templates=false;
+
+ if (find_export_template(release_file_32)==String()) {
+ r_missing_templates=true;
+ } else if (find_export_template(debug_file_32)==String()) {
+ r_missing_templates=true;
+ } else if (find_export_template(release_file_64)==String()) {
+ r_missing_templates=true;
+ } else if (find_export_template(debug_file_64)==String()) {
+ r_missing_templates=true;
+ }
+ return !r_missing_templates;
}
String EditorExportPlatformPC::get_binary_extension() const {
return extension;
}
-Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset>& p_preset,const String& p_path,int p_flags) {
+Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset>& p_preset, bool p_debug, const String& p_path, int p_flags) {
return OK;
}
@@ -916,6 +928,25 @@ void EditorExportPlatformPC::set_logo(const Ref<Texture>& p_logo) {
logo=p_logo;
}
+void EditorExportPlatformPC::set_release_64(const String& p_file) {
+
+ release_file_64=p_file;
+}
+
+void EditorExportPlatformPC::set_release_32(const String& p_file){
+
+ release_file_32=p_file;
+}
+void EditorExportPlatformPC::set_debug_64(const String& p_file){
+
+ debug_file_64=p_file;
+}
+void EditorExportPlatformPC::set_debug_32(const String& p_file){
+
+ debug_file_32=p_file;
+
+}
+
EditorExportPlatformPC::EditorExportPlatformPC() {
}
@@ -925,7 +956,7 @@ EditorExportPlatformPC::EditorExportPlatformPC() {
#if 0
#include "version.h"
#include "script_language.h"
-#include "globals.h"
+#include "global_config.h"
#include "os/file_access.h"
#include "os/dir_access.h"
#include "tools/editor/editor_file_system.h"
diff --git a/tools/editor/editor_export.h b/tools/editor/editor_export.h
index d30ce9bd92..8a9dc965e5 100644
--- a/tools/editor/editor_export.h
+++ b/tools/editor/editor_export.h
@@ -203,10 +203,10 @@ public:
virtual Error run(int p_device,int p_debug_flags) { return OK; }
- virtual bool can_export(String *r_error=NULL) const=0;
+ virtual bool can_export(const Ref<EditorExportPreset>& p_preset,String &r_error,bool &r_missing_templates) const=0;
virtual String get_binary_extension() const=0;
- virtual Error export_project(const Ref<EditorExportPreset>& p_preset,const String& p_path,int p_flags=0)=0;
+ virtual Error export_project(const Ref<EditorExportPreset>& p_preset,bool p_debug,const String& p_path,int p_flags=0)=0;
EditorExportPlatform();
};
@@ -262,7 +262,10 @@ class EditorExportPlatformPC : public EditorExportPlatform {
String name;
String extension;
-
+ String release_file_32;
+ String release_file_64;
+ String debug_file_32;
+ String debug_file_64;
public:
@@ -273,15 +276,20 @@ public:
virtual String get_name() const;
virtual Ref<Texture> get_logo() const;
- virtual bool can_export(String *r_error=NULL) const;
+ virtual bool can_export(const Ref<EditorExportPreset>& p_preset,String &r_error,bool &r_missing_templates) const;
virtual String get_binary_extension() const;
- virtual Error export_project(const Ref<EditorExportPreset>& p_preset,const String& p_path,int p_flags=0);
+ virtual Error export_project(const Ref<EditorExportPreset>& p_preset,bool p_debug,const String& p_path,int p_flags=0);
void set_extension(const String& p_extension);
void set_name(const String& p_name);
void set_logo(const Ref<Texture>& p_loco);
+ void set_release_64(const String& p_file);
+ void set_release_32(const String& p_file);
+ void set_debug_64(const String& p_file);
+ void set_debug_32(const String& p_file);
+
EditorExportPlatformPC();
};
diff --git a/tools/editor/io_plugins/editor_export_scene.cpp b/tools/editor/io_plugins/editor_export_scene.cpp
index f4ab9880ff..265526aace 100644
--- a/tools/editor/io_plugins/editor_export_scene.cpp
+++ b/tools/editor/io_plugins/editor_export_scene.cpp
@@ -34,7 +34,7 @@
#include "os/file_access.h"
#include "tools/editor/editor_settings.h"
#include "scene/resources/packed_scene.h"
-#include "globals.h"
+#include "global_config.h"
Vector<uint8_t> EditorSceneExportPlugin::custom_export(String& p_path,const Ref<EditorExportPlatform> &p_platform) {
diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
index bffccb9072..957072c20a 100644
--- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
@@ -28,7 +28,7 @@
/*************************************************************************/
#include "editor_scene_import_plugin.h"
#if 0
-#include "globals.h"
+#include "global_config.h"
#include "tools/editor/editor_node.h"
#include "scene/resources/packed_scene.h"
#include "scene/resources/box_shape.h"
diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.cpp b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
index c41199f291..cc8d47c6a9 100644
--- a/tools/editor/io_plugins/editor_texture_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
@@ -35,7 +35,7 @@
#include "tools/editor/editor_settings.h"
#include "io/md5.h"
#include "io/marshalls.h"
-#include "globals.h"
+#include "global_config.h"
#include "scene/gui/check_button.h"
#include "scene/gui/button_group.h"
#include "scene/gui/margin_container.h"
diff --git a/tools/editor/plugins/line_2d_editor_plugin.cpp b/tools/editor/plugins/line_2d_editor_plugin.cpp
index 5ecbcaac45..c90d1c4754 100644
--- a/tools/editor/plugins/line_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/line_2d_editor_plugin.cpp
@@ -50,7 +50,7 @@ int Line2DEditor::get_point_index_at(Vector2 gpos) {
return -1;
}
-bool Line2DEditor::forward_input_event(const InputEvent& p_event) {
+bool Line2DEditor::forward_gui_input(const InputEvent& p_event) {
if (!node)
return false;
@@ -84,8 +84,8 @@ bool Line2DEditor::forward_input_event(const InputEvent& p_event) {
undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
undo_redo->commit_action();
}
+ return true;
}
- return true;
}
if(mb.pressed && mb.button_index == BUTTON_LEFT && ((mb.mod.command && mode == MODE_EDIT) || mode == MODE_CREATE)) {
diff --git a/tools/editor/plugins/line_2d_editor_plugin.h b/tools/editor/plugins/line_2d_editor_plugin.h
index 0df64208a8..231f4c6ca7 100644
--- a/tools/editor/plugins/line_2d_editor_plugin.h
+++ b/tools/editor/plugins/line_2d_editor_plugin.h
@@ -15,7 +15,7 @@ class Line2DEditor : public HBoxContainer {
GDCLASS(Line2DEditor, HBoxContainer)
public:
- bool forward_input_event(const InputEvent& p_event);
+ bool forward_gui_input(const InputEvent& p_event);
void edit(Node *p_line2d);
Line2DEditor(EditorNode *p_editor);
@@ -65,7 +65,12 @@ class Line2DEditorPlugin : public EditorPlugin {
GDCLASS( Line2DEditorPlugin, EditorPlugin )
public:
- virtual bool forward_canvas_input_event(const Transform2D& p_canvas_xform,const InputEvent& p_event) { return line2d_editor->forward_input_event(p_event); }
+ virtual bool forward_canvas_gui_input(
+ const Transform2D& p_canvas_xform,
+ const InputEvent& p_event)
+ {
+ return line2d_editor->forward_gui_input(p_event);
+ }
virtual String get_name() const { return "Line2D"; }
bool has_main_screen() const { return false; }
diff --git a/tools/editor/plugins/sample_editor_plugin.cpp b/tools/editor/plugins/sample_editor_plugin.cpp
index cb60134c2c..9445095771 100644
--- a/tools/editor/plugins/sample_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_editor_plugin.cpp
@@ -30,7 +30,7 @@
#if 0
#include "io/resource_loader.h"
-#include "globals.h"
+#include "global_config.h"
#include "tools/editor/editor_settings.h"
diff --git a/tools/editor/plugins/sample_library_editor_plugin.cpp b/tools/editor/plugins/sample_library_editor_plugin.cpp
index d0ff33c881..b996cafd1f 100644
--- a/tools/editor/plugins/sample_library_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_library_editor_plugin.cpp
@@ -31,7 +31,7 @@
#include "sample_library_editor_plugin.h"
#include "io/resource_loader.h"
-#include "globals.h"
+#include "global_config.h"
#include "tools/editor/editor_settings.h"
#include "scene/main/viewport.h"
#include "sample_editor_plugin.h"
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index b7d8cc2ba9..c7639dd4d3 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -292,6 +292,10 @@ String ScriptEditor::_get_debug_tooltip(const String&p_text,Node *_se) {
void ScriptEditor::_breaked(bool p_breaked,bool p_can_debug) {
+ if (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor"))) {
+ return;
+ }
+
debug_menu->get_popup()->set_item_disabled( debug_menu->get_popup()->get_item_index(DEBUG_NEXT), !(p_breaked && p_can_debug));
debug_menu->get_popup()->set_item_disabled( debug_menu->get_popup()->get_item_index(DEBUG_STEP), !(p_breaked && p_can_debug) );
debug_menu->get_popup()->set_item_disabled( debug_menu->get_popup()->get_item_index(DEBUG_BREAK), p_breaked );