Giter Site home page Giter Site logo

examples's Introduction

Licensecc

Copy protection, licensing library and license generator for Windows and Linux.

Standard unstable License travis Github_CI Codacy Badge codecov Github Issues

Protect the software you develop from unauthorized copies, limit the usage in time, to a specific set of machines, or prevent the usage in virtualized environments. It is an open source license manager that helps to keep your software closed 😏 . Among other features if it runs on a "real hardware" it can generate a signature of that hardware and report if the signature doesn't match.

A comprehensive list of features, and their status is available in the project site.

If you're experiencing problems, or you just need informations you can't find in the documentation please contact us on github discussions, we'll be happy to help.

Remember to show your appreciation giving us a star here on GitHub.

License

The project is donated to the community. It comes with freedom of use for everyone, and it always will be. It has a BSD 3 clauses licensing schema, that allows free modification and use in commercial software.

Project Structure

The software is made by 4 main sub-components:

  • a C++ library with a nice C api, licensecc with minimal (or no) external dependencies (the part you have to integrate in your software) that is the project you're currently in.
  • a license debugger lcc-inspector to be sent to the final customer when there are licensing problems or for calculating the pc hash before issuing the license.
  • a license generator (github project lcc-license-generator) lccgen for customizing the library and generate the licenses.
  • Usage examples to simplify the integration in your project.

How to build

Below an overview of the basic build procedure, you can find detailed instructions for Linux or Windows in the project web site.

Prerequisites

  • Operating system: Linux(Ubuntu, CentOS), Windows
  • compilers : GCC (Linux) MINGW (Linux cross compile for Windows), MINGW or MSVC (Windows)
  • tools : cmake(>3.6), git, make/ninja(linux)
  • libs : If target is Linux Openssl is required. Windows depends only on system libraries. Boost is necessary to build license generator and to run the tests but it's NOT a dependency of the final licensecc library.

For a complete list of dependencies and supported environments see the project website

Clone the project. It has submodules, don't forget the --recursive option.

git clone --recursive https://github.com/open-license-manager/licensecc.git
cd licensecc/build

build on Linux

cmake .. -DCMAKE_INSTALL_PREFIX=../install
make
make install

build on Windows (with MSVC 2017)

cmake .. -G "Visual Studio 15 2017 Win64" -DBOOST_ROOT="{Folder where boost is}" -DCMAKE_INSTALL_PREFIX=../install
cmake --build . --target install --config Release

cross compile with MINGW on Linux

x86_64-w64-mingw32.static-cmake .. -DCMAKE_INSTALL_PREFIX=../install
make
make install

How to test

on Linux

make test

on Windows (MSVC)

ctest -C Release

How to use

The examples repository that shows various ways to integrate licensecc into your project.

How to contribute

The easiest way you can solve your problems or ask help is through the discussions tab above, otherwise if you think there is a problem you can open an issue in the issue system. Have a look to the contribution guidelines before reporting. We use GitFlow (or at least a subset of it). Remember to install the gitflow git plugin and use develop as default branch for your pull requests.

examples's People

Contributors

gcontini avatar gemfield avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

examples's Issues

I need your help to use examples.

I downloaded licensecc and finished installing it.
I also completed the test without any problems.
but i got a problem to follow the examples.
I installed "open-license-manager" in the "C:\code-lock\open-license-manager" path.
when I follow "simple-pc-identifier" in examples, an error occurred.
"export LCC_INSTALLATION_DIR = ... #folder where you installed open-license-manager 1" in this process
I set "set LCC_INSTALLATION_DIR=C:\code-lock\open-license-manager" and go build and start cmake
when the cmake start, an error occured.
The error is as follows.

-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
CMake Error at CMakeLists.txt:16 (find_package):
By not providing "Findlicensecc.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"licensecc", but CMake did not find one.
Could not find a package configuration file provided by "licensecc"
(requested version 2.0.0) with any of the following names:
licenseccConfig.cmake
licensecc-config.cmake
Add the installation prefix of "licensecc" to CMAKE_PREFIX_PATH or set
"licensecc_DIR" to a directory containing one of the above files. If
"licensecc" provides a separate development package or SDK, be sure it has
been installed.
-- Configuring incomplete, errors occurred!
See also "C:/code-lock/open-license-manager/examples/simple_pc_identifier/build/CMakeFiles/CMakeOutput.log".

i need your help to solve this error

submodule example unit tests fail

OS : Ubuntu 18.04

nyue@head0:~/projects/Open-License-Manager/examples/build$ make test
Running tests...
Test project /home/nyue/projects/Open-License-Manager/examples/build
Start 1: test_license
1/12 Test #1: test_license ..................... Passed 0.01 sec
Start 2: test_command-line
2/12 Test #2: test_command-line ................ Passed 0.01 sec
Start 3: test_project
3/12 Test #3: test_project ..................... Passed 0.01 sec
Start 4: test_cryptohelper
4/12 Test #4: test_cryptohelper ................ Passed 0.06 sec
Start 5: test_license_reader
5/12 Test #5: test_license_reader ..............***Failed 0.00 sec
Start 6: test_os_linux
6/12 Test #6: test_os_linux .................... Passed 0.00 sec
Start 7: test_license_locator
7/12 Test #7: test_license_locator .............***Failed 0.00 sec
Start 8: test_event_registry
8/12 Test #8: test_event_registry .............. Passed 0.00 sec
Start 9: test_date
9/12 Test #9: test_date ........................***Failed 0.01 sec
Start 10: test_standard_license
10/12 Test #10: test_standard_license ............***Failed 0.01 sec
Start 11: test_signature_verifier
11/12 Test #11: test_signature_verifier .......... Passed 0.02 sec
Start 12: test_volid
12/12 Test #12: test_volid .......................***Failed 0.13 sec

58% tests passed, 5 tests failed out of 12

Total Test time (real) = 0.29 sec

The following tests FAILED:
5 - test_license_reader (Failed)
7 - test_license_locator (Failed)
9 - test_date (Failed)
10 - test_standard_license (Failed)
12 - test_volid (Failed)
Errors while running CTest
Makefile:151: recipe for target 'test' failed
make: *** [test] Error 8

Installation problem on Windows

Hello,
I tried to install open-license-manager on Windows with MSVC 2019.
I chose the "Compile and Build (command line)" way to do it.
I retrieved the code from Github and followed the steps written in the documentation.
When I launch "cmake --build . --target install --config Release", I got the following error:

Licensecc_installation_problem

Why do I encounter this message?

To circonvent the problem, I launched the "licensecc.sln" file located in the build folder and compiled in Visual Studio. Is it a valid solution? I am not very confident since I encountered subsequent problems to launch the examples then.

Any help would be appreciated.

I do not get the message `"MY_AWESOME_FUNC is licensed" : what am I doing wrong?

git clone :

raphy@raohy:~$ git clone --recursive https://github.com/open-license-manager/licensecc.git
Cloning into 'licensecc'...
remote: Enumerating objects: 4287, done.
remote: Counting objects: 100% (114/114), done.
remote: Compressing objects: 100% (52/52), done.
remote: Total 4287 (delta 53), reused 110 (delta 52), pack-reused 4173
Receiving objects: 100% (4287/4287), 7.13 MiB | 22.88 MiB/s, done.
Resolving deltas: 100% (2652/2652), done.
Submodule 'license-generator' (https://github.com/open-license-manager/lcc-license-generator.git) registered for path 'extern/license-generator'
Cloning into '/home/raphy/licensecc/extern/license-generator'...
remote: Enumerating objects: 473, done.        
remote: Total 473 (delta 0), reused 0 (delta 0), pack-reused 473        
Receiving objects: 100% (473/473), 249.70 KiB | 2.00 MiB/s, done.
Resolving deltas: 100% (320/320), done.
Submodule path 'extern/license-generator': checked out '0227a3ef327a60ef6cca96d554a485711cc82ea5'

raphy@raohy:~$ cd licensecc/build/



raphy@raohy:~/licensecc/build$ cmake .. -DCMAKE_INSTALL_PREFIX=../install
-- You should define a variable LCC_PROJECT_NAME containing the name of the software you want to add a license to.A mock project named DEFAULT has been added for you.
-- The CXX compiler identification is GNU 11.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Could NOT find lccgen (missing: lccgen_DIR)
-- Submodule update
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found openssl version 3.0.2 - generator
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0") found components: date_time filesystem program_options system unit_test_framework 
-- CXX compiler              : /usr/bin/c++
-- CXX compiler flags        : 
-- CXX compiler flags debug  : -g
-- CXX compiler flags release: -O3 -DNDEBUG
-- Install prefix            : /home/raphy/licensecc/install
-- External libs             : 
-- Found openssl version 3.0.2 -licensecc
-- openssl 3.0.2 zlib not required - licensecc
-- CXX compiler        : /usr/bin/c++
-- CXX compiler flags  : 
-- CXX compiler flags debug : -g
-- CXX compiler flags release: -O3 -DNDEBUG
-- Install prefix      : /home/raphy/licensecc/install
-- Project name        : DEFAULT
-- Project base dir    : /home/raphy/licensecc/projects/DEFAULT
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found version "1.74.0") found components: unit_test_framework system filesystem 
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE dot) 
-- Could NOT find Sphinx (missing: SPHINX_EXECUTABLE) 
-- Doxygen or Sphynx not found, not generating docs.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/raphy/licensecc/build
raphy@raohy:~/licensecc/build$ make
[  1%] Building CXX object extern/license-generator/src/base_lib/CMakeFiles/lcc_base.dir/base64.cpp.o
[  2%] Building CXX object extern/license-generator/src/base_lib/CMakeFiles/lcc_base.dir/crypto_helper.cpp.o
[  3%] Building CXX object extern/license-generator/src/base_lib/CMakeFiles/lcc_base.dir/openssl/crypto_helper_ssl.cpp.o
/home/raphy/licensecc/extern/license-generator/src/base_lib/openssl/crypto_helper_ssl.cpp: In constructor ‘license::CryptoHelperLinux::CryptoHelperLinux()’:
/home/raphy/licensecc/extern/license-generator/src/base_lib/openssl/crypto_helper_ssl.cpp:29:37: warning: ‘int ERR_load_ERR_strings()’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   29 |                 ERR_load_ERR_strings();
      |                 ~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/openssl/cryptoerr.h:17,
                 from /usr/include/openssl/crypto.h:38,
                 from /usr/include/openssl/bio.h:30,
                 from /usr/include/openssl/evp.h:30,
                 from /home/raphy/licensecc/extern/license-generator/src/base_lib/openssl/crypto_helper_ssl.cpp:10:
/usr/include/openssl/cryptoerr_legacy.h:57:27: note: declared here
   57 | OSSL_DEPRECATEDIN_3_0 int ERR_load_ERR_strings(void);
      |                           ^~~~~~~~~~~~~~~~~~~~
/home/raphy/licensecc/extern/license-generator/src/base_lib/openssl/crypto_helper_ssl.cpp: In member function ‘virtual const string license::CryptoHelperLinux::exportPrivateKey() const’:
/home/raphy/licensecc/extern/license-generator/src/base_lib/openssl/crypto_helper_ssl.cpp:64:37: warning: ‘rsa_st* EVP_PKEY_get1_RSA(EVP_PKEY*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   64 |         RSA *rsa = EVP_PKEY_get1_RSA(m_pktmp);
      |                    ~~~~~~~~~~~~~~~~~^~~~~~~~~
In file included from /home/raphy/licensecc/extern/license-generator/src/base_lib/openssl/crypto_helper_ssl.cpp:10:
/usr/include/openssl/evp.h:1348:16: note: declared here
 1348 | struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
      |                ^~~~~~~~~~~~~~~~~
/home/raphy/licensecc/extern/license-generator/src/base_lib/openssl/crypto_helper_ssl.cpp:66:36: warning: ‘int PEM_write_bio_RSAPrivateKey(BIO*, const RSA*, const EVP_CIPHER*, const unsigned char*, int, int (*)(char*, int, int, void*), void*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   66 |         PEM_write_bio_RSAPrivateKey(bio_private, rsa, NULL, NULL, 0, NULL, NULL);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/raphy/licensecc/extern/license-generator/src/base_lib/openssl/crypto_helper_ssl.cpp:12:
/usr/include/openssl/pem.h:447:1: note: declared here
  447 | DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, RSAPrivateKey, RSA)
      | ^~~~~~~~~~~~~~~~~~~~~~
/home/raphy/licensecc/extern/license-generator/src/base_lib/openssl/crypto_helper_ssl.cpp: In member function ‘virtual const std::vector<unsigned char> license::CryptoHelperLinux::exportPublicKey() const’:
/home/raphy/licensecc/extern/license-generator/src/base_lib/openssl/crypto_helper_ssl.cpp:84:37: warning: ‘rsa_st* EVP_PKEY_get1_RSA(EVP_PKEY*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   84 |         RSA *rsa = EVP_PKEY_get1_RSA(m_pktmp);
      |                    ~~~~~~~~~~~~~~~~~^~~~~~~~~
In file included from /home/raphy/licensecc/extern/license-generator/src/base_lib/openssl/crypto_helper_ssl.cpp:10:
/usr/include/openssl/evp.h:1348:16: note: declared here
 1348 | struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
      |                ^~~~~~~~~~~~~~~~~
/home/raphy/licensecc/extern/license-generator/src/base_lib/openssl/crypto_helper_ssl.cpp:86:29: warning: ‘int i2d_RSAPublicKey_bio(BIO*, const RSA*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   86 |         i2d_RSAPublicKey_bio(bio_public, rsa);
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/pem.h:23,
                 from /home/raphy/licensecc/extern/license-generator/src/base_lib/openssl/crypto_helper_ssl.cpp:12:
/usr/include/openssl/x509.h:619:27: note: declared here
  619 | OSSL_DEPRECATEDIN_3_0 int i2d_RSAPublicKey_bio(BIO *bp, const RSA *rsa);
      |                           ^~~~~~~~~~~~~~~~~~~~
[  3%] Built target lcc_base
[  5%] Building CXX object extern/license-generator/src/license_generator/CMakeFiles/license_generator_lib.dir/command_line-parser.cpp.o
[  6%] Building CXX object extern/license-generator/src/license_generator/CMakeFiles/license_generator_lib.dir/license.cpp.o
[  7%] Building CXX object extern/license-generator/src/license_generator/CMakeFiles/license_generator_lib.dir/project.cpp.o
[  8%] Building CXX object extern/license-generator/src/license_generator/CMakeFiles/license_generator_lib.dir/__/ini/ConvertUTF.cpp.o
[ 10%] Linking CXX static library liblicense_generator_lib.a
[ 10%] Built target license_generator_lib
[ 11%] Building CXX object extern/license-generator/src/license_generator/CMakeFiles/lccgen.dir/open-license-main.cpp.o
[ 12%] Linking CXX executable lccgen
[ 12%] Built target lccgen
[ 14%] Building CXX object extern/license-generator/test/CMakeFiles/test_license.dir/license_test.cpp.o
[ 15%] Linking CXX executable test_license
[ 15%] Built target test_license
[ 16%] Building CXX object extern/license-generator/test/CMakeFiles/test_command-line.dir/command-line_test.cpp.o
[ 17%] Linking CXX executable test_command-line
[ 17%] Built target test_command-line
[ 19%] Building CXX object extern/license-generator/test/CMakeFiles/test_project.dir/project_test.cpp.o
[ 20%] Linking CXX executable test_project
[ 20%] Built target test_project
[ 21%] Building CXX object extern/license-generator/test/CMakeFiles/test_cryptohelper.dir/cryptohelper_test.cpp.o
[ 23%] Linking CXX executable test_cryptohelper
[ 23%] Built target test_cryptohelper
[ 24%] Building CXX object src/library/hw_identifier/CMakeFiles/hw_identifier.dir/hw_identifier_facade.cpp.o
[ 25%] Building CXX object src/library/hw_identifier/CMakeFiles/hw_identifier.dir/default_strategy.cpp.o
[ 26%] Building CXX object src/library/hw_identifier/CMakeFiles/hw_identifier.dir/ethernet.cpp.o
[ 28%] Building CXX object src/library/hw_identifier/CMakeFiles/hw_identifier.dir/disk_strategy.cpp.o
[ 29%] Building CXX object src/library/hw_identifier/CMakeFiles/hw_identifier.dir/identification_strategy.cpp.o
[ 30%] Building CXX object src/library/hw_identifier/CMakeFiles/hw_identifier.dir/hw_identifier.cpp.o
[ 30%] Built target hw_identifier
[ 32%] Building CXX object src/library/base/CMakeFiles/base.dir/EventRegistry.cpp.o
[ 33%] Building CXX object src/library/base/CMakeFiles/base.dir/file_utils.cpp.o
[ 34%] Building CXX object src/library/base/CMakeFiles/base.dir/string_utils.cpp.o
[ 35%] Building CXX object src/library/base/CMakeFiles/base.dir/base64.cpp.o
[ 37%] Building CXX object src/library/base/CMakeFiles/base.dir/logger.cpp.o
[ 37%] Built target base
[ 38%] generating /home/raphy/licensecc/projects/DEFAULT/include/licensecc/DEFAULT/public_key.h and /home/raphy/licensecc/projects/DEFAULT/private_key.rsa if they don't already exist
[ 38%] Built target project_initialize
[ 39%] Building CXX object src/library/os/CMakeFiles/os.dir/openssl/signature_verifier.cpp.o
/home/raphy/licensecc/src/library/os/openssl/signature_verifier.cpp: In function ‘void license::os::initialize()’:
/home/raphy/licensecc/src/library/os/openssl/signature_verifier.cpp:38:37: warning: ‘int ERR_load_ERR_strings()’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   38 |                 ERR_load_ERR_strings();
      |                 ~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/openssl/cryptoerr.h:17,
                 from /usr/include/openssl/crypto.h:38,
                 from /usr/include/openssl/bio.h:30,
                 from /usr/include/openssl/pem.h:20,
                 from /home/raphy/licensecc/src/library/os/openssl/signature_verifier.cpp:8:
/usr/include/openssl/cryptoerr_legacy.h:57:27: note: declared here
   57 | OSSL_DEPRECATEDIN_3_0 int ERR_load_ERR_strings(void);
      |                           ^~~~~~~~~~~~~~~~~~~~
/home/raphy/licensecc/src/library/os/openssl/signature_verifier.cpp: In function ‘FUNCTION_RETURN license::os::verify_signature(const string&, const string&)’:
/home/raphy/licensecc/src/library/os/openssl/signature_verifier.cpp:51:40: warning: ‘RSA* d2i_RSAPublicKey_bio(BIO*, RSA**)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   51 |         RSA* rsa = d2i_RSAPublicKey_bio(bio, NULL);
      |                    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/openssl/pem.h:23,
                 from /home/raphy/licensecc/src/library/os/openssl/signature_verifier.cpp:8:
/usr/include/openssl/x509.h:618:28: note: declared here
  618 | OSSL_DEPRECATEDIN_3_0 RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa);
      |                            ^~~~~~~~~~~~~~~~~~~~
[ 41%] Building CXX object src/library/os/CMakeFiles/os.dir/execution_environment_common.cpp.o
[ 42%] Building CXX object src/library/os/CMakeFiles/os.dir/linux/execution_environment.cpp.o
[ 43%] Building CXX object src/library/os/CMakeFiles/os.dir/linux/cpu_info.cpp.o
[ 44%] Building CXX object src/library/os/CMakeFiles/os.dir/linux/dmi_info.cpp.o
[ 46%] Building CXX object src/library/os/CMakeFiles/os.dir/linux/network.cpp.o
[ 47%] Building CXX object src/library/os/CMakeFiles/os.dir/linux/os_linux.cpp.o
[ 47%] Built target os
[ 48%] Building CXX object src/library/locate/CMakeFiles/locate.dir/ApplicationFolder.cpp.o
[ 50%] Building CXX object src/library/locate/CMakeFiles/locate.dir/EnvironmentVarLocation.cpp.o
[ 51%] Building CXX object src/library/locate/CMakeFiles/locate.dir/EnvironmentVarData.cpp.o
[ 52%] Building CXX object src/library/locate/CMakeFiles/locate.dir/ExternalDefinition.cpp.o
[ 53%] Building CXX object src/library/locate/CMakeFiles/locate.dir/LocatorStrategy.cpp.o
[ 55%] Building CXX object src/library/locate/CMakeFiles/locate.dir/LocatorFactory.cpp.o
[ 55%] Built target locate
[ 56%] Building CXX object src/library/CMakeFiles/licensecc_static.dir/licensecc.cpp.o
[ 57%] Building CXX object src/library/CMakeFiles/licensecc_static.dir/LicenseReader.cpp.o
[ 58%] Building CXX object src/library/CMakeFiles/licensecc_static.dir/limits/license_verifier.cpp.o
[ 60%] Building CXX object src/library/CMakeFiles/licensecc_static.dir/ini/ConvertUTF.cpp.o
[ 61%] Linking CXX static library liblicensecc_static.a
[ 61%] Built target licensecc_static
[ 62%] Building CXX object test/library/CMakeFiles/test_license_reader.dir/LicenseReader_test.cpp.o
[ 64%] Linking CXX executable test_license_reader
[ 64%] Built target test_license_reader
[ 65%] Building CXX object test/library/CMakeFiles/test_os_linux.dir/os_linux_test.cpp.o
[ 66%] Linking CXX executable test_os_linux
[ 66%] Built target test_os_linux
[ 67%] Building CXX object test/library/CMakeFiles/test_license_locator.dir/LicenseLocator_test.cpp.o
[ 69%] Linking CXX executable test_license_locator
[ 69%] Built target test_license_locator
[ 70%] Building CXX object test/library/CMakeFiles/test_event_registry.dir/EventRegistry_test.cpp.o
[ 71%] Linking CXX executable test_event_registry
[ 71%] Built target test_event_registry
[ 73%] Building CXX object test/library/os/CMakeFiles/test_network.dir/network_test.cpp.o
[ 74%] Linking CXX executable test_network
[ 74%] Built target test_network
[ 75%] Building CXX object test/library/os/CMakeFiles/test_dmi_info.dir/dmi_info_test.cpp.o
[ 76%] Linking CXX executable test_dmi_info
[ 76%] Built target test_dmi_info
[ 78%] Building CXX object test/library/os/CMakeFiles/test_execution_environment.dir/execution_environment_test.cpp.o
[ 79%] Linking CXX executable test_execution_environment
[ 79%] Built target test_execution_environment
[ 80%] Building CXX object test/library/hw_identifier/CMakeFiles/test_hw_identifier.dir/hw_identifier_test.cpp.o
[ 82%] Linking CXX executable test_hw_identifier
[ 82%] Built target test_hw_identifier
[ 83%] Building CXX object test/functional/CMakeFiles/license_generator_snippet.dir/generate-license.cpp.o
[ 84%] Linking CXX static library liblicense_generator_snippet.a
[ 84%] Built target license_generator_snippet
[ 85%] Building CXX object test/functional/CMakeFiles/test_standard_license.dir/standard-license_test.cpp.o
[ 87%] Linking CXX executable test_standard_license
[ 87%] Built target test_standard_license
[ 88%] Building CXX object test/functional/CMakeFiles/test_date.dir/date_test.cpp.o
[ 89%] Linking CXX executable test_date
[ 89%] Built target test_date
[ 91%] Building CXX object test/functional/CMakeFiles/test_signature_verifier.dir/signature_verifier_test.cpp.o
[ 92%] Linking CXX executable test_signature_verifier
[ 92%] Built target test_signature_verifier
[ 93%] Building CXX object test/functional/CMakeFiles/test_it_hw_identifier.dir/hw_identifier_it_test.cpp.o
[ 94%] Linking CXX executable test_it_hw_identifier
[ 94%] Built target test_it_hw_identifier
[ 96%] Building CXX object test/functional/CMakeFiles/test_crack.dir/crack_test.cpp.o
[ 97%] Linking CXX executable test_crack
[ 97%] Built target test_crack
[ 98%] Building CXX object src/inspector/CMakeFiles/lccinspector.dir/inspector.cpp.o
[100%] Linking CXX executable lccinspector
[100%] Built target lccinspector
raphy@raohy:~/licensecc/build$ make install
Consolidate compiler generated dependencies of target lcc_base
[  3%] Built target lcc_base
Consolidate compiler generated dependencies of target license_generator_lib
[ 10%] Built target license_generator_lib
Consolidate compiler generated dependencies of target lccgen
[ 12%] Built target lccgen
Consolidate compiler generated dependencies of target test_license
[ 15%] Built target test_license
Consolidate compiler generated dependencies of target test_command-line
[ 17%] Built target test_command-line
Consolidate compiler generated dependencies of target test_project
[ 20%] Built target test_project
Consolidate compiler generated dependencies of target test_cryptohelper
[ 23%] Built target test_cryptohelper
Consolidate compiler generated dependencies of target hw_identifier
[ 30%] Built target hw_identifier
Consolidate compiler generated dependencies of target base
[ 37%] Built target base
[ 38%] generating /home/raphy/licensecc/projects/DEFAULT/include/licensecc/DEFAULT/public_key.h and /home/raphy/licensecc/projects/DEFAULT/private_key.rsa if they don't already exist
[ 38%] Built target project_initialize
Consolidate compiler generated dependencies of target os
[ 47%] Built target os
Consolidate compiler generated dependencies of target locate
[ 55%] Built target locate
Consolidate compiler generated dependencies of target licensecc_static
[ 61%] Built target licensecc_static
Consolidate compiler generated dependencies of target test_license_reader
[ 64%] Built target test_license_reader
Consolidate compiler generated dependencies of target test_os_linux
[ 66%] Built target test_os_linux
Consolidate compiler generated dependencies of target test_license_locator
[ 69%] Built target test_license_locator
Consolidate compiler generated dependencies of target test_event_registry
[ 71%] Built target test_event_registry
Consolidate compiler generated dependencies of target test_network
[ 74%] Built target test_network
Consolidate compiler generated dependencies of target test_dmi_info
[ 76%] Built target test_dmi_info
Consolidate compiler generated dependencies of target test_execution_environment
[ 79%] Built target test_execution_environment
Consolidate compiler generated dependencies of target test_hw_identifier
[ 82%] Built target test_hw_identifier
Consolidate compiler generated dependencies of target license_generator_snippet
[ 84%] Built target license_generator_snippet
Consolidate compiler generated dependencies of target test_standard_license
[ 87%] Built target test_standard_license
Consolidate compiler generated dependencies of target test_date
[ 89%] Built target test_date
Consolidate compiler generated dependencies of target test_signature_verifier
[ 92%] Built target test_signature_verifier
Consolidate compiler generated dependencies of target test_it_hw_identifier
[ 94%] Built target test_it_hw_identifier
Consolidate compiler generated dependencies of target test_crack
[ 97%] Built target test_crack
Consolidate compiler generated dependencies of target lccinspector
[100%] Built target lccinspector
Install the project...
-- Install configuration: ""
-- Installing: /home/raphy/licensecc/install/include/licensecc/DEFAULT
-- Installing: /home/raphy/licensecc/install/include/licensecc/DEFAULT/public_key.h
-- Installing: /home/raphy/licensecc/install/include/licensecc/DEFAULT/licensecc_properties.h
-- Up-to-date: /home/raphy/licensecc/install/include
-- Up-to-date: /home/raphy/licensecc/install/include/licensecc
-- Installing: /home/raphy/licensecc/install/include/licensecc/licensecc.h
-- Installing: /home/raphy/licensecc/install/include/licensecc/datatypes.h
-- Installing: /home/raphy/licensecc/install/lib/cmake/licensecc/licensecc-config.cmake
-- Installing: /home/raphy/licensecc/install/lib/cmake/licensecc/licensecc-config-version.cmake
-- Installing: /home/raphy/licensecc/install/bin/lccgen
-- Installing: /home/raphy/licensecc/install/lib/cmake/lccgen/license_generator.cmake
-- Installing: /home/raphy/licensecc/install/lib/cmake/lccgen/license_generator-noconfig.cmake
-- Installing: /home/raphy/licensecc/install/lib/cmake/lccgen/lccgen-config.cmake
-- Installing: /home/raphy/licensecc/install/lib/licensecc/DEFAULT/liblicensecc_static.a
-- Installing: /home/raphy/licensecc/install/lib/licensecc/DEFAULT/cmake/licensecc.cmake
-- Installing: /home/raphy/licensecc/install/lib/licensecc/DEFAULT/cmake/licensecc-noconfig.cmake
-- Installing: /home/raphy/licensecc/install/bin/DEFAULT/lccinspector
raphy@raohy:~/licensecc/build$ 

examples:

raphy@raohy:~/examples/simple_pc_identifier$ export LCC_INSTALLATION_DIR=/home/raphy/licensecc/install/


raphy@raohy:~/examples/simple_pc_identifier$ cd build
raphy@raohy:~/examples/simple_pc_identifier/build$ cmake .. -Dlicensecc_DIR=$LCC_INSTALLATION_DIR/lib/cmake/licensecc
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.a (found version "3.0.2") found components: Crypto 
-- LicenseCC found: /home/raphy/licensecc/install//lib/cmake/licensecc
-- Configuring done
-- Generating done
-- Build files have been written to: /home/raphy/examples/simple_pc_identifier/build
raphy@raohy:~/examples/simple_pc_identifier/build$ 


raphy@raohy:~/examples/simple_pc_identifier/build$ make
[ 50%] Building CXX object CMakeFiles/example.dir/src/example.cpp.o
[100%] Linking CXX executable example
[100%] Built target example
raphy@raohy:~/examples/simple_pc_identifier/build$ 
raphy@raohy:~/examples/simple_pc_identifier/build$ ./example 
license ERROR :
    license file not found 
hardware id is :
    AFpM-J6oA-AAA=


raphy@raohy:~/examples/simple_pc_identifier$ $LCC_INSTALLATION_DIR/bin/lccgen license issue -o example.lic --project-folder /home/raphy/licensecc/projects/DEFAULT/
License written 

I tried to test the program features, but may be I'm doing something wrong.... I do not get the message "MY_AWESOME_FUNC is licensed" .... :

raphy@raohy:~/examples/simple_pc_identifier/build$ ./example 
license ERROR :
    license file not found 
hardware id is :
    AFpM-J6oA-AAA=

raphy@raohy:~/examples/simple_pc_identifier/build$ /home/raphy/licensecc/install/bin/lccgen license issue -p /home/raphy/licensecc/projects/DEFAULT/ -s AFpM-J6oA-AAA= -o example.lic ./example 
License written 

raphy@raohy:~/examples/simple_pc_identifier/build$ /home/raphy/licensecc/install/bin/lccgen license issue -p /home/raphy/licensecc/projects/DEFAULT/ -f MY_AWESOME_FUNC -s AFpM-J6oA-AAA= -o example.lic 
License written 

Other Info:

    OS: Ubuntu 22.04
    gcc --version : gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

How to make it work?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.