summaryrefslogtreecommitdiffstats
path: root/build/mac
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-11 00:51:02 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-11 00:51:02 +0000
commit961306dca553f6e7b5262e384317a73351a77985 (patch)
treedbba7e1e9d1774eaf03c5254bbeb71a42c914fda /build/mac
parentd04d10a3b93b428d5e4fe636be4ab6ffd94424d9 (diff)
downloadchromium_src-961306dca553f6e7b5262e384317a73351a77985.zip
chromium_src-961306dca553f6e7b5262e384317a73351a77985.tar.gz
chromium_src-961306dca553f6e7b5262e384317a73351a77985.tar.bz2
Back out r22981, it may have caused Windows test failures.
Review URL: http://codereview.chromium.org/164298 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22992 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/mac')
-rwxr-xr-xbuild/mac/dump_app_syms79
-rwxr-xr-xbuild/mac/tweak_app_infoplist67
2 files changed, 47 insertions, 99 deletions
diff --git a/build/mac/dump_app_syms b/build/mac/dump_app_syms
index 130b5a0..cd6e626 100755
--- a/build/mac/dump_app_syms
+++ b/build/mac/dump_app_syms
@@ -1,26 +1,9 @@
-#!/bin/bash
+#!/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.
-# This script expects the following environment variables to be set. Xcode
-# normally sets them:
-#
-# CONFIGURATION - Release or Debug; this script only operates when Release.
-# SRCROOT - /path/to/chrome/src/chrome
-# BUILT_PRODUTS_DIR - /path/to/chrome/src/xcodebuild/Release
-#
-# The script also takes a single argument defining the branding type.
-#
-# To test this script without running an entire build:
-#
-# cd /path/to/chrome/src/chrome
-# CONFIGURATION=Release \
-# SRCROOT=$(pwd) \
-# BUILT_PRODUCTS_DIR=$(pwd)/../xcodebuild/Release \
-# ../build/mac/dump_app_syms Chromium
-
# Make sure we got the header to write into passed to us
if [ $# -ne 1 ]; then
echo "error: missing branding as an argument" >&2
@@ -42,43 +25,37 @@ SRC_APP_NAME=$("${BRAND_SCRIPT}" "${BUILD_BRANDING}" PRODUCT_FULLNAME)
. "${TOP}/chrome/VERSION"
BREAKPAD_DUMP_SYMS="${BUILT_PRODUCTS_DIR}/dump_syms"
+BREAKPAD_PRODUCT_ID="${BUILD_BRANDING}_Mac"
FULL_VERSION="${MAJOR}.${MINOR}.${BUILD}.${PATCH}"
-ARCH="i386"
-
-DSYM_TAR_PATH="${BUILT_PRODUCTS_DIR}/${SRC_APP_NAME}.dSYM.tar.bz2"
-
-declare -a DSYMS
-
-for SRC_BUNDLE in "${SRC_APP_NAME}.app" \
- "${SRC_APP_NAME} Framework.framework" \
- "${SRC_APP_NAME} Helper.app" ; do
- SRC_STEM=$(echo "${SRC_BUNDLE}" | sed -Ee 's/^(.*)\..*$/\1/')
- SRC_BUNDLE_PATH="${BUILT_PRODUCTS_DIR}/${SRC_BUNDLE}"
- DSYM_NAME="${SRC_BUNDLE}.dSYM"
- DSYM_PATH="${BUILT_PRODUCTS_DIR}/${DSYM_NAME}"
- DWARF_PATH="${DSYM_PATH}/Contents/Resources/DWARF/${SRC_STEM}"
- BPAD_SYM_NAME="${SRC_STEM}-${FULL_VERSION}-${ARCH}.breakpad"
- BPAD_SYM_PATH="${BUILT_PRODUCTS_DIR}/${BPAD_SYM_NAME}"
+SRC_APP_PATH="${BUILT_PRODUCTS_DIR}/${SRC_APP_NAME}.app"
+# Created by the build/mac/strip_from_xcode script.
+UNSTRIPPED_APP="${SRC_APP_PATH}.dSYM/Contents/Resources/DWARF/${SRC_APP_NAME}"
+APP_SYMBOL_FILE="${BUILT_PRODUCTS_DIR}/${SRC_APP_NAME}-${FULL_VERSION}-i386.breakpad"
+
+# Only run dump_syms if the file has changed since we last did a dump.
+if [ "${UNSTRIPPED_APP}" -nt "${APP_SYMBOL_FILE}" ] ; then
+ "${BREAKPAD_DUMP_SYMS}" -a i386 "${UNSTRIPPED_APP}" > "${APP_SYMBOL_FILE}"
+fi
+APP_DSYM_NAME="${SRC_APP_NAME}.app.dSYM"
- # Only run dump_syms if the file has changed since the last dump.
- if [ "${DWARF_PATH}" -nt "${BPAD_SYM_PATH}" ] ; then
- "${BREAKPAD_DUMP_SYMS}" -a "${ARCH}" "${DWARF_PATH}" > "${BPAD_SYM_PATH}"
- fi
+# Do the same thing for chrome_dll.
- # Remove the .dSYM archive if the file has changed since the archive was
- # last generated. This will cause a new .dSYM archive to be created.
- if [ "${DWARF_PATH}" -nt "${DSYM_TAR_PATH}" ] ; then
- rm -f "${DSYM_TAR_PATH}"
- fi
+SRC_DYLIB_NAME="${SRC_APP_NAME} Framework"
+SRC_DYLIB_PATH="${BUILT_PRODUCTS_DIR}/${SRC_DYLIB_NAME}.framework"
+UNSTRIPPED_DYLIB="${SRC_DYLIB_PATH}.dSYM/Contents/Resources/DWARF/${SRC_DYLIB_NAME}"
+DYLIB_SYMBOL_FILE="${BUILT_PRODUCTS_DIR}/${SRC_DYLIB_NAME}-${FULL_VERSION}-i386.breakpad"
+if [ "${UNSTRIPPED_DYLIB}" -nt "${DYLIB_SYMBOL_FILE}" ] ; then
+ "${BREAKPAD_DUMP_SYMS}" -a i386 "${UNSTRIPPED_DYLIB}" > "${DYLIB_SYMBOL_FILE}"
+fi
+DYLIB_DSYM_NAME="${SRC_DYLIB_NAME}.framework.dSYM"
- # Push the .dSYM bundle onto the DSYMS array so that it will be included in
- # the .dSYM archive if a new one is needed
- DSYMS[${#DSYMS[@]}]="${DSYM_NAME}"
-done
+DSYM_TAR_PATH="${BUILT_PRODUCTS_DIR}/${APP_DSYM_NAME}.tar.bz2"
-# Create the archive of .dSYM bundles.
-if [ ! -e "${DSYM_TAR_PATH}" ] ; then
- # Change directory so that absolute paths aren't included in the archive.
+# Make a .tar.bz2 out of the .dSYM
+if [ "${BUILT_PRODUCTS_DIR}/${APP_DSYM_NAME}" -nt "${DSYM_TAR_PATH}" ] ||
+ [ "${BUILT_PRODUCTS_DIR}/${DYLIB_DSYM_NAME}" -nt "${DSYM_TAR_PATH}" ] ; then
+ # Change directory so when building the tar, we don't include the build dir
+ # in the tar paths.
(cd "${BUILT_PRODUCTS_DIR}" &&
- tar --owner 0 --group 0 -jcf "${DSYM_TAR_PATH}" "${DSYMS[@]}")
+ tar -jcf "${DSYM_TAR_PATH}" "${APP_DSYM_NAME}" "${DYLIB_DSYM_NAME}")
fi
diff --git a/build/mac/tweak_app_infoplist b/build/mac/tweak_app_infoplist
index 120c3c8..845fc7e 100755
--- a/build/mac/tweak_app_infoplist
+++ b/build/mac/tweak_app_infoplist
@@ -9,9 +9,8 @@ set -e
# Pull off the optional args
USE_BREAKPAD=0
USE_KEYSTONE=0
-USE_SVN=1
OPTERR=0
-while getopts ":b:k:s:" an_opt ; do
+while getopts ":b:k:" an_opt ; do
case $an_opt in
b)
USE_BREAKPAD=$OPTARG
@@ -19,9 +18,6 @@ while getopts ":b:k:s:" an_opt ; do
k)
USE_KEYSTONE=$OPTARG
;;
- s)
- USE_SVN=$OPTARG
- ;;
\?)
echo "Unknown option $OPTARG"
exit 1
@@ -38,7 +34,7 @@ while getopts ":b:k:s:" an_opt ; do
done
shift $(($OPTIND - 1))
-# Make sure the branding argument was supplied.
+# Make sure we got the header to write into passed to us
if [ $# -ne 1 ]; then
echo "error: missing branding as an argument" >&2
exit 1
@@ -49,7 +45,7 @@ fi
# because:
#
# 1. Xcode wants to do the Info.plist work before it runs any build phases,
-# this means if we were to generate a .h file for INFOPLIST_PREFIX_HEADER
+# this means if we were to generate a .h file for INFOPLIST_PREFIX_HEADER
# we'd have to put it in another target so it runs in time.
# 2. Xcode also doesn't check to see if the header being used as a prefix for
# the Info.plist has changed. So even if we updated it, it's only looking
@@ -67,37 +63,23 @@ BRAND_SCRIPT="${TOP}/build/branding_value.sh"
set -x
APP_NAME=$("${BRAND_SCRIPT}" "${BUILD_BRANDING}" PRODUCT_FULLNAME)
-SRC_APP_PATH="${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}"
-
-if [ "${USE_SVN}" = "1" ] ; then
- # Visible in the about:version page.
- SVN_INFO=$(svn info "${TOP}")
- SVN_REVISION=$(echo "${SVN_INFO}" | sed -Ene 's/^Revision: (.*)$/\1/p')
- if [ -z "${SVN_REVISION}" ] ; then
- echo "Could not determine svn revision. This may be OK." >&2
- # TODO: check for git, and get the version number from it?
- fi
-
- # Grab the path to the source root in the Subversion repository by taking the
- # URL to the source root directory and the repository root, and removing the
- # latter from the former. This ensures that SVN_PATH will contain a useful
- # path regardless of the Subversion server, mirror, and authentication scheme
- # in use.
- SVN_URL=$(echo "${SVN_INFO}" | sed -Ene 's/^URL: (.*)$/\1/p')
- SVN_ROOT=$(echo "${SVN_INFO}" | sed -Ene 's/^Repository Root: (.*)$/\1/p')
- if [ -n "${SVN_ROOT}" ] && \
- [ "${SVN_URL:0:${#SVN_ROOT}}" = "${SVN_ROOT}" ] ; then
- SVN_PATH="${SVN_URL:${#SVN_ROOT}}"
- fi
+SRC_APP_PATH="${BUILT_PRODUCTS_DIR}/${APP_NAME}.app"
+
+# Visible in the about:version page.
+SVN_REVISION=$(svn info "${SRCROOT}" | grep "Revision:" | cut -d" " -f2-)
+if [ -z "${SVN_REVISION}" ] ; then
+ echo "Could not determine svn revision. This may be OK." >&2
+ # TODO: check for git, and get the version number from it?
fi
-# Pull in the Chrome version number.
+# Pull in the chrome version number
. "${TOP}/chrome/VERSION"
FULL_VERSION="${MAJOR}.${MINOR}.${BUILD}.${PATCH}"
+SHORT_VERSION="${MAJOR}.${MINOR}.${BUILD}"
-# Fetch the copyright.
+# Fetch the copyright
COPYRIGHT_STRING=$("${BRAND_SCRIPT}" "${BUILD_BRANDING}" COPYRIGHT)
-# Map (c) or (C) to the copyright symbol.
+# Map (c) or (C) to the copyright sign
COPYRIGHT_STRING=$(echo "${COPYRIGHT_STRING}" | sed -e $'s/([cC])/\302\251/g')
# Build the full copyright string
@@ -110,25 +92,17 @@ TMP_INFO_PLIST_DEFAULTS="${TEMP_DIR}/Info"
TMP_INFO_PLIST="${TMP_INFO_PLIST_DEFAULTS}.plist"
cp "${SRC_APP_PATH}/${INFO_PLIST_PATH}" "${TMP_INFO_PLIST}"
-# Save off the Subversion revision number and source root path in case they're
-# needed.
+# Save off the svn version number in case we need it
if [ ! -z "${SVN_REVISION}" ] ; then
defaults write "${TMP_INFO_PLIST_DEFAULTS}" \
- SVNRevision -string "${SVN_REVISION}"
-else
- defaults delete "${TMP_INFO_PLIST_DEFAULTS}" SVNRevision || true
-fi
-if [ ! -z "${SVN_PATH}" ] ; then
- defaults write "${TMP_INFO_PLIST_DEFAULTS}" SVNPath -string "${SVN_PATH}"
-else
- defaults delete "${TMP_INFO_PLIST_DEFAULTS}" SVNPath || true
+ SVNRevision -string "${SVN_REVISION}"
fi
# Add public version info so "Get Info" works
defaults write "${TMP_INFO_PLIST_DEFAULTS}" \
CFBundleGetInfoString -string "${LONG_COPYRIGHT}"
defaults write "${TMP_INFO_PLIST_DEFAULTS}" \
- CFBundleShortVersionString -string "${FULL_VERSION}"
+ CFBundleShortVersionString -string "${SHORT_VERSION}"
# Honor the 429496.72.95 limit. The maximum comes from splitting 2^32 - 1 into
# 6, 2, 2 digits. The limitation was present in Tiger, but it could have been
# fixed in later OS release, but hasn't been tested (it's easy enough to find
@@ -141,7 +115,7 @@ defaults write "${TMP_INFO_PLIST_DEFAULTS}" \
defaults write "${TMP_INFO_PLIST_DEFAULTS}" \
NSHumanReadableCopyright -string "${COPYRIGHT_STRING}"
-# Add or remove the Breakpad keys.
+# Add/Remove the breakpad keys
if [ "${USE_BREAKPAD}" = "1" ] ; then
defaults write "${TMP_INFO_PLIST_DEFAULTS}" \
BreakpadURL "https://clients2.google.com/cr/report"
@@ -165,7 +139,7 @@ else
defaults delete "${TMP_INFO_PLIST_DEFAULTS}" BreakpadSkipConfirm || true
fi
-# Add or remove the Keystone keys (only supported in release builds).
+# 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}" \
@@ -186,6 +160,3 @@ fi
# might have done.
plutil -convert xml1 "${TMP_INFO_PLIST}"
cp "${TMP_INFO_PLIST}" "${SRC_APP_PATH}/${INFO_PLIST_PATH}"
-
-# Clean up.
-rm -f "${TMP_INFO_PLIST}"