Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: build/mac/tweak_app_infoplist

Issue 113652: Added a script to remove headers from the target.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 set -e 7 set -e
8 8
9 # Pull off the optional args 9 # Pull off the optional args
10 INCLUDE_BREAKPAD=0 10 USE_BREAKPAD=0
11 USE_KS=0
Mark Mentovai 2009/05/20 18:43:13 I would spell out KEYSTONE (like BREAKPAD).
11 OPTERR=0 12 OPTERR=0
12 while getopts ":b:" an_opt ; do 13 while getopts ":b:k:" an_opt ; do
13 case $an_opt in 14 case $an_opt in
14 b) 15 b)
15 INCLUDE_BREAKPAD=$OPTARG 16 USE_BREAKPAD=$OPTARG
17 ;;
18 k)
19 USE_KS=$OPTARG
16 ;; 20 ;;
17 \?) 21 \?)
18 echo "Unknown option $OPTARG" 22 echo "Unknown option $OPTARG"
19 exit 1 23 exit 1
20 ;; 24 ;;
21 :) 25 :)
22 echo "Option $OPTARG missing it's value" 26 echo "Option $OPTARG missing it's value"
23 exit 1 27 exit 1
24 ;; 28 ;;
25 *) 29 *)
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 # out with "lsregister -dump). 108 # out with "lsregister -dump).
105 # http://lists.apple.com/archives/carbon-dev/2006/Jun/msg00139.html 109 # http://lists.apple.com/archives/carbon-dev/2006/Jun/msg00139.html
106 # BUILD will always be an increasing value, so BUILD_PATH gives us something 110 # BUILD will always be an increasing value, so BUILD_PATH gives us something
107 # unique that meetings what LS wants. 111 # unique that meetings what LS wants.
108 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ 112 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \
109 CFBundleVersion -string "${BUILD}.${PATCH}" 113 CFBundleVersion -string "${BUILD}.${PATCH}"
110 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ 114 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \
111 NSHumanReadableCopyright -string "${COPYRIGHT_STRING}" 115 NSHumanReadableCopyright -string "${COPYRIGHT_STRING}"
112 116
113 # Add/Remove the breakpad keys 117 # Add/Remove the breakpad keys
114 if [ "${INCLUDE_BREAKPAD}" == "1" ] ; then 118 if [ "${USE_BREAKPAD}" == "1" ] ; then
Mark Mentovai 2009/05/20 18:43:13 Strictly speaking, test/[ uses = for string equali
115 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ 119 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \
116 BreakpadURL "https://clients2.google.com/cr/report" 120 BreakpadURL "https://clients2.google.com/cr/report"
117 defaults write "${TMP_INFO_PLIST_DEFAULTS}" BreakpadReportInterval "3600" 121 defaults write "${TMP_INFO_PLIST_DEFAULTS}" BreakpadReportInterval "3600"
118 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ 122 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \
119 BreakpadProduct "${BUILD_BRANDING}_Mac" 123 BreakpadProduct "${BUILD_BRANDING}_Mac"
120 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ 124 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \
121 BreakpadProductDisplay "${BUILD_BRANDING}" 125 BreakpadProductDisplay "${BUILD_BRANDING}"
122 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ 126 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \
123 BreakpadVersion -string "${FULL_VERSION}" 127 BreakpadVersion -string "${FULL_VERSION}"
124 defaults write "${TMP_INFO_PLIST_DEFAULTS}" BreakpadSendAndExit "YES" 128 defaults write "${TMP_INFO_PLIST_DEFAULTS}" BreakpadSendAndExit "YES"
125 defaults write "${TMP_INFO_PLIST_DEFAULTS}" BreakpadSkipConfirm "YES" 129 defaults write "${TMP_INFO_PLIST_DEFAULTS}" BreakpadSkipConfirm "YES"
126 else 130 else
127 # Make sure the keys aren't there, || true to avoid errors if they aren't. 131 # Make sure the keys aren't there, || true to avoid errors if they aren't.
128 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" BreakpadURL || true 132 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" BreakpadURL || true
129 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" BreakpadReportInterval || true 133 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" BreakpadReportInterval || true
130 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" BreakpadProduct || true 134 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" BreakpadProduct || true
131 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" BreakpadProductDisplay || true 135 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" BreakpadProductDisplay || true
132 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" BreakpadVersion || true 136 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" BreakpadVersion || true
133 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" BreakpadSendAndExit || true 137 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" BreakpadSendAndExit || true
134 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" BreakpadSkipConfirm || true 138 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" BreakpadSkipConfirm || true
135 fi 139 fi
136 140
141 # Add/Remove keystone keys (only supported in release builds)
142 if [ \( "${USE_KS}" == "1" \) -a \( "${CONFIGURATION}" == "Release" \) ] ; then
Mark Mentovai 2009/05/20 18:43:13 -a is ass. That's what it stands for, in fact. Y
143 KEYSTONE_URL="https://tools.google.com/service/update2"
144 KEYSTONE_APP_ID=$(defaults read "${TMP_INFO_PLIST_DEFAULTS}" \
145 CFBundleIdentifier)
146 defaults write "${TMP_INFO_PLIST_DEFAULTS}" KSVersion -string "${FULL_VERSION} "
Mark Mentovai 2009/05/20 18:43:13 80
147 defaults write "${TMP_INFO_PLIST_DEFAULTS}" KSProductID "${KEYSTONE_APP_ID}"
148 defaults write "${TMP_INFO_PLIST_DEFAULTS}" KSUpdateURL "${KEYSTONE_URL}"
149 else
150 # Make sure the keys aren't there, || true to avoid errors if they aren't.
151 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" KSVersion || true
152 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" KSProductID || true
153 defaults delete "${TMP_INFO_PLIST_DEFAULTS}" KSUpdateURL || true
154 fi
155
137 # Info.plist will work perfectly well in any plist format, but traditionally 156 # Info.plist will work perfectly well in any plist format, but traditionally
138 # applications use xml1 for this, so convert it back after whatever defaults 157 # applications use xml1 for this, so convert it back after whatever defaults
139 # might have done. 158 # might have done.
140 plutil -convert xml1 "${TMP_INFO_PLIST}" 159 plutil -convert xml1 "${TMP_INFO_PLIST}"
141 cp "${TMP_INFO_PLIST}" "${SRC_APP_PATH}/${INFO_PLIST_PATH}" 160 cp "${TMP_INFO_PLIST}" "${SRC_APP_PATH}/${INFO_PLIST_PATH}"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698