Chromium Code Reviews| 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..a2037236b222acd2501b6f2446fc027380b86b84 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) Download/Install the NDK toolchain from |
| +http://developer.android.com/tools/sdk/ndk/index.html |
| + |
| +$ NDK_ROOT=$HOME/android/ndk-toolchain |
| +$ ./build/tools/make-standalone-toolchain.sh --platform=android-9 --install-dir=$NDK_ROOT |
| +$ NDK_CC=$NDK_ROOT/bin/arm-linux-androideabi-gcc |
|
qsr
2014/10/30 10:43:47
Why do you need all of this? If you have an androi
gauthamt
2014/10/30 17:51:22
Modified the instructions to just generate the des
|
| + |
| +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 |