Skip to content

Commit b76abf5

Browse files
kkorotkovr-brown
authored andcommitted
Fix tests and update readme
1 parent 4f7f240 commit b76abf5

File tree

3 files changed

+41
-6
lines changed

3 files changed

+41
-6
lines changed

README.md

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ C++ wrapper for Labs64 NetLicensing [RESTful API](https://netlicensing.io/wiki/r
1212
Visit Labs64 NetLicensing at https://netlicensing.io
1313

1414
## Dependencies
15-
1. C++11 STL
16-
2. [libcurl](https://github.com/curl/curl) (with libcurl's transitive dependencies)
17-
3. [jsoncpp](https://github.com/open-source-parsers/jsoncpp) (included)
15+
1. C++11 toolset + STL
16+
2. cmake
17+
3. [libcurl](https://github.com/curl/curl) (with libcurl's transitive dependencies)
18+
4. [jsoncpp](https://github.com/open-source-parsers/jsoncpp) (included)
19+
5. [boost](https://www.boost.org/) (optional, needed for unit tests)
20+
1821

1922
## Compatibility
2023

@@ -32,6 +35,7 @@ Windows 10 | Visual studio 14 2015 x86 - x64
3235
Windows 10 | Visual studio 15 2017 x86 - x64
3336
macOS Mojave | Xcode 10.1
3437

38+
3539
## Windows build
3640

3741
### Build curl
@@ -58,12 +62,14 @@ macOS Mojave | Xcode 10.1
5862
(replace `-G` argument with your actual version / platform, see [`cmake` documentation](https://cmake.org/cmake/help/latest/))
5963
5. Open solution created in `NetLicensingClient-cpp\build` directory in Visual Studio and build the library and demo client.
6064

65+
6166
## Linux build
6267

6368
### Build NetLincesing-cpp
6469
1. Download the latest release and unpack to `NetLicensingClient-cpp` (or checkout [master](https://github.com/Labs64/NetLicensingClient-cpp.git) to build the latest development version)
65-
2. Install **curl** (for development, including C headers and libraries). E.g. in **Ubuntu**:
66-
```sudo apt-get install libcurl4-openssl```
70+
2. Install **libcurl** (for development, including C headers and libraries). E.g. in **Ubuntu**:
71+
```sudo apt-get install libcurl4-openssl-dev```
72+
3. Install **boost**: ```sudo apt-get install libboost-all-dev```
6773
3. In the `NetLicensingClient-cpp` directory create `build/` subdirectory
6874
4. Execute:
6975
```
@@ -77,6 +83,33 @@ macOS Mojave | Xcode 10.1
7783
Unit tests require [**Boost**](https://www.boost.org) Unit Test Framework. To build project with the unit tests activated add cmake option `-DBUILD_TESTS=yes`. The tests must be executed from `tests/` subdirectory on Linux or `tests\Debug\` on Windows in order to properly locate the JSON files with test data.
7884

7985

86+
## Linux build using docker
87+
88+
_TODO: full description_
89+
90+
1. Prepare container
91+
- Image: ubuntu:22.04
92+
- apt-get update
93+
- apt-get install cmake g++ libcurl4-openssl-dev libboost-all-dev
94+
95+
2. Map `NetLicensingClient-cpp` or clone it inside the container
96+
97+
3. Build as described in [Linux Build](#linux-build)
98+
99+
100+
## MacOS build
101+
102+
_TODO: full description_
103+
104+
1. Prepare environment:
105+
- Install XCode 10.1+
106+
- Install `homebrew`
107+
- `libcurl` is provided
108+
- `brew install cmake boost`
109+
110+
2. Build as described in [Linux Build](#linux-build)
111+
112+
80113
## Execution environment
81114

82115
**libcurl** dynamic library should be either installed system-wide or otherwise available for the loading at run-time (typically located in the same directory as your executable)

include/netlicensing/mapper.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include "netlicensing/token.h"
1818
#include "netlicensing/transaction.h"
1919
#include "netlicensing/licensing_model.h"
20+
#include "netlicensing/license_type.h"
21+
#include "netlicensing/license_template.h"
2022

2123
namespace netlicensing {
2224

tests/run_tests.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class TestObserver {
7575
BOOST_AUTO_TEST_SUITE(test_mapper)
7676

7777
BOOST_AUTO_TEST_CASE(initial_test) {
78-
std::string str = read_whole_file("../json/product.json");
78+
std::string str = read_whole_file("product.json");
7979
BOOST_REQUIRE(!str.empty());
8080
Json::Value root;
8181
Json::Reader reader;

0 commit comments

Comments
 (0)