InstallationJava » History » Version 5

J. Moringen, 08/30/2011 04:31 AM
extended installation instruction, mention necessity of installing protocol sub-project

1 5 J. Moringen
h1. Installation of RSB Java Implementation
2 1 S. Wrede
3 5 J. Moringen
For compilation and installation of the Java implementation, we use the "Ant":http://ant.apache.org/ build tool. 
4 1 S. Wrede
5 5 J. Moringen
h2. Dependencies
6 1 S. Wrede
7 5 J. Moringen
h3. Dependencies on Externals Libraries and Tools
8 5 J. Moringen
9 5 J. Moringen
Required:
10 5 J. Moringen
* "CMake":http://www.cmake.org/ (tested with CMake version 2.8)
11 1 S. Wrede
* libprotobuf-java
12 1 S. Wrede
* ant
13 5 J. Moringen
* Daemon program of the "Spread group communication system":http://www.spread.org/
14 5 J. Moringen
15 5 J. Moringen
Optional:
16 1 S. Wrede
** javadoc
17 1 S. Wrede
18 5 J. Moringen
h3. Dependencies on other RSB Sub-projects
19 5 J. Moringen
20 5 J. Moringen
The Java implementation of RSB depends on RSB's language independent network protocol specification. This specification is maintained in the "protocol sub-project of the RSB source tree":https://code.cor-lab.org/projects/rsb/repository/show/trunk/protocol.
21 5 J. Moringen
22 5 J. Moringen
Assuming the entire RSB source tree has been checked out into the current directory, the protocol sub-project can be built and installed using the following commands (@$prefix@ has to be replaced with a desired installation prefix):
23 5 J. Moringen
<pre>
24 5 J. Moringen
cd protocol/build && cmake .. -DCMAKE_INSTALL_PREFIX=$prefix && make && make install
25 5 J. Moringen
</pre>
26 5 J. Moringen
27 1 S. Wrede
h2. Installation of RSB Core
28 1 S. Wrede
29 5 J. Moringen
*After installing the protocol sub-project* (see above)
30 5 J. Moringen
# Checkout code from Subversion repository (see "front page":https://code.cor-lab.org/projects/rsb)
31 5 J. Moringen
# Invoke @ant@ supplying build properties on the commandline or via @build.properties@ (see below)
32 4 S. Wrede
33 5 J. Moringen
The following properties are used to configure the build:
34 5 J. Moringen
|_.Ant Property    |_.Meaning                                                       |_.Example                       |
35 5 J. Moringen
| @prefix@         | Location into which RSB should be installed                    | @/vol/cit/share@               |
36 5 J. Moringen
| @pbuf.protoc@    | Location of protocol buffer compiler (@protoc@ or @protoc.exe@ | @/usr/bin/protoc@              |
37 5 J. Moringen
| @pbuf.protopath@ | Location of RSB protocol IDL files (see TODO)                  | @/vol/cit/share/RSBProtocol@   |
38 5 J. Moringen
| @pbuf.lib@       | Location of Java protocol buffer runtime library               | @/usr/share/java/protobuf.jar@ |
39 5 J. Moringen
| @spread.daemon@  | Location of Spread Daemon Executable                           | @/vol/cit/sbin/spread@         |
40 1 S. Wrede
41 5 J. Moringen
All properties can be supplied on the @ant@ commandline using the @-DNAME=VALUE@ syntax or by creating a @build.properties@ file containing lines of the form @NAME = VALUE@.
42 1 S. Wrede
43 5 J. Moringen
An exemplary @ant dist@ command, which builds the RSB jar library, may look as follows:
44 1 S. Wrede
<pre>
45 1 S. Wrede
ant -Dpbuf.protoc=/usr/bin/protoc -Dpbuf.protopath=/vol/cit/share/RSBProtocol -Dpbuf.lib=/usr/share/java/protobuf.jar -Dspread.daemon=/vol/cit/sbin/spread dist
46 1 S. Wrede
</pre>
47 5 J. Moringen
The equivalent @build.properties@ file looks like this:
48 5 J. Moringen
<pre>
49 5 J. Moringen
pbuf.protoc = /usr/bin/protoc
50 5 J. Moringen
pbuf.protopath = /vol/cit/share/RSBProtocol
51 5 J. Moringen
pbuf.lib = /usr/share/java/protobuf.jar
52 5 J. Moringen
spread.daemon = /vol/cit/sbin/spread dist
53 5 J. Moringen
</pre>
54 5 J. Moringen
In the presence of this file, the @ant@ command reduces to
55 5 J. Moringen
<pre>
56 5 J. Moringen
ant dist
57 5 J. Moringen
</pre>
58 1 S. Wrede
59 5 J. Moringen
To install RSB jars into the configured prefix (e.g., into @${prefix}/share/java@), the following @ant@ command can be used
60 5 J. Moringen
<pre>
61 5 J. Moringen
ant install
62 5 J. Moringen
</pre>
63 4 S. Wrede
64 4 S. Wrede
h2. Installation of RSB-XML
65 4 S. Wrede
66 4 S. Wrede
* for rsb-xml, you need to additionally install XOM (available via ubuntu)
67 4 S. Wrede
* and pass the following parameters to the ant build script
68 4 S. Wrede
69 5 J. Moringen
|_.Ant Property    |_.Meaning                             |_.Example                        |
70 5 J. Moringen
| @pbuf.lib@       | Location of Protobuf Library         | @/usr/share/java/protobuf.jar@  |
71 5 J. Moringen
| @spread.daemon@  | Location of Spread Daemon Executable | @/vol/cit/sbin/spread@          |
72 5 J. Moringen
| @xom.lib@        | Location of XOM XML Library          | @/usr/share/java/xom-1.2.1.jar@ |
73 5 J. Moringen
| @rsb.lib@        | Location of RSB Core Library         | @/vol/cit/lib/java/RSBJava.jar@ |