#allow user to choose to generate the doc or not
generationdir=$1
-docGeneration=$2
+docgeneration=$2
cvsUserName=$3
installPrefix=$4
buildType=$5
gdcmVersion=$6
scriptDir=$PWD
+echo scriptDir
+echo $scriptDir
+
+
+mkdir $generationdir
+cd $generationdir
creasource=crea
bbtksource=bbtk
bbtkgeditorsource=bbtkGEditor
creatoolssource=creaTools
-mkdir $generationdir
-mkdir $generationdir/creatools_source
-mkdir $generationdir/creatools_bin
-
-cd $generationdir
# start_point : used at debug time : start point of the script
# ex : if everything is OK, but bbtkGEditor,
-# ----------------------------------
-# start_point = 0 : checkout all
-#-----------------------------------
-if [ $start_point -le 0 ]
-then
-#if [ true = false ]
-if [ true = true ]
-then
- sh $scriptDir/cvscheckout.sh $creasource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $bbtksource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $creamaracassource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $creaenvironmentsource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $creabrukersource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $creaimagesource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $creacontourssource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $crearigidregistrationssource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $bbtkgeditorsource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $creatoolssource $generationdir $cvsUserName
-fi
-fi
-
# --------------------------------
-# start_point = 1 : remove everything but source files
+# start_point = 0 : remove everything but source files
#---------------------------------
-if [ $start_point -le 1 ]
+if [ $start_point -le 0 ]
then
# the following stupid test is used at debug time; Please don't remove!
#if [ true = false ]
# modify .bashrc
# - remove line 'sh $installPrefix/creatools_install/share/creatools_base_party_libraries_config.sh' if any (with accurate value for ???)
+sed -i -e '/.*installPrefixCreaTools*/ d' ~/.bashrc
sed -i -e '/.*creatools_base_library_config.*/ d' ~/.bashrc
# - add line 'sh $installPrefix/creatools_install/share/creatools_base_libraries_config.sh' (with accurate value for ???)
-#echo [ -f "$installPrefix/share/creatools_base_library_config.sh" ] && source $installPrefix/share/creatools_base_library_config.sh >> ~/.bashrc
-echo source $installPrefix/share/creatools_base_library_config.sh >> ~/.bashrc
+echo installPrefixCreaTools=$installPrefix >> ~/.bashrc
+echo '[ -f "$installPrefixCreaTools/share/creatools_base_library_config.sh" ] && source $installPrefixCreaTools/share/creatools_base_library_config.sh' >> ~/.bashrc
# shutdown /s
# $3 : ON/OFF (generate doc)
# $4 : GDCM1 / GDCM2
+
+
binfolder=$2/creatools_bin/$1Bin
cd $binfolder
fi
-cmake -D --BUILD_ALL:BOOL=ON -D crea_DIR:PATH=$2/creatools_bin/creaBin -D USE_GDCM2:BOOL=$boolgdcm2 -D USE_GDCM:BOOL=$boolgdcm1 CMakeCache.txt
-cmake CMakeCache.txt
+cmake -D crea_DIR:PATH=$2/creatools_bin/creaBin CMakeCache.txt
+cmake -D --BUILD_ALL:BOOL=ON CMakeCache.txt
+cmake -D USE_GDCM2:BOOL=$boolgdcm2 -D USE_GDCM:BOOL=$boolgdcm1 -D BUILD_BBTK_DOC_GUIDES_HTML:BOOL=$3 -D BUILD_BBTK_DOC_GUIDES_PDF:BOOL=$3 -D BUILD_BBTK_DOC_DOXYGEN:BOOL=$3 -D BUILD_BBTK_DOC_PACKAGE:BOOL=$3 CMakeCache.txt
+cmake CMakeCache.txt
cmake CMakeCache.txt
cmake CMakeCache.txt
cmake CMakeCache.txt
cmake CMakeCache.txt
cmake CMakeCache.txt
-cmake -D --BUILD_ALL:BOOL=OFF -D BUILD_BBTK_DOC:BOOL=$3 -D BUILD_BBTK_DOC_GUIDES_HTML:BOOL=$3 -D BUILD_BBTK_DOC_GUIDES_PDF:BOOL=$3 -D BUILD_BBTK_DOC_DOXYGEN:BOOL=$3 -D BUILD_BBTK_DOC_PACKAGE:BOOL=$3 CMakeCache.txt
+cmake -D --BUILD_ALL:BOOL=OFF -D BUILD_BBTK_DOC:BOOL=$3 CMakeCache.txt
cd ..
+
+
#allow user to choose where he wants to get the sources from : CVS / HTML
generationdir=$1
-docGeneration=$2
+docgeneration=$2
cvsUserName=$3
installPrefix=$4
buildType=$5
mkdir $sourcesDir
mkdir $binDir
-sudo rm $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh
+rm $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh
# the following stupid test is used at debug time; Please don't remove!
if [ true = true ]
then
- rm -rf $sources/VTK*
- rm -rf $sources/vtk*
- rm -rf $sources/InsightToolkit*
- rm -rf $sources/gdcm*
+ rm -rf $sourcesDir/VTK*
+ rm -rf $sourcesDir/vtk*
+ rm -rf $sourcesDir/InsightToolkit*
+ rm -rf $sourcesDir/gdcm*
+ rm -rf $sourcesDir/tth*
cd $sourcesDir
wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/vtk-5.6.1.tar.gz
wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/gdcm_08_Dic_2009.tar.gz
wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/InsightToolkit-3.20.0.tar.gz
+ wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_Developer_Tools/All_Versions/tth/tth_linux/tth
+
tar -xvzf vtk-5.6.1.tar.gz
tar -xvzf gdcm_08_Dic_2009.tar.gz
tar -xvzf InsightToolkit-3.20.0.tar.gz
cmake -D USE_DEBUG_LIB:BOOL=$buildType -D CMAKE_INSTALL_PREFIX:PATH=$installPrefix CMakeCache.txt
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
make -j 2
- sudo make install
+ make install
cd ..
fi
cmake -D VTK_DIR:PATH=$dirInstallVTK CMakeCache.txt
cmake -D GDCM_VTK:BOOL=ON -D GDCM_NAME_SPACE:STRING=gdcm13 CMakeCache.txt
make -j 2
- sudo make install
+ make install
cd ..
fi
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
cmake CMakeCache.txt
make -j 2
- sudo make install
+ make install
cd ..
fi
+
+if [ true = true ]
+then
+ cd $sourcesDir
+ cp tth $installPrefix/bin
+fi
+
#deal with create creatools_third_party_libraries_config.sh
touch $installPrefix/share/creatools_third_party_library_config.sh
chmod 666 $installPrefix/share/creatools_third_party_library_config.sh
-echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_third_party_library_config.sh
-echo export VTK_DIR=$installPrefix/lib/vtk-5.6 >> $installPrefix/share/creatools_third_party_library_config.sh
-echo export ITK_DIR=$installPrefix/lib/InsightToolkit >> $installPrefix/share/creatools_third_party_library_config.sh
+echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_third_party_library_config.sh
+echo export VTK_DIR=$installPrefix/lib/vtk-5.6 >> $installPrefix/share/creatools_third_party_library_config.sh
+echo export ITK_DIR=$installPrefix/lib/InsightToolkit >> $installPrefix/share/creatools_third_party_library_config.sh
echo export GDCM_DIR=$installPrefix/lib/gdcm >> $installPrefix/share/creatools_third_party_library_config.sh
+echo export TTH=$installPrefix/bin/tth >> $installPrefix/share/creatools_third_party_library_config.sh
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$GDCM_DIR >> $installPrefix/share/creatools_third_party_library_config.sh
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$ITK_DIR >> $installPrefix/share/creatools_third_party_library_config.sh
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$VTK_DIR >> $installPrefix/share/creatools_third_party_library_config.sh