From 09f326dc7ddc9f0c93cbe6021dd9b5804851f323 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Wed, 6 Jul 2022 17:20:20 -0400 Subject: [PATCH] BuildMacOSUniversalBinary: Add flag to create a Steam build --- BuildMacOSUniversalBinary.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/BuildMacOSUniversalBinary.py b/BuildMacOSUniversalBinary.py index 8632995407..99e62b1bc6 100755 --- a/BuildMacOSUniversalBinary.py +++ b/BuildMacOSUniversalBinary.py @@ -72,6 +72,8 @@ DEFAULT_CONFIG = { "run_unit_tests": False, + # Whether we should make a build for Steam. + "steam": False, } # Architectures to build for. This is explicity left out of the command line @@ -119,6 +121,12 @@ def parse_args(conf=DEFAULT_CONFIG): parser.add_argument("--run_unit_tests", action="store_true", default=conf["run_unit_tests"]) + parser.add_argument( + "--steam", + help="Create a build for Steam", + action="store_true", + default=conf["steam"]) + parser.add_argument( "--codesign", help="Code signing identity to use to sign the applications", @@ -246,6 +254,8 @@ def recursive_merge_binaries(src0, src1, dst): relative_path = os.path.relpath(os.path.realpath(newpath1), src1) os.symlink(relative_path, new_dst_path) +def python_to_cmake_bool(boolean): + return "ON" if boolean else "OFF" def build(config): """ @@ -292,7 +302,9 @@ def build(config): + config["codesign_identity"], "-DMACOS_CODE_SIGNING_IDENTITY_UPDATER=" + config["codesign_identity"], - '-DMACOS_CODE_SIGNING="ON"' + '-DMACOS_CODE_SIGNING="ON"', + "-DSTEAM=" + + python_to_cmake_bool(config["steam"]) ], env=env, cwd=arch)