node-alljoyn
Version:
Access Alljoyn service functions
134 lines (105 loc) • 4.99 kB
Plain Text
Overview
========
The source code for AllJoyn is stored in a set of git projects that can be
cloned individually or as a group using the `repo` tool.
AllJoyn is currently supported on the following target platforms:
* Ubuntu 9.10 through 10.10 (x86 and x86-64)
* Android 2.2 (Froyo+/NexusOne) (ARM)
Prerequisites
=============
General Prerequisites
---------------------
* [git] [git] - Used for source code repository access
* [repo] [repo] - A tool used to manage projects that consist of multiple git
projects
* [Scons] [scons] - A software construction tool (Make replacement) used to
build AllJoyn
Linux Prerequites
-----------------
* `apt-get install libssl-dev`
Android Prerequisites for Google baseline phones (G1, Nexus One, etc)
---------------------------------------------------------------------
* [Android Source] [asrc] - Required for building Android targets
* [Android SDK] [asdk] - Required for installing Android targets
* [Android NDK] [andk] - Required for Android targets
* [Eclipse] [eclp] - Used to build Java based AllJoyn demos for Android.
Java Prerequisites
------------------
* Java 6 sun-java5-jdk [Ubuntu package] [ujdk] (Note: Android, as of froyo,
doesn't work well with Java 6)
* JUnit 3.8
Documentation Prerequisites
---------------------------
* [Doxygen] [dxgn] - Builds documentation from source code
* [Graphviz Dot] [gdot] - Diagrams class hierarchies
* [TeX Live] [texl] - LaTeX binaries and style sheets for Linux. (Needed if
producing PDF output file in Linux.)
[git]: http://git.wiki.kernel.org/index.php/Installation
[repo]: http://source.android.com/source/git-repo.html
[scons]: http://www.scons.org/
[asrc]: http://android.git.kernel.org/
[asdk]: http://developer.android.com/sdk/index.html
[andk]: http://developer.android.com/sdk/ndk/index.html
[eclp]: http://www.eclipse.org/
[ujdk]: http://packages.ubuntu.com/dapper/sun-java5-jdk
[dxgn]: http://www.stack.nl/~dimitri/doxygen/
[gdot]: http://www.graphviz.org/
[texl]: http://www.tug.org/texlive
Building the source code
========================
Use `scons` `-h` for some basic settings. In the examples below, any of the
scons variables' default values can be set as environment variables.
Building for Ubuntu 10.10 (x86 target)
--------------------------------------
$ cd <workspace>
$ scons OS=linux CPU=x86
Building for Ubuntu 10.10 (x86-64 target)
-----------------------------------------
$ cd <workspace>
$ scons OS=linux CPU=x86-64
Building for Android Froyo (2.2)
--------------------------------
To build for Android it is necessary to indicate where the NDK and the Android
source is installed. The paths to these are idendicated using the
`ANDRIOD_NDK`, and `ANDROID_SRC` variables. An example is shown below.
$ cd <workspace>
$ scons OS=android CPU=arm ANDROID_NDK=/usr/local/android-ndk ANDROID_SRC=/home/allseen/android-platform
Build variants
--------------
Building in "release mode" removes all symbol information and enables code
optimization. To build in release mode, add the following build variable to
your scons command line:
VARIANT=release
If the variable is not defined the default configuration is to build the
debug vairant.
Java Support
------------
The AllJoyn Java code is built automatically; however, in order to build it,
scons needs to know where the Java tools are located. Set two environment
variables to tell scons where to find the tools:
$ export JAVA_HOME=<path_of_sun-java-5>
$ export CLASSPATH=<path_to_junit/junit4.jar>
Here are the paths used on a typical Ubuntu installation:
$ export JAVA_HOME="/usr/lib/jvm/java-5-sun"
$ export CLASSPATH="/usr/share/java/junit4.jar"
In some circumstances scons may not be able to find the Java tools even when
`JAVA_HOME` is explicitly specified. This issue is described in this [blog
post] [jhbp]. In short, the blog says that scons will only search for
sun-java-5 somewhere in `/usr/local/bin:/opt/bin:/bin:/usr/bin`. As a work
around for this issue you can add a symlink to one of the searched folders,
for example:
/usr/bin/java -> /opt/java/something/bin/java
**NOTE**: currently the scons scripts reqiure these variables to be
defined to bild any of the AllJoyn code.
[jhbp]: http://kdl-general.blogspot.com/2006/09/attributeerror-sconsenvironment.html
Build Products
--------------
A description of the output parameters can be found in the file
`build/<OS>/<CPU>/<variant>/dist/README.TXT`. For example, for `OS=linux`,
`CPU=x86`, `VARIANT=release` would result in the file being in the
`build/linux/x86/release/dist/` directory.
More info on Scons
------------------
The [Scons User Guide] [scug] is a good place to learn about the scons build
system.
[scug]: http://www.scons.org/doc/HTML/scons-user.html%20Scons