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--
40 sourcesDir=$generationdir/thirdparty_sources
41 binDir=$generationdir/thirdparty_bin
47 if [ -f $installPrefix/share/creatools_third_party_library_config.sh ]
49 rm $installPrefix/share/creatools_third_party_library_config.sh
52 # the following stupid test is used at debug time; Please don't remove!
56 case "$OperatingSystem" in
59 yum install cmake-gui -y
60 yum install doxygen -y
61 yum install graphviz -y
62 yum install texlive -y
63 yum install latex2html -y
64 yum install wxGTK-devel wxBase -y
65 yum install boost-devel -y
66 yum install sqlite-devel -y
67 yum install qt-devel -y
68 yum install mesa-libOSMesa-devel -y
71 apt-get --yes install build-essential # esta linea instala las librerias necesarias para compilar en ubuntu, g++ gcc etc etc etc.
72 apt-get --yes install cmake
73 apt-get --yes install cmake-gui
74 apt-get --yes install cmake-curses-gui
75 apt-get --yes install doxygen
76 apt-get --yes install graphviz
77 apt-get --yes install texlive
78 apt-get --yes install latex2html
79 apt-get --yes install libgtk2.0-dev #GTK
80 apt-get --yes install libwxgtk2.8-dev #Wx GTK
81 apt-get --yes install libwxbase2.8-dev #Wx solito
82 apt-get --yes install libboost-dev #Boost
83 apt-get --yes install libboost-all-dev #Boost
84 apt-get --yes install libqt4-dev #QT4
85 apt-get --yes install sqlite
86 apt-get --yes install libsqlite0-dev
87 apt-get --yes install libosmesa6-dev #Mesa6
88 apt-get --yes install uuid-dev # uuid para la instalacion de itk
89 apt-get --yes install libxaw7-dev # X11
92 # QUESTION : is -y mandatory?
95 port install cmake-gui -y
96 port install doxygen -y
97 port install graphviz -y
98 port install texlive -y
99 port install latex2html -y
100 port install wxGTK-devel wxBase -y
101 port install boost-devel -y
102 port install sqlite-devel -y
103 port install qt-devel -y
104 port install mesa-libOSMesa-devel -y
107 #echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem "
108 echo " Allowed values are (right now) Fedora, Ubuntu, MacOS "
116 # the following stupid test is used at debug time; Please don't remove!
119 rm -rf $sourcesDir/VTK*
120 rm -rf $sourcesDir/vtk*
121 rm -rf $sourcesDir/InsightToolkit*
122 rm -rf $sourcesDir/gdcm*
123 rm -rf $sourcesDir/tth*
125 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/vtk-5.6.1.tar.gz
126 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/gdcm_08_Dic_2009.tar.gz
127 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
128 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_Developer_Tools/All_Versions/tth/tth_linux/tth
130 tar -xvzf vtk-5.6.1.tar.gz
131 tar -xvzf gdcm_08_Dic_2009.tar.gz
132 tar -xvzf InsightToolkit-3.20.0.tar.gz
137 if [ $buildType = "Debug" ]
148 dirInstall=$binDir/$libname-Bin
149 dirInstallVTK=$dirInstall
150 VTK_DIR=$installPrefix/lib/vtk-5.6/
152 cmake -G"Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
153 ##cmake -G"CodeBlocks - Unix Makefiles" -H$sourcesDir/$libname -B$dirInstall/
154 cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefix CMakeCache.txt
155 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
164 dirInstall=$binDir/$libname-Bin
165 GDCM_DIR=$installPrefix/lib/gdcm/
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 VTK_DIR:PATH=$dirInstallVTK CMakeCache.txt
172 cmake -D GDCM_VTK:BOOL=ON -D GDCM_NAME_SPACE:STRING=gdcm13 CMakeCache.txt
180 libname=InsightToolkit-3.20.0
181 dirInstall=$binDir/$libname-Bin
182 ITK_DIR=$installPrefix/lib/InsightToolkit/
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=$installPrefix CMakeCache.txt
188 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
199 cp tth $installPrefix/bin
202 #deal with create creatools_third_party_libraries_config.sh
204 touch $installPrefix/share/creatools_third_party_library_config.sh
205 chmod 755 $installPrefix/share/creatools_third_party_library_config.sh
207 echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_third_party_library_config.sh
208 echo export VTK_DIR=$installPrefix/lib/vtk-5.6 >> $installPrefix/share/creatools_third_party_library_config.sh
209 echo export ITK_DIR=$installPrefix/lib/InsightToolkit >> $installPrefix/share/creatools_third_party_library_config.sh
210 echo export GDCM_DIR=$installPrefix/lib/gdcm >> $installPrefix/share/creatools_third_party_library_config.sh
211 echo export TTH=$installPrefix/bin/tth >> $installPrefix/share/creatools_third_party_library_config.sh
212 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$GDCM_DIR >> $installPrefix/share/creatools_third_party_library_config.sh
213 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$ITK_DIR >> $installPrefix/share/creatools_third_party_library_config.sh
214 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$VTK_DIR >> $installPrefix/share/creatools_third_party_library_config.sh
217 # - remove line 'sh $installPrefix/share/creatools_third_party_library_config.sh' if any (with accurate value for ???)
218 sed -i -e '/.*creatools_third_party_library_config.*/ d' /etc/bashrc
220 # - add line 'sh $installPrefix/share/creatools_third_party_library_config.sh' (with accurate value for ???)
221 echo source $installPrefix/share/creatools_third_party_library_config.sh >> /etc/bashrc