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

Side by Side Diff: webkit/tools/test_shell/mac/TestShell.xcodeproj/package_test_shell.sh

Issue 18521: Keystone auto-update support for TestShell (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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
Property Changes:
Added: svn:executable
+ *
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 #!/bin/sh
2
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
5 # found in the LICENSE file.
6
7 # Packages TestShell up into a disk image, renaming it "Chromium TestShell"
8 # so that it's easily identifiable.
9 #
10 # TODO(mmentovai): This is temporary, as soon as we can package up Chromium
11 # proper, we should rip this out and let TestShell live out the rest of its
12 # years as a simple test shell.
13
14 set -ex
15
16 TOP="${SRCROOT}/../../../.."
17 PKG_DMG="${TOP}/build/mac/pkg-dmg"
18 KEYSTONE_URL="https://tools.google.com/service/update2"
19
20 SRC_APP_NAME="TestShell"
21 DST_APP_NAME="Chromium TestShell"
22 SRC_APP_PATH="${BUILT_PRODUCTS_DIR}/${SRC_APP_NAME}.app"
23
24 KSR="${TOP}/third_party/googlemac/Releases/Keystone/KeystoneRegistration.framewo rk"
25
26 # Really, if you want to distribute something, it probably shouldn't be
27 # a debug-mode build. Release-mode builds are already stripped and are
28 # intended for this sort of thing.
29 if [ "${CONFIGURATION}" != "Release" ] ; then
30 echo "warning: packaging in non-release mode" >&2
31 fi
32
33 # Figure out what version this build corresponds to. Just use the svn revision
34 # for now.
35 SVN_REVISION=$(svnversion "${TOP}" | sed -e "s/[^0-9]//g")
36 if [ -z "${SVN_REVISION}" ] ; then
37 echo "warning: could not determine svn revision" >&2
38 fi
39
40 # I really hate how "defaults" doesn't take a real pathname but instead insists
41 # on appending ".plist" to everything.
42 INFO_PLIST_PATH="Contents/Info.plist"
43 TMP_INFO_PLIST_DEFAULTS="${TEMP_DIR}/Info"
44 TMP_INFO_PLIST="${TMP_INFO_PLIST_DEFAULTS}.plist"
45 cp "${SRC_APP_PATH}/${INFO_PLIST_PATH}" "${TMP_INFO_PLIST}"
46
47 # Stuff the version information in the Info.plist, and update the CFBundleName
48 # to correspond to what we want to call it.
49 defaults write "${TMP_INFO_PLIST_DEFAULTS}" CFBundleName "${DST_APP_NAME}"
50 defaults write "${TMP_INFO_PLIST_DEFAULTS}" SVNRevision "0.0.${SVN_REVISION}"
51 if [ -d "${KSR}" ] ; then
52 defaults write "${TMP_INFO_PLIST_DEFAULTS}" KSUpdateURL "${KEYSTONE_URL}"
53 fi
54
55 # Info.plist will work perfectly well in any plist format, but traditionally
56 # applications use xml1 for this, so convert it back after whatever defaults
57 # might have done.
58 plutil -convert xml1 "${TMP_INFO_PLIST}"
59
60 # If the Keystone registration framework is available, stuff it and the
61 # Keystone installation script into the application, so that the result will
62 # be both auto-updatable and suitable for use as the target of an update.
63 PKG_DMG_EXTRA=()
64 if [ -d "${KSR}" ] ; then
65 PKG_DMG_EXTRA=(--copy "${KSR}:/${DST_APP_NAME}.app/Contents/Frameworks" \
66 --copy "${SRCROOT}/keystone_install.sh:/.keystone_install")
67 fi
68
69 "${PKG_DMG}" --source /var/empty \
70 --target "${BUILT_PRODUCTS_DIR}/ChromiumTestShell.dmg" \
71 --format UDBZ \
72 --volname "${DST_APP_NAME}" \
73 --tempdir "${TEMP_DIR}" \
74 --copy "${SRC_APP_PATH}/:/${DST_APP_NAME}.app/" \
75 --copy "${TMP_INFO_PLIST}:/${DST_APP_NAME}.app/${INFO_PLIST_PATH}" \
76 "${PKG_DMG_EXTRA[@]}"
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/mac/KeystoneGlue.m ('k') | webkit/tools/test_shell/mac/TestShell.xcodeproj/project.pbxproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698