You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Merge pull request #73429 from bruvzg/macos_no_sc
[macOS] Re-add support for the _sc_ inside app bundle.
This commit is contained in:
@@ -117,14 +117,20 @@ EditorPaths::EditorPaths() {
|
||||
|
||||
// Self-contained mode if a `._sc_` or `_sc_` file is present in executable dir.
|
||||
String exe_path = OS::get_singleton()->get_executable_path().get_base_dir();
|
||||
Ref<DirAccess> d = DirAccess::create_for_path(exe_path);
|
||||
if (d->file_exists(exe_path + "/._sc_")) {
|
||||
self_contained = true;
|
||||
self_contained_file = exe_path + "/._sc_";
|
||||
} else if (d->file_exists(exe_path + "/_sc_")) {
|
||||
self_contained = true;
|
||||
self_contained_file = exe_path + "/_sc_";
|
||||
}
|
||||
|
||||
// On macOS, look outside .app bundle, since .app bundle is read-only.
|
||||
// Note: This will not work if Gatekeeper path randomization is active.
|
||||
if (OS::get_singleton()->has_feature("macos") && exe_path.ends_with("MacOS") && exe_path.path_join("..").simplify_path().ends_with("Contents")) {
|
||||
exe_path = exe_path.path_join("../../..").simplify_path();
|
||||
}
|
||||
{
|
||||
Ref<DirAccess> d = DirAccess::create_for_path(exe_path);
|
||||
|
||||
d = DirAccess::create_for_path(exe_path);
|
||||
if (d->file_exists(exe_path + "/._sc_")) {
|
||||
self_contained = true;
|
||||
self_contained_file = exe_path + "/._sc_";
|
||||
|
||||
Reference in New Issue
Block a user