| OLD | NEW |
| 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 USE_BREAKPAD=0 | 10 USE_BREAKPAD=0 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 SVN_URL=$(echo "${SVN_INFO}" | sed -Ene 's/^URL: (.*)$/\1/p') | 88 SVN_URL=$(echo "${SVN_INFO}" | sed -Ene 's/^URL: (.*)$/\1/p') |
| 89 SVN_ROOT=$(echo "${SVN_INFO}" | sed -Ene 's/^Repository Root: (.*)$/\1/p') | 89 SVN_ROOT=$(echo "${SVN_INFO}" | sed -Ene 's/^Repository Root: (.*)$/\1/p') |
| 90 if [ -n "${SVN_ROOT}" ] && \ | 90 if [ -n "${SVN_ROOT}" ] && \ |
| 91 [ "${SVN_URL:0:${#SVN_ROOT}}" = "${SVN_ROOT}" ] ; then | 91 [ "${SVN_URL:0:${#SVN_ROOT}}" = "${SVN_ROOT}" ] ; then |
| 92 SVN_PATH="${SVN_URL:${#SVN_ROOT}}" | 92 SVN_PATH="${SVN_URL:${#SVN_ROOT}}" |
| 93 fi | 93 fi |
| 94 fi | 94 fi |
| 95 fi | 95 fi |
| 96 | 96 |
| 97 # Pull in the Chrome version number. | 97 # Pull in the Chrome version number. |
| 98 . "${TOP}/chrome/VERSION" | 98 VERSION_TOOL="${TOP}/chrome/tools/build/version.py" |
| 99 FULL_VERSION="${MAJOR}.${MINOR}.${BUILD}.${PATCH}" | 99 VERSION_FILE="${TOP}/chrome/VERSION" |
| 100 FULL_VERSION=$("${VERSION_TOOL}" -f "${VERSION_FILE}" \ |
| 101 -t "@MAJOR@.@MINOR@.@BUILD@.@PATCH@") |
| 102 BUNDLE_VERSION=$("${VERSION_TOOL}" -f "${VERSION_FILE}" -t "@BUILD@.@PATCH@") |
| 100 | 103 |
| 101 # I really hate how "defaults" doesn't take a real pathname but instead insists | 104 # I really hate how "defaults" doesn't take a real pathname but instead insists |
| 102 # on appending ".plist" to everything. | 105 # on appending ".plist" to everything. |
| 103 TMP_INFO_PLIST_DEFAULTS="${TEMP_DIR}/Info" | 106 TMP_INFO_PLIST_DEFAULTS="${TEMP_DIR}/Info" |
| 104 TMP_INFO_PLIST="${TMP_INFO_PLIST_DEFAULTS}.plist" | 107 TMP_INFO_PLIST="${TMP_INFO_PLIST_DEFAULTS}.plist" |
| 105 cp "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" "${TMP_INFO_PLIST}" | 108 cp "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" "${TMP_INFO_PLIST}" |
| 106 | 109 |
| 107 # Save off the Subversion revision number and source root path in case they're | 110 # Save off the Subversion revision number and source root path in case they're |
| 108 # needed. | 111 # needed. |
| 109 if [ ! -z "${SVN_REVISION}" ] ; then | 112 if [ ! -z "${SVN_REVISION}" ] ; then |
| (...skipping 12 matching lines...) Expand all Loading... |
| 122 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ | 125 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ |
| 123 CFBundleShortVersionString -string "${FULL_VERSION}" | 126 CFBundleShortVersionString -string "${FULL_VERSION}" |
| 124 # Honor the 429496.72.95 limit. The maximum comes from splitting 2^32 - 1 into | 127 # Honor the 429496.72.95 limit. The maximum comes from splitting 2^32 - 1 into |
| 125 # 6, 2, 2 digits. The limitation was present in Tiger, but it could have been | 128 # 6, 2, 2 digits. The limitation was present in Tiger, but it could have been |
| 126 # fixed in later OS release, but hasn't been tested (it's easy enough to find | 129 # fixed in later OS release, but hasn't been tested (it's easy enough to find |
| 127 # out with "lsregister -dump). | 130 # out with "lsregister -dump). |
| 128 # http://lists.apple.com/archives/carbon-dev/2006/Jun/msg00139.html | 131 # http://lists.apple.com/archives/carbon-dev/2006/Jun/msg00139.html |
| 129 # BUILD will always be an increasing value, so BUILD_PATH gives us something | 132 # BUILD will always be an increasing value, so BUILD_PATH gives us something |
| 130 # unique that meetings what LS wants. | 133 # unique that meetings what LS wants. |
| 131 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ | 134 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ |
| 132 CFBundleVersion -string "${BUILD}.${PATCH}" | 135 CFBundleVersion -string "${BUNDLE_VERSION}" |
| 133 | 136 |
| 134 # Add or remove the Breakpad keys. | 137 # Add or remove the Breakpad keys. |
| 135 if [ "${USE_BREAKPAD}" = "1" ] ; then | 138 if [ "${USE_BREAKPAD}" = "1" ] ; then |
| 136 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ | 139 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ |
| 137 BreakpadURL "https://clients2.google.com/cr/report" | 140 BreakpadURL "https://clients2.google.com/cr/report" |
| 138 defaults write "${TMP_INFO_PLIST_DEFAULTS}" BreakpadReportInterval "3600" | 141 defaults write "${TMP_INFO_PLIST_DEFAULTS}" BreakpadReportInterval "3600" |
| 139 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ | 142 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ |
| 140 BreakpadProduct "${BUILD_BRANDING}_Mac" | 143 BreakpadProduct "${BUILD_BRANDING}_Mac" |
| 141 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ | 144 defaults write "${TMP_INFO_PLIST_DEFAULTS}" \ |
| 142 BreakpadProductDisplay "${BUILD_BRANDING}" | 145 BreakpadProductDisplay "${BUILD_BRANDING}" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 fi | 181 fi |
| 179 | 182 |
| 180 # Info.plist will work perfectly well in any plist format, but traditionally | 183 # Info.plist will work perfectly well in any plist format, but traditionally |
| 181 # applications use xml1 for this, so convert it back after whatever defaults | 184 # applications use xml1 for this, so convert it back after whatever defaults |
| 182 # might have done. | 185 # might have done. |
| 183 plutil -convert xml1 "${TMP_INFO_PLIST}" | 186 plutil -convert xml1 "${TMP_INFO_PLIST}" |
| 184 cp "${TMP_INFO_PLIST}" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" | 187 cp "${TMP_INFO_PLIST}" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" |
| 185 | 188 |
| 186 # Clean up. | 189 # Clean up. |
| 187 rm -f "${TMP_INFO_PLIST}" | 190 rm -f "${TMP_INFO_PLIST}" |
| OLD | NEW |