echo " Get the 'CreaTools' source files :.2 (CVS : as user!)"
echo " Compile the CreaTools :..........3 "
# Install creatools as user (no longer as root) // JPR 2/5/2011
-# echo " Install the CreaTools :..........4 (as root)"
-# echo " Uninstall the CreaTools :..........5 (as root)"
echo " Install the CreaTools :..........4 "
echo " Uninstall the CreaTools :..........5 "
echo
# fi
echo "========================= 4"
+
bash scripts/CreaTools-install.sh
echo $docgeneration
echo --installPrefix--
echo $installPrefix
- echo --buildType--
+ echo --installPrefixThird--
+ echo $installPrefixThird
+ echo --buildType--
echo $buildType
echo --gdcmVersion--
echo $gdcmVersion
fi
creadll=$generationdir/creatools_bin/creaBin
LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
-
+ export crea_DIR=$generationdir/creatools_bin/creaBin
# -------------------------
# start_point = 3 : BBTK
fi
bbtkdll=$generationdir/creatools_bin/bbtkBin
LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
-
+ export bbtk_DIR=$generationdir/creatools_bin/bbtkBin
# -------------------------
# start_point = 4 : creaMaracasVisu
bash $scriptDir/ctestmod.sh $creamaracassource $generationdir
fi
fi
- creamaracasdll=$generationdir/creatools_bin/creamaracasBin
+ creamaracasdll=$generationdir/creatools_bin/creaMaracasVisuBin
LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
-
+ export creaMaracasVisu_DIR=$generationdir/creatools_bin/creaMaracasVisuBin
# -------------------------
# start_point = 5 : creaEnvironment
fi
creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
-
+ export creaEnvironment_DIR=$generationdir/creatools_bin/creaEnvironmentBin
# -------------------------
# start_point = 6 : creaBruker
fi
creabrukerdll=$generationdir/creatools_bin/creabrukerBin
LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
-
+ export creaBruker_DIR=$generationdir/creatools_bin/creaBrukerBin
# -------------------------
# start_point = 7 : creaImageIO
fi
creaimagedll=$generationdir/creatools_bin/creaimageBin
LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
-
+export creaImageIO_DIR=$generationdir/creatools_bin/creaImageIOBin
# -------------------------
# start_point = 8 : creaContour
bash $scriptDir/ctestmod.sh $creacontourssource $generationdir
fi
fi
-# creacontourdll=$generationdir/creatools_bin/creacontoursBin
-# LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
-
+ creacontourdll=$generationdir/creatools_bin/creacontoursBin
+ LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
+ export creaContours_DIR=$generationdir/creatools_bin/creaContoursBin
# -------------------------
# start_point = 9 : creaRigidRegistration
#!/bin/bash
+# JPR 2/5/2011
#if [ $UID = 0 ]
#then
# Set all local variables
source $PWD/scripts/CreaTools-names.sh
cd $scriptDir
- bash installmod.sh $buildType $creasource $generationdir
- bash installmod.sh $buildType $bbtksource $generationdir
- bash installmod.sh $buildType $creamaracassource $generationdir
- bash installmod.sh $buildType $creaenvironmentsource $generationdir
- bash installmod.sh $buildType $creabrukersource $generationdir
- bash installmod.sh $buildType $creaimagesource $generationdir
- bash installmod.sh $buildType $creacontourssource $generationdir
- bash installmod.sh $buildType $crearigidregistrationssource $generationdir
- bash installmod.sh $buildType $bbtkgeditorsource $generationdir
- bash installmod.sh $buildType $creatoolssource $generationdir
-
+
+#create creatools_base_library_config.sh at the very begining, so we can write "export xxx_BIN=..." inside installmod.sh. JPRx 3 mars 2011
+
if [ -f $installPrefix/share/creatools_base_library_config.sh ]
then
rm $installPrefix/share/creatools_base_library_config.sh
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh
-# Install creatools as user (no longer as root) // JPR 2/5/2011
+# Install creatools as user (no longer as root) // JPR 2/5/2011
+
# if [ ! -f /etc/bashrc ]
# then
# export ETC_BASHRC="/etc/bash.bashrc"
# else
# export ETC_BASHRC="/etc/bashrc"
-# fi
+# fi
+
export ETC_BASHRC=$HOME/.bashrc
- # - remove line 'bash $installPrefix/creatools_install/share/creatools_base_librariy_config.sh' if any
+ # - remove line 'bash $installPrefix/creatools_install/share/creatools_base_library_config.sh' if any
sed -i -e '/.*creatools_base_library_config.*/ d' $ETC_BASHRC
sed -i -e '/installPrefixtmp*/ d' $ETC_BASHRC
+
+ # JPR 2/5/2011
# modify /etc/bashrc (we cannot modify .bashrc, since we switched as root)
- # - add line 'bash $installPrefix/creatools_install/share/creatools_base_librariy_config.sh'
+ # - add line 'bash $installPrefix/creatools_install/share/creatools_base_library_config.sh'
+
+ bash installmod.sh $buildType $creasource $generationdir $installPrefix
+ bash installmod.sh $buildType $bbtksource $generationdir $installPrefix
+ bash installmod.sh $buildType $creamaracassource $generationdir $installPrefix
+ bash installmod.sh $buildType $creaenvironmentsource $generationdir $installPrefix
+ bash installmod.sh $buildType $creabrukersource $generationdir $installPrefix
+ bash installmod.sh $buildType $creaimagesource $generationdir $installPrefix
+ bash installmod.sh $buildType $creacontourssource $generationdir $installPrefix
+ bash installmod.sh $buildType $crearigidregistrationssource $generationdir $installPrefix
+ bash installmod.sh $buildType $bbtkgeditorsource $generationdir $installPrefix
+ bash installmod.sh $buildType $creatoolssource $generationdir $installPrefix
echo installPrefixtmp=$installPrefix >> $ETC_BASHRC
echo '[ -f "$installPrefixtmp/share/creatools_base_library_config.sh" ] && source $installPrefixtmp/share/creatools_base_library_config.sh' >> $ETC_BASHRC
+source $installPrefix/share/creatools_base_library_config.sh
+echo "==================================================="
+echo " Regenerate Package doc"
+$installPrefix/bin/bbRegeneratePackageDoc -a -q
+echo " Regenerate Boxes list"
+$installPrefix/bin/bbRegenerateBoxesLists -q
+echo "==================================================="
+ # JPR 2/5/2011
#else
# echo
# echo "..ERROR.."
# $1 : useless for Linux (Release/Debug)
# $2 : name of source ex : crea
# $3 : generationdir ex : /tmp/myGenerationDir
-
+# $4 : installPrefix
cd $3/creatools_bin/$2Bin
echo
echo
echo $1
echo $2
echo $3
-
+echo $4
+installPrefix=$4
# We install, now
pwd
make install
+
+if [ -e $installPrefix/lib64 ]
+then
+ echo export $2_DIR=$installPrefix/lib64/creatools/$2 >> $installPrefix/share/creatools_base_library_config.sh
+fi
+if [ -e $installPrefix/lib ]
+then
+ echo "export $2_DIR=$installPrefix/lib/creatools/$2" >> $installPrefix/share/creatools_base_library_config.sh
+else
+ echo "============================= NEITHER $installPrefix/lib64 NOR installPrefix/lib EXIST ?!?"
+fi
cd ../..
pwd