Skip to content

Commit

Permalink
Refs #18328: Update README with Linux installation and deployment
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <[email protected]>
  • Loading branch information
JesusPoderoso committed Jun 5, 2023
1 parent 85274fa commit 3029a28
Showing 1 changed file with 70 additions and 1 deletion.
71 changes: 70 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,37 @@ or the [CMake installation](#cmake-installation) instructions.

## Requirements

### Linux requirements

The installation of *eProsima RPC* in a Linux environment from sources requires the following tools to be
installed in the system:

* [SDKman, JDK and gradle](#java-dependencies)
* [Boost thread, a portable C++ multi-threading library](#libboost-thread)
* [CMake and other tools](#cmake-and-other-tools)

#### Java dependencies

[SDKman](https://sdkman.io/), [JDK 8](https://www.oracle.com/es/java/technologies/javase/javase8-archive-downloads.html) and [gradle 5.0](https://gradle.org/) are required for the installation:

```cmd
sudo apt install openjdk-8-jdk
curl -s "https://get.sdkman.io" | bash
sdk install gradle 5.0
```

Once installed, navigate to the RPC `fastrpcgen` directory and build gradle (`gradle assemble`).

#### Libboost-thread

The boost thread library `libboost-thead` is required for this project.
It can be installed in Linux by running:

```cmd
sudo apt install libboost-thread1.74-dev
```


### Windows requirements

The installation of *eProsima RPC* in a Windows environment from sources requires the following tools to be
Expand All @@ -48,7 +79,7 @@ Chocolatey is a Windows package manager.
It is needed to install some of *eProsima RPC*'s dependencies.
Download and install it directly from the [website](https://chocolatey.org/).

#### CMake and other tools
### CMake and other tools

These packages provide the tools required to install *eProsima RPC* and its dependencies from command line.
Download and install [CMake][cmake], [pip3][pip3], [wget][wget] and [git][git] by following the instructions detailed in the respective
Expand Down Expand Up @@ -82,6 +113,14 @@ After downloading these packages, open an administrative shell with *PowerShell*

where `<PATH_TO_DOWNLOADS>` is the folder into which the packages have been downloaded.

**Linux**

On Linux, both dependencies can be easily installed using apt package manager:

```cmd
sudo apt install libasio-dev libtinyxml2-dev
```

## Colcon installation

[colcon][colcon] is a command line tool based on [CMake][cmake] aimed at building sets of software packages.
Expand Down Expand Up @@ -114,6 +153,14 @@ This section explains how to use it to compile *eProsima RPC* and its dependenci
vcs import src --input rpc.repos
```

Make sure that the [eProsima IDL Parser](https://github.com/eProsima/IDL-Parser/) submodule included in the project has been imported successfully.
To do so, initialize the submodule by running:

```cmd
cd ~\RPC\src\rpc
git submodule update --init
```

Finally, use [colcon][colcon] to compile all software:

- Building *eProsima RPC over DDS* use next command:
Expand All @@ -122,6 +169,28 @@ This section explains how to use it to compile *eProsima RPC* and its dependenci
```
### Run an application

**Linux**

If the *eProsima RPC over DDS* has been build with colcon, make sure that the `install` folder contains directly all the required dependencies, by adding the flag `--merge-install` in the build process:

```cmd
colcon build --merge-install --cmake-args -DNO_TLS=ON -DRPCPROTO=rpcdds
```

The installation directory must be exported to the environment variable `RPCDDSHOME` to be used by the `rpcddsgen` application:

```cmd
export RPCDDSHOME="~/RPC/install"
```

Finally, deploy the complete *RPC* framework based on a IDL file by running:

```cmd
~/RPC/src/rpc/fastrpcgen/scripts/rpcddsgen -example x64Linux2.6gcc4.4.5 -transport rtps my_idl_example.idl
```

**Windows**

When running an instance of an application using *eProsima RPC*, the colcon overlay built in the
dedicated `RPC` directory must be sourced.
There are two possibilities:
Expand Down

0 comments on commit 3029a28

Please sign in to comment.