# Installation¶

## External references¶

LDOPA is related to a number of external libraries. They must be downloaded, configured and compiled (if needed) before being linked together with LDOPA.

### Boost¶

LDOPA uses the well-known Boost library both as header-only library (major part) and as a compiled part (needed for Boost.Python part).
The required version is 1.60. We noted some issues related to use of versions other than 1.6 with Visual Studio versions other than 2013, so it is recommended to use exactly the matched versions of the toolchain and the Boost library.

### xiLib¶

xiLib is a general purpose C++ library developed by us in order to take combined all stand-alone features developed in different projects.

The library is designed to be used with the same toolchain as LDOPA.

### sqlite3¶

SQLite is a C language library that implements a small, fast, self-contained, high-reliability, full-featured SQL database engine.

SQLite is used by LDOPA for processing multi-perspective event logs in sq3 format. SQLite can be downloaded from the official site as source code and compiled with the chosen toolchain with appropriate options.

### gtest¶

Google Testing and Mocking framework is used for maintaining unit-tests.

## Project structure¶

The library folder consists of the following top-level directories.

• /docs/ contains example of scripts for building auto-documentation in Doxygen format.
• /python/ contains C++ sources and VS2013 solution for building LDOPA C++-Python connectors. It also contains Python demo scripts showing the applicability of the connectors.
• /sol/ contains solutions and projects for building LDOPA library. The solutions are separated from source code. Currently we provide only projects for VS2013.
• /src/ contains source code separated from the building system.
• /tests/ contains gtest-based unit-tests, both solution/projects and pieces of source code isolated one from each other.

## Configuring external references¶

In Visual Studio 2013, in order to refer to external references we use an approach based on property sheets.

Generally we put all property sheets in a subfolder of a solution folder, called "properties". That is we have the following folder with property sheets:

• /sol/vs12/properties/
• /tests/gtest/sol/vs12/properties/
• /python/bpy/sol/vs12/properties/

The subfolder "import" of the folders above is used for storing property sheets that are imported for external references.

Property sheet files are highly specific for individual users as they contain paths for libraries, that are individual for every user. Thus, it is not possible to store them in repositories "as is" — this would result in overwriting them by every commit being specific for commiter's settings. Instead we track into repositories only so-called ".example" files. They are files with ".example" extension that provide stencils for corresponding files w/o ".example". For instance, "ldopa.vc120.props.example" is a sample for creating the corresponding "ldopa.vc120.props" file that is to be put to the same directory as "ldopa.vc120.props.example". An end user creates a copy of "ldopa.vc120.props.example" as "ldopa.vc120.props" and sets parameters specific for his/her individual case, i.e. LDOPA_INCLUDE_DIR, LDOPA_DLIB_DIR and LDOPA_RLIB_DIR variables.

### Configuring individual property sheets¶

All property sheet files with the same name put in different directories are treated as the same property sheets. So, here we enumerate all sheets used by the whole project and provide necessary explanations on how they can be configured.

ldopa.vc120.props contains definitions for paths to individual components of LDOPA.

Var Description
LDOPA_INCLUDE_DIR path to LDOPA sources; default value is /src/
LDOPA_DLIB_DIR path to debug binaries; default value is /sol/vs12/output/
LDOPA_RLIB_DIR path to release binaries; default value is /sol/vs12/output/

boost1_60.vc120.props contains paths to Boost library.

Var Description
BOOST1_60_INCLUDE_DIR Path to the header part of Boost library. Example: f:\se\lib\cpp\boost\boost_1_60_0
BOOST1_60_DLIB_DIR, BOOST1_60_DLIB64_DIR Path to 32/64 version of debug binaries. Example: f:\se\lib\cpp\boost\boost_1_60_0\stage\lib
BOOST1_60_RLIB_DIR, BOOST1_60_RLIB64_DIR Path to 32/64 version of release binaries. Example: f:\se\lib\cpp\boost\boost_1_60_0\stage\lib\x64

Note, that boost1_60-inc.vc120.props and boost1_60.inc-lib32.vc120.props are pre-configured property sheets, so there is no need to change these files.

sqlite3_17.vc120.props contains paths to SQLite3 library.

Var Description
SQLITE317_AM_INCLUDE_DIR Path to include directory with an amalgam version of SQLite library. Example: f:\se\lib\cpp\sqlite\prj\root\3.17\src\amalgam
SQLITE317_32_DLIB_DIR, SQLITE317_64_DLIB_DIR Path to the 32/64 version of the debug binaries. Example: f:\se\lib\cpp\sqlite\prj\root\3.17\sol\vs12\output\Debug\Win32
SQLITE317_32_RLIB_DIR, SQLITE317_64_RLIB_DIR Path to the 32/64 version of the release binaries. Example: f:\se\lib\cpp\sqlite\prj\root\3.17\sol\vs12\output\Release\Win32

Note, that sqlite3_17-inc.vc120.props and sqlite3_17-release-32.vc120.props are pre-configured property sheets, so there is no need to change these files.

xilib.vc120.props contains paths to xiLib library.

Var Description
XILIB_INCLUDE_DIR Path to include the directory of xiLib library. Example: f:\se\projects\cpp\xi\xilib\dev\root\0.3\src
XILIB_DLIB_DIR Path to the debug binaries. Example: f:\se\projects\cpp\xi\xilib\dev\root\0.3\sol\vs12\output
XILIB_RLIB_DIR Path to the release binaries. Example: f:\se\projects\cpp\xi\xilib\dev\root\0.3\sol\vs12\output

gtest.vc120.props contains paths to gtest library. We refer to a separately compiled version of gtest library despite the fact that sometimes gtest is linked to a project as source code (see readme).

Var Description
GTEST_INCLUDE_DIR Path to include directory of gtest library. Example: f:\se\projects\cpp\xi\xilib\dev\root\0.3\src
GTEST_DLIB_DIR, GTEST_RLIB_DIR Path to debug/release binary static libraries (/MTd, /MT options). Example: f:\se\lib\cpp\google\gtest\github\googletest\googletest\msvc\gtest\Debug
GTEST_DLIB2_DIR, GTEST_RLIB2_DIR Path to debug/release binary static libraries built in to-dll mode (/MDd, /MD options). Example: f:\se\lib\cpp\google\gtest\github\googletest\googletest\msvc\gtest\Debug2dll
GTEST_DDLL_DIR, GTEST_RDLL_DIR Path to debug/release binary dynamic libraries (/MDd, /MD options). Example: f:\se\lib\cpp\google\gtest\github\googletest\googletest\msvc\gtest\Debug2dll

Note, that gtest-debug.vc120.props, gtest-debug2dll.vc120.props and gtest-debug-dll.vc120.props are pre-configured property sheets, so there no need to change these files.

python36-x32.vc120.props contains paths to Python 3.6 32-bit C-libraries.

Var Description
PYTHON36_X32_INCLUDE_DIR Path to include the directory of Python library. Example: c:\programs\Python36-32\include
PYTHON36_X32_DLIB_DIR, PYTHON36_X32_RLIB_DIR Path to debug/release binaries. Example: c:\programs\Python36-32\libs

Note, that python36-x32.dll.vc120.props is pre-configured property sheets, so there is no need to change this file.

## Examples¶

Unit-tests and demo applications supplied together with the library use external particularly heavy event log files. In order not to track them in repositories, we supply such files separately as zip-archives.

We have the following relation between the project structure and external files:

• /tests/gtest/work_files/ is a directory for files that can be downloaded here.
• /python/demos/work_files/ is a directory for files that can be downloaded here.