agrieve | 8638ef8 | 2017-03-08 15:44:31 | [diff] [blame] | 1 | #!/bin/bash |
[email protected] | 9f95fb9 | 2011-10-06 18:19:30 | [diff] [blame] | 2 | |
[email protected] | 2a89cd9 | 2012-02-18 01:58:43 | [diff] [blame] | 3 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 9f95fb9 | 2011-10-06 18:19:30 | [diff] [blame] | 4 | # Use of this source code is governed by a BSD-style license that can be |
5 | # found in the LICENSE file. | ||||
6 | |||||
lisandrop | aeae0b7 | 2015-02-10 21:39:31 | [diff] [blame] | 7 | # Script to install everything needed to build chromium on android, including |
8 | # items requiring sudo privileges. | ||||
mostynb | df175a8 | 2016-02-08 23:27:20 | [diff] [blame] | 9 | # See https://www.chromium.org/developers/how-tos/android-build-instructions |
[email protected] | 9f95fb9 | 2011-10-06 18:19:30 | [diff] [blame] | 10 | |
navabi | 654f395 | 2015-01-20 23:43:07 | [diff] [blame] | 11 | args="$@" |
dgn | ebe5d99c | 2015-11-06 15:28:51 | [diff] [blame] | 12 | |
[email protected] | c4fabbc3 | 2012-03-07 02:22:18 | [diff] [blame] | 13 | if ! uname -m | egrep -q "i686|x86_64"; then |
14 | echo "Only x86 architectures are currently supported" >&2 | ||||
15 | exit | ||||
16 | fi | ||||
[email protected] | 9f95fb9 | 2011-10-06 18:19:30 | [diff] [blame] | 17 | |
agrieve | 8638ef8 | 2017-03-08 15:44:31 | [diff] [blame] | 18 | # Exit if any commands fail. |
19 | set -e | ||||
friedman | 3f67f4a | 2016-04-28 00:32:26 | [diff] [blame] | 20 | |
agrieve | 8638ef8 | 2017-03-08 15:44:31 | [diff] [blame] | 21 | lsb_release=$(lsb_release --codename --short) |
friedman | 3f67f4a | 2016-04-28 00:32:26 | [diff] [blame] | 22 | |
[email protected] | 9e5f728 | 2014-04-03 21:40:19 | [diff] [blame] | 23 | # Install first the default Linux build deps. |
24 | "$(dirname "${BASH_SOURCE[0]}")/install-build-deps.sh" \ | ||||
navabi | 654f395 | 2015-01-20 23:43:07 | [diff] [blame] | 25 | --no-syms --lib32 --no-arm --no-chromeos-fonts --no-nacl --no-prompt "${args}" |
johnme | 49bb458a | 2014-11-27 15:45:31 | [diff] [blame] | 26 | |
[email protected] | 4ba8681e | 2012-03-14 07:23:30 | [diff] [blame] | 27 | # Fix deps |
28 | sudo apt-get -f install | ||||
[email protected] | 9f95fb9 | 2011-10-06 18:19:30 | [diff] [blame] | 29 | |
[email protected] | 758d7708 | 2014-01-08 00:05:19 | [diff] [blame] | 30 | # common |
thomasanderson | 98888af | 2016-12-08 06:58:50 | [diff] [blame] | 31 | sudo apt-get -y install lib32z1 lighttpd python-pexpect xvfb x11-utils |
[email protected] | 9f95fb9 | 2011-10-06 18:19:30 | [diff] [blame] | 32 | |
johnme | 49bb458a | 2014-11-27 15:45:31 | [diff] [blame] | 33 | # Some binaries in the Android SDK require 32-bit libraries on the host. |
34 | # See https://developer.android.com/sdk/installing/index.html?pkg=tools | ||||
sbc | bc51e877 | 2017-04-07 16:20:20 | [diff] [blame] | 35 | sudo apt-get -y install libncurses5:i386 libstdc++6:i386 zlib1g:i386 |
[email protected] | 36cd20a | 2014-08-19 20:10:06 | [diff] [blame] | 36 | |
estevenson | 4c45625 | 2017-03-01 15:21:44 | [diff] [blame] | 37 | # Required for apk-patch-size-estimator |
38 | sudo apt-get -y install bsdiff | ||||
39 | |||||
[email protected] | c4fabbc3 | 2012-03-07 02:22:18 | [diff] [blame] | 40 | echo "install-build-deps-android.sh complete." |