OI Platform Linux and Win32 installation instructions by nef90815

VIEWS: 9 PAGES: 9

									        OI Platform
Linux and Win32 installation
        instructions
Installation
1 Content
GNU/Linux Platform installation - how to download and install the OpenInterface platform
kernel on GNU/Linux System.

Windows Platform installation - how to download and install the OpenInterface platform
kernel on Windows XP(x86).

Components installation - how to download and install a set of OpenInterface components,
implementing some modalities of communication.

2 Platform installation on GNU/Linux systems
2.1 Installing the OpenInterface Platform

Step 0 - Download the following packages:

ZThread-2.3.2_patched.tar.gz: library for Thread creation, required. If you don't already
have an installed version of Zthread (release 2.3.2 or higher), then you should use this
distribution. This package has been patched so that it can be compiled with gcc 4.

OI.Kernel_v0.1.6b.tar.gz: the OpenInterface kernel, along with two languages extensions:
c++ and Java.

Step 1 - Create a directory for the installation:

   •    ~$ mkdir OpenInterface_v0.1

   •    ~$ mkdir OpenInterface_v0.1/third_part_lib

Step 2 – Download all packages and put them inside the OpenInterface_v0.1 directory.

Step 3 – Install required Libraries

3.1 ZThread

First check if you have ZThread installed

   •    ~$ locate zthread/ZThread.h

If the call returns nothing, you should proceed with the installation of ZThread library.
Otherwise the prefix of the returned path is the one you'll use to configure OpenInterface.

example: if the call to locate has returned “/usr/include/zthread/ZThread.h” then the prefix
to use while configuring OpenInterface is “/usr”



                                          OpenInterface STREP
                                                                                      2 of 9
                      an open source platform for developing multimodal interaction
· untar Zthread-2.3.2.tar.gz in the ~/OpenInterface_v0.1 directrory

    •   ~/OpenInterface_v0.1$ tar -zxvf ZThread-2.3.2_patched.tar.gz

· configure ZThread

    •   ~/OpenInterface_v0.1/ZThread-2.3.2$              ./configure          -
        prefix=$HOME/OpenInterface_v0.1/third_part_lib/zthread       CXXFLAGS=-
        fpermissive

· Install Zthread

    •   ~/OpenInterface_v0.1/ZThread-2.3.2$ make
    •   ~/OpenInterface_v0.1/ZThread-2.3.2$ make install

3.2 Libxml2

· check for a libxml2 installation

    •   ~$ locate libxml2/libxml/parser.h

if the call doesn't return a value, you should proceed with the installation of libxml2.
Otherwise the prefix of the retuned path is the one you'll use to configure OpenInterface.

example: if the call to locate has returned “/usr/include/libxml2/libxml/parser..h” then the
prefix to use while configuring OpenInterface is “/usr”

· install libxml2

    •   ~$ sudo apt-get install libxml2

3.3 Java Development Kit (JDK)

If you plan to use some Java components, you will need to install a recent release of the Java
Development Kit (JDK). Note that the Java Runtime Environment (JRE) will not suffice, as
you will need to compile the Java components.

· Check if you already have an installed version of the JDK

    •   user@localhost:~$ locate include/jni.h

· If you don't find anything, then you will have to download an install a JDK

Step 4 – Install the OpenInterface kernel

· Unpack the archive OI.Kernel_v0.1.tar.gz in the directory '/OpenInterface_v0.1'.

    •   ~/OpenInterface_v0.1$ tar -zxvf OI.Kernel_v0.1.tar.gz

    •   ~/OpenInterface_v0.1$ cd OpenInterface


                                          OpenInterface STREP
                                                                                        3 of 9
                      an open source platform for developing multimodal interaction
· run the "configure" script with the required and optional (if desired) switches.

OpenInterface is installed using a “configure” script. Here are the options to customize your
installation:

· --with-zthread=: this required option setup the path to the ZThread installation directory. (e.g
–with-zthread=~/OpenInterface/third_part_lib/zthread)

· --with-libxml2=: this required option setup the path to the Libxml2 installation directory.
(e.g: --with-libxml2=/usr)

· --enable-java=: this optional switch is used to activate the java extension in OpenInterface.
The argument is the path to the J2SDK installation directory. (e.g: --enable-
java=/usr/lib/j2sdk1.5-sun)

note: use “locate include/jni.h” to find the path of your J2SDK.

· --enable-matlab=: this optional switch is used to activate the Matlab extension in
OpenInterface. The argument is the path to the Matlab engine installation directory. (e.g. --
enable-matlab=/opt/matlab)

note: use “locate extern/include/engine.h” to find the path of your Matlab installation.

For instance, the following command will setup OpenInterface with java extension enabled.

   •   ~/OpenInterface_v0.1/OpenInterface$           ./configure           -with-
       zthread=$HOME/OpenInterface_v0.1/third_part_lib/zthread -with-libxml2=/usr
       -enable-java=/usr/lib/j2sdk1.5-sun

· compile the platform.

   •   ~/OpenInterface_v0.1/OpenInterface$ make all

At this point (if everything went well), OpenInterface is installed and the step above shouldn't
be done again!

3 Platform Installation On Windows XP(x86)
A “tar.gz” archive manager is required to perform the installation, if you don't have one you
can download 7-Zip at www.7-zip.org

3.1 Install MinGW and MSYS

You can skip this step if you already have the following version number (or higher) of
MinGW compiler set and MSYS installed:

   •   gcc-core-3.4.2
   •   gcc-g++-3.4.2
   •   mingw-runtime-3.10


                                         OpenInterface STREP
                                                                                           4 of 9
                     an open source platform for developing multimodal interaction
   •   mingw32-make-3.8.0-3
   •   binutils-2.17.50
   •   w32api-3.7
   •   MSYS-1.0.10

3.1.1 MinGW/MSYS Install procedure

Step 0 – Download the following package:

   •   MinGW-bin.tar.gz
   •   MSYS-1.0.10.exe

Step 1 – Install the compiler and shell

   •   Unpack MinGW-bin.tar.gz (in C:\ for instance)
   •   Run MSYS-1.0.10.exe and follow the instructions (do not install MSYS inside
       MinGW directory)

Step 2 – Update your user/system path

   •   add “C:\MingW\bin” to the path (if MingGW was installed in C:\)
   •   add “C:\msys\1.0\bin” to the path (if MSYS was installed in C:\)
   •   See “Note on how to add a new directory to your user path“ to see how to perform this
       step.

3.2 Installing the OpenInterface Platform

Step 0 – Download the following package:

   •   OI.Kernel_v0.1.6b-win32bin.tar.gz: a pre-compiled version of the OpenInterface
       kernel.

Step 1 – Create a directory for the installation:

   •   C:\OpenInterface_v0.1 (or whatever name you'd like, try to avoid space in the name)

Step 2 – Install the OpenInterface kernel

   •   Put the downloaded package inside C:\OpenInterface_v0.1
   •   Unpack the archive OI.Kernel_v0.1.6b-win32bin.tar.gz (in the directory
       C:\OpenInterface_v0.1).
   •   Run the "configure" script with the required and optional (if desired) switches.

The windows binaries of OpenInterface can be configured using a “configure” script. Here are
the options to customize/finalize the installation :

--with-zthread=: this required option setup the path to the ZThread installation directory. (e.g
--with-zthread=C:/OpenInterface_v0.1/third_part_lib/zthread)




                                          OpenInterface STREP
                                                                                         5 of 9
                      an open source platform for developing multimodal interaction
--with-libxml2=: this required option setup the path to the Libxml2 installation directory. (e.g:
--with-libxml2=C:/OpenInterface_v0.1/third_part_lib/libxml2)

Run the following command in a DOS shell (see “Note on how to start a DOS shell “) to
setup OpenInterface with only the C/C++ extension enabled and the correct path for libxml2
and libzthread:

   1. Go into the directory where OpenInterface has been unpacked
         o cd C:\OpenInterface_v0.1\OpenInterface
   2. Run the following command
         o sh ./configure --with-libxml2=c:/OpenInterface_v0.1/third_part_lib/libxml2 --
             with-zthread=C:/OpenInterface_v0.1/third_part_lib/zthread

Note the use of “/” and not “\”

If you get the following error message "'sh' is not recognized as an internal or external
command, operable program or batch file." then check the path to your MinGW installation
(see MinGW installation)

Step 3 – Update your user/system path

   •   add “C:\OpenInterface_v0.1\OpenInterface\bin” to the user path (if OI is installed in
       C:\OpenInterface_v0.1)
   •   add “C:\OpenInterface_v0.1\third_part_lib\libxml2\bin” to the user path (if OI is
       installed in C:\OpenInterface_v0.1)
   •   add “C:\OpenInterface_v0.1\OpenInterface\language_support\c++\bin” to the user
       path
   •   if        Java       is       enabled       (default        is       NO),        add
       “C:\OpenInterface_v0.1\OpenInterface\language_support\java\bin” to the path
   •   if       Matlab         is     enabled       (default        is      NO),        add
       “C:\OpenInterface_v0.1\OpenInterface\language_support\java\bin” to the path
   •   See “Note on how to add a new directory to your user path“ to see how to perform this
       step.

At this point (if everything went well), OpenInterface is installed and the step above shouldn't
be done again!

4 Components installation
This section is based on previous versions of the platform. A fully new set of components for
both Windows and Linux systems, and associated demonstration / tutorial will soon be
available at http://www.oi-project.org.

Download each component packages below and decompress them into ~/OpenInterface_v0.1.

OI.Component.mouse.Xwindow.tar.gz (GNU/Linux only) - this package contains the C++
source code of the OI-mouse component as well as its CIDL description.

OI.Win32.Component.gesture.ARToolkit.tar.gz (MS Windows only) - this package contains
the C++ source code of the OI-mouse component as well as its CIDL description.

                                         OpenInterface STREP
                                                                                         6 of 9
                     an open source platform for developing multimodal interaction
OI.Component.gui.ImageViewer.tar.gz - this package contains the java classes of the OI-
image viewer component as well as its CIDL description.

OI.Component.gesture.ARToolKit.tar.gz - this component uses ARToolKit library to provide
the 3D position tracking. This package contains the ARToolKit library, the OI-ARToolKit
component as well as its CIDL description.

OI.Component.speech.Sphinx.tar.gz - this component uses Sphinx library to provide speech
recognition commands. This package contains the Sphinx library for speech recognition
commands, the OI-SpeechRec component as well as its CIDL description.

4.1 Installing the components

Mouse component (C++)

Choose one of the following package, depending if you are under MS Windows or
GNU/Linux.

OI.Component.mouse.Xwindow.tar.gz (GNU/Linux only) - this package contains the C++
source code of the OI-mouse component as well as its CIDL description.

OI.Win32.Component.gesture.ARToolkit.tar.gz (MS Windows only) - this package contains
the C++ source code of the OI-mouse component as well as its CIDL description.

Download the package and decompress it into /OpenInterface_v0.1.

Go to the directory

   •   ~/OpenInterface_v0.1$ cd OpenInterface/component_repository/c++/mouse

and compile it

   •   ~/OpenInterface_v0.1/OpenInterface/component_repository/c++/mouse$              make
       all

The CIDL desription of this component “MouseDriverEmul_cfg0.xml” can be found at
~/OpenInterface_v0.1/OpenInterface/pipeline_example and it will be required by the
application pipeline.

Gesture component (C++)

OI.Component.gesture.ARToolKit.tar.gz - this component uses ARToolKit library to provide
the 3D position tracking. This package contains the ARToolKit library, the OI-ARToolKit
component as well as its CIDL description.

Download this package and decompress it into /OpenInterface_v0.1.

To install this component, you will need at first to install the ARToolKit library. Go to the
directory:



                                          OpenInterface STREP
                                                                                      7 of 9
                      an open source platform for developing multimodal interaction
   •   ~/OpenInterface_v0.1$ cd third_part_lib/ARToolKit

and execute:

   •   ~/OpenInterface_v0.1/third_part_lib/ARToolKit$ ./Configure (our component is
       using a web cam)

   •   ~/OpenInterface_v0.1/third_part_lib/ARToolKit$ make

If you have problems to compile ARToolKit, then you can go to ARToolKit.

After you have installed ARToolKit you can install the OI-ARToolKit component
(gestualCompo.c). Go to the directory :

   •   cd ~/OpenInterface/component_repository/c++/artoolkit-OI

and execute

   •   ~/OpenInterface/component_repository/c++/artoolkit-OI$ make

The CIDL desription of this component “Gesture_cfg0.xml” can be found at
~/OpenInterface_v0.1/OpenInterface/pipeline_example and it will be required by the
application pipeline.

ImageViewer component (Java)

OI.Component.gui.ImageViewer.tar.gz - this package contains the java classes of the OI-
image viewer component as well as its CIDL description.

Download this package and decompress it into /OpenInterface_v0.1.

For the OI-ImageViewer Java component, you should install .class or .jar. Go to the directory

   •   cd ~OpenInterface/component_repository

and execute

   •   make -f Makefile_mygui

The CIDL desription of this component “ImageViewer_cfg0.xml” can be found at
~/OpenInterface_v0.1/OpenInterface/pipeline_example and it will be required by the
application pipeline.

SpeechRecognition component (Java)

OI.Component.speech.Sphinx.tar.gz - this component uses Sphinx library to provide speech
recognition commands. This package contains the Sphinx library for speech recognition
commands, the OI-SpeechRec component as well as its CIDL description.

Download this package and decompress it into /OpenInterface_v0.1.


                                        OpenInterface STREP
                                                                                      8 of 9
                    an open source platform for developing multimodal interaction
To install this component you should before install the Sphinx library. Go to the subdirectory:

   •   cd ~/OpenInterface_v0.1/OpenInterface/third_part_lib/sphinx4-1.0beta/sphinx4-
       1.0beta/lib

and execute

   •   chmod +x ./jsapi.sh

   •   sh ./jsapi.sh

For the OI-Speech Java component, you should install .class or .jar. Go to the subdirectory

   •   cd ~OpenInterface/component_repository

and execute

   •   make -f Makefile_speech_recognition

The grammar used can be found in the file navigation.gram into the subdirectory

~OpenInterface/component_repository/java/speech_recognition

The CIDL desription of this component “SpeechRec_cfg0.xml” can be found at
~/OpenInterface_v0.1/OpenInterface/pipeline_example and it will be required by the
application pipeline.

5 Demo installation – To come
The graphical editor used to compose the pipes should come with a next version of the
platform.

The demo installation is not available at the moment put will soon be added to OI STREP
Web Site (http://www.oi-project.org).




                                           OpenInterface STREP
                                                                                        9 of 9
                       an open source platform for developing multimodal interaction

								
To top