From 7e8a08aeb3ca533d6dfe62ad32a4f4fed6b5fef6 Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Mon, 18 Feb 2013 16:06:57 -0500 Subject: [PATCH] Initial commit --- .gitignore | 1 + .gitmodules | 6 ++++++ VERSION | 1 + depot_tools | 1 + ninja | 1 + script/bootstrap | 13 +++++++++++++ script/build | 12 ++++++++++++ script/update | 41 +++++++++++++++++++++++++++++++++++++++++ 8 files changed, 76 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 VERSION create mode 160000 depot_tools create mode 160000 ninja create mode 100755 script/bootstrap create mode 100755 script/build create mode 100755 script/update diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..57872d0f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/vendor/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..19d3dbe0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "depot_tools"] + path = depot_tools + url = https://chromium.googlesource.com/chromium/tools/depot_tools.git +[submodule "ninja"] + path = ninja + url = https://github.com/martine/ninja diff --git a/VERSION b/VERSION new file mode 100644 index 00000000..253af831 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +CHROMIUM_REVISION=183105 diff --git a/depot_tools b/depot_tools new file mode 160000 index 00000000..34b5d826 --- /dev/null +++ b/depot_tools @@ -0,0 +1 @@ +Subproject commit 34b5d8268644a40faea2d01d9b57d2ace49d6a22 diff --git a/ninja b/ninja new file mode 160000 index 00000000..2c953d15 --- /dev/null +++ b/ninja @@ -0,0 +1 @@ +Subproject commit 2c953d1501de5195e2485185fa24a2ebfd76bbb5 diff --git a/script/bootstrap b/script/bootstrap new file mode 100755 index 00000000..7f0b8cb0 --- /dev/null +++ b/script/bootstrap @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +cd "$(dirname $0)/.." +SOURCE_ROOT=$(pwd -P) + +git submodule sync +git submodule update --init --recursive + +"${SOURCE_ROOT}/ninja/bootstrap.py" + +"${SOURCE_ROOT}/script/update" diff --git a/script/build b/script/build new file mode 100755 index 00000000..6f41421c --- /dev/null +++ b/script/build @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +cd "$(dirname $0)/.." +SOURCE_ROOT=$(pwd -P) +NINJA_DIR="${SOURCE_ROOT}/ninja" +VENDOR_DIR="${SOURCE_ROOT}/vendor" +CHROMIUM_DIR="${VENDOR_DIR}/chromium" + +"${NINJA_DIR}/ninja" -C "${CHROMIUM_DIR}/src/out/Debug" content_shell +"${NINJA_DIR}/ninja" -C "${CHROMIUM_DIR}/src/out/Release" content_shell diff --git a/script/update b/script/update new file mode 100755 index 00000000..e6a04a27 --- /dev/null +++ b/script/update @@ -0,0 +1,41 @@ +#!/bin/sh + +set -e + +announce() { + echo + echo $@ + echo +} + +cd "$(dirname $0)/.." +SOURCE_ROOT=$(pwd -P) +VENDOR_DIR="${SOURCE_ROOT}/vendor" +CHROMIUM_DIR="${VENDOR_DIR}/chromium" + +source VERSION + +export PATH="${SOURCE_ROOT}/depot_tools:${PATH}" + +if [ ! -d "${CHROMIUM_DIR}" ]; then + mkdir -p "$(dirname "${CHROMIUM_DIR}")" + + CHROMIUM_TARBALL_BASE_URL="http://chromium-browser-source.commondatastorage.googleapis.com/" + CHROMIUM_TARBALL_FILENAME=$(curl --silent "${CHROMIUM_TARBALL_BASE_URL}chromium_tarball.html" | grep 'href=' | sed -E -e 's/.*href="([^"]+)".*/\1/') + + TEMP_DIR=$(mktemp -d -t prebuilt-chromium-bootstrap) + trap "rm -rf \"${TEMP_DIR}\"" EXIT + + announce "Downloading Chromium tarball..." + curl "${CHROMIUM_TARBALL_BASE_URL}${CHROMIUM_TARBALL_FILENAME}" | tar -xz -C "${TEMP_DIR}" + mv "${TEMP_DIR}/home/src_tarball/tarball/chromium" "${CHROMIUM_DIR}" + + cd "${CHROMIUM_DIR}/src" + gclient sync --force --revision src@${CHROMIUM_REVISION} +else + cd "${CHROMIUM_DIR}/src" + gclient sync --revision src@${CHROMIUM_REVISION} +fi + +export GYP_GENERATORS=ninja +./build/gyp_chromium