Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
fix: nonexistent InfoPlist.strings
Browse files Browse the repository at this point in the history
  • Loading branch information
asdfzxcvbn committed Jul 8, 2024
1 parent 7749970 commit 32711b6
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions pyzule.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,14 +610,19 @@ def cleanup():
if args.n:
change_plist(f"changed app name to {args.n}", f"app name was already {args.n}",
plist, args.n, "CFBundleDisplayName", "CFBundleName")

real_count = 0

# i literally just stole this from bundle id change lol
for ext in (LPS := glob(os.path.join(APP_PATH, "*.lproj"))):
lp_plist = get_plist((ext_plist := os.path.join(ext, "InfoPlist.strings")))
lp_plist["CFBundleDisplayName"] = args.n
lp_plist["CFBundleName"] = args.n
dump_plist(ext_plist, lp_plist)
if LPS:
for ext in glob(os.path.join(APP_PATH, "*.lproj")):
try:
lp_plist = get_plist((ext_plist := os.path.join(ext, "InfoPlist.strings")))
lp_plist["CFBundleDisplayName"] = args.n
lp_plist["CFBundleName"] = args.n
dump_plist(ext_plist, lp_plist)
real_count += 1
except Exception:
pass # file might not exist
if real_count:
print("[*] changed localized display names")
changed = 1 # i don't even know if this is required anymore but idc

Expand Down

0 comments on commit 32711b6

Please sign in to comment.