From 443a913b8f0e3fc4a5f6abfa6be2fd6e79641ffe Mon Sep 17 00:00:00 2001 From: Jim Van Verth Date: Tue, 28 Nov 2017 09:45:26 -0500 Subject: Add create_bundle support for GN Docs-Preview: https://skia.org/?cl=75383 Bug: skia:7339 Change-Id: I985734e8b7b5af21a82cb8ee59acbfb5ff1d3ff7 Reviewed-on: https://skia-review.googlesource.com/75383 Commit-Queue: Jim Van Verth Reviewed-by: Mike Klein --- gn/gen_plist_ios.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 gn/gen_plist_ios.py (limited to 'gn/gen_plist_ios.py') diff --git a/gn/gen_plist_ios.py b/gn/gen_plist_ios.py new file mode 100644 index 0000000000..e4041be388 --- /dev/null +++ b/gn/gen_plist_ios.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python2.7 +# +# Copyright 2017 Google Inc. +# +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import os +import sys + +# Arguments to the script: +# app path to binary to package, e.g. out/Debug/gen/dm +app, = sys.argv[1:] + +out, app = os.path.split(app) + +# Write a minimal Info.plist to name the package and point at the binary. +with open(os.path.join(out, app + '_Info.plist'), 'w') as f: + f.write(''' + + + CFBundleVersion 0.1.0 + CFBundleShortVersionString 0.1.0 + CFBundleExecutable {app} + CFBundleIdentifier com.google.{app} + CFBundlePackageType APPL + + +'''.format(app=app)) -- cgit v1.2.3