diff options
author | maf@google.com <maf@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-08 18:55:47 +0000 |
---|---|---|
committer | maf@google.com <maf@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-08 18:55:47 +0000 |
commit | 13b05bee8fbd996d15f0b86302976e7ede29740a (patch) | |
tree | 2d16325fe70308f5caabd9a0d23d681103cfee7e | |
parent | e4780eaa01196743ed144858161fce40df0f5536 (diff) | |
download | chromium_src-13b05bee8fbd996d15f0b86302976e7ede29740a.zip chromium_src-13b05bee8fbd996d15f0b86302976e7ede29740a.tar.gz chromium_src-13b05bee8fbd996d15f0b86302976e7ede29740a.tar.bz2 |
Add scripts to automatically build installer and disk image in GYP build.
Fix compile error in serializer.cc
Don't force rebuild of idl files.
Review URL: http://codereview.chromium.org/195023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25642 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | o3d/installer/installer.gyp | 2 | ||||
-rw-r--r-- | o3d/installer/mac/installer.gyp | 25 | ||||
-rwxr-xr-x | o3d/installer/mac/make_disk_image.sh | 81 | ||||
-rwxr-xr-x | o3d/installer/mac/make_installer.sh | 71 | ||||
-rw-r--r-- | o3d/plugin/idl/idl.gyp | 1 |
5 files changed, 178 insertions, 2 deletions
diff --git a/o3d/installer/installer.gyp b/o3d/installer/installer.gyp index 426d153..ad018f5f 100644 --- a/o3d/installer/installer.gyp +++ b/o3d/installer/installer.gyp @@ -25,7 +25,7 @@ ['OS=="mac"', { 'dependencies': [ - 'mac/installer.gyp:installer', + 'mac/installer.gyp:disk_image', ], }, ], diff --git a/o3d/installer/mac/installer.gyp b/o3d/installer/mac/installer.gyp index d0d2c99..2a02b4e 100644 --- a/o3d/installer/mac/installer.gyp +++ b/o3d/installer/mac/installer.gyp @@ -29,6 +29,31 @@ '../../plugin/plugin.gyp:npo3dautoplugin', '../../samples/samples.gyp:samples', ], + 'postbuilds': [ + { + 'variables': { + 'installer_script_path': './make_installer.sh', + }, + 'postbuild_name': 'Make Installer', + 'action': ['<(installer_script_path)', '<(dotnppversion)',], + }, + ], + }, + { + 'target_name': 'disk_image', + 'type': 'none', + 'dependencies': [ + 'installer', + ], + 'postbuilds': [ + { + 'variables': { + 'disk_image_script_path': './make_disk_image.sh', + }, + 'postbuild_name': 'Make Disk Image', + 'action': ['<(disk_image_script_path)', '<(dotnppversion)',], + }, + ], }, ], } diff --git a/o3d/installer/mac/make_disk_image.sh b/o3d/installer/mac/make_disk_image.sh new file mode 100755 index 0000000..0022834 --- /dev/null +++ b/o3d/installer/mac/make_disk_image.sh @@ -0,0 +1,81 @@ +#!/bin/bash +# Makes O3D disk image file. +# Syntax: make_disk_image version_string +# +# Copyright 2009, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Make disk image by copying all the bits we need to a new directory and then +# calling hdiutil to make a dmg of it. +# Obviously, this should run after the script that makes the installer. + +O3D_INTERNAL_DIR="${PROJECT_DIR}/../../../o3d-internal" +# If the o3d-internal depot is present, make disk image. +if [ -d "${O3D_INTERNAL_DIR}" ] +then + MAC_INSTALLER_DIR="${O3D_INTERNAL_DIR}/mac_installer" + if [ -d "${MAC_INSTALLER_DIR}" ] + then + # Make disk image dir + IMG_DIR="${BUILT_PRODUCTS_DIR}/DMG_SRC" + # Delete any existing directory so we can start from scratch. + rm -rf "${IMG_DIR}" + mkdir "${IMG_DIR}" + + if [ -d "${IMG_DIR}" ] + then + # Delete existing dmg if present. + rm -f "${BUILT_PRODUCTS_DIR}/o3d.dmg" + + # Get keystone auto update script. + cp "${MAC_INSTALLER_DIR}/.keystone_install" "${IMG_DIR}" + + # Get O3D install package. + cp -R "${BUILT_PRODUCTS_DIR}/O3D.mpkg" "${IMG_DIR}" + + # Make disk image from the folder we just created. + hdiutil create -srcfolder "${IMG_DIR}" \ + -size 30mb -ov -fs HFS+ -imagekey zlib-level=9 \ + -volname "O3D ${1}" \ + "${BUILT_PRODUCTS_DIR}/o3d.dmg" + + # Delete source folder now we are done. + rm -rf "${IMG_DIR}" + + echo "Mac disk image built" + else + echo Could not create dir "${IMG_DIR}". + fi + else + echo Mac installer directory not found. + fi +else + echo External build - not making disk image. +fi + diff --git a/o3d/installer/mac/make_installer.sh b/o3d/installer/mac/make_installer.sh new file mode 100755 index 0000000..5b1069c --- /dev/null +++ b/o3d/installer/mac/make_installer.sh @@ -0,0 +1,71 @@ +#!/bin/bash +# Makes the O3D installer. +# Syntax: make_installer version_string +# +# Copyright 2009, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Make the installer by copying any missing raw materials to the built products +# directory and then invoking "freeze" on the installer project file. +# Does not currently use the passed-in version string. + +O3D_INTERNAL_DIR="${PROJECT_DIR}/../../../o3d-internal" +# If the o3d-internal depot is present, make installer. +if [ -d "${O3D_INTERNAL_DIR}" ] +then + MAC_INSTALLER_DIR="${O3D_INTERNAL_DIR}/mac_installer" + if [ -d "${MAC_INSTALLER_DIR}" ] + then + # Get the installer project. + cp -f "${MAC_INSTALLER_DIR}/o3d.packproj" \ + "${BUILT_PRODUCTS_DIR}" + + # Get the keystone post install script. + cp -f "${MAC_INSTALLER_DIR}/postflight.sh" \ + "${BUILT_PRODUCTS_DIR}" + + # Get keystone. + cp -R -f "${MAC_INSTALLER_DIR}/GoogleSoftwareUpdate.pkg" \ + "${BUILT_PRODUCTS_DIR}" + + # Get the installer plug-in which asks about stats collection. + cp -R -f "${MAC_INSTALLER_DIR}/O3D_Stats.bundle" \ + "${BUILT_PRODUCTS_DIR}" + + # Now we have everything in-place, make the installer. + /usr/local/bin/freeze "${BUILT_PRODUCTS_DIR}/o3d.packproj" + + echo Mac installer built. + else + echo Mac installer directory not found. + fi +else + echo External build - not making installer. +fi + diff --git a/o3d/plugin/idl/idl.gyp b/o3d/plugin/idl/idl.gyp index b381e85..8d34808 100644 --- a/o3d/plugin/idl/idl.gyp +++ b/o3d/plugin/idl/idl.gyp @@ -149,7 +149,6 @@ 'action': [ 'python', 'codegen.py', - '--force', # If the build system wants to rebuild, we rebuild. '--binding-module=o3d:../../plugin/o3d_binding.py', '--generate=npapi', '--output-dir=<(idl_out_path)', |