OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This script signs the Chromoting binaries, builds the Chrome Remote Desktop | 7 # This script signs the Chromoting binaries, builds the Chrome Remote Desktop |
8 # installer and then packages it into a .dmg. It requires that Packages be | 8 # installer and then packages it into a .dmg. It requires that Packages be |
9 # installed (for 'packagesbuild'). | 9 # installed (for 'packagesbuild'). |
10 # Packages: http://s.sudre.free.fr/Software/Packages/about.html | 10 # Packages: http://s.sudre.free.fr/Software/Packages/about.html |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 setup() { | 24 setup() { |
25 local input_dir="${1}" | 25 local input_dir="${1}" |
26 | 26 |
27 # The file that contains the properties for this signing build. | 27 # The file that contains the properties for this signing build. |
28 # The file should contain only key=value pairs, one per line. | 28 # The file should contain only key=value pairs, one per line. |
29 PROPS_FILENAME="${input_dir}/do_signing.props" | 29 PROPS_FILENAME="${input_dir}/do_signing.props" |
30 | 30 |
31 # Individually load the properties for this build. Don't 'source' the file | 31 # Individually load the properties for this build. Don't 'source' the file |
32 # to guard against code accidentally being added to the props file. | 32 # to guard against code accidentally being added to the props file. |
33 HOST_UNINSTALLER_NAME=$(read_property "HOST_UNINSTALLER_NAME") | |
34 HOST_PKG=$(read_property "HOST_PKG") | |
35 DMG_VOLUME_NAME=$(read_property "DMG_VOLUME_NAME") | 33 DMG_VOLUME_NAME=$(read_property "DMG_VOLUME_NAME") |
36 DMG_FILE_NAME=$(read_property "DMG_FILE_NAME") | 34 DMG_FILE_NAME=$(read_property "DMG_FILE_NAME") |
| 35 HOST_BUNDLE_NAME=$(read_property "HOST_BUNDLE_NAME") |
| 36 HOST_PKG=$(read_property "HOST_PKG") |
| 37 HOST_UNINSTALLER_NAME=$(read_property "HOST_UNINSTALLER_NAME") |
| 38 NATIVE_MESSAGING_HOST_BUNDLE_NAME=$(read_property\ |
| 39 "NATIVE_MESSAGING_HOST_BUNDLE_NAME") |
| 40 PREFPANE_BUNDLE_NAME=$(read_property "PREFPANE_BUNDLE_NAME") |
| 41 REMOTE_ASSISTANCE_HOST_BUNDLE_NAME=$(read_property\ |
| 42 "REMOTE_ASSISTANCE_HOST_BUNDLE_NAME") |
| 43 REMOTING_NAME=$(read_property "REMOTING_NAME") |
37 | 44 |
38 # Binaries to sign. | 45 # Binaries to sign. |
39 ME2ME_HOST='PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app' | 46 ME2ME_HOST="PrivilegedHelperTools/"` |
40 ME2ME_NM_HOST="${ME2ME_HOST}/Contents/MacOS/native_messaging_host" | 47 `"${HOST_BUNDLE_NAME}.app" |
41 IT2ME_NM_HOST="${ME2ME_HOST}/Contents/MacOS/remote_assistance_host" | 48 ME2ME_NM_HOST="Google/${REMOTING_NAME}/"` |
| 49 `"${NATIVE_MESSAGING_HOST_BUNDLE_NAME}.app/"` |
| 50 `"Contents/MacOS/native_messaging_host" |
| 51 IT2ME_NM_HOST="Google/${REMOTING_NAME}/"` |
| 52 `"${REMOTE_ASSISTANCE_HOST_BUNDLE_NAME}.app/"` |
| 53 `"Contents/MacOS/remote_assistance_host" |
42 UNINSTALLER="Applications/${HOST_UNINSTALLER_NAME}.app" | 54 UNINSTALLER="Applications/${HOST_UNINSTALLER_NAME}.app" |
43 PREFPANE='PreferencePanes/org.chromium.chromoting.prefPane' | 55 PREFPANE="PreferencePanes/${PREFPANE_BUNDLE_NAME}" |
44 | 56 |
45 # The Chromoting Host installer is a meta-package that consists of 3 | 57 # The Chromoting Host installer is a meta-package that consists of 3 |
46 # components: | 58 # components: |
47 # * Chromoting Host Service package | 59 # * Chromoting Host Service package |
48 # * Chromoting Host Uninstaller package | 60 # * Chromoting Host Uninstaller package |
49 # * Keystone package (GoogleSoftwareUpdate - for Official builds only) | 61 # * Keystone package (GoogleSoftwareUpdate - for Official builds only) |
50 PKGPROJ_HOST='ChromotingHost.pkgproj' | 62 PKGPROJ_HOST="ChromotingHost.pkgproj" |
51 PKGPROJ_HOST_SERVICE='ChromotingHostService.pkgproj' | 63 PKGPROJ_HOST_SERVICE="ChromotingHostService.pkgproj" |
52 PKGPROJ_HOST_UNINSTALLER='ChromotingHostUninstaller.pkgproj' | 64 PKGPROJ_HOST_UNINSTALLER="ChromotingHostUninstaller.pkgproj" |
53 | 65 |
54 # Final (user-visible) pkg name. | 66 # Final (user-visible) pkg name. |
55 PKG_FINAL="${HOST_PKG}.pkg" | 67 PKG_FINAL="${HOST_PKG}.pkg" |
56 | 68 |
57 DMG_FILE_NAME="${DMG_FILE_NAME}.dmg" | 69 DMG_FILE_NAME="${DMG_FILE_NAME}.dmg" |
58 | 70 |
59 # Temp directory for Packages output. | 71 # Temp directory for Packages output. |
60 PKG_DIR=build | 72 PKG_DIR=build |
61 g_cleanup_dirs+=("${PKG_DIR}") | 73 g_cleanup_dirs+=("${PKG_DIR}") |
62 | 74 |
(...skipping 23 matching lines...) Expand all Loading... |
86 echo "./${path}" | 98 echo "./${path}" |
87 else | 99 else |
88 echo "${path}" | 100 echo "${path}" |
89 fi | 101 fi |
90 } | 102 } |
91 | 103 |
92 # Read a single property from the properties file. | 104 # Read a single property from the properties file. |
93 read_property() { | 105 read_property() { |
94 local property="${1}" | 106 local property="${1}" |
95 local filename="${PROPS_FILENAME}" | 107 local filename="${PROPS_FILENAME}" |
96 echo `grep "${property}" "${filename}" | tail -n 1 | cut -d "=" -f2-` | 108 echo `grep "\<${property}\>=" "${filename}" | tail -n 1 | cut -d "=" -f2-` |
97 } | 109 } |
98 | 110 |
99 verify_clean_dir() { | 111 verify_clean_dir() { |
100 local dir="${1}" | 112 local dir="${1}" |
101 if [[ ! -d "${dir}" ]]; then | 113 if [[ ! -d "${dir}" ]]; then |
102 mkdir "${dir}" | 114 mkdir "${dir}" |
103 fi | 115 fi |
104 | 116 |
105 if [[ -e "${output_dir}/${DMG_FILE_NAME}" ]]; then | 117 if [[ -e "${output_dir}/${DMG_FILE_NAME}" ]]; then |
106 err "Output directory is dirty from previous build." | 118 err "Output directory is dirty from previous build." |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 cleanup | 247 cleanup |
236 } | 248 } |
237 | 249 |
238 if [[ ${#} < 2 ]]; then | 250 if [[ ${#} < 2 ]]; then |
239 usage | 251 usage |
240 exit 1 | 252 exit 1 |
241 fi | 253 fi |
242 | 254 |
243 main "${@}" | 255 main "${@}" |
244 exit ${?} | 256 exit ${?} |
OLD | NEW |