diff --git a/README.md b/README.md index d786b7d..011a668 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,12 @@ C++ wrapper for Labs64 NetLicensing [RESTful API](https://netlicensing.io/wiki/r Visit Labs64 NetLicensing at https://netlicensing.io ## Dependencies -1. C++11 STL -2. [libcurl](https://github.com/curl/curl) (with libcurl's transitive dependencies) -3. [jsoncpp](https://github.com/open-source-parsers/jsoncpp) (included) +1. C++11 toolset + STL +2. cmake +3. [libcurl](https://github.com/curl/curl) (with libcurl's transitive dependencies) +4. [jsoncpp](https://github.com/open-source-parsers/jsoncpp) (included) +5. [boost](https://www.boost.org/) (optional, needed for unit tests) + ## Compatibility @@ -32,6 +35,7 @@ Windows 10 | Visual studio 14 2015 x86 - x64 Windows 10 | Visual studio 15 2017 x86 - x64 macOS Mojave | Xcode 10.1 + ## Windows build ### Build curl @@ -58,12 +62,13 @@ macOS Mojave | Xcode 10.1 (replace `-G` argument with your actual version / platform, see [`cmake` documentation](https://cmake.org/cmake/help/latest/)) 5. Open solution created in `NetLicensingClient-cpp\build` directory in Visual Studio and build the library and demo client. + ## Linux build ### Build NetLincesing-cpp 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) 2. Install **curl** (for development, including C headers and libraries). E.g. in **Ubuntu**: - ```sudo apt-get install libcurl4-openssl``` + ```sudo apt-get install libcurl4-openssl-dev``` 3. In the `NetLicensingClient-cpp` directory create `build/` subdirectory 4. Execute: ``` @@ -77,6 +82,33 @@ macOS Mojave | Xcode 10.1 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. +## Linux build using docker + +_TODO: full description_ + +1. Prepare container + - Image: ubuntu:22.04 + - apt-get update + - apt-get install cmake g++ libcurl4-openssl-dev libboost-all-dev + +2. Map `NetLicensingClient-cpp` or clone it inside the container + +3. Build as described in [Linux Build](#linux-build) + + +## MacOS build + +_TODO: full description_ + +1. Prepare environment: + - Install XCode 10.1+ + - Install `homebrew` + - `libcurl` is provided + - `brew install cmake boost` + +2. Build as described in [Linux Build](#linux-build) + + ## Execution environment **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) diff --git a/include/netlicensing/mapper.h b/include/netlicensing/mapper.h index 6e90066..dc8b2e3 100644 --- a/include/netlicensing/mapper.h +++ b/include/netlicensing/mapper.h @@ -17,6 +17,8 @@ #include "netlicensing/token.h" #include "netlicensing/transaction.h" #include "netlicensing/licensing_model.h" +#include "netlicensing/license_type.h" +#include "netlicensing/license_template.h" namespace netlicensing { diff --git a/tests/run_tests.cc b/tests/run_tests.cc index 47761d9..05ce836 100644 --- a/tests/run_tests.cc +++ b/tests/run_tests.cc @@ -75,7 +75,7 @@ class TestObserver { BOOST_AUTO_TEST_SUITE(test_mapper) BOOST_AUTO_TEST_CASE(initial_test) { - std::string str = read_whole_file("../json/product.json"); + std::string str = read_whole_file("product.json"); BOOST_REQUIRE(!str.empty()); Json::Value root; Json::Reader reader;