summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorMarcelo Fernandez <marcelofg55@gmail.com>2017-09-17 14:40:58 -0300
committerMarcelo Fernandez <marcelofg55@gmail.com>2017-09-17 14:40:58 -0300
commit3528b1e571dee24917b0141232f135e29bf088ba (patch)
tree1994ea234d7c52dac02084242671348844bed3fc /editor
parent574a5714dcbf5fcf126f3f99caab62a345e665c1 (diff)
Fix x11 exported executables not getting the +x flag
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_export.cpp18
-rw-r--r--editor/editor_export.h4
2 files changed, 21 insertions, 1 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index d08a595fd2..ad9bc4a662 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -1246,9 +1246,13 @@ Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_pr
}
DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
- da->copy(template_path, p_path);
+ Error err = da->copy(template_path, p_path, get_chmod_flags());
memdelete(da);
+ if (err != OK) {
+ return err;
+ }
+
String pck_path = p_path.get_basename() + ".pck";
return save_pack(p_preset, pck_path);
@@ -1302,5 +1306,17 @@ void EditorExportPlatformPC::get_platform_features(List<String> *r_features) {
}
}
+int EditorExportPlatformPC::get_chmod_flags() const {
+
+ return chmod_flags;
+}
+
+void EditorExportPlatformPC::set_chmod_flags(int p_flags) {
+
+ chmod_flags = p_flags;
+}
+
EditorExportPlatformPC::EditorExportPlatformPC() {
+
+ chmod_flags = -1;
}
diff --git a/editor/editor_export.h b/editor/editor_export.h
index b6ea4fd889..50379b9683 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -319,6 +319,7 @@ class EditorExportPlatformPC : public EditorExportPlatform {
Set<String> extra_features;
bool use64;
+ int chmod_flags;
public:
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features);
@@ -347,6 +348,9 @@ public:
void add_platform_feature(const String &p_feature);
virtual void get_platform_features(List<String> *r_features);
+ int get_chmod_flags() const;
+ void set_chmod_flags(int p_flags);
+
EditorExportPlatformPC();
};