Commit 3c2c09c8 authored by garykac@chromium.org's avatar garykac@chromium.org

[Chromoting] Extract branding from the signing script.

With this change, all branding happens to the props file which is read
by the signing script.

BUG=None
TEST=None

Review URL: https://chromiumcodereview.appspot.com/10825193

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150006 0039d316-1c4b-4281-b951-d872f2087c98
parent 8b04a165
...@@ -190,7 +190,7 @@ def buildHostArchive(temp_dir, zip_path, source_file_roots, source_files, ...@@ -190,7 +190,7 @@ def buildHostArchive(temp_dir, zip_path, source_file_roots, source_files,
(base, ext) = os.path.splitext(f) (base, ext) = os.path.splitext(f)
if ext == '.zip': if ext == '.zip':
copyZipIntoArchive(temp_dir, source_file_roots, f) copyZipIntoArchive(temp_dir, source_file_roots, f)
elif ext in ['.packproj', '.pkgproj', '.plist', '.sh']: elif ext in ['.packproj', '.pkgproj', '.plist', '.props', '.sh']:
copyFileWithDefs(f, dst_file, defs) copyFileWithDefs(f, dst_file, defs)
else: else:
shutil.copy2(f, dst_file) shutil.copy2(f, dst_file)
......
HOST_UNINSTALLER_NAME=@@HOST_UNINSTALLER_NAME@@
HOST_PKG=@@HOST_PKG@@
DMG_VOLUME_NAME=@@DMG_VOLUME_NAME@@
DMG_FILE_NAME=@@DMG_FILE_NAME@@
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
# found in the LICENSE file. # found in the LICENSE file.
# This script signs the Chromoting binaries, builds the Chrome Remote Desktop # This script signs the Chromoting binaries, builds the Chrome Remote Desktop
# installer and then packages it into a .dmg. It requires that Iceberg be # installer and then packages it into a .dmg. It requires that Packages be
# installed (for 'freeze'). # installed (for 'packagesbuild').
# Packages: http://s.sudre.free.fr/Software/Packages/about.html
# #
# usage: sign_and_build.sh output_dir input_dir codesign_keychain codesign_id # usage: sign_and_build.sh output_dir input_dir codesign_keychain codesign_id
# #
...@@ -25,45 +26,59 @@ USE_ICEBERG=false ...@@ -25,45 +26,59 @@ USE_ICEBERG=false
declare -a g_cleanup_dirs declare -a g_cleanup_dirs
# Binaries to sign. setup() {
ME2ME_HOST='PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app' local input_dir="${1}"
UNINSTALLER='Applications/@@HOST_UNINSTALLER_NAME@@.app'
PREFPANE='PreferencePanes/org.chromium.chromoting.prefPane' # The file that contains the properties for this signing build.
# The file should contain only key=value pairs, one per line.
# The Chromoting Host installer is a meta-package that consists of 3 PROPS_FILENAME="${input_dir}/do_signing.props"
# components:
# * Chromoting Host Service package # Individually load the properties for this build. Don't 'source' the file
# * Chromoting Host Uninstaller package # to guard against code accidentally being added to the props file.
# * Keystone package (GoogleSoftwareUpdate - for Official builds only) HOST_UNINSTALLER_NAME=$(read_property "HOST_UNINSTALLER_NAME")
if $USE_ICEBERG ; then HOST_PKG=$(read_property "HOST_PKG")
PKGPROJ_HOST='ChromotingHost.packproj' DMG_VOLUME_NAME=$(read_property "DMG_VOLUME_NAME")
PKGPROJ_HOST_SERVICE='ChromotingHostService.packproj' DMG_FILE_NAME=$(read_property "DMG_FILE_NAME")
PKGPROJ_HOST_UNINSTALLER='ChromotingHostUninstaller.packproj'
# Binaries to sign.
# Final (user-visible) mpkg name. ME2ME_HOST='PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app'
PKG_FINAL='@@HOST_PKG@@.mpkg' UNINSTALLER="Applications/${HOST_UNINSTALLER_NAME}.app"
else PREFPANE='PreferencePanes/org.chromium.chromoting.prefPane'
PKGPROJ_HOST='ChromotingHost.pkgproj'
PKGPROJ_HOST_SERVICE='ChromotingHostService.pkgproj' # The Chromoting Host installer is a meta-package that consists of 3
PKGPROJ_HOST_UNINSTALLER='ChromotingHostUninstaller.pkgproj' # components:
# * Chromoting Host Service package
# Final (user-visible) pkg name. # * Chromoting Host Uninstaller package
PKG_FINAL='@@HOST_PKG@@.pkg' # * Keystone package (GoogleSoftwareUpdate - for Official builds only)
fi if $USE_ICEBERG ; then
PKGPROJ_HOST='ChromotingHost.packproj'
PKGPROJ_HOST_SERVICE='ChromotingHostService.packproj'
PKGPROJ_HOST_UNINSTALLER='ChromotingHostUninstaller.packproj'
DMG_VOLUME_NAME='@@DMG_VOLUME_NAME@@' # Final (user-visible) mpkg name.
DMG_FILE_NAME='@@DMG_FILE_NAME@@.dmg' PKG_FINAL="${HOST_PKG}.mpkg"
else
PKGPROJ_HOST='ChromotingHost.pkgproj'
PKGPROJ_HOST_SERVICE='ChromotingHostService.pkgproj'
PKGPROJ_HOST_UNINSTALLER='ChromotingHostUninstaller.pkgproj'
# Temp directory for Iceberg output. # Final (user-visible) pkg name.
PKG_DIR=build PKG_FINAL="${HOST_PKG}.pkg"
g_cleanup_dirs+=("${PKG_DIR}") fi
# Temp directories for building the dmg. DMG_FILE_NAME="${DMG_FILE_NAME}.dmg"
DMG_TEMP_DIR="$(mktemp -d -t "${ME}"-dmg)"
g_cleanup_dirs+=("${DMG_TEMP_DIR}")
DMG_EMPTY_DIR="$(mktemp -d -t "${ME}"-empty)" # Temp directory for Packages output.
g_cleanup_dirs+=("${DMG_EMPTY_DIR}") PKG_DIR=build
g_cleanup_dirs+=("${PKG_DIR}")
# Temp directories for building the dmg.
DMG_TEMP_DIR="$(mktemp -d -t "${ME}"-dmg)"
g_cleanup_dirs+=("${DMG_TEMP_DIR}")
DMG_EMPTY_DIR="$(mktemp -d -t "${ME}"-empty)"
g_cleanup_dirs+=("${DMG_EMPTY_DIR}")
}
err() { err() {
echo "[$(date +'%Y-%m-%d %H:%M:%S%z')]: ${@}" >&2 echo "[$(date +'%Y-%m-%d %H:%M:%S%z')]: ${@}" >&2
...@@ -86,6 +101,13 @@ shell_safe_path() { ...@@ -86,6 +101,13 @@ shell_safe_path() {
fi fi
} }
# Read a single property from the properties file.
read_property() {
local property="${1}"
local filename="${PROPS_FILENAME}"
echo `grep "${property}" "${filename}" | tail -n 1 | cut -d "=" -f2-`
}
verify_clean_dir() { verify_clean_dir() {
local dir="${1}" local dir="${1}"
if [[ ! -d "${dir}" ]]; then if [[ ! -d "${dir}" ]]; then
...@@ -191,6 +213,7 @@ main() { ...@@ -191,6 +213,7 @@ main() {
productsign_id="${5}" productsign_id="${5}"
fi fi
setup "${input_dir}"
verify_clean_dir "${output_dir}" verify_clean_dir "${output_dir}"
sign_binaries "${input_dir}" "${keychain}" "${codesign_id}" sign_binaries "${input_dir}" "${keychain}" "${codesign_id}"
......
...@@ -186,6 +186,7 @@ ...@@ -186,6 +186,7 @@
], ],
'remoting_host_installer_mac_files': [ 'remoting_host_installer_mac_files': [
'host/installer/mac/do_signing.sh', 'host/installer/mac/do_signing.sh',
'host/installer/mac/do_signing.props',
'host/installer/mac/ChromotingHost.packproj', 'host/installer/mac/ChromotingHost.packproj',
'host/installer/mac/ChromotingHostService.packproj', 'host/installer/mac/ChromotingHostService.packproj',
'host/installer/mac/ChromotingHostUninstaller.packproj', 'host/installer/mac/ChromotingHostUninstaller.packproj',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment