Trac is being migrated to new services! Issues can be found in our new YouTrack instance and WIKI pages can be found on our website.

Changes between Initial Version and Version 1 of GSoC2012/Android/structure


Ignore:
Timestamp:
Jun 14, 2012, 10:25:11 AM (12 years ago)
Author:
michaelz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GSoC2012/Android/structure

    v1 v1  
     1= Structure of the Android Port =
     2There is a workspace in android/workspace, that contains three eclipse projects:
     3
     4== im.pidgin.libpurple ==
     5Depends on im.pidgin.libpurple.build, so that the build scripts are always executed when you build this project.
     6
     7This project contains all sources for the jni in a native direcotry. It also contains all sources for the java files. It is configured as both, java and C project, with the following build order:
     8  * Extract C constants
     9  * Generate JNI headers
     10  * Run android resource manager
     11  * Compile the C sources
     12  * Compile the Java files
     13  * Run Android compiler
     14  * Create distribution files
     15'''(TODO: Check if this lis is optimal and in sync with project)'''
     16
     17The process includes scripts that generate the headers automatically and extract Constants from C files to use them in Java, so you do not have to worry about this.
     18
     19=== Native Methods ===
     20Native methods end in _native. They use a jlong to store pointers.
     21
     22If you added a new native method to java, run a build to generate the corrosponding header (if your java file does not contain any native mehtods yet, it is most likely not listed in the native/build.xml, so add it there.)
     23
     24== im.pidgin.libpurple.build ==
     25This project contains teeded utilities to build libpurple and its requirements.
     26The direcotry buildscripts contains all the files that build the required projects.
     27They are included in the eclipse build process, so that all libraries get downloaded and compiled automatically once you have eclipse set up.
     28
     29If you want to rebuild a library, just touch the buildfile for that library. If you touch common.ant, all libraries will be rebuild.
     30To compile from scratch, remove the contant of the build directory and touch common.ant. The files won't get downloaded again because they are stored in the downlaods direcotry.
     31
     32If you change something in the build directory, the rebuild process won't start automatically, because it is not possible to tell eclipse which files are generated and which are not from an ant script and because of that, eclipse would rebuild next time even if the change was done by a build script (which would mean on every build).
     33
     34=== Build Process ===
     35All buildscripst are registered as eclipse ant builder in the right order. Each build script does the following steps:
     36  * Download the source tar.gz or tar.bz2 archive for the requested version.
     37  * Patch config.sub to contain an the android os.
     38  * Apply a patch on the source (optional)
     39  * Run configure with the right toolchain and target
     40  * Run make && make install
     41
     42The file common.ant contains operations that are used by most build scripts.
     43
     44=== Updating ===
     45To update a library, simply change the version number. You should remove the build files of dependent libraries and touch common.ant if you want to force a compleate rebuild of them.
     46
     47=== Constant extraction ===
     48
     49The builds project is also configured as a java project that provides an ant rule to extract Constants from a C file.
     50
     51=== .so file renaming ===
     52The builds project also provides a class that renames .so.x (where x is a number) to .x.so files. This is needed because android exprects libraries to be of the form lib*.so.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!