diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2022-01-27 01:05:29 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2022-01-27 01:05:29 -0800 |
commit | 6f0efaf1f0710f5f1d29c3b050d8a5362023bd81 (patch) | |
tree | 7c5e1864935b8a8dde3c1d5360cd94b374c1156a /ldid.cpp | |
parent | a23f0faadd29ec00a6b7fb2498c3d15af15a7100 (diff) | |
download | ldid-6f0efaf1f0710f5f1d29c3b050d8a5362023bd81.tar.gz ldid-6f0efaf1f0710f5f1d29c3b050d8a5362023bd81.tar.zst ldid-6f0efaf1f0710f5f1d29c3b050d8a5362023bd81.zip |
Correctly handle nesting frameworks in frameworks.saurik
Diffstat (limited to 'ldid.cpp')
-rw-r--r-- | ldid.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -2782,7 +2782,7 @@ struct State { } }; -Bundle Sign(const std::string &root, Folder &parent, const std::string &key, State &remote, const std::string &requirements, const Functor<std::string (const std::string &, const std::string &)> &alter, const Progress &progress) { +Bundle Sign(const std::string &root, Folder &parent, const std::string &key, State &local, const std::string &requirements, const Functor<std::string (const std::string &, const std::string &)> &alter, const Progress &progress) { std::string executable; std::string identifier; @@ -2861,8 +2861,6 @@ Bundle Sign(const std::string &root, Folder &parent, const std::string &key, Sta rules2.insert(Rule{20, NoMode, "^version\\.plist$"}); } - State local; - std::string failure(mac ? "Contents/|Versions/[^/]*/Resources/" : ""); Expression nested("^(Frameworks/[^/]*\\.framework|PlugIns/[^/]*\\.appex(()|/[^/]*.app))/(" + failure + ")Info\\.plist$"); std::map<std::string, Bundle> bundles; @@ -2870,16 +2868,18 @@ Bundle Sign(const std::string &root, Folder &parent, const std::string &key, Sta folder.Find("", fun([&](const std::string &name) { if (!nested(name)) return; - auto bundle(root + Split(name).dir); + auto bundle(Split(name).dir); if (mac) { _assert(!bundle.empty()); bundle = Split(bundle.substr(0, bundle.size() - 1)).dir; } SubFolder subfolder(folder, bundle); - bundles[nested[1]] = Sign(bundle, subfolder, key, local, "", Starts(name, "PlugIns/") ? alter : + State remote; + bundles[nested[1]] = Sign(root + bundle, subfolder, key, remote, "", Starts(name, "PlugIns/") ? alter : static_cast<const Functor<std::string (const std::string &, const std::string &)> &>(fun([&](const std::string &, const std::string &) -> std::string { return entitlements; })) , progress); + local.Merge(bundle, remote); }), fun([&](const std::string &name, const Functor<std::string ()> &read) { })); @@ -3066,7 +3066,6 @@ Bundle Sign(const std::string &root, Folder &parent, const std::string &key, Sta })); })); - remote.Merge(root, local); return bundle; } |