[Pidgin] GSoC2012/Android/compiling added

Pidgin trac at pidgin.im
Wed May 16 13:21:35 EDT 2012

Added page "GSoC2012/Android/compiling" by michaelz from*
Page URL: <http://developer.pidgin.im/wiki/GSoC2012/Android/compiling>
Comment: created page, added current install process.
= Compiling libpurple on Android =

There 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.

Follow 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.

I gess you will need about one hour to set up your IDE, and afterwards another hour for the automated build.

== Install required developer tools ==

Make 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

=== get the workspace ===

Check out the Android branch into a new working directory.

=== Eclipse ===

You 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.

Start it:
The executeable is in the Eclipse directory you just downloaded.
It will prompt you for a workspace. Select the android/workspace subdirectory in the Android branch.
There are errors in the projects, because you first need to install the Android plugin.

Install C: 
Go to Help → Install new Software. Select the update site for your Eclipse version. Then install "Programming languages" → "C/C++ Development tools"

== Android Tools ==

=== Download ===

Download Android SDK + extract
(recommended: r18)

Download Android NDK + extract
(recommended: r8)

=== Install Eclipse plugin ===

If you encounter problems here, this page covers the issue with more details: http://developer.android.com/sdk/eclipse-adt.html#installing

In Eclipse, Go to Help → Install new Software.[[BR]]
Select the Android update site: https://dl-ssl.google.com/android/eclipse/ [[BR]]
Select everything[[BR]]
Click on "next", "next", "accept", "finish"[[BR]]
Restart Eclipse when the plugin is installed.

=== Configure Android SDK ===
Click on Window → Preferences, Select Android from the left panel. Enter the directory where you downloaded the SDK. Apply.

Open 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.

=== Configure Android NDK ===

Create a custom toolchain: Execute the following command in the ndk directory. Remember the install directory.
 build/tools/make-standalone-toolchain.sh --platform=android-9 --install-dir=<some-new-dir>

Enter the install directory in eclipse in Preferences → String Substitution as ndk.root TODO: How exactly

== Build it ==

Go to Project → Clean Projects... and clean all projects. Then let Eclipse rebuild if it did not do it automatically. This may take some time.

== Explore the Workspace ==

There are several projects:

   Needed utilities to build libpurple and its requirements.
   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.

== Problems ==
glib-compile-resources not found
 Update glib on your host.

Problems with undefined pthread types, e.g. pthread_rwlock_t
 Use the android-9 toolchain or newer.


* The IP shown here might not mean anything if the user or the server is
behind a proxy.

Pidgin <http://pidgin.im>

This is an automated message. Someone at http://pidgin.im added your email
address to be notified of changes on GSoC2012/Android/compiling. If it was not you, please
report to .

More information about the Wikiedit mailing list