Git Product home page Git Product logo

libqi-java's Introduction

Compiling and using libqi java bindings

Compiling

* Get a toolchain (See here

for a list of supported architectures) :

qitoolchain create --feed-name <feed-name> <toolchain-name> git://github.com/aldebaran/toolchains.git

<toolchain-name> : name give to tool chain

(Where feed-name is the basename of one of the feeds in feeds/, without the .xml extension)

  • If you want to build for android, you should install the NDK and set the following environment variables:

    ANDROID_HOME       /path/to/adt-bundle-linux/sdk  # don't forget the 'sdk'
    ANDROID_NDK_HOME   /path/to/android-ndk-r8e
  • Create a build config matching this toolchain:

    qibuild add-config <config-name> -t <toolchain-name>
  • Fetch the sources:

    mkdir -p ~/work/aldebaran
    cd ~/work/aldebaran
    qisrc init [email protected]:aldebaran/manifest.git
  • Configure and build libqi-java bindings:

    cd sdk/libqi-java/jni
    qibuild configure -c <config-name>
    qibuild make -c <config-name>
  • Copy (or create symlinks) so that the qimessaging native libs are treated as resources

    For instance, on linux, you should copy libqi.so and libqimessagingjni.so to libqi-java/qimessaging/native/linux64

  • If you are not building for android, you can now run the tests with maven :

    mvn test

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/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.