Confirmed users
586
edits
(Update to NDK r8c by default) |
|||
| Line 8: | Line 8: | ||
Also, the [https://wiki.mozilla.org/Mobile/Fennec/Android_OtherBuildEnvs OtherBuildEnvs page] has some notes on a few other environment variations, so take a look at that as well if you have an environment or configuration that deviates from "normal". | Also, the [https://wiki.mozilla.org/Mobile/Fennec/Android_OtherBuildEnvs OtherBuildEnvs page] has some notes on a few other environment variations, so take a look at that as well if you have an environment or configuration that deviates from "normal". | ||
First follow the platform-specific instructions below to set up a build environment on your machine | First follow the platform-specific instructions below to set up a build environment on your machine. Once you have done that, follow the steps to get the source code, set up your mozconfig, and build Fennec. | ||
=== Linux === | === Linux === | ||
| Line 23: | Line 23: | ||
sudo apt-get install sun-java6-jdk mercurial ccache | sudo apt-get install sun-java6-jdk mercurial ccache | ||
sudo apt-get build-dep firefox | sudo apt-get build-dep firefox | ||
wget http://dl.google.com/android/ndk/android-ndk- | wget http://dl.google.com/android/ndk/android-ndk-r8c-linux-x86.tar.bz2 | ||
tar -xjf android-ndk- | tar -xjf android-ndk-r8c-linux-x86.tar.bz2 | ||
wget http://dl.google.com/android/android-sdk_r20.0.3-linux.tgz | wget http://dl.google.com/android/android-sdk_r20.0.3-linux.tgz | ||
tar -xzf android-sdk_r20.0.3-linux.tgz | tar -xzf android-sdk_r20.0.3-linux.tgz | ||
| Line 76: | Line 76: | ||
===== Install Android NDK ===== | ===== Install Android NDK ===== | ||
Download and extract the [http://developer.android.com/sdk/ndk/ Android NDK]. NDK revs 4-8 have been tested and are known to work. The automated builders currently use version | Download and extract the [http://developer.android.com/sdk/ndk/ Android NDK]. NDK revs 4-8 have been tested and are known to work. The automated builders currently use version r8c (and r7b for the android-x86 build). | ||
wget http://dl.google.com/android/ndk/android-ndk- | wget http://dl.google.com/android/ndk/android-ndk-r8c-linux-x86.tar.bz2 | ||
tar -xjf android-ndk- | tar -xjf android-ndk-r8c-linux-x86.tar.bz2 | ||
===== Install Android SDK ===== | ===== Install Android SDK ===== | ||
| Line 119: | Line 119: | ||
===== Install Android NDK ===== | ===== Install Android NDK ===== | ||
Download and extract the [http://developer.android.com/sdk/ndk/ Android NDK]. NDK revs 4-8 have been tested and are known to work. The automated builders currently use version | Download and extract the [http://developer.android.com/sdk/ndk/ Android NDK]. NDK revs 4-8 have been tested and are known to work. The automated builders currently use version r8c (and r7b for the android-x86 build). | ||
wget http://dl.google.com/android/ndk/android-ndk- | wget http://dl.google.com/android/ndk/android-ndk-r8c-darwin-x86.tar.bz2 | ||
tar -xjf android-ndk- | tar -xjf android-ndk-r8c-darwin-x86.tar.bz2 | ||
===== Install Android SDK ===== | ===== Install Android SDK ===== | ||
| Line 138: | Line 138: | ||
export PATH=$PATH:$HOME/android-sdk-macosx/platform-tools:$HOME/android-sdk-macosx/tools | export PATH=$PATH:$HOME/android-sdk-macosx/platform-tools:$HOME/android-sdk-macosx/tools | ||
=== Getting the source === | === Getting the source === | ||
| Line 171: | Line 158: | ||
export MOZCONFIG=$PWD/my-fennec-mozconfig | export MOZCONFIG=$PWD/my-fennec-mozconfig | ||
Here is an example mozconfig file for building Fennec, assuming you have followed the instructions above and are using version | Here is an example mozconfig file for building Fennec, assuming you have followed the instructions above and are using version r8c of the NDK. | ||
<pre> | <pre> | ||
# Add the correct paths here: | # Add the correct paths here: | ||
ac_add_options --with-android-ndk="$HOME/android-ndk- | ac_add_options --with-android-ndk="$HOME/android-ndk-r8c" | ||
ac_add_options --with-android-gnu-compiler-version=4.6 | |||
ac_add_options --with-android-sdk="$HOME/android-sdk-linux/platforms/android-16" | ac_add_options --with-android-sdk="$HOME/android-sdk-linux/platforms/android-16" | ||
ac_add_options --with-android-version=5 | ac_add_options --with-android-version=5 | ||