| OLD | NEW |
| (Empty) | |
| 1 #!/bin/sh |
| 2 |
| 3 # Copyright (c) 2012 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 # This script builds the Chrome Remote Desktop installer and packages |
| 8 # it into a .dmg. It requires that Iceberg be installed (for 'freeze'). |
| 9 |
| 10 # The Chrome Remote Desktop installer consists of 2 components: |
| 11 # * Chromoting installer package |
| 12 # * Keystone (Google auto-update) |
| 13 |
| 14 PKG_DIR=build |
| 15 PKGPROJ_CHROMOTING='Chromoting.packproj' |
| 16 PKGPROJ_CHROME_REMOTE_DESKTOP='Chrome Remote Desktop.packproj' |
| 17 PKG_CHROMOTING='Chromoting.pkg' |
| 18 PKG_CRD='Chrome Remote Desktop.mpkg' |
| 19 |
| 20 DMG_TEMP=dmg_tmp |
| 21 DMG_NAME='Chrome Remote Desktop' |
| 22 DMG_DIR="$DMG_TEMP/$DMG_NAME" |
| 23 DMG_FILENAME='Chrome Remote Desktop.dmg' |
| 24 |
| 25 # Clean out previous build. |
| 26 rm -rf "$PKG_DIR" |
| 27 rm -f "$DMG_FILENAME" |
| 28 rm -rf "$DMG_TEMP" # In case previous build failed. |
| 29 |
| 30 # Copy latest release build. |
| 31 # TODO(garykac): Get from proper location. |
| 32 HOST_BINARY=PrivilegedHelperTools/org.chromium.chromoting.me2me_host |
| 33 cp ../../../../out/Release/remoting_me2me_host ./$HOST_BINARY |
| 34 |
| 35 # Build the .pkg. |
| 36 echo "Building .pkg..." |
| 37 freeze "$PKGPROJ_CHROMOTING" |
| 38 freeze "$PKGPROJ_CHROME_REMOTE_DESKTOP" |
| 39 |
| 40 # Create the .dmg. |
| 41 echo "Building .dmg..." |
| 42 mkdir -p "$DMG_DIR/$PKG_CRD" |
| 43 # Copy .mpkg installer. |
| 44 ditto "$PKG_DIR/$PKG_CRD" "$DMG_DIR/$PKG_CRD" |
| 45 # Copy uninstall script. |
| 46 # TODO(garykac): This should be made into a proper App and installed in the |
| 47 # Applications directory. |
| 48 cp Scripts/uninstall.sh "$DMG_DIR" |
| 49 # Copy .keystone_install script to top level of .dmg. |
| 50 # Keystone calls this script during upgrades. |
| 51 cp Scripts/keystone_install.sh "$DMG_DIR/.keystone_install" |
| 52 # Build the .dmg from the directory. |
| 53 hdiutil create "$DMG_FILENAME" -srcfolder "$DMG_DIR" -ov -quiet |
| 54 rm -rf "$DMG_TEMP" |
| OLD | NEW |