diff options
-rw-r--r-- | build/all.gyp | 14 | ||||
-rwxr-xr-x | build/mac/build_app_dmg | 40 | ||||
-rw-r--r-- | chrome/chrome.gyp | 29 |
3 files changed, 81 insertions, 2 deletions
diff --git a/build/all.gyp b/build/all.gyp index 2aad4a3..a2ef584 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -79,10 +79,10 @@ ], 'conditions': [ ['OS=="mac"', { - # Target to build everything needed for layout tests to cut down - # on what the layout test bots have to build. 'targets': [ { + # Target to build everything needed for layout tests to cut down + # on what the layout test bots have to build. 'target_name': 'build_for_layout_tests', 'type': 'none', 'dependencies': [ @@ -91,6 +91,16 @@ '../webkit/tools/test_shell/test_shell.gyp:test_shell_tests', ], }, + { + # Target to build everything plus the dmg. We don't put the dmg + # in the All target because developer really don't need it. + 'target_name': 'all_and_dmg', + 'type': 'none', + 'dependencies': [ + 'All', + '../chrome/chrome.gyp:build_app_dmg', + ], + }, ], }], ], diff --git a/build/mac/build_app_dmg b/build/mac/build_app_dmg new file mode 100755 index 0000000..ec12418 --- /dev/null +++ b/build/mac/build_app_dmg @@ -0,0 +1,40 @@ +#!/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. + +# Normally you don't want to build a dmg out of a debug build. +if [ "${CONFIGURATION}" != "Release" ] ; then + echo "warning: building dmg in non-release mode" >&2 +fi + +# Make sure we got the branding passed to us +if [ $# -ne 1 ]; then + echo "error: missing branding as an argument" >&2 + exit 1 +fi + +# fail on anything from here out +set -e + +TOP="${SRCROOT}/.." +PKG_DMG="${TOP}/build/mac/pkg-dmg" + +APP_NAME=$1 +SRC_APP_PATH="${BUILT_PRODUCTS_DIR}/${APP_NAME}.app" +VOL_NAME="${APP_NAME}" +# Do we want a svn version in the DMG name? +DMG_NAME="${APP_NAME}.dmg" +DST_DMG_PATH="${BUILT_PRODUCTS_DIR}/${DMG_NAME}" + +# show things as we run them +set -x + +# Call the real working +"${PKG_DMG}" --source /var/empty \ + --target "${DST_DMG_PATH}" \ + --format UDBZ \ + --volname "${VOL_NAME}" \ + --tempdir "${TEMP_DIR}" \ + --copy "${SRC_APP_PATH}/:/${APP_NAME}.app/" diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 0d1d680..95cdc1a 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -2771,6 +2771,9 @@ ['OS=="mac"', # On Mac only, add a project target called "package_app" that only # runs a shell script (package_chrome.sh). + # On Mac only, add a project target called "build_app_dmg" that only + # builds a DMG out of the App (eventually will completely replace + # "package_app"). { 'targets': [ { 'target_name': 'package_app', @@ -2792,6 +2795,32 @@ }, ], # 'actions' }, + { + 'target_name': 'build_app_dmg', + # do NOT place this in the 'all' list; most won't want it. + # In gyp, booleans are 0/1 not True/False. + 'suppress_wildcard': 1, + 'type': 'none', + 'dependencies': [ + 'app', + ], + 'variables': { + 'build_app_dmg_script_path': '<(DEPTH)/build/mac/build_app_dmg', + }, + 'actions': [ + { + 'inputs': [ + '<(build_app_dmg_script_path)', + '<(PRODUCT_DIR)/<(branding).app', + ], + 'outputs': [ + '<(PRODUCT_DIR)/<(branding).dmg', + ], + 'action_name': 'build_app_dmg', + 'action': ['<(build_app_dmg_script_path)', '<@(branding)'], + }, + ], # 'actions' + }, ] }, { # else: OS != "mac" 'targets': [ |