1
0
mirror of https://github.com/rtbrick/bngblaster.git synced 2024-05-06 15:54:57 +00:00

88 lines
1.6 KiB
Markdown
Raw Normal View History

2021-02-04 21:56:56 +01:00
# Installation
2021-02-05 21:46:21 +01:00
## Install Ubuntu
Install dependencies:
```
sudo apt install -y libssl1.1 libncurses5 libjansson4
```
Download and install debian package:
https://github.com/rtbrick/bngblaster/releases
```
sudo dpkg -i <package>
```
2021-02-04 21:56:56 +01:00
## Build from Sources
### Dependencies
The BNG Blaster has dependencies to the RtBrick libdict fork
(https://github.com/rtbrick/libdict) and the following standard
dependencies:
```
2021-02-05 21:46:21 +01:00
sudo apt install -y cmake \
libcunit1-dev \
libncurses5-dev \
libssl-dev \
libjansson-dev
2021-02-04 21:56:56 +01:00
```
### Build
Per default cmake (`cmake .`) will build the BNG Blaster as release
version with optimization and without debug symbols.
```
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make all
```
Alternative it is also possible to build a debug
version for detailed troubleshooting using gdb.
```
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make all
```
There are also CPack files generated which allows to easily generate a debian
package by just executing `cpack` from build directory.
### Install
Then BNG Blaster can be installed using make install target.
```
sudo make install
```
### Build and Run Unit Tests
Building and running unit tests requires CMocka to be installed:
```
sudo apt install libcmocka-dev
```
The option `BNGBLASTER_TESTS` enables to build unit tests.
```
cmake -DBNGBLASTER_TESTS=ON .
make all
make test
```
*Example*
```
$ make test
Running tests...
Test project
Start 1: TestProtocols
1/1 Test #1: TestProtocols .................... Passed 0.00 sec
100% tests passed, 0 tests failed out of 1
Total Test time (real) = 0.00 sec
```