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/compiling


Ignore:
Timestamp:
May 16, 2012, 5:21:33 PM (12 years ago)
Author:
michaelz
Comment:

created page, added current install process.

Legend:

Unmodified
Added
Removed
Modified
  • GSoC2012/Android/compiling

    v1 v1  
     1= Compiling libpurple on Android =
     2
     3There are build scripts in Monotone that build the libraries on which libpurple depends automatically. But you need to set up your host Programms, mainly Eclipse and the Android SDK/NDK.
     4
     5Follow these steps to set up a new Development platform. I recommend that even if you already have Eclipse or the SDK/NDK installed, you should download everything and start from scratch.
     6
     7I gess you will need about one hour to set up your IDE, and afterwards another hour for the automated build.
     8
     9== Install required developer tools ==
     10
     11Make sure you have the following things installed (the list may or may not be complete ;-)): a current JDK, patch, autoconf, pkg-config, gtk-doc-tools, GNU make and xzip
     12
     13=== get the workspace ===
     14
     15Check out the Android branch into a new working directory.
     16
     17=== Eclipse ===
     18
     19You need Eclipse IDE with C and Java Support. For this, I recommend you download Eclipse Classic or Eclipse IDE for Java developers. Files can be found at http://www.eclipse.org/downloads/. Eclipse does not need an installation, just extract the archive somewhere.
     20
     21Start it:
     22The executeable is in the Eclipse directory you just downloaded.
     23It will prompt you for a workspace. Select the android/workspace subdirectory in the Android branch.
     24There are errors in the projects, because you first need to install the Android plugin.
     25
     26Install C:
     27Go to Help → Install new Software. Select the update site for your Eclipse version. Then install "Programming languages" → "C/C++ Development tools"
     28
     29
     30
     31== Android Tools ==
     32
     33=== Download ===
     34
     35Download Android SDK + extract
     36(recommended: r18)
     37http://developer.android.com/sdk/index.html
     38
     39Download Android NDK + extract
     40(recommended: r8)
     41http://developer.android.com/sdk/ndk/index.html
     42
     43
     44
     45
     46=== Install Eclipse plugin ===
     47
     48If you encounter problems here, this page covers the issue with more details: http://developer.android.com/sdk/eclipse-adt.html#installing
     49
     50In Eclipse, Go to Help → Install new Software.[[BR]]
     51Select the Android update site: https://dl-ssl.google.com/android/eclipse/ [[BR]]
     52Select everything[[BR]]
     53Click on "next", "next", "accept", "finish"[[BR]]
     54Restart Eclipse when the plugin is installed.
     55
     56=== Configure Android SDK ===
     57Click on Window → Preferences, Select Android from the left panel. Enter the directory where you downloaded the SDK. Apply.
     58
     59Open the SDK Manager (if Eclipse has not prompted you to do it: Window → Android SDK Manager). Select "Tools" and "Android 2.3.3 (API 10)" and install. Android should have created an AVD for you.
     60
     61
     62=== Configure Android NDK ===
     63
     64Create a custom toolchain: Execute the following command in the ndk directory. Remember the install directory.
     65 {{{
     66 build/tools/make-standalone-toolchain.sh --platform=android-9 --install-dir=<some-new-dir>
     67 }}}
     68
     69Enter the install directory in eclipse in Preferences → String Substitution as ndk.root TODO: How exactly
     70
     71== Build it ==
     72
     73Go to Project → Clean Projects... and clean all projects. Then let Eclipse rebuild if it did not do it automatically. This may take some time.
     74
     75== Explore the Workspace ==
     76
     77There are several projects:
     78
     79 im.pidgin.libpurple.build::
     80   Needed utilities to build libpurple and its requirements.
     81   The direcotry buildscripts contains all the files that build the required projects. They are included in the eclipse build process. If you want to rebuild a library, just touch the buildfile for that library. If you touch common.ant, all libraries will be rebuild.
     82
     83
     84== Problems ==
     85glib-compile-resources not found
     86 Update glib on your host.
     87
     88Problems with undefined pthread types, e.g. pthread_rwlock_t
     89 Use the android-9 toolchain or newer.
     90
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!