]> Creatis software - creaToolsTools.git/commitdiff
#2493 creaToolsTools Feature New Normal - Prepare and Install binary CreaTools...
authordavila <eduardo.davila@creatis.insa-lyon.fr>
Wed, 24 Dec 2014 14:55:52 +0000 (15:55 +0100)
committerdavila <eduardo.davila@creatis.insa-lyon.fr>
Wed, 24 Dec 2014 14:55:52 +0000 (15:55 +0100)
Linux/installscript
Linux/scripts/CreaTools-install.sh
Linux/scripts/CreaTools-load.sh
Linux/scripts/ThirdParty-install-Finalize.sh
Linux/scripts/ThirdParty-install-VTK.sh
Linux/scripts/installmod.sh
Linux/scripts/installmodBash.sh [new file with mode: 0644]
Linux/scripts/installmodNomake.sh
Linux/scripts/tgz-Bin-Package.sh [new file with mode: 0644]

index 4823c0227badd9a1d5e2d5d58eb9f5605343cb04..70fb2846b2fff369df4bc54e9d45b91e0d15c5bb 100755 (executable)
@@ -339,11 +339,12 @@ fi
 if [ `checkVal $command all 3rd 3rd-base` == true ] ; then
     bigDisplay "INSTALL PACKAGES DEPENDENCIES"
     if [ "`whoami`" == root ] ; then
-        bash scripts/ThirdParty-install-Base-Stuff.sh
+       echo ThirdParty-install-Base-Stuff
+       bash scripts/ThirdParty-install-Base-Stuff.sh
     else 
         # must log as root
         echo "Please enter the root passwd to add necessary packages:"; 
-        sudo su -c "bash scripts/ThirdParty-install-Base-Stuff.sh"   
+        su -c "bash scripts/ThirdParty-install-Base-Stuff.sh"   
     fi
     bash scripts/ThirdParty-install.sh
 fi
@@ -398,7 +399,7 @@ fi
 if [ `checkVal $command all creatools creatools-cmp` == true ] ; then
     bigDisplay "COMPILE CREATOOLS"
     source $ETC_BASHRC
-    bash -x scripts/CreaTools-compile.sh
+   bash -x scripts/CreaTools-compile.sh
 
     # To allow (*very* aware) user to patch code, later
     if [ ! -e $generationdir/creatools_source ] ; then
index 4a37bb3f4f2709c94c6577cb09ce465a6422aafd..d20555c2a5d2d9dffb1eb50632443934c527545d 100644 (file)
 
   #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
-  fi
-  touch     $installPrefix/share/creatools_base_library_config.sh
-  chmod 755 $installPrefix/share/creatools_base_library_config.sh
-  
-  echo export PATH='$'PATH:$installPrefix/bin                                   >> $installPrefix/share/creatools_base_library_config.sh
-  if [ $OperatingSystem = "MacOS" ]
-  then
-     echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$installPrefix/lib/creatools   >> $installPrefix/share/creatools_base_library_config.sh
-  else
-     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
-  fi
+##EED  if [ -f $installPrefix/share/creatools_base_library_config.sh ]
+##EED  then
+##EED     rm        $installPrefix/share/creatools_base_library_config.sh
+##EED  fi
+##EED  touch     $installPrefix/share/creatools_base_library_config.sh
+
+
 
   # Install creatools as user (no longer as root) // JPR 2/5/2011
 
   # - 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
-  
+
+  mkdir $installPrefix
+  mkdir $installPrefix/share
+  echo '## This file is call from .bashrc' > $installPrefix/share/creatools_base_library_config.sh
+  bash installmodBash.sh $installPrefix
+
   # 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_library_config.sh'
   bash installmodNomake.sh $buildType wxvtk              $generationdir  $installPrefix
 
 #EED  I don't know why this works here and not after the chmod 755
-echo export PATH='$'PATH:$installPrefix/bin                                   >> $installPrefix/share/creatools_base_library_config.sh
-if [ $OperatingSystem = "MacOS" ]
-then
-  echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$installPrefix/lib/creatools   >> $installPrefix/share/creatools_base_library_config.sh
-else
-  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
-fi
+#EED  bash installmodBash.sh $installPrefix
 
 echo "===================================================in CreaTools-install.sh ETC_BASHRC : "  $ETC_BASHRC 
 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 "==================================================="
+echo '[ -f "$installPrefixtmp/share/creatools_base_library_config.sh" ] &&  source $installPrefixtmp/share/creatools_base_library_config.sh $installPrefixtmp' >> $ETC_BASHRC 
+
+source $installPrefix/share/creatools_base_library_config.sh $installPrefix
+
+##EED 21/12/2014
+##EED echo "==================================================="
+##EED echo " Regenerate Package doc"
+##EED $installPrefix/bin/bbRegeneratePackageDoc -a -q
+##EED echo " Regenerate Boxes list"
+##EED $installPrefix/bin/bbRegenerateBoxesLists -q
+##EED echo "==================================================="
 
   # JPR 2/5/2011
 #else
index 3fd2e768460da8f01c98dcdab15dec2d4977f44e..b8b983bb9e38ad71dd0db9f492b696ba17db591f 100644 (file)
@@ -86,9 +86,9 @@ then
 #if [ true = false ]
 if [ true = true ]
 then
-#  rm -rf creatools_bin
-#  mkdir $generationdir/creatools_bin
   rm -rf creatools_source
+  rm -rf creatools_bin
+  rm -rf creatools_install
   mkdir $generationdir/creatools_source
 fi
 fi
@@ -106,6 +106,7 @@ then
 #
       if [ $sourcesFrom = GIT ] || [ $sourcesFrom = GIT-READ-ONLY ];
       then
+                       ssh-add
          bash $scriptDir/gitclone.sh $creasource                   $generationdir      $sourcesFrom
          bash $scriptDir/gitclone.sh $bbtksource                   $generationdir      $sourcesFrom
          bash $scriptDir/gitclone.sh $creavtksource               $generationdir       $sourcesFrom 
index f1d99b7fcb53b33edf497e5637238c1c9a02bb58..9ac09afa72366a84a5ce159f54d7c8bcd90c10f4 100644 (file)
@@ -62,21 +62,22 @@ fi
 touch     $installPrefixThird/share/creatools_third_party_library_config.sh
 chmod 755 $installPrefixThird/share/creatools_third_party_library_config.sh
 
-echo export PATH='$'PATH:$installPrefixThird/bin           >> $installPrefixThird/share/creatools_third_party_library_config.sh
-echo export VTK_DIR=$installPrefixThird/lib/vtk-5.10        >> $installPrefixThird/share/creatools_third_party_library_config.sh
-echo export ITK_DIR=$installPrefixThird/lib/InsightToolkit >> $installPrefixThird/share/creatools_third_party_library_config.sh
-echo export GDCM_DIR=$installPrefixThird/lib/gdcm          >> $installPrefixThird/share/creatools_third_party_library_config.sh
-echo export TTH=$installPrefixThird/bin/tth                >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo installPrefixThird='$1'                                                                                           >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo export PATH='$'PATH:'$'installPrefixThird/bin             >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo export VTK_DIR='$'installPrefixThird/lib/vtk-5.10         >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo export ITK_DIR='$'installPrefixThird/lib/InsightToolkit   >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo export GDCM_DIR='$'installPrefixThird/lib/gdcm            >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo export TTH='$'installPrefixThird/bin/tth                  >> $installPrefixThird/share/creatools_third_party_library_config.sh
 
 if [ $OperatingSystem = "MacOS" ]
 then
-   echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$GDCM_DIR   >> $installPrefixThird/share/creatools_third_party_library_config.sh
-   echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$ITK_DIR    >> $installPrefixThird/share/creatools_third_party_library_config.sh
-   echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$VTK_DIR    >> $installPrefixThird/share/creatools_third_party_library_config.sh
+   echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:'$'GDCM_DIR   >> $installPrefixThird/share/creatools_third_party_library_config.sh
+   echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:'$'ITK_DIR    >> $installPrefixThird/share/creatools_third_party_library_config.sh
+   echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:'$'VTK_DIR    >> $installPrefixThird/share/creatools_third_party_library_config.sh
 else
-   echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$GDCM_DIR   >> $installPrefixThird/share/creatools_third_party_library_config.sh
-   echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$ITK_DIR    >> $installPrefixThird/share/creatools_third_party_library_config.sh
-   echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$VTK_DIR    >> $installPrefixThird/share/creatools_third_party_library_config.sh
+   echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:'$'GDCM_DIR   >> $installPrefixThird/share/creatools_third_party_library_config.sh
+   echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:'$'ITK_DIR    >> $installPrefixThird/share/creatools_third_party_library_config.sh
+   echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:'$'VTK_DIR    >> $installPrefixThird/share/creatools_third_party_library_config.sh
 fi
 
    sed -i -e '/.*installPrefixThird*/ d' $ETC_BASHRC
@@ -86,7 +87,9 @@ fi
 
 echo "====================================================ETC_BASHRC "  $ETC_BASHRC 
 echo installPrefixThird=$installPrefixThird >> $ETC_BASHRC
-echo '[ -f "$installPrefixThird/share/creatools_third_party_library_config.sh" ] &&  source $installPrefixThird/share/creatools_third_party_library_config.sh' >> $ETC_BASHRC 
+echo '[ -f "$installPrefixThird/share/creatools_third_party_library_config.sh" ] &&  source $installPrefixThird/share/creatools_third_party_library_config.sh $installPrefixThird' >> $ETC_BASHRC 
 
 chown -R $loginUserName  $generationdir
 chgrp -R $loginGroupName $generationdir
+
+source ~/.bashrc
index 7ab1f31a8df5e26e28b953fc06caa4ef05edb990..806296692adb3c3b1795369320d9e92b8eba8426 100644 (file)
@@ -108,9 +108,11 @@ fi
 ##  tar -xvf VTK-5.6.1.patchCreatis.tar.gz
 
   curl -O http://www.vtk.org/files/release/5.10/vtk-5.10.1.zip
-  # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-(
   unzip vtk-5.10.1.zip
-
+  cd VTK5.10.1/Rendering
+  curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/vtk-5.10.1.vtkXOpenGLRenderWindow.patch
+  patch < vtk-5.10.1.vtkXOpenGLRenderWindow.patch
+  # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-(
  else
 
 ## EED 2013-10-29
@@ -121,8 +123,15 @@ fi
 echo unzip vtk-5.10.1.zip
 pwd
   unzip vtk-5.10.1.zip
+
+  cd VTK5.10.1/Rendering
+  wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/vtk-5.10.1.vtkXOpenGLRenderWindow.patch
+  patch < vtk-5.10.1.vtkXOpenGLRenderWindow.patch
  fi
 
+
+
+
 #if [ $buildType = "Debug" ]
 #then
 #   debug="ON"
index 18bca2032440f437ffbe4848f9ca1eaac3d2a8b0..48f9870fcb20bb0449e1b5f430e4ea9301d0e7c0 100644 (file)
@@ -48,10 +48,10 @@ then
    # grouik style patch JPR
    if [ $2 = "bbtk" ]
    then
-      echo export BBTK_DIR=$installPrefix/lib64/creatools/$2   >> $installPrefix/share/creatools_base_library_config.sh
+      echo export BBTK_DIR='$'installPrefix/lib64/creatools/$2   >> $installPrefix/share/creatools_base_library_config.sh
    else
-      echo export $2_DIR=$installPrefix/lib64/creatools/$2     >> $installPrefix/share/creatools_base_library_config.sh
-      echo export bb$2_DIR=$installPrefix/lib64/creatools/bb$2 >> $installPrefix/share/creatools_base_library_config.sh      
+      echo export $2_DIR='$'installPrefix/lib64/creatools/$2     >> $installPrefix/share/creatools_base_library_config.sh
+      echo export bb$2_DIR='$'installPrefix/lib64/creatools/bb$2 >> $installPrefix/share/creatools_base_library_config.sh      
    fi
 
 else
@@ -60,10 +60,10 @@ else
       # grouik style patch JPR
       if [ $2 = "bbtk" ]
       then
-         echo "export BBTK_DIR=$installPrefix/lib/creatools/$2"   >> $installPrefix/share/creatools_base_library_config.sh
+         echo "export BBTK_DIR='$'installPrefix/lib/creatools/$2"   >> $installPrefix/share/creatools_base_library_config.sh
       else
-         echo "export $2_DIR=$installPrefix/lib/creatools/$2"     >> $installPrefix/share/creatools_base_library_config.sh
-         echo "export bb$2_DIR=$installPrefix/lib/creatools/bb$2" >> $installPrefix/share/creatools_base_library_config.sh    
+         echo "export $2_DIR='$'installPrefix/lib/creatools/$2"     >> $installPrefix/share/creatools_base_library_config.sh
+         echo "export bb$2_DIR='$'installPrefix/lib/creatools/bb$2" >> $installPrefix/share/creatools_base_library_config.sh    
       fi
    else
       echo "============================= NEITHER $installPrefix/lib64 NOR $installPrefix/lib EXIST ?!?"
diff --git a/Linux/scripts/installmodBash.sh b/Linux/scripts/installmodBash.sh
new file mode 100644 (file)
index 0000000..428195d
--- /dev/null
@@ -0,0 +1,45 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
+#                        pour la Santé)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+#
+#  This software is governed by the CeCILL-B license under French law and 
+#  abiding by the rules of distribution of free software. You can  use, 
+#  modify and/ or redistribute the software under the terms of the CeCILL-B 
+#  license as circulated by CEA, CNRS and INRIA at the following URL 
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability. 
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------  
+
+
+# $1 : installPrefix
+
+echo
+echo
+echo
+echo "------------------------------------------in installmodBash-------------"
+
+source CreaTools-configure.sh
+source CreaTools-names.sh
+
+echo installPrefix='$1'   >> $installPrefix/share/creatools_base_library_config.sh
+echo export PATH='$'PATH:'$'installPrefix/bin                                   >> $installPrefix/share/creatools_base_library_config.sh
+if [ $OperatingSystem = "MacOS" ]
+then
+  echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:'$'installPrefix/lib/creatools   >> $installPrefix/share/creatools_base_library_config.sh
+else
+  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
+fi
+
+
index 28d684b482e83ef00df1017f2119f042f06120c6..7910d159f27085fa67f6c2a885a5328e9c8777b1 100644 (file)
@@ -55,8 +55,8 @@ then
    #then
    #   echo export BBTK_DIR=$installPrefix/lib64/creatools/$2   >> $installPrefix/share/creatools_base_library_config.sh
    #else
-      echo export $2_DIR=$installPrefix/lib64/creatools/$2     >> $installPrefix/share/creatools_base_library_config.sh
-      echo export bb$2_DIR=$installPrefix/lib64/creatools/bb$2 >> $installPrefix/share/creatools_base_library_config.sh      
+      echo export $2_DIR='$'installPrefix/lib64/creatools/$2     >> $installPrefix/share/creatools_base_library_config.sh
+      echo export bb$2_DIR='$'installPrefix/lib64/creatools/bb$2 >> $installPrefix/share/creatools_base_library_config.sh      
    #fi
 fi
 
@@ -67,8 +67,8 @@ then
 #   then
 #      echo "export BBTK_DIR=$installPrefix/lib/creatools/$2"   >> $installPrefix/share/creatools_base_library_config.sh
 #   else
-      echo "export $2_DIR=$installPrefix/lib/creatools/$2"     >> $installPrefix/share/creatools_base_library_config.sh
-      echo "export bb$2_DIR=$installPrefix/lib/creatools/bb$2" >> $installPrefix/share/creatools_base_library_config.sh    
+      echo "export $2_DIR='$'installPrefix/lib/creatools/$2"     >> $installPrefix/share/creatools_base_library_config.sh
+      echo "export bb$2_DIR='$'installPrefix/lib/creatools/bb$2" >> $installPrefix/share/creatools_base_library_config.sh    
 #   fi
    
 else
diff --git a/Linux/scripts/tgz-Bin-Package.sh b/Linux/scripts/tgz-Bin-Package.sh
new file mode 100644 (file)
index 0000000..7c8c195
--- /dev/null
@@ -0,0 +1,58 @@
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
+#                        pour la Santé)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+#
+#  This software is governed by the CeCILL-B license under French law and 
+#  abiding by the rules of distribution of free software. You can  use, 
+#  modify and/ or redistribute the software under the terms of the CeCILL-B 
+#  license as circulated by CEA, CNRS and INRIA at the following URL 
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability. 
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------  
+
+
+#!/bin/bash
+
+# JPR 2/5/2011
+#if [ $UID = 0 ] 
+#then
+  # Set all local variables
+  source $PWD/scripts/CreaTools-configure.sh
+  if [ -e $generationdir ]
+  then
+     fileTGZ=$generationdir/creaTools-Bin.tgz
+     tar -cvzf $fileTGZ $installPrefix $installPrefixThird
+    
+     echo ""
+     echo "Creation OK:"
+     echo $fileTGZ
+     echo ""
+
+  else
+   echo
+   echo "..ERROR.."
+   echo "==================================================="
+   echo "REMEMBER !"
+   echo ""
+   echo "You MUST load the Creatools sources before (use 2.2)!"
+   echo "==================================================="
+   echo
+   echo 
+   read a
+   exit 0 
+  fi  
+  
+
+