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 ]
48 chown $loginUserName:$loginGroupName $generationdir
50 if [ ! -e $sourcesDir ]
61 # the following stupid test is used at debug time; Please don't remove!
66 case "$OperatingSystem" in
69 yum install cmake-gui -y
70 yum install doxygen -y
71 yum install graphviz -y
72 yum install texlive -y
73 yum install latex2html -y
74 yum install wxGTK-devel wxBase -y
75 yum install boost-devel -y
76 yum install sqlite-devel -y
77 yum install qt-devel -y
78 yum install mesa-libOSMesa-devel -y
81 apt-get --yes install build-essential # esta linea instala las librerias necesarias para compilar en ubuntu, g++ gcc etc etc etc.
82 apt-get --yes install cmake
83 apt-get --yes install cmake-gui
84 apt-get --yes install cmake-curses-gui
85 apt-get --yes install doxygen
86 apt-get --yes install graphviz
87 apt-get --yes install texlive
88 apt-get --yes install latex2html
89 apt-get --yes install libgtk2.0-dev #GTK
90 apt-get --yes install libwxgtk2.8-dev #Wx GTK
91 apt-get --yes install libwxbase2.8-dev #Wx solito
92 apt-get --yes install libboost-dev #Boost
93 apt-get --yes install libboost-all-dev #Boost
94 apt-get --yes install libqt4-dev #QT4
95 apt-get --yes install sqlite
96 apt-get --yes install libsqlite0-dev
97 apt-get --yes install libosmesa6-dev #Mesa6
98 apt-get --yes install uuid-dev # uuid para la instalacion de itk
99 apt-get --yes install libxaw7-dev # X11
102 # QUESTION : is -y mandatory?
104 port install cmake -y
105 port install cmake-gui -y
106 port install doxygen -y
107 port install graphviz -y
108 port install texlive -y
109 port install latex2html -y
110 port install wxGTK-devel wxBase -y
111 port install boost-devel -y
112 port install sqlite-devel -y
113 port install qt-devel -y
114 port install mesa-libOSMesa-devel -y
117 #echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem "
118 echo " Allowed values are (right now) Fedora, Ubuntu, MacOS "
126 # the following stupid test is used at debug time; Please don't remove!
130 rm -rf $sourcesDir/VTK*
131 rm -rf $sourcesDir/vtk*
132 rm -rf $sourcesDir/InsightToolkit*
133 rm -rf $sourcesDir/gdcm*
134 rm -rf $sourcesDir/tth*
137 rm -rf $binDir/InsightToolkit*
140 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/vtk-5.6.1.tar.gz
141 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/gdcm_08_Dic_2009.tar.gz
142 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
143 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_Developer_Tools/All_Versions/tth/tth_linux/tth
145 tar -xvzf vtk-5.6.1.tar.gz
146 tar -xvzf gdcm_08_Dic_2009.tar.gz
147 tar -xvzf InsightToolkit-3.20.0.tar.gz
151 if [ $buildType = "Debug" ]
162 dirInstall=$binDir/$libname-Bin
163 dirInstallVTK=$dirInstall
164 export VTK_DIR=$installPrefixThird/lib/vtk-5.6/
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=$installPrefixThird CMakeCache.txt
171 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
181 dirInstall=$binDir/$libname-Bin
182 export GDCM_DIR=$installPrefixThird/lib/gdcm/
185 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
186 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
187 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
188 cmake -D VTK_DIR:PATH=$dirInstallVTK CMakeCache.txt
189 cmake -D GDCM_VTK:BOOL=ON -D GDCM_NAME_SPACE:STRING=gdcm13 CMakeCache.txt
197 libname=InsightToolkit-3.20.0
198 dirInstall=$binDir/$libname-Bin
199 export ITK_DIR=$installPrefixThird/lib/InsightToolkit/
202 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
203 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
204 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
205 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
216 cp tth $installPrefixThird/bin
220 #deal with create creatools_third_party_libraries_config.sh
222 if [ -f $installPrefixThird/share/creatools_third_party_library_config.sh ]
224 rm $installPrefixThird/share/creatools_third_party_library_config.sh
227 if [ ! -e $installPrefixThird/share ]
229 mkdir $installPrefixThird/share
231 touch $installPrefixThird/share/creatools_third_party_library_config.sh
232 chmod 755 $installPrefixThird/share/creatools_third_party_library_config.sh
234 echo export PATH='$'PATH:$installPrefixThird/bin >> $installPrefixThird/share/creatools_third_party_library_config.sh
235 echo export VTK_DIR=$installPrefixThird/lib/vtk-5.6 >> $installPrefixThird/share/creatools_third_party_library_config.sh
236 echo export ITK_DIR=$installPrefixThird/lib/InsightToolkit >> $installPrefixThird/share/creatools_third_party_library_config.sh
237 echo export GDCM_DIR=$installPrefixThird/lib/gdcm >> $installPrefixThird/share/creatools_third_party_library_config.sh
238 echo export TTH=$installPrefixThird/bin/tth >> $installPrefixThird/share/creatools_third_party_library_config.sh
239 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
240 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$ITK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
241 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
244 # - remove line 'sh $installPrefixThird/share/creatools_third_party_library_config.sh' if any (with accurate value for ???)
246 if [ ! -f /etc/bashrc ]
249 echo "You are probabely running under UBUNTU OS ?"
250 echo "Troubles expected!"
252 echo "Hit any key to continue"scripts/CreaTools-uninstall.sh
254 echo export ETC_BASHRC="/etc/bash.bashrc"
256 echo export ETC_BASHRC="/etc/bashrc"
258 sed -i -e '/.*installPrefixThird*/ d' $ETC_BASHRC
259 sed -i -e '/.*creatools_third_party_library_config.*/ d' $ETC_BASHRC
262 # - add line 'sh $installPrefixThird/share/creatools_third_party_library_config.sh' (with accurate value for ???)
263 echo installPrefixThird=$installPrefixThird >> $ETC_BASHRC
264 echo '[ -f "$installPrefixThird/share/creatools_third_party_library_config.sh" ] && source $installPrefixThird/share/creatools_third_party_library_config.sh' >> $ETC_BASHRC