Direct dependencies
- Boost
- Open Scene Graph (a.k.a. OSG)
- GDAL (Geospatial Data Abstraction Library)
- Assimp
- LASlib: note that 3DUSE embarks its own copy
- Depending on your packaging system you might need to manually pull the following indirect dependencies:
- X11 server as QT sub-dependency
- Proj4 as gdal sub-dependency
- GEOS as gdal sub-dependency
Optional dependencies
- QT4 above version 4.8 or QT5 above version 5.4: when building the GUI
- Doxygen: when building the documentation (optional)
3DUSE is build (compiled, linked, installed) cmake
. Here is a short list of option flags that can be used to customize the building 3DUSE:
BUILD_GUI_QT4
andBUILD_GUI_QT5
enable to build the Graphical User Interface (GUI) of 3DUSE respectively with using QT4 or QT5- Flags of the form
BUILD_CityGML<something>QtPlugin
(e.g.BUILD_CityGMLCutQtPlugin
orBUILD_CityGMLSunlightQtPlugin
) toggle the build of optional 3DUSE plugins (based on QT plugin mechanism). Unsurprisingly enough theBUILD_ALL_PLUGINS
option flag will trigger the build of all plugins. BUILD_DOCUMENTATION
enables the building of the Doxygen based documentation of 3DUSE.BUILD_EMBARKED_OSG-QT_32
andBUILD_EMBARKED_OSG-QT_34
enable to build a 3DUSE embarked version of the interface of OpenSceneGraph (OSG) within QT
- Note: a Docker-aware impatient might make good use of this DockerFile
- Classic package installation with
apt-get
command:sudo apt-get install qt4-default libopenscenegraph-dev libassimp-dev
sudo apt-get install libboost-all-dev
- When building with the PCL extension (
BUILD_PCL
set to ON within cmake):- Install sub-dependencies:
apt-get install libeigen3-dev libflann-dev libqhull-dev
- Easy (recommended for newbie) Point Cloud library installation out of 3DUSE provided [tarball](https://en.wikipedia.org/wiki/Tar_(computing) (pre-configured sources):
cd /tmp && wget https://download.gforge.liris.cnrs.fr/meppbin/travis-trusty/pcl-pcl-1.7.2.travis-trusty.tgz
tar zxf pcl-pcl-1.7.2.travis-trusty.tgz && cd pcl-pcl-1.7.2/buildR
sudo make install
- Alternatively (more advanced installer) proceed with PCL standard installation (out of git repository): refer e.g. to LarryLisky's install notes.
- Install sub-dependencies:
- Manual installation of LASlib
- With access rigths to
/usr/local/
:cd 3DUSE/externals/laslib
mkdir Build && cd Build
cmake .. -DCMAKE_BUILD_TYPE=Release && make
sudo make install
- Proceed with building of 3DUSE
- Without access rights to
/usr/local/
:cd 3DUSE/externals/laslib
mkdir Build && cd Build
cmake .. -DCMAKE_INSTALL_PREFIX=~/local/LASlib
(or choose an alternate installation directory in your home directory or a stable direcory why proper access rights)cd 3DUSE
mkdir Build && cd Build
ccmake .. -DLASLIB_INCLUDE_DIR=~/local/LASlib/include -DLASLIB_LIBRARY=~/local/LASlib/lib/liblaslib.a
- With access rigths to
- Manual installation of gdal (3DUSE currently uses gdal version 1.11.4 and is not aligned with versions 2.xxx)
cd /tmp
wget http://download.osgeo.org/gdal/1.11.4/gdal-1.11.4.tar.gz
tar zxvf gdal-1.11.4.tar.gz
cd gdal-1.11.4
mkdir $HOME/local/
./configure --prefix=$HOME/local/gdal-1.11.4
make
make install
git clone https://github.com/MEPP-team/3DUSE.git
cd 3DUSE
mkdir Build && cd Build
ccmake ..
- Position the following configuration variables:
- GDAL_INCLUDE_DIR=$HOME/local/gdal-1.11.4/include
- GDAL_LIBRARY=$HOME/local/gdal-1.11.4/lib/libgdal.so
make
Post-install goodies (not 3DUSE related):
- QtCreator :
apt-get install qtcreator
- Obtain and install Homebrew
brew upgrade boost
brew install Caskroom/cask/xquartz
(X11 server)brew install gdal
brew install open-scene-graph
- Install OSGQT
- Important note: contratry to what is written in this issue
brew install open-scene-graph --with-qt
won't work with recent (say above OSG version 3.5.X) ! - Installation should be made out of osgQT independent library:
You might run into this issue (3DUSE complains about
mkdir /usr/local/stow cd /tmp git clone https://github.com/openscenegraph/osgQt.git cd osgQt mkdir Bin cd Bin cmake -DCMAKE_INSTALL_PREFIX=/usr/local/stow/osgqt .. make make instal cd /usr/local/stow stow osgqt
osgQt not found
) which can be solved (among other solutions) with providing an extra-DOSGQT_LIBRARY=/usr/local/lib/libosgQt5.dylib
cmake flag when configuring 3DUSE.
- Important note: contratry to what is written in this issue
brew install assimp
- Install laslib:
- The careful version with stow (
brew install stow
):cd 3DUSE/externals/laslib
mkdir Build && cd Build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/stow/laslib
make install
- `cd /usr/local/stow``
- `stow laslib``
- The careless version:
cd 3DUSE/externals/laslib
mkdir Build && cd Build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/stow/laslib
make install
- The careful version with stow (
Assert that proj and geos sub-dependencies where installed (e.g. with brew list | grep <pkg>
or brew info <pkg>
). Otherwise install them manually:
brew instal proj
(which is proj4)brew install geos
Optional installations
- GUI support: either with Qt4 or Qt5
- Qt4:
- Prior to El Capitan (10.10):
brew install qt
(which installs Qt4) - Starting with Sierra (10.12):
brew install cartr/qt4/qt
(refer to Homebrew-qt4
- Prior to El Capitan (10.10):
- Qt5:
brew install qt5
- Qt4:
- Documentation:
brew install doxygen graphviz
- PCL extension (
BUILD_PCL
set to ON within cmake):brew install homebrew/science/pcl --without-vtk --without-apps
git clone https://github.com/MEPP-team/3DUSE.git
cd 3DUSE
mkdir Bin && cd Bin
cmake ..
make
The following is a must when working on (but alas it does not suffice to get3DUSE compiled):
- OSX 10.14.5 (Mojave)
- homebrew (brew config): 2.1.11 (37714b5ce1e4909d4d61de2af98343c7012f7cd9)
- Before the cmake configuration of you might need to define
export Qt5_DIR=/usr/local/opt/qt/ # Because qt5 is keg only
- For GUI support with Mojave you should forget about Qt4 and opt for Qt5
brew install qt5
- Windows versions: Windows 7, Windows 8, Windows 8.1 or Windows 10
- Be sure to apply all required "services packs" and "windows updates"
- Visual Studio Express 2015:
- dowload LIRIS local copy
- Unrar the downloaded archive file (e.g. with 7-zip
- Enter the extracted folder (
Express 2015 up2 pour Wndowds Desktop
) and launch the installerwdexpress_full.exe
- On first invocation Visual Studio will ask for an email/passwd to "Connect to Visual Studio". Simply close this connection sub-window and proceed. You will be automatically granted with a 30 days free evaluation license. After this trial period:
- lauch Visual Studio,
- go to the
Help
menu, - select the "A propos Microsoft Visual Studio..." entry
- select the "State of the license" link (at the top of window)
- on the right column (not the Connect youself one) proceed by providing e.g. some Outlook junk email (google on Outlook email in order to create it).
- That pesky Express 2015 might complain from time to time that your licensed expired. In fact it didn't but MicroSpank is just "making sure" (hey it's a free version but they still keep you leash). In the right section of the pop-up window select "Search for a license update" provide the same email you already gave away (refer to previous section) and proceed with MicroSpank's lenghty (you might have to give your password three times, receive email codes...) "verification process".
- 3DUSE binary kit:
- download binary installer
- extract content (installation will require 3.1 Go of free disk space) to a target directory which full path name length (from
C:\
) must be shorter than 50 characters: placing the extracted directory, namedVCITY_local_vs2015_64
, intoC:\
orC:\Programs
is ok (avoid unstable directories like "Desktop" or "My Documents"). - Note: the extracted directory name (
VCITY_local_vs2015_64
) can be renamed if you need to.
- Obtain 3DUSE sources:
- Install (from github) the git for Windows client
- If you are using TortoiseGit here are some configuration notes
- Cmake version 3.4.3. (this version is Visual Studio 2015 aware):
- Extract cmake from
VCITY_local_vs2015_64\_utils_\cmake-3.4.3-win32-x86.zip
- Extract NSIS from `VCITY_local_vs2015_64_utils_\nsis-2.50-setup.exe``
- Extract cmake from
- Setting 3DUSE related environment variables:
- Warnings: for those upgrading from a previous 3DUSE version, make sure to remove any
3DUse
related variable. Also make sure to remove any previously setvs2012
variable
- Warnings: for those upgrading from a previous 3DUSE version, make sure to remove any
Optional dependencies
- Nullsoft Scriptable Install System (NSIS)
- only needed if you need to package 3DUSE versions for redistribution
- In order to build the documentation:
In order to build the "solution" you will first need to setup the following new environment variables (in order to define the building context i.e. in order to indicate where the dependency libraries are to be found):
VCITY_KIT_ROOT
to beC:/VCITY_local_vs2015_64
.BOOST_ROOT
to be%VCITY_KIT_ROOT%/boost_1_59_0
- When building with Qt5:
QT5_DIR
to be%VCITY_KIT_ROOT%/Qt/Qt5.6.0/5.6/msvc2015_64
Watch out: notice that for the above variables used path definitions where the separator is a (/
) character and NOT backslash (\
) character ! (Note: this is because those variables are used by CMake which internally uses the Unix convention for path separators)
Once the "solution" is build (see below), and for the impatient user, in order to run the application you will also need to:
- Add a traling
";C:\VCITY_local_vs2015_64\_bin_"
to yourPATH
environment variable (in order for the dynamic loader to find the dynamic libraries of the application dependencies) - Assuming you build the solution in e.g. the
c:\Users\MyLogin\3DUSE\MyBuild
directory add the following entries to yourPATH
environment variable: - Release mode
c:\Users\MyLogin\3DUSE\MyBuild\Release
- Debug mode
c:\Users\MyLogin\3DUSE\MyBuild\Debug
Watch out: notice that for the above run time variables the separator is now classically for Windows a backslash (\
) character !
Tips and notes:
- in order to assert that the environement variables are properly set open a dos command and either use
set
and look for the variable(s) you are checking or check a specific variable with e.g.echo %BOOST_ROOT%
. - When editing your
PATH
environment variable (and for versions of Windows requiring the edition of the pullPATH
as a string) don't forget to add the proper `";" as path separator - Note that prepending (as opposed to trailing) your
PATH
variable with the above mentionned directory paths might be safer (it will avoid possible conflicts with otherwise installed versions of QT or Graphviz...)
-
Clone the sources with some git client e.g.
- Tortoise git
- Git for Windows (provided by github). Configuring "git Bash" is documented here and the toubleshooting guide might be helpful. When debugging "cloning" the following commands should work:
ssh -T [email protected]
(refer here)git clone --verbose [email protected]:MEPP-team/3DUSE.git
-
Proceed with using cmake (
cmake-gui.exe
)- Configure stage warning: on the pop-up window that raises when configuring the cmake project assert that cmake detects the generator as being "Visual Studio 14 2015 Win64". Not only assert that the generator is Visual Studio 2015 (which is the 14th of Visual Studio) but also assert that the generated code is 64 bits (Win64). If it is not properly set then set it manually (with the rolling down menu).
- Set the optional cmake build flag
BUILD_EMBARKED_OSG-QT_34
toON
. - Unless you are a developer working on improving the regression tests, turn the cmake build flag
BUILD_UNMATURE_TESTS
toOFF
. - Open (with Visual Studio) the resulting project
3DUSE.sln
located in your build subdirectory (Bin
most often) and generate the solution
Select the RUN_TESTS
project and launch (right click) the tests by invoking Debug->Start a new instance