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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: webkit/tools/test_shell/mac/TestShell.xcodeproj/package_test_shell.sh
===================================================================
--- webkit/tools/test_shell/mac/TestShell.xcodeproj/package_test_shell.sh (revision 0)
+++ webkit/tools/test_shell/mac/TestShell.xcodeproj/package_test_shell.sh (revision 0)
@@ -0,0 +1,76 @@
+#!/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.
+
+# Packages TestShell up into a disk image, renaming it "Chromium TestShell"
+# so that it's easily identifiable.
+#
+# TODO(mmentovai): This is temporary, as soon as we can package up Chromium
+# proper, we should rip this out and let TestShell live out the rest of its
+# years as a simple test shell.
+
+set -ex
+
+TOP="${SRCROOT}/../../../.."
+PKG_DMG="${TOP}/build/mac/pkg-dmg"
+KEYSTONE_URL="https://tools.google.com/service/update2"
+
+SRC_APP_NAME="TestShell"
+DST_APP_NAME="Chromium TestShell"
+SRC_APP_PATH="${BUILT_PRODUCTS_DIR}/${SRC_APP_NAME}.app"
+
+KSR="${TOP}/third_party/googlemac/Releases/Keystone/KeystoneRegistration.framework"
+
+# Really, if you want to distribute something, it probably shouldn't be
+# a debug-mode build. Release-mode builds are already stripped and are
+# intended for this sort of thing.
+if [ "${CONFIGURATION}" != "Release" ] ; then
+ echo "warning: packaging in non-release mode" >&2
+fi
+
+# Figure out what version this build corresponds to. Just use the svn revision
+# for now.
+SVN_REVISION=$(svnversion "${TOP}" | sed -e "s/[^0-9]//g")
+if [ -z "${SVN_REVISION}" ] ; then
+ echo "warning: could not determine svn revision" >&2
+fi
+
+# I really hate how "defaults" doesn't take a real pathname but instead insists
+# on appending ".plist" to everything.
+INFO_PLIST_PATH="Contents/Info.plist"
+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}"
+
+# Stuff the version information in the Info.plist, and update the CFBundleName
+# to correspond to what we want to call it.
+defaults write "${TMP_INFO_PLIST_DEFAULTS}" CFBundleName "${DST_APP_NAME}"
+defaults write "${TMP_INFO_PLIST_DEFAULTS}" SVNRevision "0.0.${SVN_REVISION}"
+if [ -d "${KSR}" ] ; then
+ defaults write "${TMP_INFO_PLIST_DEFAULTS}" KSUpdateURL "${KEYSTONE_URL}"
+fi
+
+# Info.plist will work perfectly well in any plist format, but traditionally
+# applications use xml1 for this, so convert it back after whatever defaults
+# might have done.
+plutil -convert xml1 "${TMP_INFO_PLIST}"
+
+# If the Keystone registration framework is available, stuff it and the
+# Keystone installation script into the application, so that the result will
+# be both auto-updatable and suitable for use as the target of an update.
+PKG_DMG_EXTRA=()
+if [ -d "${KSR}" ] ; then
+ PKG_DMG_EXTRA=(--copy "${KSR}:/${DST_APP_NAME}.app/Contents/Frameworks" \
+ --copy "${SRCROOT}/keystone_install.sh:/.keystone_install")
+fi
+
+"${PKG_DMG}" --source /var/empty \
+ --target "${BUILT_PRODUCTS_DIR}/ChromiumTestShell.dmg" \
+ --format UDBZ \
+ --volname "${DST_APP_NAME}" \
+ --tempdir "${TEMP_DIR}" \
+ --copy "${SRC_APP_PATH}/:/${DST_APP_NAME}.app/" \
+ --copy "${TMP_INFO_PLIST}:/${DST_APP_NAME}.app/${INFO_PLIST_PATH}" \
+ "${PKG_DMG_EXTRA[@]}"
Property changes on: webkit/tools/test_shell/mac/TestShell.xcodeproj/package_test_shell.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:eol-style
+ LF
« 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