# @echo off
-# buildtype, useless for Linux; let here for compatiblitily purpose
+#allow user to choose the generation dir
+generationdir=$1
+mkdir $generationdir
+
+# buildtype, useless for Linux; let here for compatibility purpose
buildtype=Release
- creasourcefolder=crea
- creabinfolder=creaBin
- bbtksourcefolder=bbtk
- bbtkbinfolder=bbtkBin
- creamaracassourcefolder=creaMaracasVisu
- creamaracasbinary=creaMaracasVisuBin
- creaenvironmentsource=creaEnvironment
- creaenvironmentbinary=creaEnvironmentBin
+ 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
+
creabrukersource=creaBruker
- creabrukerbinary=creaBrukerBin
- creaimagesourcefolder=creaImageIO
- creaimagebinary=creaImageIOBin
+ creabrukersourcefolder=$generationdir/creaBruker
+ creabrukerbinaryfolder=$generationdir/creaBrukerBin
+
+ creaimagesource=creaImageIO
+ creaimagesourcefolder=$generationdir/creaImageIO
+ creaimagebinaryfolder=$generationdir/creaImageIOBin
+
creacontourssource=creaContours
- creacontoursbinary=creaContoursBin
+ creacontourssourcefolder=$generationdir/creaContours
+ creacontoursbinaryfolder=$generationdir/creaContoursBin
+
crearigidregistrationssource=creaRigidRegistration
- crearigidregistrationbinary=creaRigidRegistrationBin
- bbtkgeditorsource=bbtkGEditor
- bbtkgeditorbinary=bbtkGEditorBin
- creatoolssource=creaTools
- creatoolsbinary=creaToolsBin
+ crearigidregistrationssourcefolder=$generationdir/creaRigidRegistration
+ crearigidregistrationbinaryfolder=$generationdir/creaRigidRegistrationBin
+ bbtkgeditorsource=bbtkGEditor
+ bbtkgeditorsourcefolder=$generationdir/bbtkGEditor
+ bbtkgeditorbinaryfolder=$generationdir/bbtkGEditorBin
- sh cvscheckout.sh $creasourcefolder
- sh cvscheckout.sh $bbtksourcefolder
- sh cvscheckout.sh $creamaracassourcefolder
- sh cvscheckout.sh $creaenvironmentsource
- sh cvscheckout.sh $creabrukersource
- sh cvscheckout.sh $creaimagesourcefolder
- sh cvscheckout.sh $creacontourssource
- sh cvscheckout.sh $crearigidregistrationssource
- sh cvscheckout.sh $bbtkgeditorsource
- sh cvscheckout.sh $creatoolssource
+ 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
# CREA
- sh cmakemod.sh $creasourcefolder $creabinfolder
+ sh cmakemod.sh $creasource $creabinfolder $generationdir
sh creaVariables.sh $creabinfolder $creasourcefolder
sh compilemod.sh $buildtype $creabinfolder
sh ctestmod.sh $creabinfolder
- creadll=`pwd`/$creabinfolder
- LD_LIBRARY_PATH=$creadll:LD_LIBRARY_PATH
+ creadll=`pwd`/creabinfolder
+ LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
# BBTK
- sh cmakemod.sh $bbtksourcefolder $bbtkbinfolder
+ sh cmakemod.sh $bbtksource $bbtkbinfolder $generationdir
sh bbtkVariables.sh $bbtkbinfolder $creabinfolder
sh compilemod.sh $buildtype $bbtkbinfolder
sh ctestmod.sh $bbtkbinfolder
- bbtkdll=`pwd`/$bbtkbinfolder
+ bbtkdll=`pwd`/bbtkbinfolder
LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
# creaMaracasVisu
- sh cmakemod.sh $creamaracassourcefolder $creamaracasbinary
+ sh cmakemod.sh $creamaracassource $creamaracasbinary $generationdir
sh creaMaracasVariables.sh $creamaracasbinary $creabinfolder $bbtkbinfolder
sh compilemod.sh $buildtype $creamaracasbinary
sh ctestmod.sh $creamaracasbinary
LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
# creaEnvironment
- sh cmakemod.sh $creaenvironmentsource $creaenvironmentbinary
+ sh cmakemod.sh $creaenvironment $creaenvironmentbinary $generationdir
sh creaenvironmentVariables.sh $creaenvironmentbinary $creabinfolder
sh compilemod.sh $buildtype $creaenvironmentbinary
sh ctestmod.sh $creaenvironmentbinary
LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
# creaBruker
- sh cmakemod.sh $creabrukersource $creabrukerbinary
+ sh cmakemod.sh $creabruker $creabrukerbinary $generationdir
sh creaenvironmentVariables.sh $creabrukerbinary $creabinfolder
sh compilemod.sh $buildtype $creabrukerbinary
sh ctestmod.sh $creabrukerbinary
LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
# creaImageIO
- sh cmakemod.sh $creaimagesourcefolder $creaimagebinary
+ sh cmakemod.sh $creaimagesource $creaimagebinary $generationdir
sh creaImageIOVariables.sh $creaimagebinary $creabinfolder $bbtkbinfolder $creabrukerbinary
sh compilemod.sh $buildtype $creaimagebinary
sh ctestmod.sh $creaimagebinary
LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
# creaContours
- sh cmakemod.sh $creacontourssource $creacontoursbinary
+ sh cmakemod.sh $creacontourssource $creacontoursbinary $generationdir
sh creaContoursVariables.sh $creacontoursbinary $creasourcefolder $creaenvironmentsource $creamaracassourcefolder $creaimagesourcefolder $bbtksourcefolder
sh compilemod.sh $buildtype $creacontoursbinary
sh ctestmod.sh $creacontoursbinary
# LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
# creaRigidRegistration
- cmakemod.sh $crearigidregistrationssource $crearigidregistrationbinary
+ cmakemod.sh $crearigidregistrationssource $crearigidregistrationbinary $generationdir
creaRigidRegistrationVariables.sh $crearigidregistrationbinary $creabinfolder $bbtksourcefolder
compilemod.sh $buildtype $crearigidregistrationbinary
ctestmod.sh $crearigidregistrationbinary
# LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
# bbtkGEditor
- sh cmakemod.sh $bbtkgeditorsource $bbtkgeditorbinary
+ sh cmakemod.sh $bbtkgeditorsource $bbtkgeditorbinary $generationdir
sh bbtkGEditorVariables.sh $bbtkgeditorbinary $creasourcefolder $bbtksourcefolder $creamaracassourcefolder
sh compilemod.sh $buildtype $bbtkgeditorbinary
sh ctestmod.sh $bbtkgeditorbinary
# LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
# creaTools
- sh cmakemod.sh $creatoolssource $creatoolsbinary
+ sh cmakemod.sh $creatoolssource $creatoolsbinary $generationdir
sh creaToolsVariables.sh $creatoolsbinary
sh compilemodCreaTools.sh $buildtype $creatoolsbinary
# sh ctestmod.sh $creatoolsbinary