Skip to content

Commit

Permalink
Update build_linux.md (rdkcentral#1572)
Browse files Browse the repository at this point in the history
remove $ signs, so it is copy/pasteable into terminal
  • Loading branch information
woutermeek authored Apr 17, 2024
1 parent 9a4f15f commit b54b0b8
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions docs/introduction/build_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ The following instructions will use the `CMAKE_INSTALL_PREFIX` option to install
These instructions are based on Ubuntu 22.04 - you may need to change this for your distros package manager

```
$ sudo apt install build-essential cmake ninja-build libusb-1.0-0-dev zlib1g-dev libssl-dev
sudo apt install build-essential cmake ninja-build libusb-1.0-0-dev zlib1g-dev libssl-dev
```

Thunder also uses Python 3 for code and documentation generation scripts. Ensure you have at least **Python 3.5** installed and install the [**jsonref**](https://pypi.org/project/jsonref/) library with pip:

```
$ pip install jsonref
pip install jsonref
```

### 2. Build Thunder Tools
Expand All @@ -33,27 +33,27 @@ First, change the directory to where you want to build Thunder.

Then clone ThunderTools repo:
```shell
$ git clone https://github.com/rdkcentral/ThunderTools.git
git clone https://github.com/rdkcentral/ThunderTools.git
```
Next, we need to run the following commands to build and then install the code generators inside ThunderTools:
```shell
$ cmake -G Ninja -S ThunderTools -B build/ThunderTools -DCMAKE_INSTALL_PREFIX="install/usr"
cmake -G Ninja -S ThunderTools -B build/ThunderTools -DCMAKE_INSTALL_PREFIX="install/usr"

$ cmake --build build/ThunderTools --target install
cmake --build build/ThunderTools --target install
```

### 3. Build Thunder

Clone the Thunder repo:

```shell
$ git clone https://github.com/rdkcentral/Thunder.git
git clone https://github.com/rdkcentral/Thunder.git
```

Run the following commands to build and then install Thunder. The available `-DCMAKE_BUILD_TYPE` options are: `[Debug, Release, MinSizeRel]`.

```shell
$ cmake -G Ninja -S Thunder -B build/Thunder \
cmake -G Ninja -S Thunder -B build/Thunder \
-DBUILD_SHARED_LIBS=ON \
-DBINDING="127.0.0.1" \
-DCMAKE_BUILD_TYPE="Debug" \
Expand All @@ -66,7 +66,7 @@ $ cmake -G Ninja -S Thunder -B build/Thunder \
-DSYSTEM_PATH="${PWD}/install/usr/lib/wpeframework/plugins" \
-DVOLATILE_PATH="tmp"

$ cmake --build build/Thunder --target install
cmake --build build/Thunder --target install
```

### 4. Build ThunderInterfaces
Expand All @@ -77,17 +77,17 @@ $ cmake --build build/Thunder --target install
Clone the ThunderInterfaces repo:

```shell
$ git clone https://github.com/rdkcentral/ThunderInterfaces.git
git clone https://github.com/rdkcentral/ThunderInterfaces.git
```

Run the following commands to build and then install ThunderInterfaces:

```shell
$ cmake -G Ninja -S ThunderInterfaces -B build/ThunderInterfaces \
cmake -G Ninja -S ThunderInterfaces -B build/ThunderInterfaces \
-DCMAKE_INSTALL_PREFIX="install/usr" \
-DCMAKE_MODULE_PATH="${PWD}/install/usr/include/WPEFramework/Modules"

$ cmake --build build/ThunderInterfaces --target install
cmake --build build/ThunderInterfaces --target install
```

### 5. Build Plugins
Expand All @@ -98,15 +98,15 @@ The exact repo and steps here will depend on exactly which plugins you want to b

Clone the ThunderNanoServices repo:
```shell
$ git clone https://github.com/rdkcentral/ThunderNanoServices.git
git clone https://github.com/rdkcentral/ThunderNanoServices.git
```

Run the following commands to build and then install ThunderNanoServices.

In the command below, there is a complete list of plugins that do not require any outside software/hardware dependencies. However, you should customise this to include the plugins you require for your platform.

```shell
$ cmake -G Ninja -S ThunderNanoServices -B build/ThunderNanoServices \
cmake -G Ninja -S ThunderNanoServices -B build/ThunderNanoServices \
-DCMAKE_INSTALL_PREFIX="install/usr" \
-DCMAKE_MODULE_PATH="${PWD}/install/usr/include/WPEFramework/Modules" \
-DPLUGIN_COMMANDER=ON \
Expand All @@ -126,23 +126,23 @@ $ cmake -G Ninja -S ThunderNanoServices -B build/ThunderNanoServices \
-DPLUGIN_WEBSHELL=ON \
-DPLUGIN_WIFICONTROL=ON

$ cmake --build build/ThunderNanoServices --target install
cmake --build build/ThunderNanoServices --target install
```

#### ThunderNanoServicesRDK

Clone the ThunderNanoServicesRDK repo:

```
$ git clone https://github.com/WebPlatformForEmbedded/ThunderNanoServicesRDK.git
git clone https://github.com/WebPlatformForEmbedded/ThunderNanoServicesRDK.git
```

Run the following commands to build and then install ThunderNanoServicesRDK.

In the command below, there is a complete list of plugins that do not require any outside software/hardware dependencies. However, you should customise this to include the plugins you require for your platform.

```shell
$ cmake -G Ninja -S ThunderNanoServicesRDK -B build/ThunderNanoServicesRDK \
cmake -G Ninja -S ThunderNanoServicesRDK -B build/ThunderNanoServicesRDK \
-DCMAKE_INSTALL_PREFIX="install/usr" \
-DCMAKE_MODULE_PATH="${PWD}/install/usr/include/WPEFramework/Modules" \
-DPLUGIN_DEVICEIDENTIFICATION=ON \
Expand All @@ -154,7 +154,7 @@ $ cmake -G Ninja -S ThunderNanoServicesRDK -B build/ThunderNanoServicesRDK \
-DPLUGIN_OPENCDMI=ON \
-DPLUGIN_PERFORMANCEMETRICS=ON

$ cmake --build build/ThunderNanoServicesRDK --target install
cmake --build build/ThunderNanoServicesRDK --target install
```

### 6. Build Thunder Client Libraries (optional)
Expand All @@ -164,15 +164,15 @@ If you require a convenience library from the ThunderClientLibraries repo, follo
Clone the ThunderClientLibraries repo:

```
$ git clone https://github.com/rdkcentral/ThunderClientLibraries.git
git clone https://github.com/rdkcentral/ThunderClientLibraries.git
```

Run the following commands to build and then install ThunderClientLibraries:

In the command below, there is a complete list of client libraries that do not require any outside dependencies; therefore, each of them can be successfully built in this simple fashion.

```shell
$ cmake -G Ninja -S ThunderClientLibraries -B build/ThunderClientLibraries \
cmake -G Ninja -S ThunderClientLibraries -B build/ThunderClientLibraries \
-DCMAKE_INSTALL_PREFIX="install/usr" \
-DCMAKE_MODULE_PATH="${PWD}/install/usr/include/WPEFramework/Modules" \
-DBLUETOOTHAUDIOSINK=ON \
Expand All @@ -184,31 +184,31 @@ $ cmake -G Ninja -S ThunderClientLibraries -B build/ThunderClientLibraries \
-DPROTOCOLS=ON \
-DVIRTUALINPUT=ON

$cmake --build build/ThunderClientLibraries --target install
cmake --build build/ThunderClientLibraries --target install
```

### 7. Build Thunder UI (optional)

Clone the ThunderUI repo:

```shell
$ git clone https://github.com/rdkcentral/ThunderUI.git
git clone https://github.com/rdkcentral/ThunderUI.git
```

First, you have to install NodeJS + NPM, and this can be done with the following command:

```shell
$ sudo apt install nodejs npm
sudo apt install nodejs npm
```

Run the following commands to build and then install ThunderUI:

```shell
$ cmake -G Ninja -S ThunderUI -B build/ThunderUI \
cmake -G Ninja -S ThunderUI -B build/ThunderUI \
-DCMAKE_INSTALL_PREFIX="install/usr" \
-DCMAKE_MODULE_PATH="${PWD}/install/usr/include/WPEFramework/Modules"

$ cmake --build build/ThunderUI --target install
cmake --build build/ThunderUI --target install
```


Expand All @@ -219,10 +219,10 @@ After everything has been built and installed correctly, we can run Thunder.
Since we installed Thunder in a custom installation directory, we need to provide an `LD_LIBRARY_PATH` to that location and set `PATH` to include the `bin` directory. If the libraries are installed in system-wide locations (e.g. `/usr/lib` and `/usr/bin`) then those environment variables are not required

```shell
$ export LD_LIBRARY_PATH=${PWD}/install/usr/lib:${LD_LIBRARY_PATH}
$ export PATH=${PWD}/install/usr/bin:${PATH}
export LD_LIBRARY_PATH=${PWD}/install/usr/lib:${LD_LIBRARY_PATH}
export PATH=${PWD}/install/usr/bin:${PATH}

$ WPEFramework -f -c ${PWD}/install/etc/WPEFramework/config.json
WPEFramework -f -c ${PWD}/install/etc/WPEFramework/config.json
```

The following arguments should be specified to the WPEFramework binary:
Expand Down

0 comments on commit b54b0b8

Please sign in to comment.