Skip to content

Commit

Permalink
Merge pull request #43768 from sjml/mac-mono-export-fix
Browse files Browse the repository at this point in the history
Mono/macOS: Separate data dir into frameworks and resources for codesigning
  • Loading branch information
akien-mga authored Mar 3, 2021
2 parents 0599e5f + 42eb09d commit 338fa05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions modules/mono/godotsharp_dirs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,16 @@ class _GodotSharpDirs {

#ifdef OSX_ENABLED
if (!DirAccess::exists(data_editor_tools_dir)) {
data_editor_tools_dir = exe_dir.plus_file("../Frameworks/GodotSharp/Tools");
data_editor_tools_dir = exe_dir.plus_file("../Resources/GodotSharp/Tools");
}

if (!DirAccess::exists(data_editor_prebuilt_api_dir)) {
data_editor_prebuilt_api_dir = exe_dir.plus_file("../Frameworks/GodotSharp/Api");
data_editor_prebuilt_api_dir = exe_dir.plus_file("../Resources/GodotSharp/Api");
}

if (!DirAccess::exists(data_mono_root_dir)) {
data_mono_etc_dir = exe_dir.plus_file("../Resources/GodotSharp/Mono/etc");
data_mono_lib_dir = exe_dir.plus_file("../Frameworks/GodotSharp/Mono/lib");
data_mono_lib_dir = exe_dir.plus_file("../Resources/GodotSharp/Mono/lib");
}
#endif

Expand Down Expand Up @@ -218,11 +218,11 @@ class _GodotSharpDirs {
#ifdef OSX_ENABLED
if (!DirAccess::exists(data_mono_root_dir)) {
data_mono_etc_dir = exe_dir.plus_file("../Resources/GodotSharp/Mono/etc");
data_mono_lib_dir = exe_dir.plus_file("../Frameworks/GodotSharp/Mono/lib");
data_mono_lib_dir = exe_dir.plus_file("../Resources/GodotSharp/Mono/lib");
}

if (!DirAccess::exists(data_game_assemblies_dir)) {
data_game_assemblies_dir = exe_dir.plus_file("../Frameworks/GodotSharp/Assemblies");
data_game_assemblies_dir = exe_dir.plus_file("../Resources/GodotSharp/Assemblies");
}
#endif

Expand Down
6 changes: 3 additions & 3 deletions platform/osx/export/export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class EditorExportPlatformOSX : public EditorExportPlatform {
virtual void get_platform_features(List<String> *r_features) override {
r_features->push_back("pc");
r_features->push_back("s3tc");
r_features->push_back("OSX");
r_features->push_back("macOS");
}

virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override {
Expand Down Expand Up @@ -702,14 +702,14 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
ret = unzGoToNextFile(src_pkg_zip);
continue; // skip
}
file = file.replace("/data.mono.osx.64.release_debug/", "/data_" + pkg_name + "/");
file = file.replace("/data.mono.osx.64.release_debug/", "/GodotSharp/");
}
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 + "/");
file = file.replace("/data.mono.osx.64.release/", "/GodotSharp/");
}

if (file.ends_with(".dylib")) {
Expand Down

0 comments on commit 338fa05

Please sign in to comment.