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--
24 echo --docgeneration--
26 echo --installPrefix--
28 echo --installPrefixThird--
29 echo $installPrefixThird
34 # echo --sourcesFrom--
38 # echo --start_point--
44 sourcesDir=$generationdir/thirdparty_sources
45 binDir=$generationdir/thirdparty_bin
47 if [ ! -e $generationdir ]
50 chown $loginUserName:$loginGroupName $generationdir
52 if [ ! -e $sourcesDir ]
55 chown $loginUserName:$loginGroupName $sourcesDir
61 chown $loginUserName:$loginGroupName $binDir
65 # the following stupid test is used at debug time; Please don't remove!
70 case "$OperatingSystem" in
73 yum install cmake-gui -y
74 yum install doxygen -y
75 yum install graphviz -y
76 yum install texlive -y
77 yum install latex2html -y
78 yum install wxGTK-devel wxBase -y
79 yum install boost-devel -y
80 yum install sqlite-devel -y
81 yum install qt-devel -y
82 yum install mesa-libOSMesa-devel -y
85 apt-get --yes install build-essential # esta linea instala las librerias necesarias para compilar en ubuntu, g++ gcc etc etc etc.
86 apt-get --yes install cmake
87 apt-get --yes install cmake-gui
88 apt-get --yes install cmake-curses-gui
89 apt-get --yes install doxygen
90 apt-get --yes install graphviz
91 apt-get --yes install texlive
92 apt-get --yes install latex2html
93 apt-get --yes install libgtk2.0-dev #GTK
94 apt-get --yes install libwxgtk2.8-dev #Wx GTK
95 apt-get --yes install libwxbase2.8-dev #Wx solito
96 apt-get --yes install libboost-dev #Boost
97 apt-get --yes install libboost-all-dev #Boost
98 apt-get --yes install libqt4-dev #QT4
99 apt-get --yes install sqlite
100 apt-get --yes install libsqlite0-dev
101 apt-get --yes install libosmesa6-dev #Mesa6
102 apt-get --yes install uuid-dev # uuid para la instalacion de itk
103 apt-get --yes install libxaw7-dev # X11
106 # QUESTION : is -y mandatory?
108 port install cmake -y
109 port install cmake-gui -y
110 port install doxygen -y
111 port install graphviz -y
112 port install texlive -y
113 port install latex2html -y
114 port install wxGTK-devel wxBase -y
115 port install boost-devel -y
116 port install sqlite-devel -y
117 port install qt-devel -y
118 port install mesa-libOSMesa-devel -y
121 #echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem "
122 echo " Allowed values are (right now) Fedora, Ubuntu, MacOS "
130 # the following stupid test is used at debug time; Please don't remove!
134 rm -rf $sourcesDir/VTK*
135 rm -rf $sourcesDir/vtk*
136 rm -rf $sourcesDir/InsightToolkit*
137 rm -rf $sourcesDir/gdcm*
138 rm -rf $sourcesDir/tth*
141 rm -rf $binDir/InsightToolkit*
144 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/VTK-5.6.1.patchCreatis.tar.gz
145 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/gdcm_05_Mai_2011.tar.gz
146 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
147 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_Developer_Tools/All_Versions/tth/tth_linux/tth
149 tar -xvzf VTK-5.6.1.patchCreatis.tar.gz
150 tar -xvzf gdcm_05_Mai_2011.tar.gz
151 tar -xvzf InsightToolkit-3.20.0.tar.gz
155 if [ $buildType = "Debug" ]
163 # the following stupid test is used at debug time; Please don't remove!
168 dirInstall=$binDir/$libname-Bin
169 dirInstallVTK=$dirInstall
170 export VTK_DIR=$installPrefixThird/lib/vtk-5.6/
174 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
175 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
176 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
177 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
184 # the following stupid test is used at debug time; Please don't remove!
189 dirInstall=$binDir/$libname-Bin
190 export GDCM_DIR=$installPrefixThird/lib/gdcm/
193 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
194 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
195 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
196 cmake -D VTK_DIR:PATH=$dirInstallVTK CMakeCache.txt
197 cmake -D GDCM_VTK:BOOL=ON -D GDCM_NAME_SPACE:STRING=gdcm13 CMakeCache.txt
203 # the following stupid test is used at debug time; Please don't remove!
207 libname=InsightToolkit-3.20.0
208 dirInstall=$binDir/$libname-Bin
209 export ITK_DIR=$installPrefixThird/lib/InsightToolkit/
212 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
213 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
214 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
215 cmake -D BUILD_EXAMPLES:BOOL=OFF -D BUILD_TESTING:BOOL=OFF -D BUILD_SHARED_LIBS:BOOL=ON -D ITK_USE_REVIEW:BOOL=ON -D ITK_USE_REVIEW_STATISTICS:BOOL=ON CMakeCache.txt
216 #uncomment following line if you want to use the bleeding edge of GDCM2!
217 #cmake -D ITK_USE_SYSTEM_GDCM:BOOL=ON CMakeCache.txt
228 cp tth $installPrefixThird/bin
232 #deal with create creatools_third_party_libraries_config.sh
234 if [ -f $installPrefixThird/share/creatools_third_party_library_config.sh ]
236 rm $installPrefixThird/share/creatools_third_party_library_config.sh
239 if [ ! -e $installPrefixThird/share ]
241 mkdir $installPrefixThird/share
243 touch $installPrefixThird/share/creatools_third_party_library_config.sh
244 chmod 755 $installPrefixThird/share/creatools_third_party_library_config.sh
246 echo export PATH='$'PATH:$installPrefixThird/bin >> $installPrefixThird/share/creatools_third_party_library_config.sh
247 echo export VTK_DIR=$installPrefixThird/lib/vtk-5.6 >> $installPrefixThird/share/creatools_third_party_library_config.sh
248 echo export ITK_DIR=$installPrefixThird/lib/InsightToolkit >> $installPrefixThird/share/creatools_third_party_library_config.sh
249 echo export GDCM_DIR=$installPrefixThird/lib/gdcm >> $installPrefixThird/share/creatools_third_party_library_config.sh
250 echo export TTH=$installPrefixThird/bin/tth >> $installPrefixThird/share/creatools_third_party_library_config.sh
251 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
252 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$ITK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
253 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
256 # - remove line 'bash $installPrefixThird/share/creatools_third_party_library_config.sh' if any (with accurate value for ???)
258 # Install creatools as user (no longer as root) // JPR 2/5/2011
259 #if [ ! -f /etc/bashrc ]
261 # export ETC_BASHRC="/etc/bash.bashrc"
263 # export ETC_BASHRC="/etc/bashrc"
266 export ETC_BASHRC=$HOME/.bashrc
268 sed -i -e '/.*installPrefixThird*/ d' $ETC_BASHRC
269 sed -i -e '/.*creatools_third_party_library_config.*/ d' $ETC_BASHRC
272 # - add line 'bash $installPrefixThird/share/creatools_third_party_library_config.sh' (with accurate value for ???)
273 echo installPrefixThird=$installPrefixThird >> $ETC_BASHRC
274 echo '[ -f "$installPrefixThird/share/creatools_third_party_library_config.sh" ] && source $installPrefixThird/share/creatools_third_party_library_config.sh' >> $ETC_BASHRC
278 chown -R $loginUserName:$loginGroupName $generationdir