Auto-tools/Projects/Robocop/GetStarted
Setup
- First Clone the source code
- Then Setup the build environment
- Finally, build with the command
make -f client.mk
in the source directory.
Items which need attention:
Robocop needs two different builds of firefox in order for it to work. One is the desktop build, and the other being the fennec build. When making different builds, it is essential that we should use two different .mozconfig files to generate the correct build. Here's some examples of .mozconfig:
# This is an example .mozconfig file for building fennec . $topsrcdir/browser/config/mozconfig mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-android mk_add_options MOZ_MAKE_FLAGS="-s -j10" ac_add_options --enable-debug ac_add_options --disable-optimize ac_add_options --with-ccache ac_add_options --disable-crashreporter # Android SDK/NDK ac_add_options --with-android-ndk="/dir/to/android-tools/android-ndk-r5c" ac_add_options --with-android-sdk="/dir/to/android-tools/android-sdk-macosx/platforms/android-14" ac_add_options --with-android-version=5 ac_add_options --with-android-tools="/dir/to/android-tools/android-sdk-macosx/tools" ac_add_options --with-android-toolchain="/dir/to/android-tools/android-ndk-r5c/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86" ac_add_options --with-android-platform="/dir/to/android-tools/android-ndk-r5c/platforms/android-5/arch-arm" # Android options ## Native UI: ac_add_options --enable-application=mobile/android ac_add_options --target=arm-linux-androideabi ac_add_options --with-endian=little
# This is an example for building desktop firefox ac_add_options --enable-application=browser mk_add_options MOZ_OBJDIR=./objdir-firefox
After done cloning and building (which takes an awfully long time), we can now package the fennec builds we just created by using this command under the object directory:
make package
When all of the above is completed, we just need to install the fennec package on our device by using adb:
adb install dist/fennec-*.apk
Running Test Cases
We should be following this link for running test cases.
Items which need attention:
Please make sure the MOZ_HOST_BIN environmental variable is set to the correct place. It should point directly to the SOURCE/{objdir}/dist/bin under the DESKTOP build.