summaryrefslogtreecommitdiffstats
path: root/build/mac
diff options
context:
space:
mode:
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.