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

Side by Side Diff: build/install-build-deps-android.sh

Issue 10963014: Fix android build deps to work on ubuntu 12.04+ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added common install section and addressing nits. Created 8 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash -e 1 #!/bin/bash -e
2 2
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Script to install everything needed to build chromium on android that 7 # Script to install everything needed to build chromium on android that
8 # requires sudo privileges. 8 # requires sudo privileges.
9 # See http://code.google.com/p/chromium/wiki/AndroidBuildInstructions 9 # See http://code.google.com/p/chromium/wiki/AndroidBuildInstructions
10 10
(...skipping 21 matching lines...) Expand all
32 exit ${status} 32 exit ${status}
33 } 33 }
34 trap cleanup EXIT 34 trap cleanup EXIT
35 35
36 sudo apt-get update 36 sudo apt-get update
37 37
38 # Fix deps 38 # Fix deps
39 sudo apt-get -f install 39 sudo apt-get -f install
40 40
41 # Install deps 41 # Install deps
42 sudo apt-get -y install python-pexpect ant1.8 xvfb x11-utils 42 # This step differs depending on what Ubuntu release we are running
43 # on since the package names are different, and Sun's Java must
44 # be installed manually on late-model versions.
43 45
44 # Install sun-java6 stuff 46 # common
45 sudo apt-get -y install sun-java6-bin sun-java6-jre sun-java6-jdk 47 sudo apt-get -y install python-pexpect xvfb x11-utils
46 48
47 # Switch version of Java to java-6-sun 49 if /usr/bin/lsb_release -r -s | grep -q "12."; then
48 # Sun's java is missing certain Java plugins (e.g. for firefox, mozilla). These 50 # Ubuntu 12.x
49 # are not required to build, and thus are treated only as warnings. Any errors 51 sudo apt-get -y install ant
50 # in updating java alternatives which are not '*-javaplugin.so' will cause 52
51 # errors and stop the script from completing successfully. 53 # Java can not be installed via ppa on Ubuntu 12.04+ so we'll
52 if ! sudo update-java-alternatives -s java-6-sun \ 54 # simply check to see if it has been setup properly -- if not
53 >& "${TEMPDIR}"/update-java-alternatives.out 55 # let the user know.
54 then 56
55 # Check that there are the expected javaplugin.so errors for the update 57 if ! java -version 2>&1 | grep -q "Java(TM)"; then
56 if grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out >& /dev/null 58 echo "****************************************************************"
59 echo "You need to install the Oracle Java SDK from http://goo.gl/uPRSq"
60 echo "and configure it as the default command-line Java environment."
61 echo "****************************************************************"
62 exit
63 fi
64
65 else
66 # Ubuntu 10.x
67
68 sudo apt-get -y install ant1.8
69
70 # Install sun-java6 stuff
71 sudo apt-get -y install sun-java6-bin sun-java6-jre sun-java6-jdk
72
73 # Switch version of Java to java-6-sun
74 # Sun's java is missing certain Java plugins (e.g. for firefox, mozilla).
75 # These are not required to build, and thus are treated only as warnings.
76 # Any errors in updating java alternatives which are not '*-javaplugin.so'
77 # will cause errors and stop the script from completing successfully.
78 if ! sudo update-java-alternatives -s java-6-sun \
79 >& "${TEMPDIR}"/update-java-alternatives.out
57 then 80 then
58 # Print as warnings all the javaplugin.so errors 81 # Check that there are the expected javaplugin.so errors for the update
59 echo 'WARNING: java-6-sun has no alternatives for the following plugins:' 82 if grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out >& \
60 grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out 83 /dev/null
61 fi 84 then
62 # Check if there are any errors that are not javaplugin.so 85 # Print as warnings all the javaplugin.so errors
63 if grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out \ 86 echo 'WARNING: java-6-sun has no alternatives for the following plugins:'
64 >& /dev/null 87 grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out
65 then 88 fi
66 # If there are non-javaplugin.so errors, treat as errors and exit 89 # Check if there are any errors that are not javaplugin.so
67 echo 'ERRORS: Failed to update alternatives for java-6-sun:' 90 if grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out \
68 grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out 91 >& /dev/null
69 exit 1 92 then
93 # If there are non-javaplugin.so errors, treat as errors and exit
94 echo 'ERRORS: Failed to update alternatives for java-6-sun:'
95 grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out
96 exit 1
97 fi
70 fi 98 fi
71 fi 99 fi
72 100
73 echo "install-build-deps-android.sh complete." 101 echo "install-build-deps-android.sh complete."
OLDNEW
« 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