gcontini
2020-03-28 037e7cc02b66a54d5dec19a6b93a7bf107a95a0e
documentation update (win32) and others
4个文件已修改
3个文件已添加
1 文件已重命名
2个文件已删除
275 ■■■■■ 已修改文件
README.md 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
doc/analysis/Backoffice.txt 补丁 | 查看 | 原始文档 | blame | 历史
doc/analysis/features.rst 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
doc/api/extend.rst 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
doc/development/Build-the-library-windows.md 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
doc/development/Build-the-library-windows.rst 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
doc/development/CMakeSettings.json 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
doc/index.rst 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
doc/usage/integration.md 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
doc/usage/integration.rst 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
README.md
@@ -14,7 +14,7 @@
machines, or prevent the usage in  virtualized environments. It is an Open License Manager that helps to keep your 
software closed :smirk: . 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](https://github.com/open-license-manager/open-license-manager/wiki/features), and their status is available in the project wiki.
A comprehensive [list of features](http://open-license-manager.github.io/open-license-manager/analysis/features.html), and their status is available in the project wiki.
If you plan to use this library or part of it remember to show us your appreciation giving it a 
<a class="github-button" href="https://github.com/open-license-manager/open-license-manager" data-icon="octicon-star" aria-label="Star open-license-manager/open-license-manager on GitHub">star</a> here on GitHub.
@@ -39,7 +39,7 @@
-   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 wiki](https://github.com/open-license-manager/open-license-manager/wiki/Dependencies)
For a complete list of dependencies and supported environments see [the wiki](http://open-license-manager.github.io/open-license-manager/development/Dependencies.html)
Clone the project. It has submodules, don't forget the `--recursive` option.
doc/analysis/Backoffice.txt
doc/analysis/features.rst
@@ -2,7 +2,13 @@
Features
###########
features and their status
Licensecc is suitable  for your project if it is relatively small, you plan to distribute it in a demo version and you
estimate there will be a "limited" number of clients:
* The management of licenses is command-line. If you plan to issue hundreds of licenses you should consider more advanced licensing systems.
* Open License Manager doesn't offer professional support.
Features and their status
****************************
======================================  ========================
doc/api/extend.rst
@@ -10,7 +10,7 @@
You've found the provided hardware signatures don't behave well for your customers (we can test on a limited set of 
hardware we've receiving reports of usage on environments we never imagined before). 
You can either change the way the default strategy behaves (choose for instance cpu type over disk label as default) or
invent your own identification method.
provide your own identification method.
.. toctree::
doc/development/Build-the-library-windows.md
File was deleted
doc/development/Build-the-library-windows.rst
New file
@@ -0,0 +1,104 @@
#######################################
Build - Windows
#######################################
This page describes how to build the library under windows. Both MSVC compiler and MinGW are supported.
MSVC (2015~2019)
*****************
MSVC install prerequisites
=============================
Git is of course a prerequisite, if you don't have it you can download it from git-scm.com (here is a )
Pre-compiled `versions of boost <https://sourceforge.net/projects/boost/files/boost-binaries/>`_ for windows are available
at SourceForge. Choose the version that matches the desired architecture (eg. for Visual Studio 2019 64 bit you can download
`boost 1.71 msvc-14.2 <https://dl.bintray.com/boostorg/release/1.71.0/binaries/boost_1_71_0-msvc-14.2-64.exe>`_ ) or
if unsure download the full `boost_1_71_0-bin-msvc-all-32-64.7z <https://dl.bintray.com/boostorg/release/1.71.0/binaries/boost_1_71_0-bin-msvc-all-32-64.7z>`_ archive.
With boost 1.71 it is recommended to download one of the `latest cmake <https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0-win64-x64.msi>`_ (>3.16). The version with Visual Studio 2019 isn't the most up to date.
Checkout the code
==================
Check out the code using git:
.. NOTE::
  This project has a submodule (the license generator). Remember to add the option `--recursive` to clone it.
.. code-block:: console
  git clone --recursive https://github.com/open-license-manager/open-license-manager.git
Compile and build (command line)
====================================
Open a command prompt in the folder where you checked out the library.
Configure the library (windows x64):
.. code-block:: console
  cd build
  cmake .. -G "Visual Studio 16 2019" -A x64 -DBOOST_ROOT="C:\local\boost"  //(or where boost was installed)
Configure the library (windows x86):
For some configuration reason we're unable to build using x86 using visual studio generators. We recommend to use Ninja
build system.
.. code-block:: console
  cd build
  "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
  cmake .. -G "Ninja" -DBOOST_ROOT="C:\local\boost"  //(or where boost was installed)
Supported cmake definitions/options
=======================================
Below a list of some useful cmake configurations:
============================== ==============================================================================================
Definition name                Description
============================== ==============================================================================================
-DSTATIC_RUNTIME=1             link statically to the standard and runtime support libraries (compiler flag /MT)
-DCMAKE_BUILD_TYPE=Release     link to the release version of the boost libraries
-DCMAKE_INSTALL_PREFIX=C:\..   folder where to install libraries and headers
-DBOOST_ROOT=C:\..             folder where boost is installed. If cmake is reporting boost not found consider updating cmake.
============================== ==============================================================================================
Compile and test
.. code-block:: console
  cmake --build . --target install --config Release
  ctest -C Release
Compile and build (Visual studio 2019)
==========================================
Visual Studio 2019 integrates with CMake (the process requires a couple of restarts and it's all but "fluid").
After opening the project "as a CMake project" a CMakeSettings.json should appear in the base folder. Edit the file as
below (the file is for an x86 architecture). In a special way:
* remove the "-v" switch from "buildCommandArgs"
* add the variable BOOST_ROOT pointing to where your boost installation is.
Restart, delete and rebuild the cache a couple of time, until Visual Studio understands the new options
(tested with Visual Studio 2019 16.5.1).
.. literalinclude:: CMakeSettings.json
   :language: json
MINGW
*****************
.. TODO::
   MINGW documentation need to be done. Refer to file .travis.yml to see a list of commands for windows-mingw
doc/development/CMakeSettings.json
New file
@@ -0,0 +1,24 @@
{
  "configurations": [
    {
      "name": "x86-Debug",
      "generator": "Visual Studio 16 2019",
      "configurationType": "Debug",
      "buildRoot": "${projectDir}\\out\\build\\${name}",
      "installRoot": "${projectDir}\\out\\install\\${name}",
      "cmakeExecutable": "C:/Program Files/CMake/bin/cmake.exe",
      "cmakeCommandArgs": "",
      "buildCommandArgs": "",
      "ctestCommandArgs": "",
      "inheritEnvironments": [ "msvc_x86" ],
      "intelliSenseMode": "windows-msvc-x86",
      "variables": [
        {
          "name": "BOOST_ROOT",
          "value": "F:/boost_1_71_0",
          "type": "PATH"
        }
      ]
    }
  ]
}
doc/index.rst
@@ -39,11 +39,12 @@
Project Structure
*******************
The software is made by 3 main sub-components:
The software is made by 4 main sub-components:
* ``licensecc``    : the C++ library with a C api (the part you have to integrate in your software) with minimal (or no) external dependencies. This is the project you're currently looking at.
* ``lccinspector`` : a license debugger to be sent to the final customer to diagnose licensing problems or for calculating the pc hash before issuing the license.
* ``lccgen``       : a license generator (github project `lcc-license-generator`_ ) to initialize the library and generate the licenses.
* ``examples``     : usage samples (github project `examples <https://github.com/open-license-manager/examples>`_ ).
.. _lcc-license-generator: https://github.com/open-license-manager/lcc-license-generator
@@ -115,10 +116,16 @@
How to use
**************
The `examples`_ repository shows various ways to integrate `licensecc` into your project.
The `examples`_ repository shows various ways to integrate ``licensecc`` into your project.
.. _examples: https://github.com/open-license-manager/examples 
Branches and status
*********************
* On branch ``master`` there is the 'legacy' 1.0.0 version. This version is working but doesn't correspond to the current documentation, and we don't plan to actively fix it. There are well-known bugs and limitations. We still accept community contributions on this branch. Feel free to propose your pull request.
* On branch ``develop`` there is the upcoming 2.0.0 version that corresponds to the documentation. This version is under development and has not been extensively used/tested. However we encourage users to download and use this one.
How to contribute
********************
doc/usage/integration.md
File was deleted
doc/usage/integration.rst
New file
@@ -0,0 +1,41 @@
#########################################
Integrate Licensecc in your application
#########################################
This short guide explain how to integrate `open-license-manager` in your application.
Working examples are provided in the `examples <https://github.com/open-license-manager/examples>`_ project.
Build System - locate and link the licensecc
*********************************************
We strongly recommend to use CMake as a build system.
If this is the case, the easiest way to compile is to configure LicenseCC as a git submodule of your project.
Then you can copy the cmake module ``Findlicensecc.cmake`` into your cmake modules directory in order to be able to
locate the compiled library.
Adding the following lines to your ``CMakeLists.txt``
.. code-block:: console
  find_package(licensecc 2.0.0 REQUIRED)
will make the external target ``licensecc::licensecc_static`` to be available for linking.
``Findlicensecc.cmake`` takes the following CMake variables as input.
==================== ====================
Cmake variable        Description
==================== ====================
LICENSECC_LOCATION   | If licensecc was not checked out as a git submodule, in this variable you can provide an hint
                     | to locate the library. It may point to the installation folder or the source folder.
LCC_PROJECT_NAME     | Name of the project (the software where you want to integrate licensecc).
                     | Alternatively it is possible to specify a component name in the component section of find_package.
==================== ====================
Call Licensecc from your code
*******************************
The file containing the public api is ``include/licensecc/licensecc.h``. Functions in there are considered stable.
refer to :ref:`public api <api/public_api:Public api>` to understand how to generate an hardware identifer or validate a license.