summaryrefslogtreecommitdiff
path: root/platform/osx/export
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2020-01-10 20:08:01 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2020-01-10 20:08:01 +0200
commit2d22b6e5c311e73363b168eafe4c41e56fbe8204 (patch)
treeddc4caffde6fa0fdd5ebc4d3da721e73a3a5a437 /platform/osx/export
parent4b3123104cb766a11a9cb93afb08af118712f012 (diff)
[macOS/Mono] Filter release/debug and rename Mono data folder on export.
Diffstat (limited to 'platform/osx/export')
-rw-r--r--platform/osx/export/export.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index 1cb72943fc..cf38664022 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -502,6 +502,8 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
else
pkg_name = "Unnamed";
+ String pkg_name_safe = OS::get_singleton()->get_safe_dir_name(pkg_name);
+
Error err = OK;
String tmp_app_path_name = "";
zlib_filefunc_def io2 = io;
@@ -612,6 +614,22 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
}
if (data.size() > 0) {
+
+ if (file.find("/data.mono.osx.64.release_debug/") != -1) {
+ if (!p_debug) {
+ ret = unzGoToNextFile(src_pkg_zip);
+ continue; //skip
+ }
+ file = file.replace("/data.mono.osx.64.release_debug/", "/data_" + pkg_name_safe + "/");
+ }
+ if (file.find("/data.mono.osx.64.release/") != -1) {
+ if (p_debug) {
+ ret = unzGoToNextFile(src_pkg_zip);
+ continue; //skip
+ }
+ file = file.replace("/data.mono.osx.64.release/", "/data_" + pkg_name_safe + "/");
+ }
+
print_line("ADDING: " + file + " size: " + itos(data.size()));
total_size += data.size();