TerraLib and TerraView Wiki Page

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
wiki:documentation:devguide:build [2018/05/03 15:10]
marisa [Building on Microsoft Windows with Microsoft Visual C++ 2013]
wiki:documentation:devguide:build [2018/09/17 10:33]
marisa
Line 10: Line 10:
   * Linux Ubuntu 14.04 and 16.04   * Linux Ubuntu 14.04 and 16.04
   * Mac OS X Yosemite, El Capitan and Sierra   * Mac OS X Yosemite, El Capitan and Sierra
-  * Microsoft ​Windows 7 and Windows 10+  * Microsoft Windows 10
  
-You should use at least CMake version ​2.8.12 for building TerraLib. Older versions than this may not work properly.+You should use at least CMake version ​3.11 for building TerraLib. Older versions than this may not work properly.
  
 Follow the build steps below according to your platform. Follow the build steps below according to your platform.
  
-===== Building on Microsoft Windows with Microsoft Visual C++ 2013 =====+===== Building on Microsoft Windows with Microsoft Visual C++ 2017 =====
  
-**1.** Microsoft Visual Studio ​2013 C++ users can download and unpack the suitable third-party libraries compiled for building 64-bit version of TerraLib with Qt5.4.1 support. Choose the right version specified by ''​x.y.z''​ at terralib-x.y.z-3rdparty-msvc-2013-win64:+**1.** Microsoft Visual Studio ​2017 C++ users can download and unpack the suitable third-party libraries compiled for building 64-bit version of TerraLib with Qt5.10.1 support. Choose the right version specified by ''​x.y.z''​ at terralib-x.y.z-3rdparty-msvc-2017-win64:
  
   *[[http://​www.dpi.inpe.br/​terralib5/​terralib5-3rdparty/​|Choose the right version specified by x.y.z]]   *[[http://​www.dpi.inpe.br/​terralib5/​terralib5-3rdparty/​|Choose the right version specified by x.y.z]]
-  * Note that the same terralib5-3rdparty are used to build [[http://​www.dpi.inpe.br/​terralib5/​terralib5-3rdparty/​terralib-5.3.2-and-5.3.1-and-5.3.0-3rdparty-msvc-2013-win64.zip| 5.3.2, 5.3.1 and 5.3.0]] 
  
-  * Note that the same terralib5-3rdparty are used to build [[http://​www.dpi.inpe.br/​terralib5/​terralib5-3rdparty/terralib-5.2.2-and-5.2.3-3rdparty-msvc-2013-win64.zip5.2.2 and 5.2.3]] +Alternatively,​ download ​the most updated third-party library ​used by developers working at DEVELOP branch ​[[http://​www.dpi.inpe.br/​terralib5-devel/3rdparty/bin|here]]. 
-  * Note that the same terralib5-3rdparty are used to build more than one version [[http://​www.dpi.inpe.br/​terralib5/​terralib5-3rdparty/​terralib-5.1.z-3rdparty-msvc-2013-win64.zip| ​5.1.2,​5.1.3,​5.1.4 and 5.1.5]]+  
 +To work in RELEASE-5.Y branches go to the 5.Y corresponding directory to access the right third party used.
  
-Alternatively,​ download the most updated third-party library used by developers at [[http://​www.dpi.inpe.br/​terralib5-devel/​3rdparty/​bin/​| binary package with all the dependencies]] +**2.** Uncompress the third-party ​package into a folder:
- +
-**2.** Uncompress the above package into a folder:+
 <​code>​ <​code>​
 c:​\terralib5\3rdparty c:​\terralib5\3rdparty
Line 52: Line 50:
  
   * Click in "Add entry":​   * Click in "Add entry":​
-    * Add new variable named **CMAKE_PREFIX_PATH**,​ select type as **PATH** and fill value with the dependencies ​path: ''​c:​\terralib5\3rdparty''​.+    * Add new variable named **CMAKE_PREFIX_PATH**((as a example c:​\terralib5\3rdparty;​c:​\terralib5\3rdparty/​lib/​cmake/​terralib-4.2.2;​C:/​Qt/​Qt5.4.1/​5.4/​msvc2013_64_opengl/​lib/​cmake;​c:​\terralib5\3rdparty\lib\cmake\wtss_cxx-0.4.0;​c:​\Python366)), select type as **PATH** and fill its value with the following ​dependencies ​paths separated by semicolon (;)
  
-  * At the same **CMAKE_PREFIX_PATH** variable, add the following locations separeted by ";":​ +^Dependencies^PATH^ 
-    * Qt5 path: ''​c:​\<​Qt5 path>​\lib\cmake''​ (or something similar)((This is the folder where the dir **Qt5** containing the **Qt5Config.cmake** file can be find)). +|third-party| ''​c:\terralib5\3rdparty''​| 
-    ​* ​Terralib4 ​path: ''​c:​\terralib5\3rdparty\lib\cmake\terralib-4.2.2''​ +|Qt         ​| ​''​c:​\<​Qt5 path>​\lib\cmake''​ (or something similar)((This is the folder where the dir **Qt5** containing the **Qt5Config.cmake** file can be find))| 
-    ​* Swig path: ''​c:​\terralib5\3rdparty\swig''​+|Terralib4 ​''​c:​\terralib5\3rdparty\lib\cmake\terralib-4.2.2''​| 
 +|Python ​   ''​c:​\Python366''​|
  
   * Click in "​Configure"​ button.   * Click in "​Configure"​ button.
-    * Select option "​Visual Studio ​12 2013 Win64"​ +    * Select option "​Visual Studio ​15 2017 Win64"​ 
-    * If the output folder does not exist, CMake GUI will prompt you for creating it: just confirm the creation.+    * If the output folder ​(c:​\terralib5\build) ​does not exist, CMake GUI will prompt you for creating it: just confirm the creation.
  
   * if no problem occurs, set the following variables:   * if no problem occurs, set the following variables:
-    * CPACK => See the CPACK entries and keep ON onlythe NSIS package generator (used in release). All other kind of packages must be disabled. + 
-    ​* ​TERRALIB ​entry => See the TERRALIB entries and set +^Entry^Variable^Value^ 
-      * TERRALIB_BUILD_AS_BUNDLE ​=> ON +|CPACK| CPACK_BINARY_NSYS| ​ON ((package generator (used in release)-disable the others))| 
-      ​* ​TERRALIB_BUILD_AS_DEV ​=> ON +|TERRALIBTERRALIB_BUILD_AS_BUNDLEON| 
-      ​* ​TERRALIB_TRACK_3RDPARTY_DEPENDENCIES ​=> ON +|TERRALIB| ​TERRALIB_BUILD_AS_DEVON| 
-      ​* ​TERRALIB_QHELP_ENABLED ​=> ON   +|TERRALIB| ​TERRALIB_TRACK_3RDPARTY_DEPENDENCIESON| 
-    ​* ​ Some projects may be disabled through the following variables:​ +|TERRALIB| ​TERRALIB_QHELP_ENABLEDON
-    ​* ​TERRALIB_DOXYGEN_ENABLED ​=> OFF  ​=> ​if you want to distribute the API documentation this should be turn to on. But keep in mind that this option may take a considerable time, so you should do this only for final releases. +|TERRALIB| TERRALIB_QTRANSLATION_ENABLED| ON| 
-    ​* ​TERRALIB_BUILD_EXAMPLES_ENABLED ​=> OFF +|TERRALIB| TERRALIB_MOD_VM_ENABLED| ON ((it enable TERRALIB_MOD_VM_PYTHON_ENABLED,​TERRALIB_MOD_VM_LUA_ENABLED))| 
-    ​* ​TERRALIB_BUILD_UNITTEST_ENABLED ​=> OFF + 
-   ​+  ​Some projects may be disabled through the following variables:​ 
 + 
 +|TERRALIB| ​TERRALIB_DOXYGEN_ENABLED ​OFF((if you want to distribute the API documentation this should be turn to on. But keep in mind that this option may take a considerable time, so you should do this only for final releases))| 
 +|TERRALIB| ​TERRALIB_BUILD_EXAMPLES_ENABLED ​OFF| 
 +|TERRALIB| ​TERRALIB_BUILD_UNITTEST_ENABLED ​OFF| 
   * Press ''​Configure''​ again.   * Press ''​Configure''​ again.
-    ​ +  * Some entries might not be filled automatically by cmake, so do it manually. Examples of entries not filled are: 
-  * Press "Generate": this will generate a solution file for Visual Studio ​2013 under the folder ''​c:​\terralib5\build''​ ((The location set in "Where to build the binaries"​)).+ 
 +|Boost| Boost_PYTHON_LIBRARY_RELEASE |''​c:​\terralib5\3rdparty\lib/​boost_python3-mt.lib''​| 
 +|Boost| Boost_PYTHON_LIBRARY_DEBUG |''​c:​\terralib5\3rdparty\lib/​boost_python3-mt-gd.lib''​| 
 +|Qscintilla| Qscintilla_LIBRARY_RELEASE |''​c:​\terralib5\3rdparty\lib/​qscintilla2.lib''​| 
 + 
 +  * Press ''​Configure''​ again. ​   ​ 
 +  * Press ''​Generate''​: this will generate a solution file for Visual Studio ​2017 under the folder ''​c:​\terralib5\build''​ ((The location set in "Where to build the binaries"​)).
  
 **5.** Open the solution file located at: **5.** Open the solution file located at:
Line 217: Line 227:
 DYLD_FALLBACK_FRAMEWORK_PATH DYLD_FALLBACK_FRAMEWORK_PATH
 </​code>​ </​code>​
 +
 +
 +===== Building on Microsoft Windows with Microsoft Visual C++ 2013 =====
 +
 +**1.** Microsoft Visual Studio 2013 C++ users can download and unpack the suitable third-party libraries compiled for building 64-bit version of TerraLib with Qt5.4.1 support. Choose the right version specified by ''​x.y.z''​ at terralib-x.y.z-3rdparty-msvc-2013-win64:​
 +
 +  *[[http://​www.dpi.inpe.br/​terralib5/​terralib5-3rdparty/​|Choose the right version specified by x.y.z]]
 +  * Note that the same terralib5-3rdparty are used to build [[http://​www.dpi.inpe.br/​terralib5/​terralib5-3rdparty/​terralib-5.3.2-and-5.3.1-and-5.3.0-3rdparty-msvc-2013-win64.zip| 5.3.2, 5.3.1 and 5.3.0]]
 +
 +  * Note that the same terralib5-3rdparty are used to build [[http://​www.dpi.inpe.br/​terralib5/​terralib5-3rdparty/​terralib-5.2.2-and-5.2.3-3rdparty-msvc-2013-win64.zip| 5.2.2 and 5.2.3]]
 +  * Note that the same terralib5-3rdparty are used to build more than one version [[http://​www.dpi.inpe.br/​terralib5/​terralib5-3rdparty/​terralib-5.1.z-3rdparty-msvc-2013-win64.zip| 5.1.2,​5.1.3,​5.1.4 and 5.1.5]]
 +
 +Alternatively,​ download the most updated third-party library used by developers at [[http://​www.dpi.inpe.br/​terralib5-devel/​3rdparty/​bin/​| binary package with all the dependencies]]
 +
 +**2.** Uncompress the above package into a folder:
 +<​code>​
 +c:​\terralib5\3rdparty
 +</​code>​
 +
 +**3.** We will assume that the codebase ([[http://​www.dpi.inpe.br/​terralib5/​wiki/​doku.php?​id=wiki:​documentation:​devguide:​cloning |all the source tree ]]) is located at:
 +<​code>​
 +c:​\terralib5\codebase
 +</​code>​
 +
 +**4.** Open the CMake GUI:
 +  * Set the "Where is the source code" edit text to:
 +<​code>​
 +c:​\terralib5\codebase\build\cmake
 +</​code>​
 +
 +  * Set the "Where to build the binaries"​ edit text to:
 +<​code>​
 +c:​\terralib5\build
 +</​code>​
 +
 +  * Mark the "​Grouped"​ and "​Advanced"​ check box.
 +
 +  * Click in "Add entry":​
 +    * Add new variable named **CMAKE_PREFIX_PATH**,​ select type as **PATH** and fill value with the dependencies path: ''​c:​\terralib5\3rdparty''​.
 +
 +  * At the same **CMAKE_PREFIX_PATH** variable, add the following locations separeted by ";":​
 +    * Qt5 path: ''​c:​\<​Qt5 path>​\lib\cmake''​ (or something similar)((This is the folder where the dir **Qt5** containing the **Qt5Config.cmake** file can be find)).
 +    * Terralib4 path: ''​c:​\terralib5\3rdparty\lib\cmake\terralib-4.2.2''​
 +    * Swig path: ''​c:​\terralib5\3rdparty\swig''​
 +
 +  * Click in "​Configure"​ button.
 +    * Select option "​Visual Studio 12 2013 Win64"
 +    * If the output folder does not exist, CMake GUI will prompt you for creating it: just confirm the creation.
 +
 +  * if no problem occurs, set the following variables:
 +    * CPACK => See the CPACK entries and keep ON onlythe NSIS package generator (used in release). All other kind of packages must be disabled.
 +    * TERRALIB entry => See the TERRALIB entries and set
 +      * TERRALIB_BUILD_AS_BUNDLE => ON
 +      * TERRALIB_BUILD_AS_DEV => ON
 +      * TERRALIB_TRACK_3RDPARTY_DEPENDENCIES => ON
 +      * TERRALIB_QHELP_ENABLED => ON  ​
 +    *  Some projects may be disabled through the following variables:
 +    * TERRALIB_DOXYGEN_ENABLED => OFF  => if you want to distribute the API documentation this should be turn to on. But keep in mind that this option may take a considerable time, so you should do this only for final releases.
 +    * TERRALIB_BUILD_EXAMPLES_ENABLED => OFF
 +    * TERRALIB_BUILD_UNITTEST_ENABLED => OFF
 +   
 +  * Press ''​Configure''​ again.
 +    ​
 +  * Press "​Generate":​ this will generate a solution file for Visual Studio 2013 under the folder ''​c:​\terralib5\build''​ ((The location set in "Where to build the binaries"​)).
 +
 +**5.** Open the solution file located at:
 +<​code>​
 +c:​\terralib5\build\terralib.sln or press ''​Open Project''​
 +</​code>​
 +
 +**6.** Build ALL_BUILD ((Inside Visual Studio, right click over the project ALL_BUILD and build)), and before running, set it as ''​StartUp''​ Project and set the local environment of terraview project ((terraview->​Properties->​Configuration Properties->​ Debugging, set the Environment entry as ''​PATH=c:​\terralib5\3rdparty\lib;​c:​\<​Qt5 path>​\bin''​)).
 +
 +**7.** If TERRALIB_BUILD_EXAMPLES_ENABLED => ON or TERRALIB_BUILD_EXAMPLES_ENABLED => ON: to run and debug one of the terralib_example_* or terralib_unitest_*,​ set it as ''​StartUp''​ Project and make sure the data ([[http://​www.dpi.inpe.br/​terralib5-devel/​data/​data.zip| data.zip]]) used by these examples/​unittest are uncompressed at the default directory specified by TERRALIB_DATA_DIR :   
 +   ​TERRALIB_DATA_DIR ​  ​C:​\terralib\build-win64\data