aldebaran / libqi-java

QiMessaging Java bindings
Other
14 stars 13 forks source link

Compiling and using libqi java bindings

Compiling

Using libqi-java in an other project ++++++++++++++++++++++++++++++++++++

To use the libqi Java bindings in an other maven project, run::

mvn install -DskipTests=true   # use -f pom-android.xml if relevant

Android compilation +++++++++++++++++++

For Android arm, you have to choose android-arm configuration. The first time create the configuration cd ~/work/aldebaran/sdk/libqi-java qitoolchain create --feed-name android-arm android-arm git://github.com/aldebaran/toolchains.git

On each compilation cd ~/work/aldebaran/sdk/libqi-java/jni qibuild configure --release -c android-arm qibuild make -j4 -c android-arm mkdir -p ../qimessaging/lib/armeabi-v7a mkdir -p /tmp/libqi-java/android-arm/ qibuild install --runtime -c android-arm

cd /tmp/libqi-java/android-arm/

for file in $(find -name *.so)
do
   cp $file ~/work/aldebaran/sdk/libqi-java/qimessaging/lib/armeabi-v7a
done

cd ~/work/aldebaran/sdk/libqi-java
rm -rf /tmp/libqi-java/android-arm/
cp -f jni/build-android-arm/sdk/lib/libgnustl_shared.so qimessaging/lib/armeabi-v7a
cd qimessaging
mvn install -DskipTests=true # use -f pom-android.xml
version=$(cat pom-android.xml | grep -oPm1 "(?<=<version>)[^<]+")
zip -r target/libqi-java-$version.jar lib/