OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 |
| 6 def GetConfigurationForBuild(defines): |
| 7 '''Returns a configuration dictionary for the given build that contains |
| 8 build-specific settings and information. |
| 9 |
| 10 Args: |
| 11 defines: Definitions coming from the build system. |
| 12 |
| 13 Raises: |
| 14 Exception: If 'defines' contains an unknown build-type. |
| 15 ''' |
| 16 # The prefix of key names in config determines which writer will use their |
| 17 # corresponding values: |
| 18 # win: Both ADM and ADMX. |
| 19 # mac: Only plist. |
| 20 # admx: Only ADMX. |
| 21 # none/other: Used by all the writers. |
| 22 if '_chromium' in defines: |
| 23 config = { |
| 24 'build': 'chromium', |
| 25 'app_name': 'Chromium', |
| 26 'frame_name': 'Chromium Frame', |
| 27 'os_name': 'Chromium OS', |
| 28 'win_reg_key_name': 'Software\\Policies\\Chromium', |
| 29 'win_category_path': ['chromium'], |
| 30 'admx_namespace': 'Chromium.Policies.Chromium', |
| 31 'admx_prefix': 'chromium', |
| 32 } |
| 33 elif '_google_chrome' in defines: |
| 34 config = { |
| 35 'build': 'chrome', |
| 36 'app_name': 'Google Chrome', |
| 37 'frame_name': 'Google Chrome Frame', |
| 38 'os_name': 'Google Chrome OS', |
| 39 'win_reg_key_name': 'Software\\Policies\\Google\\Chrome', |
| 40 'win_category_path': ['google', 'googlechrome'], |
| 41 'admx_namespace': 'Google.Policies.Chrome', |
| 42 'admx_prefix': 'chrome', |
| 43 } |
| 44 else: |
| 45 raise Exception('Unknown build') |
| 46 config['win_group_policy_class'] = 'Both' |
| 47 config['win_supported_os'] = 'SUPPORTED_WINXPSP2' |
| 48 if 'mac_bundle_id' in defines: |
| 49 config['mac_bundle_id'] = defines['mac_bundle_id'] |
| 50 return config |
OLD | NEW |