1 #!/usr/bin/env python2.7
3 # Copyright 2017 Google Inc.
5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file.
11 # Arguments to the script:
12 # app path to binary to package, e.g. out/Debug/gen/dm
13 # bundle_prefix the first part of the bundle ID, e.g. com.google (no trailing '.')
14 # the app name will be appended to this to create the full bundle ID
15 app,bundle_prefix = sys.argv[1:3]
17 out, app = os.path.split(app)
19 # Write a minimal Info.plist to name the package and point at the binary.
20 with open(os.path.join(out, app + '_Info.plist'), 'w') as f:
24 <key>CFBundleVersion</key> <string>0.1.0</string>
25 <key>CFBundleShortVersionString</key> <string>0.1.0</string>
26 <key>CFBundleExecutable</key> <string>{app}</string>
27 <key>CFBundleIdentifier</key> <string>{bundle_prefix}.{app}</string>
28 <key>CFBundlePackageType</key> <string>APPL</string>
29 <key>LSRequiresIPhoneOS</key> <true/>
30 <key>UIDeviceFamily</key> <array>
34 <key>UILaunchStoryboardName</key> <string>LaunchScreen</string>
37 '''.format(app=app, bundle_prefix=bundle_prefix))