Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Unified Diff: src/scripts/build_chrome.sh

Issue 600027: Adding [no]runhooks, [no]chrome, and [no]official options. (Closed)
Patch Set: Removed legacy environ variable for official. Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/build_chrome.sh
diff --git a/src/scripts/build_chrome.sh b/src/scripts/build_chrome.sh
index 7816a3f6fdc3a173854a33ef814819f490ace541..b4a10cbf2cd62d56e23ab441f1802e946341029b 100755
--- a/src/scripts/build_chrome.sh
+++ b/src/scripts/build_chrome.sh
@@ -14,7 +14,7 @@
assert_outside_chroot
# This script defaults Chrome source is in ~/chrome
-# You may override the Chrome source dir via the --chrome_dir option or by
+# You may override the Chrome source dir via the --chrome_dir option or by
# setting CHROMEOS_CHROME_DIR (for example, in ./.chromeos_dev)
DEFAULT_CHROME_DIR="${CHROMEOS_CHROME_DIR:-/home/$USER/chrome}"
@@ -24,11 +24,17 @@ NUM_JOBS=`grep -c "^processor" /proc/cpuinfo`
# Flags
DEFINE_string chrome_dir "$DEFAULT_CHROME_DIR" \
- "Directory to Chrome source"
+ "Directory to Chrome/Chromium source"
DEFINE_string mode "Release" \
- "The mode to build Chrome in (Debug or Release)"
+ "The mode to build Chrome/Chromium in (Debug or Release)"
DEFINE_string num_jobs "$NUM_JOBS" \
"The number of jobs to run in parallel"
+DEFINE_boolean runhooks true \
+ "Execute gclient runhooks before build (if norunhooks then chrome and official are ignored)"
+DEFINE_boolean chrome false \
+ "Builds a chrome branded version (requires src-internal)"
+DEFINE_boolean official false \
+ "Builds an official version (additional optimizations)"
# Parse command line
FLAGS "$@" || exit 1
@@ -45,9 +51,25 @@ FLAGS_chrome_dir=`eval readlink -f $FLAGS_chrome_dir`
echo Building Chrome in mode $FLAGS_mode
export GYP_GENERATORS="make"
export GYP_DEFINES="target_arch=ia32 chromeos=1"
+
+if [ $FLAGS_chrome -eq $FLAGS_TRUE ]
+then
+ export GYP_DEFINES="${GYP_DEFINES} branding=Chrome ffmpeg_branding=Chrome"
+fi
+
+if [ $FLAGS_official -eq $FLAGS_TRUE ]
+then
+ export GYP_DEFINES="${GYP_DEFINES} buildtype=Official"
+fi
+
CHROME_DIR=$FLAGS_chrome_dir
cd "$CHROME_DIR/src"
-gclient runhooks --force
+
+if [ $FLAGS_runhooks -eq $FLAGS_TRUE ]
+then
+ gclient runhooks --force
+fi
+
make BUILDTYPE=$FLAGS_mode -j$FLAGS_num_jobs -r chrome candidate_window
# Zip into chrome-chromeos.zip and put in local_assets
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698