summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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}"