diff options
-rwxr-xr-x | build/mac/tweak_info_plist.py | 33 | ||||
-rw-r--r-- | chrome/chrome.gyp | 24 | ||||
-rw-r--r-- | chrome/chrome_dll.gypi | 7 | ||||
-rw-r--r-- | chrome/chrome_exe.gypi | 13 | ||||
-rw-r--r-- | content/content_shell.gypi | 4 |
5 files changed, 40 insertions, 41 deletions
diff --git a/build/mac/tweak_info_plist.py b/build/mac/tweak_info_plist.py index aed9cf7..07a3a0b 100755 --- a/build/mac/tweak_info_plist.py +++ b/build/mac/tweak_info_plist.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -212,28 +212,29 @@ def _RemoveKeystoneKeys(plist): def Main(argv): - parser = optparse.OptionParser('%prog [options] branding bundle-id') + parser = optparse.OptionParser('%prog [options]') parser.add_option('--breakpad', dest='use_breakpad', action='store', type='int', default=False, help='Enable Breakpad [1 or 0]') parser.add_option('--breakpad_uploads', dest='breakpad_uploads', action='store', type='int', default=False, help='Enable Breakpad\'s uploading of crash dumps [1 or 0]') - parser.add_option('-k', dest='use_keystone', action='store', type='int', - default=False, help='Enable Keystone [1 or 0]') - parser.add_option('-s', dest='add_svn_info', action='store', type='int', + parser.add_option('--keystone', dest='use_keystone', action='store', + type='int', default=False, help='Enable Keystone [1 or 0]') + parser.add_option('--svn', dest='add_svn_info', action='store', type='int', default=True, help='Add SVN metadata [1 or 0]') - parser.add_option('-p', dest='add_pdf_support', action='store', type='int', + parser.add_option('--pdf', dest='add_pdf_support', action='store', type='int', default=False, help='Add PDF file handler support [1 or 0]') + parser.add_option('--branding', dest='branding', action='store', + type='string', default=None, help='The branding of the binary') + parser.add_option('--bundle_id', dest='bundle_identifier', + action='store', type='string', default=None, + help='The bundle id of the binary') (options, args) = parser.parse_args(argv) - if len(args) < 2: + if len(args) > 0: print >>sys.stderr, parser.get_usage() return 1 - # Extract remaining arguments. - branding = args[0] - bundle_identifier = args[1] - # Read the plist into its parsed format. DEST_INFO_PLIST = os.path.join(env['TARGET_BUILD_DIR'], env['INFOPLIST_PATH']) plist = plistlib.readPlist(DEST_INFO_PLIST) @@ -244,7 +245,10 @@ def Main(argv): # Add Breakpad if configured to do so. if options.use_breakpad: - _AddBreakpadKeys(plist, branding) + if options.branding is None: + print >>sys.stderr, 'Use of Breakpad requires branding.' + return 1 + _AddBreakpadKeys(plist, options.branding) if options.breakpad_uploads: plist['BreakpadURL'] = 'https://clients2.google.com/cr/report' else: @@ -260,7 +264,10 @@ def Main(argv): # Only add Keystone in Release builds. if options.use_keystone and env['CONFIGURATION'] == 'Release': - _AddKeystoneKeys(plist, bundle_identifier) + if options.bundle_identifier is None: + print >>sys.stderr, 'Use of Keystone requires the bundle id.' + return 1 + _AddKeystoneKeys(plist, options.bundle_identifier) else: _RemoveKeystoneKeys(plist) diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 2b8aea5..00f2c9a 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -780,16 +780,14 @@ { # Modify the Info.plist as needed. The script explains why this # is needed. This is also done in the chrome and chrome_dll - # targets. In this case, --breakpad=0, -k0, and -s0 are used - # because Breakpad, Keystone, and Subversion keys are never - # placed into the helper. + # targets. In this case, --breakpad=0, --keystone=0, and --svn=0 + # are used because Breakpad, Keystone, and Subversion keys are + # never placed into the helper. 'postbuild_name': 'Tweak Info.plist', 'action': ['<(tweak_info_plist_path)', '--breakpad=0', - '-k0', - '-s0', - '<(branding)', - '<(mac_bundle_id)'], + '--keystone=0', + '--svn=0'], }, { # Make sure there isn't any Objective-C in the helper app's @@ -880,16 +878,14 @@ { # Modify the Info.plist as needed. The script explains why this # is needed. This is also done in the chrome and chrome_dll - # targets. In this case, --breakpad=0, -k0, and -s0 are used - # because Breakpad, Keystone, and Subversion keys are never - # placed into the app mode loader. + # targets. In this case, --breakpad=0, --keystone=0, and --svn=0 + # are used because Breakpad, Keystone, and Subversion keys are + # never placed into the app mode loader. 'postbuild_name': 'Tweak Info.plist', 'action': ['<(tweak_info_plist_path)', '--breakpad=0', - '-k0', - '-s0', - '<(branding)', - '<(mac_bundle_id)'], + '--keystone=0', + '--svn=0'], }, ], }, # target app_mode_app diff --git a/chrome/chrome_dll.gypi b/chrome/chrome_dll.gypi index c2894d7..db5160e 100644 --- a/chrome/chrome_dll.gypi +++ b/chrome/chrome_dll.gypi @@ -383,10 +383,9 @@ 'action': ['<(tweak_info_plist_path)', '--breakpad=<(mac_breakpad_compiled_in)', '--breakpad_uploads=<(mac_breakpad_uploads)', - '-k0', - '-s1', - '<(branding)', - '<(mac_bundle_id)'], + '--keystone=0', + '--svn=1', + '--branding=<(branding)'], }, { 'postbuild_name': 'Symlink Libraries', diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi index e0255f1..d35f2a7 100644 --- a/chrome/chrome_exe.gypi +++ b/chrome/chrome_exe.gypi @@ -314,18 +314,17 @@ # Keystone information is included if Keystone is enabled. The # application reads Keystone keys from this plist and not the # framework's, and the ticket will reference this Info.plist to - # determine the tag of the installed product. Use -s1 to - # include Subversion information. The -p flag controls whether + # determine the tag of the installed product. Use --svn=1 to + # include Subversion information. The --pdf flag controls whether # to insert PDF as a supported type identifier that can be # opened. 'postbuild_name': 'Tweak Info.plist', 'action': ['<(tweak_info_plist_path)', '--breakpad=0', - '-k<(mac_keystone)', - '-s1', - '-p<(internal_pdf)', - '<(branding)', - '<(mac_bundle_id)'], + '--keystone=<(mac_keystone)', + '--svn=1', + '--pdf=<(internal_pdf)', + '--bundle_id=<(mac_bundle_id)'], }, { 'postbuild_name': 'Clean up old versions', diff --git a/content/content_shell.gypi b/content/content_shell.gypi index a6eadbf..f17ee72 100644 --- a/content/content_shell.gypi +++ b/content/content_shell.gypi @@ -289,9 +289,7 @@ # Modify the Info.plist as needed. 'postbuild_name': 'Tweak Info.plist', 'action': ['../build/mac/tweak_info_plist.py', - '-s1', - 'unused branding', - 'unused bundle-id'], + '--svn=1'], }, { # Make sure there isn't any Objective-C in the shell's |