If you want to compile Computree from the source code, here is the procedure to follow.
On your system, the following must be installed:
A C++ compiler
On Windows, you must install the Microsoft Visual Studio 2022 64-bit C++ compiler (MSVC2022 ), available in Visual Studio Community. You must choose the Desktop Development component in C++, by activating at least:
- Windows 11 SDK (10.xxx)
- MSVC v143 – VS 2022 C++
On Linux, the GCC compiler (version >= 9.3) is normally already available by default. Otherwise, install it with the command:
sudo apt-get install build-essential
On MacOS X, you must install Apple Xcode, then the development tools by launching from a terminal:
command xcode-select --install
QtCreator and Qt
You must install Qt version 5.15.2, available in open-source version here
A Subversion Client (SVN)
You must install a Subversion client (SVN), such as:
- TortoiseSVN on Windows
- or the subversion package on Linux or MacOS X:
sudo apt install subversion
Retrieving source codes
To set up the Computree development environment, you must first create a root folder for Computree, classically named "computree" (but this name is free). It is in this folder that the source code repositories of the platform and its plugins will be retrieved.
To retrieve the source codes of the platform and plugins distributed as standard (SVN checkout), you must execute, in the computree root folder, the following commands:
svn checkout http://rdinnovation.onf.fr/svn/computreev6/ computreev6 svn checkout http://rdinnovation.onf.fr/svn/plugin-onf/dev_v6/ pluginonf svn checkout http://rdinnovation.onf.fr/svn/plugin-mk/dev_v6/ pluginmk svn checkout http://rdinnovation.onf.fr/svn/plugin-toolkit/dev_v6/ plugintoolkit svn checkout http://rdinnovation.onf.fr/svn/segma/dev_v6/ pluginsegma svn checkout http://rdinnovation.onf.fr/svn/plugin-generate/dev_v6/ plugingenerate svn checkout http://rdinnovation.onf.fr/svn/plugin-onf-dev/dev_v6/ pluginonfdev svn checkout http://rdinnovation.onf.fr/svn/plugin-ign-lif/dev_v6/ pluginignlif
This will create a main computreev6 subfolder containing all the core elements of the platform. This folder should not be renamed. Then a subfolder is created for each Computree plugin. Only the computreev6 deposit is strictly essential. The other repositories to retrieve depend on the plugins you want to compile.
You must then run the script create_plugins_pro.bat (on Windows) or create_plugins_pro.sh (on Linux or MacOS X), located in the computree/computreev6 folder. This script creates the Qt project file plugins.pro that will be used for compilation.
N.B. : At this stage (or later in QtCreator), you can remove (by commenting the corresponding lines) or add plugin folders to compile in the plugins.pro file created.
On Windows, you must download the 3rdparty.zip file, and unzip its contents into a computree/computreev6/3rdparty folder.
On Linux, the following packages must be installed :
sudo apt install libeigen3-dev sudo apt install libmuparser-dev sudo apt install libgdal-dev gdal-bin sudo apt install libopencv-dev python3-opencv sudo apt install libpcl-dev sudo apt install libboost-all-dev sudo apt install libgsl-dev gsl-bin sudo apt install libqhull-dev sudo apt install libflann-dev
On MacOS X, you must install Brew and then install the following packages:
brew install eigen brew install muparser brew install gdal brew install opencv brew install pcl brew install boost brew install gsl brew install qhull brew install flann
To compile the translations (and therefore be able to benefit from an interface entirely in English or entirely in French), you must execute the lrelease.bat script (on Windows) or lrelease.sh (on Linux or MacOS X) located in the computree/computreev6 directory. This script can be adjusted according to the plugins to be compiled.
N.B. : Another lupdate.bat / lupdate.sh script is used to update the translation files if the code has been modified locally (to be used before the lrelease script).
Configuring the Qt project and compiling
The first step is to open the computree.pro file, located in computree/computreev6, in QtCreator. At the opening QtCreator proposes to configure the project : you have to choose the right version of Qt and the compiler, ie Qt 5.15.2 and, under Windows, take the version MSVC 2022 64bits
You must then go to the Project tab of QtCreator to configure the compilation options:
- Uncheck "Shadow Build" for Debug mode and for Release mode
- Leave Release mode selected
- In the Run configuration (left ) add a step of the type "Make", and with the argument "install"
- On Windows, add paths to libraries and plugins so that Computree can start at the end of the compilation. To do this, still in the Run configuration, in Environment, complete the PATH variable with paths separated by semicolons.
Example of adding paths to the QtCreator PATH on Windows (Run / Environment / PATH, without line breaks):
C:\computree\ComputreeInstallRelease\plugins; C:\computree\ComputreeInstallRelease\libraries\core; C:\computree\ComputreeInstallRelease\libraries\gdal; C:\computree\ComputreeInstallRelease\libraries\pcl; C:\computree\ComputreeInstallRelease\libraries\Qt; C:\computree\ComputreeInstallRelease\libraries\opencv;
Replace C:/computree with the path of the Computree root folder on your system.
N.B. : The computree/ComputreeInstallRelease folder is created during compilation.
Finally, go back to the Edit tab and:
- Right-click on the computree.pro project, and click Run Qmake
- Launch compilation, with the Hammer button at the bottom left (or right click, Compilation)
- Once the compilation is complete, launch Computree, using the Play button.
N.B. : Later, if major changes have taken place in the source code, it may be necessary to redo a Run Qmake and then Recompile on the computree.pro project. This manipulation is to be tried if problems begin to occur just after an update of the source code (SVN update).