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

Unified Diff: README.md

Issue 1155123007: README: integrate Android build instructions into "Build Mojo" section. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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: README.md
diff --git a/README.md b/README.md
index 99daeb49601a29668409f00106210ea5460809e1..c4d63e6861acc155df5e03646d4d6989b9294a7c 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ Mojo is an effort to extract a common platform out of Chrome's renderer and
plugin processes that can support multiple types of sandboxed content, such as
HTML, Pepper, or NaCl.
-## Set up your environment
+## Set-up and code check-out
The instructions below only need to be done once. Note that a simple "git clone"
command is not sufficient to build the source code because this repo uses the
@@ -41,8 +41,30 @@ out/Debug.
If the fetch command fails, you will need to delete the src directory and start
over.
+### <a name="configure-android"></a>Adding Android bits in an existing checkout
+
+If you configured your set-up for Linux and now wish to build for Android, edit
+the file .gclient in your root Mojo directory (the parent directory to src.)
tonyg 2015/06/08 15:56:09 Add back-tics around `.gclient`?
ppi 2015/06/08 16:00:30 Done.
+and add this line at the end of the file:
+
+```
+target_os = [u'android',u'linux']
+```
+
+Bring in Android-specific build dependencies:
+```
+$ build/install-build-deps-android.sh
+```
+
+Pull down all of the packages with this command:
+```
+$ gclient sync
+```
+
## <a name="buildmojo"></a>Build Mojo
+### Linux
+
Build Mojo for Linux by running:
```
@@ -56,12 +78,13 @@ You can also use the mojob.py script for building. This script automatically
calls ninja and sets -j to an appropriate value based on whether Goma is
present. You cannot specify a target name with this script.
```
+mojo/tools/mojob.py gn
mojo/tools/mojob.py build
```
Run a demo:
```
-out/Debug//mojo_shell mojo:spinning_cube
+out/Debug/mojo_shell mojo:spinning_cube
```
Run the tests:
@@ -76,10 +99,23 @@ mojo/tools/mojob.py build --release
mojo/tools/mojob.py test --release
```
-## Update your repo
+### Android
+
+To build for Android, first make sure that your checkout is [configured](#configure-android) to build
+for Android. After that you can use the mojob script as follows:
+
+```
+$ mojo/tools/mojob.py gn --android
+$ mojo/tools/mojob.py build --android
+```
+
+The result will be in out/android_Debug. If you see javac compile errors,
+[make sure you have an up-to-date JDK](https://code.google.com/p/chromium/wiki/AndroidBuildInstructions#Install_Java_JDK)
-You can update your repo like this. The order is important. You must do the `git
-pull` first because `gclient sync` is dependent on the current revision.
+## Update your checkout
+
+You can update your checkout like this. The order is important. You must do the
+`git pull` first because `gclient sync` is dependent on the current revision.
```
# Fetch changes from upstream and rebase the current branch on top
$ git pull --rebase
@@ -136,44 +172,6 @@ $ git cl land
Don't break the build! Waterfall is here:
http://build.chromium.org/p/client.mojo/waterfall
-## Android Builds
-
-To build for Android, first make sure you've downloaded build support for
-Android, which you would have done by adding `--target_os=android` when you ran
-`fetch mojo`. If you didn't do that, there's an easy fix. Edit the file .gclient
-in your root Mojo directory (the parent directory to src.) Add this line at the
-end of the file:
-
-```
-target_os = [u'android']
-```
-
-Bring in android specific build dependencies:
-```
-$ build/install-build-deps-android.sh
-```
-
-Pull down all of the packages with this command:
-
-```
-$ gclient sync
-```
-
-Prepare the build directory for Android:
-
-```
-$ mojo/tools/mojob.py gn --android
-```
-
-Finally, perform the build. The result will be in out/android_Debug:
-
-```
-$ mojo/tools/mojob.py build --android
-```
-
-If you see javac compile errors, make sure you have an up-to-date JDK:
-https://code.google.com/p/chromium/wiki/AndroidBuildInstructions#Install_Java_JDK
-
## Dart Code
Because the dart analyzer is a bit slow, we don't run it unless the user
« 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