]> Creatis software - creaToolsTools.git/commitdiff
?
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Fri, 21 Jan 2011 13:31:35 +0000 (13:31 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Fri, 21 Jan 2011 13:31:35 +0000 (13:31 +0000)
Install/scripts/All.sh
Linux/menu.sh

index 944b7c2530131383c5b4af93e65ab449d6ba9596..423248e08c7b6ef78e68cbd1ae62f7d0d7de34e4 100644 (file)
@@ -141,10 +141,10 @@ then
 #if [ true = false ]
 if [ true = true ]
 then
- sh cmakemod.sh                $creasource $generationdir $installPrefix $buildType 
- sh creaVariables.sh   $creasource $generationdir $docgeneration
- sh compilemod.sh      $buildType   $creasource $generationdir  
- sh ctestmod.sh        $creasource $generationdir
+ sh cmakemod.sh              $creasource $generationdir $installPrefix $buildType 
+ sh creaVariables.sh         $creasource $generationdir $docgeneration
+ sh compilemod.sh $buildType $creasource $generationdir  
+ sh ctestmod.sh              $creasource $generationdir
 fi
 fi
  creadll=$generationdir/creatools_bin/creaBin
@@ -161,10 +161,10 @@ then
 if [ true = true ]
 then
 # BBTK
- sh cmakemod.sh        $bbtksource $generationdir $installPrefix $buildType 
- sh bbtkVariables.sh   $bbtksource $generationdir $docgeneration $gdcmVersion
- sh compilemod.sh      $buildType $bbtksource $generationdir 
- sh ctestmod.sh                $bbtksource $generationdir
+ sh cmakemod.sh              $bbtksource $generationdir $installPrefix $buildType 
+ sh bbtkVariables.sh         $bbtksource $generationdir $docgeneration $gdcmVersion
+ sh compilemod.sh $buildType $bbtksource $generationdir 
+ sh ctestmod.sh              $bbtksource $generationdir
 fi
 fi
  bbtkdll=$generationdir/creatools_bin/bbtkBin
@@ -181,10 +181,10 @@ then
 if [ true = true ]
 then
 # creaMaracasVisu
- sh cmakemod.sh                        $creamaracassource $generationdir $installPrefix $buildType 
- sh creaMaracasVariables.sh            $creamaracassource $generationdir $docgeneration
- sh compilemod.sh              $buildType $creamaracassource $generationdir 
- sh ctestmod.sh                $creamaracassource $generationdir
+ sh cmakemod.sh              $creamaracassource $generationdir $installPrefix $buildType 
+ sh creaMaracasVariables.sh  $creamaracassource $generationdir $docgeneration
+ sh compilemod.sh $buildType $creamaracassource $generationdir 
+ sh ctestmod.sh              $creamaracassource $generationdir
 fi
 fi
  creamaracasdll=$generationdir/creatools_bin/creamaracasBin
@@ -203,7 +203,7 @@ then
 # creaEnvironment
  sh cmakemod.sh                 $creaenvironmentsource $generationdir $installPrefix $buildType 
  sh creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration
- sh compilemod.sh $buildType    $creaenvironmentsource $generationdir
+ sh compilemod.sh    $buildType $creaenvironmentsource $generationdir
  sh ctestmod.sh                 $creaenvironmentsource $generationdir
 fi
 fi
@@ -222,10 +222,10 @@ if [ true = true ]
 then
 # creaBruker
  sh cmakemod.sh              $creabrukersource $generationdir $installPrefix $buildType 
- sh creaBrukerVariables.sh      $creabrukersource $generationdir $docgeneration $gdcmVersion
+ sh creaBrukerVariables.sh   $creabrukersource $generationdir $docgeneration $gdcmVersion
  sh compilemod.sh $buildType $creabrukersource $generationdir
- echo generationdir 
  sh ctestmod.sh              $creabrukersource $generationdir
+  echo generationdir 
 fi
 fi
  creabrukerdll=$generationdir/creatools_bin/creabrukerBin
@@ -242,10 +242,10 @@ then
 if [ true = true ]
 then
 # creaImageIO
- sh cmakemod.sh                $creaimagesource $generationdir $installPrefix $buildType 
- sh creaImageIOVariables.sh    $creaimagesource $generationdir $docgeneration $gdcmVersion
- sh compilemod.sh    $buildType $creaimagesource $generationdir
- sh ctestmod.sh                $creaimagesource $generationdir
+ sh cmakemod.sh              $creaimagesource $generationdir $installPrefix $buildType 
+ sh creaImageIOVariables.sh  $creaimagesource $generationdir $docgeneration $gdcmVersion
+ sh compilemod.sh $buildType $creaimagesource $generationdir
+ sh ctestmod.sh              $creaimagesource $generationdir
 fi
 fi
  creaimagedll=$generationdir/creatools_bin/creaimageBin
@@ -262,10 +262,10 @@ then
 if [ true = true ]
 then
 # creaContours
- sh cmakemod.sh                $creacontourssource $generationdir $installPrefix $buildType 
- sh creaContoursVariables.sh   $creacontourssource $generationdir $docgeneration
- sh compilemod.sh       $buildType $creacontourssource $generationdir
- sh ctestmod.sh                $creacontourssource $generationdir
+ sh cmakemod.sh              $creacontourssource $generationdir $installPrefix $buildType 
+ sh creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
+ sh compilemod.sh $buildType $creacontourssource $generationdir
+ sh ctestmod.sh              $creacontourssource $generationdir
 fi
 fi
 # creacontourdll=$generationdir/creatools_bin/creacontoursBin
@@ -281,10 +281,10 @@ then
 #if [ true = false ]
 if [ true = true ]
 then
- sh cmakemod.sh                        $crearigidregistrationssource $generationdir $installPrefix $buildType 
- sh creaRigidRegistrationVariables.sh  $crearigidregistrationssource $generationdir $docgeneration
- sh compilemod.sh                       $buildType $crearigidregistrationssource $generationdir
- sh ctestmod.sh                        $crearigidregistrationssource $generationdir
+ sh cmakemod.sh                       $crearigidregistrationssource $generationdir $installPrefix $buildType 
+ sh creaRigidRegistrationVariables.sh $crearigidregistrationssource $generationdir $docgeneration
+ sh compilemod.sh          $buildType $crearigidregistrationssource $generationdir
+ sh ctestmod.sh                       $crearigidregistrationssource $generationdir
 fi
 fi
 # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
@@ -321,9 +321,9 @@ then
 if [ true = true ]
 then
 # creaTools
- sh cmakemod.sh                    $creatoolssource $generationdir $installPrefix $buildType 
- sh creaToolsVariables.sh          $creatoolssource $generationdir $docgeneration
- sh compilemod.sh              $buildType $creatoolssource $generationdir
+ sh cmakemod.sh                      $creatoolssource $generationdir $installPrefix $buildType 
+ sh creaToolsVariables.sh            $creatoolssource $generationdir $docgeneration
+ sh compilemod.sh         $buildType $creatoolssource $generationdir
 fi
 fi
 
@@ -348,14 +348,8 @@ sudo echo export PATH='$'PATH:$installPrefix/bin
 sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools   >> $installPrefix/share/creatools_base_library_config.sh
 sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh
 
-#  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 installPrefixCreaTools=$installPrefix >> ~/.bashrc
-echo '[ -f "$installPrefixCreaTools/share/creatools_base_library_config.sh" ] &&  source $installPrefixCreaTools/share/creatools_base_library_config.sh' >> ~/.bashrc 
+
 
 
 # shutdown /s
index 05dd4545876c7c2cf3c75b668be201e6e8b5c89e..852f94505bf0b2e28e84286afb67ef2f80046a67 100644 (file)
@@ -55,20 +55,32 @@ do
      source scripts/CreaTools-configure.sh
   fi
   
-  if [ "$suitable" = "NO" ]
+  if [ "$suitable" = "NO" || "$suitable" = "N"  || "$suitable" = "no" || "$suitable" = "n" ]
   then
+  
+  
+
+       
+       
      echo
      echo
      confirm="NO"
      while [ "$confirm" != "YES" ]
      do
+     
+     
         OperatingSystem="XXX"
         while [[ "$OperatingSystem" != "Fedora" && \
                  "$OperatingSystem" != "Ubuntu" && \
+
                 "$OperatingSystem" != "MacOS" ]]
         do
            echo "Operating System : Fedora/Ubuntu/MacOS (default :Fedora!)"
            read OperatingSystem
+           if [ "$OperatingSystem" = "" ]
+           then
+             OperatingSystem="Fedora"
+           fi  
         done
         echo "you said : [" $OperatingSystem "]"
         echo
@@ -129,11 +141,11 @@ do
         sourcesFrom="___"
         while [[ "$sourcesFrom" != "CVS"  && "$sourcesFrom" != "HTML" ]]
         do
-           echo "Where do you want to get source files from : CVS/HTML (default is HTML)"
+           echo "Where do you want to get source files from : CVS/HTML (default is CVS)"
            read sourcesFrom
            if [ "$sourcesFrom" = "" ]
            then
-              sourcesFrom="HTML"
+              sourcesFrom="CVS"
            fi
            echo "you said : [" $sourcesFrom "]"
         done
@@ -157,6 +169,7 @@ do
         echo
         # ------------------
 
+
         loginUserName=""
         while [ "$loginUserName" == "" ]
         do 
@@ -221,7 +234,7 @@ do
         echo "  Where do you want to get source files from : $sourcesFrom"
         if [ $sourcesFrom = CVS ]
         then
-           echo "           CVS User Name                              : $cvsUserName"
+           echo " CVS User Name                              : $cvsUserName"
         fi
         echo "  Login User Name                            : $loginUserName"
         echo "  Login Group Name                           : $loginGroupName"
@@ -229,8 +242,12 @@ do
         echo "  Gdcm version                               : $gdcmVersion"
         echo
         echo
-        echo "Do you confirm your choices : YES/NO ? (default is NO)"
+        echo "Do you confirm your choices : YES/NO ? (default is YES)"
         read confirm
+       if [ "$confirm" = "" ]
+       then
+          confirm=YES
+       fi
    done
 
  # GROS SOUCIS : Ou generer le fichier CreaTools-configure.sh?
@@ -267,27 +284,26 @@ do
   1)
      echo "========================== 1 "
      source scripts/Check-if-root.sh
-     
      sh scripts/ThirdParty-install.sh
      
-     vtkdirVariable=""
-     while [ "$vtkdirVariable" = "" ]
-     do
-        while [ ! -e "$vtkdirVariable" ]
-        do
-           echo
-          echo " --------------------------------"
-           echo " Set VTK_DIR environment variable"
-          echo " --------------------------------"
-           echo                
-           read vtkdirVariable
-          if [  ! -e "$vtkdirVariable" ]
-          then
-             echo $vtkdirVariable is NOT a valid directory
-          fi
-        done
-     done
-     echo "you said [" $vtkdirVariable "]"
+     vtkdirVariable=""
+     while [ "$vtkdirVariable" = "" ]
+     do
+        while [ ! -e "$vtkdirVariable" ]
+        do
+           echo
+#         echo " --------------------------------"
+           echo " Set VTK_DIR environment variable"
+#         echo " --------------------------------"
+#            echo              
+# #            #read vtkdirVariable
+#         if [  ! -e "$vtkdirVariable" ]
+#         then
+# #          echo $vtkdirVariable is NOT a valid directory
+#         fi
+        done
+     done
+     echo "you said [" $vtkdirVariable "]"
 
      #vtkdirVariable=""
      #while [ "$vtkdirVariable" = "" ]
@@ -297,31 +313,31 @@ do
      #done
      #echo "you said [" $vtkdirVariable "]"
           
-     latexCompilerVariable=""
-     while [ "$latexCompilerVariable" = "" ]
-     do
-        while [ ! -f "$latexCompilerVariable" ]
-        do 
-          echo
-          echo " ---------------------------------------"
-           echo " Set LATEX_COMPILER environment variable"
-          echo " ---------------------------------------"
-           echo                
-           read latexCompilerVariable
-          if [  ! -e "$latexCompilerVariable" ]
-          then
-             echo $latexCompilerVariable is NOT a valid file
-          fi
-       done
-     done
-     echo "you said [" $latexCompilerVariable "]"     
+     latexCompilerVariable=""
+     while [ "$latexCompilerVariable" = "" ]
+     do
+        while [ ! -f "$latexCompilerVariable" ]
+        do 
+#         echo
+# #       echo " ---------------------------------------"
+           echo " Set LATEX_COMPILER environment variable"
+# #       echo " ---------------------------------------"
+#            echo              
+           read latexCompilerVariable
+#         if [  ! -e "$latexCompilerVariable" ]
+#         then
+#            echo $latexCompilerVariable is NOT a valid file
+#         fi
+# #    done
+     done
+     echo "you said [" $latexCompilerVariable "]"     
 
-     sed -i -e '/.*VTK_DIR*/ d'        /etc/bashrc
-     sed -i -e '/.*LATEX_COMPILER*/ d' /etc/bashrc 
-     echo "export VTK_DIR=$vtkdirVariable" >> /etc/bashrc
-     echo "export LATEX_COMPILER=$latexCompilerVariable" >> /etc/bashrc
-  
-     if [ $sourcesFrom = CVS ]
+#     sed -i -e '/.*VTK_DIR*/ d'        /etc/bashrc
+#     sed -i -e '/.*LATEX_COMPILER*/ d' /etc/bashrc 
+#     echo "export VTK_DIR=$vtkdirVariable" >> /etc/bashrc
+#     echo "export LATEX_COMPILER=$latexCompilerVariable" >> /etc/bashrc
+
+     if [ "$sourcesFrom" = "CVS" ]
      then
         echo "----------------------------------------------------------------------"
         echo OK
@@ -334,16 +350,13 @@ do
         echo "To go on, run again 'sh menu.sh'  in a new window"
         echo "---------------------------------------------------------------------"
         exit 0    
-     fi
-     
-     echo "---------------------------------------------------------"
-     echo OK
-     echo "To go on, run again 'sh menu.sh' as root, in a new window"
-     echo "---------------------------------------------------------"
-     exit 0             
+     fi 
+       
   ;;
 
   2)
+    
+     
      echo "========================== 2" 
      sh scripts/CreaTools-load.sh
   ;;