Difference between revisions of "API2 source build"
(→Building the API2 examples on Robotino) |
(→Step 2: Build Robotino Common) |
||
(24 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | == | + | == Robotino API2 source build process == |
− | Get the | + | === Step 1: Get the sources via SVN === |
+ | Check out the sources from our SVN repository as follows. | ||
<pre> | <pre> | ||
− | svn co | + | svn co svn://svn.rec.de/openrobotino/api2/trunk source/api2 |
</pre> | </pre> | ||
+ | On Linux make sure that files in the bin folders of the external dependencies are executable. | ||
+ | <pre> | ||
+ | find source/api2/external -wholename "*/bin/*" -exec chmod +x {} \; | ||
+ | </pre> | ||
+ | |||
+ | === Step 2: Configure, build and install === | ||
Configure the build environment with cmake, build and install: | Configure the build environment with cmake, build and install: | ||
<pre> | <pre> | ||
− | mkdir build/ | + | mkdir build/api2 |
− | cd build/ | + | cd build/api2 |
− | ccmake ../../source/ | + | ccmake ../../source/api2 |
make install | make install | ||
</pre> | </pre> | ||
− | + | ==== Windows ==== | |
− | In case you used a 32bit compiler set the environment variable '''ROBOTINOAPI2_32_DIR''' to the installation directory. When you compiled the library with a 64bit compiler set the environment variable '''ROBOTINOAPI2_64_DIR''' The environment variable is used by the other packages to find the FindRobotinoApi.cmake | + | In case you used a 32bit compiler set the environment variable '''ROBOTINOAPI2_32_DIR''' to the installation directory. When you compiled the library with a 64bit compiler set the environment variable '''ROBOTINOAPI2_64_DIR''' The environment variable is used by the other packages to find the FindRobotinoApi.cmake script. |
− | + | For example, on our machine, the environment variable looks like: | |
<pre>ROBOTINOAPI2_32_DIR=E:\build\robotino_api_win32_vc100\install</pre> | <pre>ROBOTINOAPI2_32_DIR=E:\build\robotino_api_win32_vc100\install</pre> | ||
− | + | ==== Linux (Debian) ==== | |
<pre> | <pre> | ||
− | make | + | make CREATE_INSTALLER |
sudo dpkg -i robotino-api-*.deb | sudo dpkg -i robotino-api-*.deb | ||
</pre> | </pre> | ||
− | === | + | ==== Linux (non Debian systems) ==== |
+ | The previous ''make install'' put all files into the sub-directory '''install'''. To be able to use the just build API2 you have to perform the following steps: | ||
+ | * Set the environment variable '''ROBOTINOAPI2_32_DIR''' on x86 and '''ROBOTINOAPI2_64_DIR''' on amd64 systems | ||
+ | :example x86: export ROBOTINOAPI2_32_DIR=/home/robotino/build/api2/install/usr/local/robotino/api2/ | ||
+ | :example amd64: export ROBOTINOAPI2_64_DIR=/home/robotino/build/api2/install/usr/local/robotino/api2/ | ||
+ | |||
+ | == Robotino API2 examples build process == | ||
+ | A few have examples have also been included to test Robotino's functionality and also for better understanding of the Robotino API2. The examples can be built on Robotino as follows: | ||
<pre> | <pre> | ||
mkdir -p build/circle | mkdir -p build/circle | ||
Line 32: | Line 46: | ||
sudo target/example_circle 127.0.0.1 | sudo target/example_circle 127.0.0.1 | ||
</pre> | </pre> | ||
− | ''' | + | '''Note''': sudo is available starting with CF card image 3.0. If you are using CF card 2.4 or earlier you have to start a second session logging in as root (password: dorp6) and execute the example from the root session. |
− | |||
− | |||
− | Windows | + | == Robotino Tools and Daemons build process == |
+ | === Prerequisites === | ||
+ | ==== Windows ==== | ||
* Get the latest Qt libraries from [http://qt.nokia.com/downloads Digia] | * Get the latest Qt libraries from [http://qt.nokia.com/downloads Digia] | ||
* Alternatively build Qt from source | * Alternatively build Qt from source | ||
− | Linux | + | ==== Linux ==== |
* Install libqt4-dev | * Install libqt4-dev | ||
− | === | + | === Step 1: Build REC-RPC === |
− | + | Obtain the sources via SVN as follows: | |
<pre> | <pre> | ||
− | svn co | + | svn co svn://svn.rec.de/servicerobotics/rec_rpc/trunk source/rec_rpc |
</pre> | </pre> | ||
Configure the build environment with cmake, build and install: | Configure the build environment with cmake, build and install: | ||
Line 56: | Line 70: | ||
</pre> | </pre> | ||
− | + | ==== Windows ==== | |
− | In case you used a 32bit compiler set the environment variable '''RECRPC32_DIR''' to the installation directory. When you compiled the library with a 64bit compiler set the environment variable '''RECRPC64_DIR''' The environment variable is used by the other packages to find the FindRecRpc.cmake | + | In case you used a 32bit compiler set the environment variable '''RECRPC32_DIR''' to the installation directory. When you compiled the library with a 64bit compiler set the environment variable '''RECRPC64_DIR''' The environment variable is used by the other packages to find the FindRecRpc.cmake script. |
+ | For example, on our machine, the environment variable looks like: | ||
<pre>RECRPC32_DIR=E:\build\rec-rpc_win32_vc100\install</pre> | <pre>RECRPC32_DIR=E:\build\rec-rpc_win32_vc100\install</pre> | ||
− | + | ==== Linux ==== | |
<pre> | <pre> | ||
− | make | + | make CREATE_INSTALLER |
sudo dpkg -i rec-rpc-*.deb | sudo dpkg -i rec-rpc-*.deb | ||
</pre> | </pre> | ||
− | === | + | === Step 2: Build Robotino Common === |
− | + | Obtain the sources via SVN as follows: | |
<pre> | <pre> | ||
− | svn co | + | svn co svn://svn.rec.de/openrobotino/common/trunk source/common |
</pre> | </pre> | ||
Configure the build environment with cmake, build and install: | Configure the build environment with cmake, build and install: | ||
Line 79: | Line 94: | ||
</pre> | </pre> | ||
− | + | ==== Windows ==== | |
− | In case you used a 32bit compiler set the environment variable '''ROBOTINOCOMMON32_DIR''' to the installation directory. When you compiled the library with a 64bit compiler set the environment variable '''ROBOTINOCOMMON64_DIR''' The environment variable is used by the other packages to find the FindRobotinoCommon.cmake | + | In case you used a 32bit compiler set the environment variable '''ROBOTINOCOMMON32_DIR''' to the installation directory. When you compiled the library with a 64bit compiler set the environment variable '''ROBOTINOCOMMON64_DIR''' The environment variable is used by the other packages to find the FindRobotinoCommon.cmake script. |
− | + | For example, on our machine, the environment variable looks like: | |
<pre>ROBOTINOCOMMON32_DIR=E:\build\robotino_common_win32_vc100\install</pre> | <pre>ROBOTINOCOMMON32_DIR=E:\build\robotino_common_win32_vc100\install</pre> | ||
− | + | ==== Linux ==== | |
<pre> | <pre> | ||
− | make | + | make CREATE_INSTALLER |
sudo dpkg -i robotino-common-*.deb | sudo dpkg -i robotino-common-*.deb | ||
</pre> | </pre> | ||
− | === | + | Note: If your system is Ubuntu 9.04 you must apply the following patch to /usr/include/qt4/QtNetwork/qhostaddress.h |
− | + | <pre> | |
+ | --- a/src/network/kernel/qhostaddress.h | ||
+ | +++ b/src/network/kernel/qhostaddress.h | ||
+ | @@ -43,6 +43,7 @@ | ||
+ | #define QHOSTADDRESS_H | ||
+ | |||
+ | #include <QtCore/qstring.h> | ||
+ | +#include <QtCore/qpair.h> | ||
+ | #include <QtNetwork/qabstractsocket.h> | ||
+ | |||
+ | struct sockaddr; | ||
+ | </pre> | ||
+ | |||
+ | === Step 3: Build Robotino Daemons === | ||
+ | Obtain the sources via SVN as follows: | ||
<pre> | <pre> | ||
− | svn co | + | svn co svn://svn.rec.de/openrobotino/daemons/trunk source/daemons |
</pre> | </pre> | ||
Configure the build environment with cmake, build and install: | Configure the build environment with cmake, build and install: |
Latest revision as of 15:57, 13 April 2016
Contents
Robotino API2 source build process
Step 1: Get the sources via SVN
Check out the sources from our SVN repository as follows.
svn co svn://svn.rec.de/openrobotino/api2/trunk source/api2
On Linux make sure that files in the bin folders of the external dependencies are executable.
find source/api2/external -wholename "*/bin/*" -exec chmod +x {} \;
Step 2: Configure, build and install
Configure the build environment with cmake, build and install:
mkdir build/api2 cd build/api2 ccmake ../../source/api2 make install
Windows
In case you used a 32bit compiler set the environment variable ROBOTINOAPI2_32_DIR to the installation directory. When you compiled the library with a 64bit compiler set the environment variable ROBOTINOAPI2_64_DIR The environment variable is used by the other packages to find the FindRobotinoApi.cmake script. For example, on our machine, the environment variable looks like:
ROBOTINOAPI2_32_DIR=E:\build\robotino_api_win32_vc100\install
Linux (Debian)
make CREATE_INSTALLER sudo dpkg -i robotino-api-*.deb
Linux (non Debian systems)
The previous make install put all files into the sub-directory install. To be able to use the just build API2 you have to perform the following steps:
- Set the environment variable ROBOTINOAPI2_32_DIR on x86 and ROBOTINOAPI2_64_DIR on amd64 systems
- example x86: export ROBOTINOAPI2_32_DIR=/home/robotino/build/api2/install/usr/local/robotino/api2/
- example amd64: export ROBOTINOAPI2_64_DIR=/home/robotino/build/api2/install/usr/local/robotino/api2/
Robotino API2 examples build process
A few have examples have also been included to test Robotino's functionality and also for better understanding of the Robotino API2. The examples can be built on Robotino as follows:
mkdir -p build/circle cd build/circle ccmake /usr/local/robotino/examples/src/c++/circle/ configure(c) 2x, generate(g) make sudo target/example_circle 127.0.0.1
Note: sudo is available starting with CF card image 3.0. If you are using CF card 2.4 or earlier you have to start a second session logging in as root (password: dorp6) and execute the example from the root session.
Robotino Tools and Daemons build process
Prerequisites
Windows
- Get the latest Qt libraries from Digia
- Alternatively build Qt from source
Linux
- Install libqt4-dev
Step 1: Build REC-RPC
Obtain the sources via SVN as follows:
svn co svn://svn.rec.de/servicerobotics/rec_rpc/trunk source/rec_rpc
Configure the build environment with cmake, build and install:
mkdir build/rec_rpc cd build/rec_rpc ccmake ../../source/rec_rpc make install
Windows
In case you used a 32bit compiler set the environment variable RECRPC32_DIR to the installation directory. When you compiled the library with a 64bit compiler set the environment variable RECRPC64_DIR The environment variable is used by the other packages to find the FindRecRpc.cmake script. For example, on our machine, the environment variable looks like:
RECRPC32_DIR=E:\build\rec-rpc_win32_vc100\install
Linux
make CREATE_INSTALLER sudo dpkg -i rec-rpc-*.deb
Step 2: Build Robotino Common
Obtain the sources via SVN as follows:
svn co svn://svn.rec.de/openrobotino/common/trunk source/common
Configure the build environment with cmake, build and install:
mkdir build/common cd build/common ccmake ../../source/common make install
Windows
In case you used a 32bit compiler set the environment variable ROBOTINOCOMMON32_DIR to the installation directory. When you compiled the library with a 64bit compiler set the environment variable ROBOTINOCOMMON64_DIR The environment variable is used by the other packages to find the FindRobotinoCommon.cmake script. For example, on our machine, the environment variable looks like:
ROBOTINOCOMMON32_DIR=E:\build\robotino_common_win32_vc100\install
Linux
make CREATE_INSTALLER sudo dpkg -i robotino-common-*.deb
Note: If your system is Ubuntu 9.04 you must apply the following patch to /usr/include/qt4/QtNetwork/qhostaddress.h
--- a/src/network/kernel/qhostaddress.h +++ b/src/network/kernel/qhostaddress.h @@ -43,6 +43,7 @@ #define QHOSTADDRESS_H #include <QtCore/qstring.h> +#include <QtCore/qpair.h> #include <QtNetwork/qabstractsocket.h> struct sockaddr;
Step 3: Build Robotino Daemons
Obtain the sources via SVN as follows:
svn co svn://svn.rec.de/openrobotino/daemons/trunk source/daemons
Configure the build environment with cmake, build and install:
mkdir build/daemons cd build/daemons ccmake ../../source/daemons make install