2 if [ ! -f $PWD/scripts/CreaTools-configure.sh ]
6 echo "==================================================="
9 echo "YOU NEED TO RUN 'Configure' (0) First !"
10 echo "==================================================="
16 source $PWD/scripts/CreaTools-configure.sh
19 echo $PWD/scripts/CreaTools-configure.sh
20 echo --generationdir--
22 echo --docgeneration--
24 echo --installPrefix--
26 echo --installPrefixThird--
27 echo $installPrefixThird
32 # echo --sourcesFrom--
36 # echo --start_point--
42 sourcesDir=$generationdir/thirdparty_sources
43 binDir=$generationdir/thirdparty_bin
45 if [ ! -e $generationdir ]
53 # the following stupid test is used at debug time; Please don't remove!
58 case "$OperatingSystem" in
61 yum install cmake-gui -y
62 yum install doxygen -y
63 yum install graphviz -y
64 yum install texlive -y
65 yum install latex2html -y
66 yum install wxGTK-devel wxBase -y
67 yum install boost-devel -y
68 yum install sqlite-devel -y
69 yum install qt-devel -y
70 yum install mesa-libOSMesa-devel -y
73 apt-get --yes install build-essential # esta linea instala las librerias necesarias para compilar en ubuntu, g++ gcc etc etc etc.
74 apt-get --yes install cmake
75 apt-get --yes install cmake-gui
76 apt-get --yes install cmake-curses-gui
77 apt-get --yes install doxygen
78 apt-get --yes install graphviz
79 apt-get --yes install texlive
80 apt-get --yes install latex2html
81 apt-get --yes install libgtk2.0-dev #GTK
82 apt-get --yes install libwxgtk2.8-dev #Wx GTK
83 apt-get --yes install libwxbase2.8-dev #Wx solito
84 apt-get --yes install libboost-dev #Boost
85 apt-get --yes install libboost-all-dev #Boost
86 apt-get --yes install libqt4-dev #QT4
87 apt-get --yes install sqlite
88 apt-get --yes install libsqlite0-dev
89 apt-get --yes install libosmesa6-dev #Mesa6
90 apt-get --yes install uuid-dev # uuid para la instalacion de itk
91 apt-get --yes install libxaw7-dev # X11
94 # QUESTION : is -y mandatory?
97 port install cmake-gui -y
98 port install doxygen -y
99 port install graphviz -y
100 port install texlive -y
101 port install latex2html -y
102 port install wxGTK-devel wxBase -y
103 port install boost-devel -y
104 port install sqlite-devel -y
105 port install qt-devel -y
106 port install mesa-libOSMesa-devel -y
109 #echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem "
110 echo " Allowed values are (right now) Fedora, Ubuntu, MacOS "
118 # the following stupid test is used at debug time; Please don't remove!
122 rm -rf $sourcesDir/VTK*
123 rm -rf $sourcesDir/vtk*
124 rm -rf $sourcesDir/InsightToolkit*
125 rm -rf $sourcesDir/gdcm*
126 rm -rf $sourcesDir/tth*
129 rm -rf $binDir/InsightToolkit*
133 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/vtk-5.6.1.tar.gz
134 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/gdcm_08_Dic_2009.tar.gz
135 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
136 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_Developer_Tools/All_Versions/tth/tth_linux/tth
138 tar -xvzf vtk-5.6.1.tar.gz
139 tar -xvzf gdcm_08_Dic_2009.tar.gz
140 tar -xvzf InsightToolkit-3.20.0.tar.gz
144 if [ $buildType = "Debug" ]
155 dirInstall=$binDir/$libname-Bin
156 dirInstallVTK=$dirInstall
157 export VTK_DIR=$installPrefixThird/lib/vtk-5.6/
160 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
161 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
162 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
163 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
173 dirInstall=$binDir/$libname-Bin
174 export GDCM_DIR=$installPrefixThird/lib/gdcm/
177 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
178 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
179 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
180 cmake -D VTK_DIR:PATH=$dirInstallVTK CMakeCache.txt
181 cmake -D GDCM_VTK:BOOL=ON -D GDCM_NAME_SPACE:STRING=gdcm13 CMakeCache.txt
189 libname=InsightToolkit-3.20.0
190 dirInstall=$binDir/$libname-Bin
191 export ITK_DIR=$installPrefixThird/lib/InsightToolkit/
194 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
195 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
196 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
197 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
208 cp tth $installPrefixThird/bin
212 #deal with create creatools_third_party_libraries_config.sh
214 if [ -f $installPrefixThird/share/creatools_third_party_library_config.sh ]
216 rm $installPrefixThird/share/creatools_third_party_library_config.sh
219 if [ ! -e $installPrefixThird/share ]
221 mkdir $installPrefixThird/share
223 touch $installPrefixThird/share/creatools_third_party_library_config.sh
224 chmod 755 $installPrefixThird/share/creatools_third_party_library_config.sh
226 echo export PATH='$'PATH:$installPrefixThird/bin >> $installPrefixThird/share/creatools_third_party_library_config.sh
227 echo export VTK_DIR=$installPrefixThird/lib/vtk-5.6 >> $installPrefixThird/share/creatools_third_party_library_config.sh
228 echo export ITK_DIR=$installPrefixThird/lib/InsightToolkit >> $installPrefixThird/share/creatools_third_party_library_config.sh
229 echo export GDCM_DIR=$installPrefixThird/lib/gdcm >> $installPrefixThird/share/creatools_third_party_library_config.sh
230 echo export TTH=$installPrefixThird/bin/tth >> $installPrefixThird/share/creatools_third_party_library_config.sh
231 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
232 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$ITK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
233 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
236 # - remove line 'sh $installPrefixThird/share/creatools_third_party_library_config.sh' if any (with accurate value for ???)
237 sed -i -e '/.*installPrefixThird*/ d' /etc/bashrc
238 sed -i -e '/.*creatools_third_party_library_config.*/ d' /etc/bashrc
240 # - add line 'sh $installPrefixThird/share/creatools_third_party_library_config.sh' (with accurate value for ???)
241 echo installPrefixThird=$installPrefix >> /etc/bashrc
242 echo '[ -f "$installPrefixThird/share/creatools_third_party_library_config.sh" ] && source $installPrefixThird/share/creatools_third_party_library_config.sh' >> /etc/bashrc