3 source $PWD/scripts/CreaTools-configure.sh
6 echo $PWD/scripts/CreaTools-configure.sh
26 sourcesDir=$generationdir/thirdparty_sources
27 binDir=$generationdir/thirdparty_bin
33 rm $installPrefix/share/creatools_third_party_library_config.sh
35 # the following stupid test is used at debug time; Please don't remove!
39 case "$OperatingSystem" in
42 yum install cmake-gui -y
43 yum install doxygen -y
44 yum install graphviz -y
45 yum install texlive -y
46 yum install latex2html -y
47 yum install wxGTK-devel wxBase -y
48 yum install boost-devel -y
49 yum install sqlite-devel -y
50 yum install qt-devel -y
51 yum install mesa-libOSMesa-devel -y
54 apt-get --yes install build-essential # esta linea instala las librerias necesarias para compilar en ubuntu, g++ gcc etc etc etc.
55 apt-get --yes install cmake
56 apt-get --yes install cmake-gui
57 apt-get --yes install cmake-curses-gui
58 apt-get --yes install doxygen
59 apt-get --yes install graphviz
60 apt-get --yes install texlive
61 apt-get --yes install latex2html
62 apt-get --yes install libgtk2.0-dev #GTK
63 apt-get --yes install libwxgtk2.8-dev #Wx GTK
64 apt-get --yes install libwxbase2.8-dev #Wx solito
65 apt-get --yes install libboost-dev #Boost
66 apt-get --yes install libboost-all-dev #Boost
67 apt-get --yes install libqt4-dev #QT4
68 apt-get --yes install sqlite
69 apt-get --yes install libsqlite0-dev
70 apt-get --yes install libosmesa6-dev #Mesa6
71 apt-get --yes install uuid-dev # uuid para la instalacion de itk
72 apt-get --yes install libxaw7-dev # X11
75 # QUESTION : is -y mandatory?
78 port install cmake-gui -y
79 port install doxygen -y
80 port install graphviz -y
81 port install texlive -y
82 port install latex2html -y
83 port install wxGTK-devel wxBase -y
84 port install boost-devel -y
85 port install sqlite-devel -y
86 port install qt-devel -y
87 port install mesa-libOSMesa-devel -y
90 #echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem "
91 echo " Allowed values are (right now) Fedora, Ubuntu, MacOS "
99 # the following stupid test is used at debug time; Please don't remove!
102 rm -rf $sourcesDir/VTK*
103 rm -rf $sourcesDir/vtk*
104 rm -rf $sourcesDir/InsightToolkit*
105 rm -rf $sourcesDir/gdcm*
106 rm -rf $sourcesDir/tth*
108 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/vtk-5.6.1.tar.gz
109 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/gdcm_08_Dic_2009.tar.gz
110 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
111 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_Developer_Tools/All_Versions/tth/tth_linux/tth
113 tar -xvzf vtk-5.6.1.tar.gz
114 tar -xvzf gdcm_08_Dic_2009.tar.gz
115 tar -xvzf InsightToolkit-3.20.0.tar.gz
120 if [ $buildType = "Debug" ]
131 dirInstall=$binDir/$libname-Bin
132 dirInstallVTK=$dirInstall
133 VTK_DIR=$installPrefix/lib/vtk-5.6/
135 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
136 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
137 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefix CMakeCache.txt
138 cmake -D BUILD_EXAMPLES:BOOL=OFF -D BUILD_TESTING:BOOL=OFF -D BUILD_SHARED_LIBS:BOOL=ON -D VTK_USE_QT:BOOL=ON CMakeCache.txt
147 dirInstall=$binDir/$libname-Bin
148 GDCM_DIR=$installPrefix/lib/gdcm/
151 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
152 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
153 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefix CMakeCache.txt
154 cmake -D VTK_DIR:PATH=$dirInstallVTK CMakeCache.txt
155 cmake -D GDCM_VTK:BOOL=ON -D GDCM_NAME_SPACE:STRING=gdcm13 CMakeCache.txt
163 libname=InsightToolkit-3.20.0
164 dirInstall=$binDir/$libname-Bin
165 ITK_DIR=$installPrefix/lib/InsightToolkit/
168 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
169 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
170 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefix CMakeCache.txt
171 cmake -D BUILD_EXAMPLES:BOOL=OFF -D BUILD_TESTING:BOOL=OFF -D BUILD_SHARED_LIBS:BOOL=ON -D ITK_USE_REVIEW:BOOL=ON CMakeCache.txt
182 cp tth $installPrefix/bin
185 #deal with create creatools_third_party_libraries_config.sh
187 touch $installPrefix/share/creatools_third_party_library_config.sh
188 chmod 755 $installPrefix/share/creatools_third_party_library_config.sh
190 echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_third_party_library_config.sh
191 echo export VTK_DIR=$installPrefix/lib/vtk-5.6 >> $installPrefix/share/creatools_third_party_library_config.sh
192 echo export ITK_DIR=$installPrefix/lib/InsightToolkit >> $installPrefix/share/creatools_third_party_library_config.sh
193 echo export GDCM_DIR=$installPrefix/lib/gdcm >> $installPrefix/share/creatools_third_party_library_config.sh
194 echo export TTH=$installPrefix/bin/tth >> $installPrefix/share/creatools_third_party_library_config.sh
195 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$GDCM_DIR >> $installPrefix/share/creatools_third_party_library_config.sh
196 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$ITK_DIR >> $installPrefix/share/creatools_third_party_library_config.sh
197 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$VTK_DIR >> $installPrefix/share/creatools_third_party_library_config.sh
200 # - remove line 'sh $installPrefix/share/creatools_third_party_library_config.sh' if any (with accurate value for ???)
201 sed -i -e '/.*creatools_third_party_library_config.*/ d' /etc/bashrc
203 # - add line 'sh $installPrefix/share/creatools_third_party_library_config.sh' (with accurate value for ???)
204 echo source $installPrefix/share/creatools_third_party_library_config.sh >> /etc/bashrc