From 352bf09ef70f3c37335628fad22dcce2341be5f7 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Thu, 1 Aug 2024 14:55:34 -0400 Subject: [PATCH] BuildMacOSUniversalBinary: Switch to mac-codesign tool and codesign embedded updater --- BuildMacOSUniversalBinary.py | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/BuildMacOSUniversalBinary.py b/BuildMacOSUniversalBinary.py index 33973393a6..d09bd9a8b3 100755 --- a/BuildMacOSUniversalBinary.py +++ b/BuildMacOSUniversalBinary.py @@ -59,8 +59,6 @@ DEFAULT_CONFIG = { # running corrupted binaries and allows for access to the extended # permisions needed for ARM builds "codesign_identity": "-", - # Entitlements file to use for code signing - "entitlements": "../Source/Core/DolphinQt/DolphinEmu.entitlements", # Minimum macOS version for each architecture slice "arm64_mac_os_deployment_target": "11.0.0", @@ -119,11 +117,6 @@ def parse_args(conf=DEFAULT_CONFIG): help="Directory where universal binary will be stored", default=conf["dst_app"]) - parser.add_argument( - "--entitlements", - help="Path to .entitlements file for code signing", - default=conf["entitlements"]) - parser.add_argument("--run_unit_tests", action="store_true", default=conf["run_unit_tests"]) @@ -352,21 +345,21 @@ def build(config): src_app1 = ARCHITECTURES[1]+"/Binaries/" recursive_merge_binaries(src_app0, src_app1, dst_app) - for path in glob.glob(dst_app+"/*"): - if os.path.isdir(path) and os.path.splitext(path)[1] != ".app": - continue - + + if config["autoupdate"]: subprocess.check_call([ - "codesign", - "-d", - "--force", - "-s", + "../Tools/mac-codesign.sh", + "-t", + "-e", "preserve", config["codesign_identity"], - "--options=runtime", - "--entitlements", config["entitlements"], - "--deep", - "--verbose=2", - path]) + dst_app+"/Dolphin.app/Contents/Helpers/Dolphin Updater.app"]) + + subprocess.check_call([ + "../Tools/mac-codesign.sh", + "-t", + "-e", "preserve", + config["codesign_identity"], + dst_app+"/Dolphin.app"]) print("Built Universal Binary successfully!")