Setting up a build environment ============================== Standard build setup -------------------- Git --- * On Linux git can be installed through the distribution's package manager. On Ubuntu, Raspbian, and Debian-based distribtution, the command is ``sudo apt install git``. * On Mac OS X 10.9 and above, the git command line tool is installed on its first invocation (source: `GIT SCM book <) * On Windows, we suggest the `Git for Windows `_ binaries. Alternatively you can choose from a number of GUIs, for example `_ or `GitKraken `_, or the support in modern IDEs as Microsoft Visual Studio or Apple XCode. CMake --------------------- VISR uses `CMake `_ as a portable build tool The minimum required version is CMake 3.1. CMake can be used as a command line tool but also provides a GUI (cmake-gui) for configuring builds. * On Linux, install throught he distribution's package manager. On Debian-based systems, the packages are named ``cmake`` for the command line tools and ``cmake-qt-gui`` for the graphical user interface. * On Windows and Mac OS X, download * If you plan to use the machine for CI (continuous integration tasks), make sure you add it to the system path (Windows: Select "Add CMake to the system PATH for all users") Documentation ----------------------- The VISR documentation is mainly written as ReStructured text documents (using `Sphinx <>`_ to create web pages and PDF documents), whereas the code documentation pulled into these documents is generated through `Doxygen `_. In order to create the user and API documentation, the following software tools must be installed: * Doxygen: On Windows and Mac OS X, we recommend downloading binary packages from the `Doxygen download page `_ and installing them. On Linux, installing via the distribution-specific package manager (e.g., ``sudo apt install doxygen''. Note that the XML output generation needed for subsequent build stages is quite buggy in older Doxygen releases, it might therefore be advisable to upgrade to a recent Doxygen release or to build from source (especially on Linux, where the version provided by the package manager could be rather dated). * LaTeX: Both the Doxygen documentation and the PDF generation of Sphinx require a LaTeX system to be installed. We recommend the following LaTeX distributions: - Linux: The system-provided LaTeX (installed, e.g., through ``sudo apt install texlive-full'' ``sudo apt install texlive'' on Ubuntu) - Mac OS X: `MacTeX `_. * sphinxcontrib-bibtex: Extension to create bibliographies using BibTeX files. Installed in the same way as breathe, that, is using ``conda`` where available, or the ``pip`` package manager. Again, it is not included in the standard conda package repository, therefore it has to be installed through .. code-block:: bash conda install -c conda-forge sphinxcontrib-bibtex * sphinx.ext.autodoc: Extract documentation from the docstrings contained in Python code and Python bindings. * sphinx.ext.napoleon: Enables a simpler syntax for Python docstrings to be extracted via ``autodoc``. Installer package generation -------------------------------------- Installation packages are created using `CPack `_, which is integrated into the CMake build software. On Linux and Mac OS X, no external build software is needed. Windows """"""" Download and install the NSIS installer system (`https://sourceforge.net/projects/nsis/`_). It will be automatically recognized if you create the installer packages. Setup as Gitlab runner ---------------------- To provide a