Home | History | Annotate | Download | only in tools
      1 #!/bin/bash
      2 #
      3 # Author: Ravi Mistry
      4 #
      5 # Script to checkout and build a fresh copy of Chromium from head that uses a
      6 # writable, tip-of-tree Skia rather than the read-only, revision-locked Skia
      7 # specified in http://src.chromium.org/viewvc/chrome/trunk/src/DEPS
      8 #
      9 # Sample Usage:
     10 #   tools/build-tot-chromium.sh ~/chromiumtrunk
     11 
     12 if [[ $# -ne 1 ]] ; then
     13   echo "usage: $0 chromium_location"
     14   exit 1
     15 fi
     16 CHROMIUM_LOCATION=$1
     17 
     18 echo -e "\n\n========Deleting $CHROMIUM_LOCATION========\n\n"
     19 rm -rf $CHROMIUM_LOCATION
     20 
     21 mkdir $CHROMIUM_LOCATION
     22 cd $CHROMIUM_LOCATION
     23 gclient config https://src.chromium.org/chrome/trunk/src
     24 echo '
     25 solutions = [
     26   { "name"        : "src",
     27     "url"         : "https://src.chromium.org/chrome/trunk/src",
     28     "deps_file"   : "DEPS",
     29     "managed"     : True,
     30     "custom_deps" : {
     31       "src/third_party/skia": "https://skia.googlecode.com/svn/trunk",
     32       "src/third_party/skia/gyp": None,
     33       "src/third_party/skia/src": None,
     34       "src/third_party/skia/include": None,
     35     },
     36     "safesync_url": "http://chromium-status.appspot.com/lkgr",
     37   },
     38 ]
     39 ' > .gclient
     40 
     41 echo -e "\n\n========Starting gclient sync========\n\n"
     42 START_TIME=$SECONDS
     43 gclient sync
     44 END_TIME=$SECONDS
     45 echo -e "\n\n========gclient sync took $((END_TIME - START_TIME)) seconds========\n\n"
     46 
     47 cd src
     48 rm -rf out/Debug out/Release
     49 GYP_GENERATORS='ninja' ./build/gyp_chromium
     50 
     51 echo -e "\n\n========Starting ninja build========\n\n"
     52 START_TIME=$SECONDS
     53 ninja -C out/Release chrome
     54 END_TIME=$SECONDS
     55 echo -e "\n\n========ninja build took $((END_TIME - START_TIME)) seconds========\n\n"
     56 
     57 SVN_VERSION=`svnversion .`
     58 echo -e "\n\n========The Chromium & Skia versions are $SVN_VERSION========\n\n"
     59 
     60