summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgfeher@chromium.org <gfeher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-29 09:24:08 +0000
committergfeher@chromium.org <gfeher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-29 09:24:08 +0000
commit718effe55072dd78062ff6ef9d7caa8c9faeda81 (patch)
tree7504655dd4bb2e752a0ae01d8ec2d154fd9d5397
parent0ea0ccd6f2431a302ab431526d68c56d243a4b8b (diff)
downloadchromium_src-718effe55072dd78062ff6ef9d7caa8c9faeda81.zip
chromium_src-718effe55072dd78062ff6ef9d7caa8c9faeda81.tar.gz
chromium_src-718effe55072dd78062ff6ef9d7caa8c9faeda81.tar.bz2
Add the new Mac manifest to the application bundle
Add the policy templates generated from chrome/app/policy_templates.json to the Mac application bundle. (The template generator for Mac is implemented in CL 3116027) BUG=49316 TEST=add Chromium to the managed applications' list in the OSX Workgroup Manager, and see if it shows the manageable preferences Review URL: http://codereview.chromium.org/3143036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57812 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/chrome_exe.gypi91
-rwxr-xr-xchrome/tools/build/mac/copy_mcx_manifest.sh22
2 files changed, 66 insertions, 47 deletions
diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi
index d4c774e..9532a4b 100644
--- a/chrome/chrome_exe.gypi
+++ b/chrome/chrome_exe.gypi
@@ -279,6 +279,10 @@
'dependencies': [
'helper_app',
'infoplist_strings_tool',
+ 'chrome_manifest_bundle',
+ ],
+ 'mac_bundle_resources': [
+ '<(PRODUCT_DIR)/<(mac_bundle_id).manifest',
],
'actions': [
{
@@ -323,31 +327,6 @@
'message': 'Generating the language InfoPlist.strings files',
'process_outputs_as_mac_bundle_resources': 1,
},
- {
- # Massage the manifest and add it as a resource
- 'action_name': 'Generate MCX manifest file',
- 'variables': {
- 'tool_path': 'tools/build/mac/copy_mcx_manifest.sh',
- 'input_path': 'app/policy/mac/app-Manifest.plist',
- 'output_path': '<(INTERMEDIATE_DIR)/<(mac_bundle_id).manifest',
- },
- 'inputs': [
- '<(tool_path)',
- '<(input_path)',
- ],
- 'outputs': [
- '<(output_path)',
- ],
- 'action': [
- '<(tool_path)',
- '<(mac_product_name)',
- '<(mac_bundle_id)',
- '<(input_path)',
- '<(output_path)',
- ],
- 'message': 'Generating the MCX policy manifest file',
- 'process_outputs_as_mac_bundle_resources': 1,
- },
],
'copies': [
{
@@ -511,5 +490,67 @@
},
],
}],
+ ['OS=="mac"', {
+ 'targets': [
+ {
+ # This is the bundle of the manifest file of Chrome.
+ # It contains the manifest file and its string tables.
+ 'target_name': 'chrome_manifest_bundle',
+ 'type': 'loadable_module',
+ 'mac_bundle': 1,
+ 'product_extension': 'manifest',
+ 'product_name': '<(mac_bundle_id)',
+ 'dependencies': [
+ # Provides app-Manifest.plist and its string tables:
+ 'policy_templates',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'Copy MCX manifest file to manifest bundle',
+ 'inputs': [
+ '<(grit_out_dir)/app/policy/mac/app-Manifest.plist',
+ ],
+ 'outputs': [
+ '<(INTERMEDIATE_DIR)/app_manifest/<(mac_bundle_id).manifest',
+ ],
+ 'action': [
+ 'cp',
+ '<@(_inputs)',
+ '<@(_outputs)',
+ ],
+ 'message':
+ 'Copying the MCX policy manifest file to the manifest bundle',
+ 'process_outputs_as_mac_bundle_resources': 1,
+ },
+ {
+ 'action_name':
+ 'Copy Localizable.strings files to manifest bundle',
+ 'variables': {
+ 'input_path': '<(grit_out_dir)/app/policy/mac/strings',
+ # Directory to collect the Localizable.strings files before
+ # they are copied to the bundle.
+ 'output_path': '<(INTERMEDIATE_DIR)/app_manifest',
+ },
+ 'inputs': [
+ # TODO: remove this helper when we have loops in GYP
+ '>!@(<(apply_locales_cmd) -d \'<(input_path)/ZZLOCALE.lproj/Localizable.strings\' <(locales))',
+ ],
+ 'outputs': [
+ # TODO: remove this helper when we have loops in GYP
+ '>!@(<(apply_locales_cmd) -d \'<(output_path)/ZZLOCALE.lproj/Localizable.strings\' <(locales))',
+ ],
+ 'action': [
+ 'cp', '-R',
+ '<(input_path)/',
+ '<(output_path)',
+ ],
+ 'message':
+ 'Copy the Localizable.strings files to the manifest bundle',
+ 'process_outputs_as_mac_bundle_resources': 1,
+ },
+ ],
+ },
+ ]
+ }]
],
}
diff --git a/chrome/tools/build/mac/copy_mcx_manifest.sh b/chrome/tools/build/mac/copy_mcx_manifest.sh
deleted file mode 100755
index fc4cbfc..0000000
--- a/chrome/tools/build/mac/copy_mcx_manifest.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) 2010 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.
-
-set -e
-
-if [[ ${#} -ne 4 ]]; then
- echo "usage: ${0} APP_NAME IDENTIFIER SOURCE DESTINATION" >&2
- exit 1
-fi
-
-APP_NAME="${1}"
-IDENTIFIER=${2}
-SOURCE=${3}
-DESTINATION=${4}
-
-# All hail sed.
-exec sed -e "s/@APP_NAME@/${APP_NAME}/g" \
- -e "s/@CHROMIUM_BUNDLE_ID@/${IDENTIFIER}/g" \
- "${SOURCE}" > "${DESTINATION}"