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.patchCreatis.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.patchCreatis.tar.gz
146 tar -xvzf gdcm_08_Dic_2009.tar.gz
147 tar -xvzf InsightToolkit-3.20.0.tar.gz
151 if [ $buildType = "Debug" ]
159 # the following stupid test is used at debug time; Please don't remove!
164 dirInstall=$binDir/$libname-Bin
165 dirInstallVTK=$dirInstall
166 export VTK_DIR=$installPrefixThird/lib/vtk-5.6/
170 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
171 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
172 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
173 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
180 # the following stupid test is used at debug time; Please don't remove!
185 dirInstall=$binDir/$libname-Bin
186 export GDCM_DIR=$installPrefixThird/lib/gdcm/
189 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
190 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
191 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
192 cmake -D VTK_DIR:PATH=$dirInstallVTK CMakeCache.txt
193 cmake -D GDCM_VTK:BOOL=ON -D GDCM_NAME_SPACE:STRING=gdcm13 CMakeCache.txt
199 # the following stupid test is used at debug time; Please don't remove!
203 libname=InsightToolkit-3.20.0
204 dirInstall=$binDir/$libname-Bin
205 export ITK_DIR=$installPrefixThird/lib/InsightToolkit/
208 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
209 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
210 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefixThird CMakeCache.txt
211 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
222 cp tth $installPrefixThird/bin
226 #deal with create creatools_third_party_libraries_config.sh
228 if [ -f $installPrefixThird/share/creatools_third_party_library_config.sh ]
230 rm $installPrefixThird/share/creatools_third_party_library_config.sh
233 if [ ! -e $installPrefixThird/share ]
235 mkdir $installPrefixThird/share
237 touch $installPrefixThird/share/creatools_third_party_library_config.sh
238 chmod 755 $installPrefixThird/share/creatools_third_party_library_config.sh
240 echo export PATH='$'PATH:$installPrefixThird/bin >> $installPrefixThird/share/creatools_third_party_library_config.sh
241 echo export VTK_DIR=$installPrefixThird/lib/vtk-5.6 >> $installPrefixThird/share/creatools_third_party_library_config.sh
242 echo export ITK_DIR=$installPrefixThird/lib/InsightToolkit >> $installPrefixThird/share/creatools_third_party_library_config.sh
243 echo export GDCM_DIR=$installPrefixThird/lib/gdcm >> $installPrefixThird/share/creatools_third_party_library_config.sh
244 echo export TTH=$installPrefixThird/bin/tth >> $installPrefixThird/share/creatools_third_party_library_config.sh
245 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
246 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$ITK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
247 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
250 # - remove line 'bash $installPrefixThird/share/creatools_third_party_library_config.sh' if any (with accurate value for ???)
252 # Install creatools as user (no longer as root) // JPR 2/5/2011
253 #if [ ! -f /etc/bashrc ]
255 # export ETC_BASHRC="/etc/bash.bashrc"
257 # export ETC_BASHRC="/etc/bashrc"
260 export ETC_BASHRC=$HOME/.bashrc
262 sed -i -e '/.*installPrefixThird*/ d' $ETC_BASHRC
263 sed -i -e '/.*creatools_third_party_library_config.*/ d' $ETC_BASHRC
266 # - add line 'bash $installPrefixThird/share/creatools_third_party_library_config.sh' (with accurate value for ???)
267 echo installPrefixThird=$installPrefixThird >> $ETC_BASHRC
268 echo '[ -f "$installPrefixThird/share/creatools_third_party_library_config.sh" ] && source $installPrefixThird/share/creatools_third_party_library_config.sh' >> $ETC_BASHRC