Supported distribution

Currently, only Ubuntu 18.04 distribution has been tested, and is highly recommended. We plan to support Ubuntu 20.04 very soon.

Test SolAR

We provide you with a set of samples to test the possibilities of the SolAR framework. Each .zip file corresponds to stand-alone applications, including all necessary SolAR .dll and .exe files.

Table 1. Available Samples

Natural Image Marker

https://github.com/SolarFramework/NaturalImageMarker/releases

Fiducial Marker

https://github.com/SolarFramework/FiducialMarker/releases

 Sample-Slam

https://github.com/SolarFramework/Sample-Slam/releases

Sample-Triangulation

https://github.com/SolarFramework/Sample-Triangulation/releases

Print the marker included in .zip file to perform the test.

Install development environment

The SolAR framework uses a dedicated pipeline to link and compile code as well as internal tools for third party downloads which should make your job much easier. As you will see later, the SolAR framework is based on QMake originally created by the Qt Company, but compliant with most IDE.

Install QT Creator IDE

As SolAR is using QMake file to setup the projects, we highly recommend to install Qt Creator. Moreover, you will have access to wizards which will help you create new SolAR modules, components and pipelines.

Download the latest version of QTCreator on the following link (scroll down to choose "Downloads for open-source users" for open-source development): QT installer download

When downloaded, right clik on the Qt installer.run file, select properties, Permissions, and check Authorize execution of the file. Then, run your installer.

Create a Qt account if not already done, select where you want to install Qt.
You don’t need to install Qt SDK, just the Qt Creator. So just check the following components:

  • Qt x.x.x (last version proposed)

    • With Desktop gcc 64-bit (version of gcc is 7.5)

    • Android (if you want to build SolAR for Android)

  • Developer and Designer Tools

and start the installation.

Install dependencies

To download dependencies, the SolAR framework uses the meta dependencies management tool Remaken supporting Conan, VCPKG and its native C++ packaging structure based on pkg-config description files.

Install Remaken

  • If Homebrew is not installed on your machine, you can use the following script to install it: Homebrew installer. Homebrew is used to install the last release of Remaken.

  • source ~/.profile to update brew eval modification to your ${HOME}/.profile. Try brew --version commands in terminal to check installation

  • Use the following script to install and configure Remaken: Remaken installer. By default, Remaken installer will also install Conan, cmake and pkg_config which will be used afterwards. Try remaken --help, conan -h, and cmake -h commands in a terminal to check installation. Conan will check these remotes for searching your dependencies.

  • This should install remaken 1.7.2. If you face some issues with this version, you can try a more recent revision that has not yet been made available via Homebrew:

wget https://github.com/b-com-software-basis/remaken/releases/download/1.7.3/remaken-Ubuntu1804 -O ~/remaken
chmod +x ~/remaken
sudo mv ~/remaken /usr/local/bin
  • SolAR has its own conan remote to store pre-built dependencies for the common configurations used by the SolAR Framework. You will need to add these conan remotee with the following commande in a command prompt:

conan remote add conan-solar https://artifact.b-com.com/api/conan/solar-conan-local --insert 0
conan remote add conan-bcom https://artifact.b-com.com/api/conan/bcom-conan-local --insert 1

You should obtain a list of conan remotes that looks like this:

$ conan remote list
conan-solar: https://artifact.b-com.com/api/conan/solar-conan-local [Verify SSL: True]
conan-bcom: https://artifact.b-com.com/api/conan/bcom-conan-local [Verify SSL: True]
conancenter: https://center.conan.io [Verify SSL: True]

Then, open a command prompt with administrator rights and run:

remaken init -e -f

This command will install the latest version of qmake building rules in your ${USER_HOME}/.remaken/rules folder.

Permanently add the PKG_CONFIG_PATH environment variable pointing to the folders where .pc files can be found:

test -r ~/.profile && echo "export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig" >>~/.profile

and reload your .profile:

source ~/.profile

Finally, you need to configure your remaken profile according to your development environment. To do so, run the following command in a command prompt:

remaken profile init --cpp-std 17 -b gcc -o linux -a x86_64

Set conan profile

As we are using conan to download dependencies, you need to configure your default conan profile. To do so, create a new default profile with the following command:

conan profile new default --detect

Then, update your default profile with the two following commands:

conan profile update settings.compiler.libcxx=libstdc++11 default
conan profile update settings.compiler.cppstd=17 default

Your default profile file available in your ${HOME}/.conan/profiles should looks like the following one:

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=7
compiler.libcxx=libstdc++11
compiler.cppstd=17
build_type=Release
[options]
[build_requires]
[env]

Now, you are ready to download your dependencies with remaken.

Use Remaken

Remaken uses a file called packagedependencies.txt to describe which depedencies to install, in which version, where to install them, where to download them, with which package manager and with which configuration.

A global packagedepedencies.txt defining the common dependencies with specific packagedependencies_os.txt files defining dependencies which are specific for each os are available in the parent GIT repository SolAR, and can be downloaded on the following link:

Copy these files where you want on your computer, open a command prompt in the folder where you have copied the packagedependencies.txt and packagedependencies_os.txt files, and run remaken with the following command:

remaken install packagedependencies.txt

This command will install all SolAR dependencies in release mode in your ${HOME}/.remaken/packages folder. You can go and have a cup of coffee while it’s downloading.

To download the dependencies in debug mode, run the following command:

remaken install -c debug packagedependencies.txt
You do not need to launch remaken install on packagedependencies_linux. remaken install packagedependencies.txt will automatically load it depending on the platform you are executing it.

This is done, all your dependencies are downloaded and ready to use !

Some of the module will download and build third parties using Conan which requires CMake (minimum version 3.10).

Build SolAR v0.9.0

Clone SolAR

SolAR is made up of a multitude of projects (SolAR Framework, SolAR pipeline manager, modules, samples, etc.). To help you, we have created a parent repository with sub-modules regrouping all source codes of SolAR projects. You can clone it from the following url: https://github.com/SolarFramework/SolAR.git

No space in the path of the folder where you are cloning SolAR !
git clone --recurse-submodules https://github.com/SolarFramework/SolAR.git

If you forgot to use --recurse-submodules, you can initialize the submodules afterwards with:

cd SolAR
git submodule update --init --recursive

If you want to move all submodules on HEAD of master, launch the following commands

git submodule foreach --recursive git checkout master
git submodule foreach --recursive git pull

If you do not want to download all the source codes of SolAR, you can have a look to the different repositories available on Github on the Community/Git page.

Build on Qt Creator

Counting the framework, the pipeline manager, modules, module tests, samples, pipelines, pipeline tests, there are more than 60 QT projects on GitHub. In order to ease the building of all this projects, they are grouped in the following parent QT projects available into the root folder of SolAR:

  • SolARCore

  • SolARAllModules

  • SolARAllModulesTests

  • SolARAllSamples

  • SolARAllPipelines

  • SolARAllPipelineTests

You can open one of them or all in QT Creator.

If you have not yet run a qmake on each project, some error could appear concerning the fact thta conanbuildinfo.pri files do not exist. This is normal, run qmake on each project will create these files, and the error message will no longer appear.

Check by clicking on the Projects tab, and then on the Manage Kits…​ button that your Qt x.x.x GCC 64 bit kit is well configured.

Now, you have to configure your parent project before building them. In your project build settings of your kit, for each configuration (release and debug), add the following argument to the Builds Steps > Make step:

  • SolARCore: install

  • SolARAllModules: install and install_deps

  • SolARAllModulesTests: install and install_deps

  • SolARAllSamples: install and install_deps

  • SolARAllPipelines: install

  • SolARAllPipelineTests: install and install_deps

The install step will copy the built binaries into ${HOME}/.remaken/packages, and the install_deps step will also copy its dependencies.

Since QT Creator 4.14.0, we highly recommand to set the project option qmake system() behavior when parsing to Ignore to highly reduce the project loading time. But do not forget to run qmake on projects before building them.
Add install argurment
Figure 1. Add install and install_deps argument for Debug and Release mode.

If you open several projects, you will have to set their build order. You can do it in QT Creator by defining the dependencies of each project in the Projects menu, select your project, click and Dependencies, and check the projects that depend directly on the selected project (checking `Synchronize configuration' will synchronize all projects in Debug or Release configuration).

Edit build settings
Figure 2. Project dependencies settings
Table 2. Project dependencies
Project Project dependencies

SolARAllModules

SolARCore

SolARAllModulesTests

SolARAllModules

SolARAllPipelines

SolARAllModules

SolARAllPipelineTests

SolARAllPipelines

SolARAllSamples

SolARAllModules

SolARCore

No dependency

Then, in the Build menu, click on Rebuild All Projects for All Configurations, and go get a cup of coffee.

Q&A

Remaken does not work

Be sure to install, init and use Remaken from a command prompt with admin rights. You can check that cmake, pkg-config and conan are well installed with the following command:

cmake -version
pkg-config --version
conan -v