Install MicMac Ubuntu : Différence entre versions

De MicMac
Aller à : navigation, rechercher
(Build sources)
Ligne 16 : Ligne 16 :
 
It can take some times.
 
It can take some times.
  
== Build sources ==
+
== Build from sources ==
 
From the installation directory, move to the 'culture3d' directory :
 
From the installation directory, move to the 'culture3d' directory :
 
<pre>cd culture3d</pre>
 
<pre>cd culture3d</pre>
Ligne 25 : Ligne 25 :
 
</pre>
 
</pre>
 
Then we have to generate the makefile : <code>cmake ../</code>
 
Then we have to generate the makefile : <code>cmake ../</code>
If you want to use graphical interfaces (SaisieAppuisInitQT etc...), use
+
 
 
<pre>
 
<pre>
cmake -DWITH_QT5=1 ../
+
cmake ..
 
</pre>
 
</pre>
You have to install QT (version 5 here, use "-DWITH_QT4=1" instead if ou have QT v4). If you don't have QT, install it with this command:
 
<code>sudo apt-get install qt5-default qttools5-dev-tools</code>
 
 
Now we can finally build the sources by launching :
 
Now we can finally build the sources by launching :
 
<pre>
 
<pre>
Ligne 36 : Ligne 34 :
 
</pre>
 
</pre>
 
Where K="number of processor in your computer" (if you are not sure how many cores you have, just write a big number and all of the cores will be used).
 
Where K="number of processor in your computer" (if you are not sure how many cores you have, just write a big number and all of the cores will be used).
 +
 +
=== With Qt tools ===
 +
If you want to use graphical interfaces (SaisieAppuisInitQT, SaisieMasqQTetc...), use instead :
 +
<pre>cmake -DWITH_QT5=1 ../</pre>
 +
You have perhaps to install QT so you can run :
 +
<pre>sudo apt-get install qt5-default qttools5-dev-tools</pre>
 +
Version 5 is used here, use "-DWITH_QT4=1" instead if ou have QT v4.
  
 
==Add MicMac to path==
 
==Add MicMac to path==

Version du 27 août 2016 à 16:42

MicMac is an open source project and you can download the source code and compile the project yourself. This page presents the steps of the installation on a Linux system using apt-get (such as Ubuntu), but similar steps work on other systems.

Beware : the code available in the latest revision might not be stable or might not compile in a given OS.

Install mercurial

The MicMac project is hosted by a mercurial repository, so first you have to install mercurial.

sudo apt-get install mercurial

Download the source

Go to the installation directory, where you want to install MicMac then launch

hg clone https://geoportail.forge.ign.fr/hg/culture3d
login: culture3d
pswd: culture3d

It can take some times.

Build from sources

From the installation directory, move to the 'culture3d' directory :

cd culture3d

Then, you have to create a build directory and go in it :

mkdir build
cd build

Then we have to generate the makefile : cmake ../

cmake ..

Now we can finally build the sources by launching :

make install -jK

Where K="number of processor in your computer" (if you are not sure how many cores you have, just write a big number and all of the cores will be used).

With Qt tools

If you want to use graphical interfaces (SaisieAppuisInitQT, SaisieMasqQTetc...), use instead :

cmake -DWITH_QT5=1 ../

You have perhaps to install QT so you can run :

sudo apt-get install qt5-default qttools5-dev-tools

Version 5 is used here, use "-DWITH_QT4=1" instead if ou have QT v4.

Add MicMac to path

We have now to edit the file wich contains environnement path which is located in "/etc/bash.bashrc". The file is maybe hidden, so press CTRL+H, or activate "Hidden files" in Display (Top bar). So open a terminal and type :

sudo gedit /etc/bash.bashrc

NB : files in "/etc/" have to be opened in super user mode.
Add the following lines at the bottom of the file :
export PATH=/micmac_install_directory/culture3d/bin:$PATH

Check Installation

List of MicMac tools

To check if MicMac is well installed, you can type in a terminal :

mm3d

This will return the list of all tools available for micmac library.

Check dependencies

Sometimes, even when the MicMac installation is good, you can encounter messages in the terminal such as :

  • "Warning Exiftool not installed"

This warnings means that MicMac can't find an external tools. MicMac integrates a module which can check if all dependencies are correctly installed. It can be called by typing :

mm3d CheckDependencies
Exemple d'image en hauteur
Screenshot 1

You will get an output like Screenshot 1, with different informations :

  • MicMac revision : micmac source code version number
  • Qt : "enabled" permit you to use graphical interfaces such SaisieAppuisQT
  • Kakadu : Image library for JPEG2000 management
  • MicMac directory : Directory where MicMac is installed
  • make :
  • exiftool : library of image metadata management
  • exiv2 : library of image metadata management
  • convert :
  • proj : library for cartographic projection
  • cs2cs :

Update sources

To update the sources, go in the installtion directory ("installation_directory/culture3d") and type:

hg pull https://geoportail.forge.ign.fr/hg/culture3d
login: culture3d
pswd: culture3d

Then upload the sources with the command:

hg update

You have now to build again the sources:

cd build
cmake -DWITH_QT5=1 ../
make install -j8

Known problems

Errors with cmake

  • ...Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR)... => Try to install Qt