Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | .. _build_androideclipse: |
michael@0 | 2 | |
michael@0 | 3 | ======================== |
michael@0 | 4 | Android Eclipse Projects |
michael@0 | 5 | ======================== |
michael@0 | 6 | |
michael@0 | 7 | The build system contains alpha support for generating Android Eclipse |
michael@0 | 8 | project files to aid with development. |
michael@0 | 9 | |
michael@0 | 10 | To generate Android Eclipse project files, you'll need to have a fully |
michael@0 | 11 | built and packaged tree:: |
michael@0 | 12 | |
michael@0 | 13 | mach build && mach package |
michael@0 | 14 | |
michael@0 | 15 | (This is because Eclipse itself packages an APK containing |
michael@0 | 16 | ``omni.ja``, and ``omni.ja`` is only assembled during packaging.) |
michael@0 | 17 | |
michael@0 | 18 | Then, simply generate the Android Eclipse build backend:: |
michael@0 | 19 | |
michael@0 | 20 | mach build-backend -b AndroidEclipse |
michael@0 | 21 | |
michael@0 | 22 | If all goes well, the path to the generated projects should be |
michael@0 | 23 | printed (currently, ``$OBJDIR/android_eclipse``). |
michael@0 | 24 | |
michael@0 | 25 | To use the generated Android Eclipse project files, you'll need to |
michael@0 | 26 | have a recent version of Eclipse (see `Tested Versions`_) with the |
michael@0 | 27 | `Eclipse ADT plugin |
michael@0 | 28 | <http://developer.android.com/tools/sdk/eclipse-adt.html>`_ |
michael@0 | 29 | installed. You can then import all the projects into Eclipse using |
michael@0 | 30 | *File > Import ... > General > Existing Projects into Workspace*. |
michael@0 | 31 | |
michael@0 | 32 | Updating Project Files |
michael@0 | 33 | ====================== |
michael@0 | 34 | |
michael@0 | 35 | As you pull and update the source tree, your Android Eclipse files may |
michael@0 | 36 | fall out of sync with the build configuration. The tree should still |
michael@0 | 37 | build fine from within Eclipse, but source files may be missing and in |
michael@0 | 38 | rare circumstances Eclipse's index may not have the proper build |
michael@0 | 39 | configuration. |
michael@0 | 40 | |
michael@0 | 41 | To account for this, you'll want to periodically regenerate the |
michael@0 | 42 | Android Eclipse project files. You can do this by running ``mach build |
michael@0 | 43 | && mach package && mach build-backend -b AndroidEclipse`` from the |
michael@0 | 44 | command line. It's a good idea to refresh and clean build all projects |
michael@0 | 45 | in Eclipse after doing this. |
michael@0 | 46 | |
michael@0 | 47 | In future, we'd like to include an Android Eclipse run configuration |
michael@0 | 48 | or build target that integrates updating the project files. |
michael@0 | 49 | |
michael@0 | 50 | Currently, regeneration rewrites the original project files. **If |
michael@0 | 51 | you've made any customizations to the projects, they will likely get |
michael@0 | 52 | overwritten.** We would like to improve this user experience in the |
michael@0 | 53 | future. |
michael@0 | 54 | |
michael@0 | 55 | Troubleshooting |
michael@0 | 56 | =============== |
michael@0 | 57 | |
michael@0 | 58 | If Eclipse's builder gets confused, you should always refresh and |
michael@0 | 59 | clean build all projects. If Eclipse's builder is continually |
michael@0 | 60 | confused, you can see a log of what is happening at |
michael@0 | 61 | ``$OBJDIR/android_eclipse/build.log``. |
michael@0 | 62 | |
michael@0 | 63 | If you run into memory problems executing ``dex``, you should |
michael@0 | 64 | `Increase Eclipse's memory limits <http://stackoverflow.com/a/11093228>`_. |
michael@0 | 65 | |
michael@0 | 66 | The produced Android Eclipse project files are unfortunately not |
michael@0 | 67 | portable. Please don't move them around. |
michael@0 | 68 | |
michael@0 | 69 | Structure of Android Eclipse projects |
michael@0 | 70 | ===================================== |
michael@0 | 71 | |
michael@0 | 72 | The Android Eclipse backend generates several projects spanning Fennec |
michael@0 | 73 | itself and its tests. You'll mostly interact with the *Fennec* project |
michael@0 | 74 | itself. |
michael@0 | 75 | |
michael@0 | 76 | In future, we'd like to expand this documentation to include some of |
michael@0 | 77 | the technical details of how the Eclipse integration works, and how to |
michael@0 | 78 | add additional Android Eclipse projects using the ``moz.build`` |
michael@0 | 79 | system. |
michael@0 | 80 | |
michael@0 | 81 | Tested Versions |
michael@0 | 82 | =============== |
michael@0 | 83 | |
michael@0 | 84 | =============== ==================================== ================= |
michael@0 | 85 | OS Version Working as of |
michael@0 | 86 | =============== ==================================== ================= |
michael@0 | 87 | Mac OS X Luna (Build id: 20130919-0819) February 2014 |
michael@0 | 88 | Mac OS X Kepler (Build id: 20131219-0014) February 2014 |
michael@0 | 89 | Mac OS X 10.8.5 Kepler (Build id: 20130919-0819) February 2014 |
michael@0 | 90 | =============== ==================================== ================= |