summaryrefslogtreecommitdiffstats
path: root/build/mac
diff options
context:
space:
mode:
authorthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-20 19:44:42 +0000
committerthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-20 19:44:42 +0000
commit36a1abf0163a7c762149eae9dc827ab7ffb309df (patch)
tree35dab79940a83088b013e8969d17888dab6173d3 /build/mac
parent61bd7d155e1ce5a3e14198b6170157faddf336e3 (diff)
downloadchromium_src-36a1abf0163a7c762149eae9dc827ab7ffb309df.zip
chromium_src-36a1abf0163a7c762149eae9dc827ab7ffb309df.tar.gz
chromium_src-36a1abf0163a7c762149eae9dc827ab7ffb309df.tar.bz2
Added a script to remove headers from the target.
Added a default in common.gypi to remove headers from all mac applications that are bundles. Added a var to control the inclusion of keystone to chrome.gyp defaulted on branding and then honor it for the shipping work. Review URL: http://codereview.chromium.org/113652 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16510 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/mac')
-rwxr-xr-xbuild/mac/remove_target_headers12
-rwxr-xr-xbuild/mac/tweak_app_infoplist28
2 files changed, 36 insertions, 4 deletions
diff --git a/build/mac/remove_target_headers b/build/mac/remove_target_headers
new file mode 100755
index 0000000..a7e73ac
--- /dev/null
+++ b/build/mac/remove_target_headers
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# Copyright (c) 2009 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
+
+find "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}" -iname '*.h' -delete
+find "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}" -iname 'Headers' -type l -delete
+find "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}" -iname 'Headers' -type d -prune \
+ -delete
diff --git a/build/mac/tweak_app_infoplist b/build/mac/tweak_app_infoplist
index 3a1f350..1a2cc8d 100755
--- a/build/mac/tweak_app_infoplist
+++ b/build/mac/tweak_app_infoplist
@@ -7,12 +7,16 @@
set -e
# Pull off the optional args
-INCLUDE_BREAKPAD=0
+USE_BREAKPAD=0
+USE_KEYSTONE=0
OPTERR=0
-while getopts ":b:" an_opt ; do
+while getopts ":b:k:" an_opt ; do
case $an_opt in
b)
- INCLUDE_BREAKPAD=$OPTARG
+ USE_BREAKPAD=$OPTARG
+ ;;
+ k)
+ USE_KEYSTONE=$OPTARG
;;
\?)
echo "Unknown option $OPTARG"
@@ -111,7 +115,7 @@ defaults write "${TMP_INFO_PLIST_DEFAULTS}" \
NSHumanReadableCopyright -string "${COPYRIGHT_STRING}"
# Add/Remove the breakpad keys
-if [ "${INCLUDE_BREAKPAD}" == "1" ] ; then
+if [ "${USE_BREAKPAD}" = "1" ] ; then
defaults write "${TMP_INFO_PLIST_DEFAULTS}" \
BreakpadURL "https://clients2.google.com/cr/report"
defaults write "${TMP_INFO_PLIST_DEFAULTS}" BreakpadReportInterval "3600"
@@ -134,6 +138,22 @@ else
defaults delete "${TMP_INFO_PLIST_DEFAULTS}" BreakpadSkipConfirm || true
fi
+# Add/Remove keystone keys (only supported in release builds)
+if [ "${USE_KEYSTONE}" = "1" ] && [ "${CONFIGURATION}" = "Release" ] ; then
+ KEYSTONE_URL="https://tools.google.com/service/update2"
+ KEYSTONE_APP_ID=$(defaults read "${TMP_INFO_PLIST_DEFAULTS}" \
+ CFBundleIdentifier)
+ defaults write "${TMP_INFO_PLIST_DEFAULTS}" \
+ KSVersion -string "${FULL_VERSION}"
+ defaults write "${TMP_INFO_PLIST_DEFAULTS}" KSProductID "${KEYSTONE_APP_ID}"
+ defaults write "${TMP_INFO_PLIST_DEFAULTS}" KSUpdateURL "${KEYSTONE_URL}"
+else
+ # Make sure the keys aren't there, || true to avoid errors if they aren't.
+ defaults delete "${TMP_INFO_PLIST_DEFAULTS}" KSVersion || true
+ defaults delete "${TMP_INFO_PLIST_DEFAULTS}" KSProductID || true
+ defaults delete "${TMP_INFO_PLIST_DEFAULTS}" KSUpdateURL || true
+fi
+
# Info.plist will work perfectly well in any plist format, but traditionally
# applications use xml1 for this, so convert it back after whatever defaults
# might have done.