| Index: mojo/go/sample_app/README.txt
|
| diff --git a/mojo/go/sample_app/README.txt b/mojo/go/sample_app/README.txt
|
| index fbe0c9c3d90494ed32e9844a87437603af335cfa..86c4fb294c774de6822384afbe2e37209c55d25f 100644
|
| --- a/mojo/go/sample_app/README.txt
|
| +++ b/mojo/go/sample_app/README.txt
|
| @@ -2,19 +2,32 @@ Sample Go application that can be loaded into a mojo shell running on Android.
|
| The application exports a MojoMain entry point for the shell and then makes
|
| a GetTimeTicksNow system call.
|
|
|
| -Build instructions
|
| -gn args <output_directory>
|
| +Setup instructions
|
| +
|
| +1) Generate the NDK toolchain for the android platform you plan to use.
|
| +
|
| +$ cd mojo/src/third_party/android_tools/ndk
|
| +$ NDK_ROOT=$HOME/android/ndk-toolchain
|
| +$ ./build/tools/make-standalone-toolchain.sh --platform=android-14 --install-dir=$NDK_ROOT
|
| +$ NDK_CC=$NDK_ROOT/bin/arm-linux-androideabi-gcc
|
| +
|
| +2) Download/Install the Go compiler.
|
| +
|
| +$ unset GOBIN GOPATH GOROOT
|
| +$ hg clone https://code.google.com/p/go
|
| +$ cd go/src
|
| +$ CC_FOR_TARGET=$NDK_CC GOOS=android GOARCH=arm GOARM=7 ./make.bash
|
| +$ ls ../bin/go
|
| +
|
| +3) Now, we switch to the Mojo workspace and build the sample application.
|
| +
|
| +$ cd mojo/src
|
| +$ gn args <output_directory>
|
|
|
| Set the following arguments
|
| mojo_use_go=true
|
| -go_build_tool=<go_binary_location>
|
| +go_build_tool="<path_to_go_binary>"
|
| os="android"
|
|
|
| -gn gen <output_directory>
|
| -ninja -C <output_directory> go_sample_app
|
| -
|
| -You can now following instructions from the below link to run the app.
|
| -http://dev.chromium.org/developers/how-tos/run-mojo-shell
|
| -
|
| -Start the Go application.
|
| -./build/android/adb_run_mojo_shell http://127.0.0.1:4444/go_sample_app
|
| +$ gn gen <output_directory>
|
| +$ ninja -C <output_directory> go_sample_app
|
|
|