Mobile/Fennec/Android: Difference between revisions

Jump to navigation Jump to search
Line 72: Line 72:


To speed up subsequent builds you should build only part of the <tt>mobile/android</tt> directory using <tt>./mach build mobile/android</tt> or <tt>./mach build mobile/android/base</tt>, depending on where your changes are.
To speed up subsequent builds you should build only part of the <tt>mobile/android</tt> directory using <tt>./mach build mobile/android</tt> or <tt>./mach build mobile/android/base</tt>, depending on where your changes are.
==== Building faster with 'mach artifact' ====
Since most Firefox for Android development is in Java and JS, you can speed up your build process by downloading rather than building the C++ code pieces, because that takes up the majority of build time. This is optional and not necessary for developing on Firefox for Android, so you can skip this section and do it later if you wish.
===== mach artifact setup =====
Make sure that you have run <tt>mach mercurial-setup</tt> and installed the <tt>mozext</tt> tools when prompted.
1. Add the following to your mercurial config file <tt>.hg/hgrc</tt> in your source directory.
[extensions]
mozext = /PATH/TO/HOME/.mozbuild/version-control-tools/hgext/mozext
2. Run <tt>hg pushlogsync</tt>. Mercurial should show a long (and slow) progress bar. From now on, each time you hg pull, you’ll also maintain your local copy of the pushlog.
3. Add the following lines to your mozconfig:
ac_add_options --disable-compile-environment
mk_add_options MOZ_OBJDIR=./objdir-frontend
(The objdir can be whatever you choose, but it's named differently so you can go back to non-artifact building if you choose.)
4. All done! When building, you need to run an extra <tt>mach artifact</tt> step:
./mach build
./mach artifact install
./mach package
./mach install
For more detailed explanation of these steps, see [http://www.ncalexander.net/blog/2015/07/02/build-fennec-frontend-fast-with-mach-artifact/ nalexander's blog post] introducing mach artifact.


=== Developing Fennec with IDEs ===
=== Developing Fennec with IDEs ===
Confirmed users
400

edits

Navigation menu