Skip to content
Snippets Groups Projects
Commit ad3016e1 authored by thomasvl@chromium.org's avatar thomasvl@chromium.org
Browse files

Add a simple dmg script to the mac build dir to build a dmg out of the app.

Add a target to build a dmg out of the app.
Add a target to all that will build everything and the dmg (since we don't include the dmg in all since developers really don't need to wait for that).
Review URL: http://codereview.chromium.org/113152

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15672 0039d316-1c4b-4281-b951-d872f2087c98
parent 0800c669
No related merge requests found
......@@ -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',
],
},
],
}],
],
......
#!/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/"
......@@ -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': [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment