Skip to content

Commit

Permalink
refactor: move orion check out of loop
Browse files Browse the repository at this point in the history
  • Loading branch information
asdfzxcvbn committed Nov 2, 2024
1 parent 0808fd8 commit 31169d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
7 changes: 1 addition & 6 deletions cyan/tbhtypes/executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Executable:
# CydiaSubstrate.framework, libsubstrate.dylib, EVEN CydiaSubstrate.dylib
# AND PROBABLY EVEN MORE !!!! IT'S CRAZY.
common = {
"ubstrate.": {
"substrate.": {
"name": "CydiaSubstrate.framework",
"path": "@rpath/CydiaSubstrate.framework/CydiaSubstrate"
},
Expand Down Expand Up @@ -93,11 +93,6 @@ def fix_common_dependencies(self, needed: set[str]) -> None:

needed.add(common)

# orion has a *weak* dependency to substrate,
# but will still crash without it. nice !!!!!!!!!!!
if common == "orion.":
needed.add("ubstrate.")

def fix_dependencies(self, tweaks: dict[str, str]) -> None:
for dep in self.get_dependencies():
for cname in tweaks:
Expand Down
5 changes: 5 additions & 0 deletions cyan/tbhtypes/main_executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ def inject(self, tweaks: dict[str, str], tmpdir: str) -> None:
if not existed:
print(f"[*] injected {bn}")

# orion has a *weak* dependency to substrate,
# but will still crash without it. nice !!!!!!!!!!!
if "orion." in needed:
needed.add("substrate.")

for missing in needed:
real = self.common[missing]["name"] # e.g. "Orion.framework"
ip = f"{FRAMEWORKS_DIR}/{real}"
Expand Down

0 comments on commit 31169d6

Please sign in to comment.