mirror of
https://github.com/NohamR/pyzule-rw.git
synced 2026-10-10 18:39:41 +00:00
feat(cgen): plist and entitlement merging
This commit is contained in:
@@ -15,6 +15,7 @@ you can open an issue to request a feature :D !! also see my [recommended flags]
|
||||
- remove watch app
|
||||
- change the app icon
|
||||
- fakesign the output ipa/tipa/app
|
||||
- merge a plist into the app's existing Info.plist
|
||||
- add custom entitlements to the main executable
|
||||
- thin all binaries to arm64, it can LARGELY reduce app size sometimes!
|
||||
- remove all app extensions (or just encrypted ones!)
|
||||
|
||||
@@ -42,6 +42,14 @@ def main() -> None:
|
||||
"-k", metavar="icon",
|
||||
help="modify the app's icon"
|
||||
)
|
||||
parser.add_argument(
|
||||
"-l", metavar="plist",
|
||||
help="a plist to merge with the app's Info.plist"
|
||||
)
|
||||
parser.add_argument(
|
||||
"-x", metavar="entitlements",
|
||||
help="add or modify entitlements to the main binary"
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-u", "--remove-supported-devices", action="store_true",
|
||||
@@ -83,6 +91,10 @@ def generate_cyan(parser: argparse.ArgumentParser) -> None:
|
||||
parser.error(f"invalid minimum OS version: {args.m}")
|
||||
if args.k is not None and not os.path.isfile(args.k):
|
||||
parser.error(f"{args.k} does not exist")
|
||||
if args.l is not None and not os.path.isfile(args.l):
|
||||
parser.error(f"{args.l} does not exist")
|
||||
if args.x is not None and not os.path.isfile(args.x):
|
||||
parser.error(f"{args.x} does not exist")
|
||||
if args.f is not None:
|
||||
fake = [f for f in args.f if not os.path.exists(f)]
|
||||
|
||||
@@ -107,7 +119,7 @@ def generate_cyan(parser: argparse.ArgumentParser) -> None:
|
||||
real_args = {k: v for k, v in dict(vars(args)).items() if v}
|
||||
del real_args["output"]
|
||||
|
||||
for key in "fk": # these need files
|
||||
for key in "fkxl": # these need files
|
||||
if key in real_args:
|
||||
real_args[key] = True
|
||||
|
||||
@@ -136,6 +148,12 @@ def generate_cyan(parser: argparse.ArgumentParser) -> None:
|
||||
if args.k is not None:
|
||||
zf.write(args.k, "icon.idk")
|
||||
|
||||
if args.l:
|
||||
zf.write(args.l, "merge.plist")
|
||||
|
||||
if args.x:
|
||||
zf.write(args.x, "new.entitlements")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -253,6 +253,12 @@ def parse_cyan(args: dict[str, Any], tmpdir: str) -> None:
|
||||
if "k" in config:
|
||||
args["k"] = zf.extract("icon.idk", DOT_PATH)
|
||||
del config["k"]
|
||||
if "l" in config:
|
||||
args["l"] = zf.extract("merge.plist", DOT_PATH)
|
||||
del config["l"]
|
||||
if "x" in config:
|
||||
args["x"] = zf.extract("new.entitlements", DOT_PATH)
|
||||
del config["x"]
|
||||
|
||||
for k, v in config.items():
|
||||
args[k] = v
|
||||
|
||||
BIN
nogamemode.cyan
Normal file
BIN
nogamemode.cyan
Normal file
Binary file not shown.
Reference in New Issue
Block a user