Skip to content

Commit 3c8bd98

Browse files
committed
fix: extra logging
1 parent bb15fcf commit 3c8bd98

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

sign.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -268,13 +268,14 @@ def get_otool_imports(binary: Path):
268268
return results
269269

270270

271-
def install_name_change(binary: Path, old: Path, new: Path):
272-
print("Re-linking", binary, old, new)
273-
return run_process("install_name_tool", "-change", str(old), str(new), str(binary))
271+
def install_name_change(binary: Path, old: Path, new: Path, capture: bool = True):
272+
return run_process("install_name_tool", "-change", str(old), str(new), str(binary), capture=capture)
274273

275274

276-
def insert_dylib(binary: Path, path: Path):
277-
return run_process("./insert_dylib", "--inplace", "--no-strip-codesig", "--all-yes", str(path), str(binary))
275+
def insert_dylib(binary: Path, path: Path, capture: bool = True):
276+
return run_process(
277+
"./insert_dylib", "--inplace", "--no-strip-codesig", "--all-yes", str(path), str(binary), capture=capture
278+
)
278279

279280

280281
def get_binary_map(dir: Path):
@@ -629,7 +630,7 @@ def inject_tweaks(ipa_dir: Path, tweaks_dir: Path):
629630
):
630631
binary_fixed = base_load_path.joinpath(binary_rel)
631632
print("Injecting", binary_path, binary_fixed)
632-
insert_dylib(app_bin, binary_fixed)
633+
insert_dylib(app_bin, binary_fixed, False)
633634

634635
# detect any references to support libs and install missing files
635636
for binary_path in binary_map.values():
@@ -657,7 +658,7 @@ def inject_tweaks(ipa_dir: Path, tweaks_dir: Path):
657658
if link_name in binary_map:
658659
link_fixed = base_load_path.joinpath(binary_map[link_name].relative_to(temp_dir))
659660
print("Re-linking", binary_path, link_path, link_fixed)
660-
install_name_change(binary_path, link_path, link_fixed)
661+
install_name_change(binary_path, link_path, link_fixed, False)
661662

662663
for file in safe_glob(temp_dir, "*"):
663664
move_merge_replace(file, base_dir)

0 commit comments

Comments
 (0)