# @echo off
#allow user to choose the generation dir
+#allow user to choose to generate the doc or not
+
generationdir=$1
mkdir $generationdir
+mkdir $generationdir/tmpCreaTools_INSTALL
+
# buildtype, useless for Linux; let here for compatibility purpose
buildtype=Release
creasource=crea
- creasourcefolder=$generationdir/crea
- creabinfolder=$generationdir/creaBin
-
bbtksource=bbtk
- bbtksourcefolder=$generationdir/bbtk
- bbtkbinfolder=$generationdir/bbtkBin
-
creamaracassource=creaMaracasVisu
- creamaracassourcefolder=$generationdir/creaMaracasVisu
- creamaracasbinaryfolder=$generationdir/creaMaracasVisuBin
-
- creaenvironment=creaEnvironment
- creaenvironmentsourcefolder=$generationdir/creaEnvironment
- creaenvironmentbinaryfolder=$generationdir/creaEnvironmentBin
-
+ creaenvironmentsource=creaEnvironment
creabrukersource=creaBruker
- creabrukersourcefolder=$generationdir/creaBruker
- creabrukerbinaryfolder=$generationdir/creaBrukerBin
-
creaimagesource=creaImageIO
- creaimagesourcefolder=$generationdir/creaImageIO
- creaimagebinaryfolder=$generationdir/creaImageIOBin
-
creacontourssource=creaContours
- creacontourssourcefolder=$generationdir/creaContours
- creacontoursbinaryfolder=$generationdir/creaContoursBin
-
crearigidregistrationssource=creaRigidRegistration
- crearigidregistrationssourcefolder=$generationdir/creaRigidRegistration
- crearigidregistrationbinaryfolder=$generationdir/creaRigidRegistrationBin
-
bbtkgeditorsource=bbtkGEditor
- bbtkgeditorsourcefolder=$generationdir/bbtkGEditor
- bbtkgeditorbinaryfolder=$generationdir/bbtkGEditorBin
-
creatoolssource=creaTools
- creatoolssourcefolder=$generationdir/creaTools
- creatoolsbinaryfolder=$generationdir/creaToolsBin
-
-rm -rf creabinfolder
-rm -rf bbtkbinfolder
-rm -rf creamaracasbinaryfolder
-rm -rf creaenvironmentbinaryfolder
-rm -rf creabrukerbinaryfolder
-rm -rf creaimagebinaryfolder
-rm -rf creacontoursbinaryfolder
-rm -rf crearigidregistrationbinaryfolder
-rm -rf bbtkgeditorbinaryfolder
-rm -rf creatoolsbinaryfolder
-
- sh cvscheckout.sh $creasource $generationdir
- sh cvscheckout.sh $bbtksource $generationdir
- sh cvscheckout.sh $creamaracassource $generationdir
- sh cvscheckout.sh $creaenvironmentsource $generationdir
- sh cvscheckout.sh $creabrukersource $generationdir
- sh cvscheckout.sh $creaimagesource $generationdir
- sh cvscheckout.sh $creacontourssource $generationdir
- sh cvscheckout.sh $crearigidregistrationssource $generationdir
- sh cvscheckout.sh $bbtkgeditorsource $generationdir
- sh cvscheckout.sh $creatoolssource $generationdir
+
+rm -rf $generationdir/creaBin
+rm -rf $generationdir/bbtkBin
+rm -rf $generationdir/creamaracasBin
+rm -rf $generationdir/creaEnvironmentBin
+rm -rf $generationdir/creaBrukerBin
+rm -rf $generationdir/creaImageIOBin
+rm -rf $generationdir/creaContoursBin
+rm -rf $generationdir/creaRigidRegistrationBin
+rm -rf $generationdir/bbtkGEditorBin
+rm -rf $generationdir/creaToolsBin
+
+sh cvscheckout.sh $creasource $generationdir
+sh cvscheckout.sh $bbtksource $generationdir
+sh cvscheckout.sh $creamaracassource $generationdir
+sh cvscheckout.sh $creaenvironmentsource $generationdir
+sh cvscheckout.sh $creabrukersource $generationdir
+sh cvscheckout.sh $creaimagesource $generationdir
+sh cvscheckout.sh $creacontourssource $generationdir
+sh cvscheckout.sh $crearigidregistrationssource $generationdir
+sh cvscheckout.sh $bbtkgeditorsource $generationdir
+sh cvscheckout.sh $creatoolssource $generationdir
# CREA
- sh cmakemod.sh $creasource $creabinfolder $generationdir
- sh creaVariables.sh $creabinfolder $creasourcefolder
- sh compilemod.sh $buildtype $creabinfolder
- sh ctestmod.sh $creabinfolder
- creadll=`pwd`/creabinfolder
+#if [ true = false ]
+#then
+ sh cmakemod.sh $creasource $generationdir
+ sh creaVariables.sh $creasource $generationdir $docgeneration
+ sh compilemod.sh $buildtype $creasource $generationdir
+ sh ctestmod.sh $creasource $generationdir
+#fi
+
+
+ creadll=$generationdir/tmpCreaTools_INSTALL/creaBin
LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
+
+# echo "=in All.sh, out of crea ============================================================================ $LD_LIBRARY_PATH"
+
+#if [ true = false ]
+#then
# BBTK
- sh cmakemod.sh $bbtksource $bbtkbinfolder $generationdir
- sh bbtkVariables.sh $bbtkbinfolder $creabinfolder
- sh compilemod.sh $buildtype $bbtkbinfolder
- sh ctestmod.sh $bbtkbinfolder
- bbtkdll=`pwd`/bbtkbinfolder
+ sh cmakemod.sh $bbtksource $generationdir
+# echo "============================BBTK out of cmakemod "
+
+ sh bbtkVariables.sh $bbtksource $generationdir $docgeneration
+# echo "============================BBTK out of bbtkVariables "
+
+ sh compilemod.sh $buildtype $bbtksource $generationdir
+ echo "============================BBTK out of compilemod "
+
+ sh ctestmod.sh $bbtksource $generationdir
+#fi
+
+ bbtkdll=$generationdir/tmpCreaTools_INSTALL/bbtkBin
LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
-# creaMaracasVisu
- sh cmakemod.sh $creamaracassource $creamaracasbinary $generationdir
- sh creaMaracasVariables.sh $creamaracasbinary $creabinfolder $bbtkbinfolder
- sh compilemod.sh $buildtype $creamaracasbinary
- sh ctestmod.sh $creamaracasbinary
- creamaracasdll=`pwd`/$creamaracasbinary
+
+#if [ true = false ]
+#then
+ creaMaracasVisu
+# echo "========================================================================================start creaMaracasVisu "
+ sh cmakemod.sh $creamaracassource $generationdir
+# echo "=======================================================================================creaMaracasVisu out of cmakemod "
+
+ sh creaMaracasVariables.sh $creamaracassource $generationdir $docgeneration
+ sh compilemod.sh $buildtype $creamaracassource $generationdir
+ sh ctestmod.sh $creamaracassource $generationdir
+#fi
+ creamaracasdll=$generationdir/tmpCreaTools_INSTALL/creamaracasBin
LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
+
+
+#if [ true = false ]
+#then
# creaEnvironment
- sh cmakemod.sh $creaenvironment $creaenvironmentbinary $generationdir
- sh creaenvironmentVariables.sh $creaenvironmentbinary $creabinfolder
- sh compilemod.sh $buildtype $creaenvironmentbinary
- sh ctestmod.sh $creaenvironmentbinary
- creaenvironmentdll=`pwd`/$creaenvironmentbinary
- LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
+ sh cmakemod.sh $creaenvironmentsource $generationdir
+ sh creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration
+ sh compilemod.sh $buildtype $creaenvironmentsource $generationdir
+ sh ctestmod.sh $creaenvironmentsource $generationdir
+#fi
+ creaenvironmentdll=$generationdir/tmpCreaTools_INSTALL/creaenvironmentBin
+ LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
+
+#if [ true = false ]
+#then
# creaBruker
- sh cmakemod.sh $creabruker $creabrukerbinary $generationdir
- sh creaenvironmentVariables.sh $creabrukerbinary $creabinfolder
- sh compilemod.sh $buildtype $creabrukerbinary
- sh ctestmod.sh $creabrukerbinary
- creabrukerdll=`pwd`$creabrukerbinary
+ sh cmakemod.sh $creabrukersource $generationdir
+ sh creaBrukerVariables.sh $creabrukersource $generationdir $docgeneration
+#fi
+ sh compilemod.sh $buildtype $creabrukersource $generationdir
+ echo "creaBruker : out of compilemod.sh; stop here, now!"
+ exit 0
+ sh ctestmod.sh $creabrukersource $creabinfolder
+ creabrukerdll=$generationdir/tmpCreaTools_INSTALL/creabrukerBin
LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
# creaImageIO
- sh cmakemod.sh $creaimagesource $creaimagebinary $generationdir
- sh creaImageIOVariables.sh $creaimagebinary $creabinfolder $bbtkbinfolder $creabrukerbinary
- sh compilemod.sh $buildtype $creaimagebinary
- sh ctestmod.sh $creaimagebinary
- creaimagedll=`pwd`/$creaimagebinary
+ sh cmakemod.sh $creaimagesource $generationdir
+ sh creaImageIOVariables.sh $creaimagesource $generationdir $docgeneration
+ sh compilemod.sh $buildtype $creaimagesource $generationdir
+ sh ctestmod.sh $creaimagesource $generationdir
+ creaimagedll=$generationdir/tmpCreaTools_INSTALL/creaimageBin
LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
# creaContours
- sh cmakemod.sh $creacontourssource $creacontoursbinary $generationdir
- sh creaContoursVariables.sh $creacontoursbinary $creasourcefolder $creaenvironmentsource $creamaracassourcefolder $creaimagesourcefolder $bbtksourcefolder
- sh compilemod.sh $buildtype $creacontoursbinary
- sh ctestmod.sh $creacontoursbinary
-# creacontourdll=`pwd`/$creacontoursbinary
+ sh cmakemod.sh $creacontourssource $generationdir
+ sh creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
+ sh compilemod.sh $buildtype $creacontourssource $generationdir
+ sh ctestmod.sh $creacontourssource $generationdir
+# creacontourdll=$generationdir/tmpCreaTools_INSTALL/creacontoursBin
# LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
# creaRigidRegistration
- cmakemod.sh $crearigidregistrationssource $crearigidregistrationbinary $generationdir
- creaRigidRegistrationVariables.sh $crearigidregistrationbinary $creabinfolder $bbtksourcefolder
- compilemod.sh $buildtype $crearigidregistrationbinary
- ctestmod.sh $crearigidregistrationbinary
-# crearigidregistrationdll=`pwd`/$crearigidregistrationbinary
+ cmakemod.sh $crearigidregistrationsource $generationdir
+ creaRigidRegistrationVariables.sh $crearigidregistrationsource $generationdir $docgeneration
+ compilemod.sh $buildtype $crearigidregistrationsource $generationdir
+ ctestmod.sh $crearigidregistrationsource $generationdir
+# crearigidregistrationdll=$generationdir/tmpCreaTools_INSTALL/crearigidregistrationBin
# LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
# bbtkGEditor
- sh cmakemod.sh $bbtkgeditorsource $bbtkgeditorbinary $generationdir
- sh bbtkGEditorVariables.sh $bbtkgeditorbinary $creasourcefolder $bbtksourcefolder $creamaracassourcefolder
- sh compilemod.sh $buildtype $bbtkgeditorbinary
- sh ctestmod.sh $bbtkgeditorbinary
-# bbtkgeditordll=`pwd`/$bbtkgeditorbinary
+ sh cmakemod.sh $bbtkgeditorsource $generationdir
+ sh bbtkGEditorVariables.sh $bbtkgeditorsource $generationdir $docgeneration
+ sh compilemod.sh $buildtype $bbtkgeditorsource $generationdir
+ sh ctestmod.sh $bbtkgeditorsource $generationdir
+# bbtkgeditordll=$generationdir/tmpCreaTools_INSTALL/bbtkgeditorBin
# LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
# creaTools
- sh cmakemod.sh $creatoolssource $creatoolsbinary $generationdir
- sh creaToolsVariables.sh $creatoolsbinary
- sh compilemodCreaTools.sh $buildtype $creatoolsbinary
-# sh ctestmod.sh $creatoolsbinary
- creatoolsdll=`pwd`/$creatoolsbinary
+ sh cmakemod.sh $creatoolssource $generationdir
+ sh creaToolsVariables.sh $creatoolssource $generationdir $docgeneration
+ sh compilemodCreaTools.sh $buildtype $creatoolssource $generationdir
+# sh ctestmod.sh $creatoolsbinary $generationdir
+ creatoolsdll=$generationdir/tmpCreaTools_INSTALL/creatoolsBin
LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
# shutdown /s