From 86b1121fbe5f7b49c51379b53e07f5044c40b4b8 Mon Sep 17 00:00:00 2001 From: Martin Fouilleul Date: Wed, 23 Aug 2023 15:06:35 +0200 Subject: [PATCH] allow enabling/disabling metal frame capture when bundling a macos app --- scripts/bundle.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/bundle.py b/scripts/bundle.py index 1997d25..44b6571 100644 --- a/scripts/bundle.py +++ b/scripts/bundle.py @@ -22,6 +22,7 @@ def init_parser(parser): parser.add_argument("-n", "--name", default="out", help="the app's name") parser.add_argument("-O", "--orca-dir", default=".") parser.add_argument("--version", default="0.0.0", help="a version number to embed in the application bundle") + parser.add_argument("--mtl-enable-capture", action='store_true', help="Enable Metal frame capture for the application bundle (macOS only)") parser.add_argument("module", help="a .wasm file containing the application's wasm module") parser.set_defaults(func=shellish(make_app)) @@ -169,9 +170,14 @@ def macos_make_app(args): icon.icns NSHighResolutionCapable True + """ + if args.mtl_enable_capture == True: + plist_contents += f""" MetalCaptureEnabled - - + """ + + plist_contents += f""" + """