]> Creatis software - creaToolsTools.git/commitdiff
Automatic generation of 'export' environment variables in bashrc for Third Party...
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Tue, 9 Nov 2010 17:08:15 +0000 (17:08 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Tue, 9 Nov 2010 17:08:15 +0000 (17:08 +0000)
Install/scripts/All.sh
Install/scripts/compilemod.sh
Install_ThirdParty/Readme.txt
Install_ThirdParty/scripts/install_thirdparty_all.sh
README.txt

index 06851954e528292caae12357890aaa1aeb139086..99ae399eec6602e588bef53c09e2ebcd285e877e 100644 (file)
@@ -4,8 +4,9 @@ if [ $# = 0 ]
 then
 echo "Use it as :"
 echo "sh All.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType>"
+  echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install
 echo " "
-echo "ex : sh All.sh /tmp/gendir OFF jpr /home/jpr/myInstallDirectory Debug"
+echo "ex : sh All.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug"
 exit 0
 fi
 
@@ -22,8 +23,9 @@ echo "----------"
 if [ $# != 5 ]
 then 
 echo "sh All.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType>"
+echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install
 echo " "
-echo "ex : sh All.sh /tmp/gendir OFF jpr /home/jpr/myInstallDirectory Debug"
+echo "ex : sh All.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug"
 exit 0
 fi
 
@@ -121,6 +123,8 @@ then
 fi
  creadll=$generationdir/creatools_bin/creaBin
  LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
 
 
 # the following stupid test is used at debug time; Please don't remove!
index 28011502b9d410dfc42d240d93dd21cbedfd3bc1..f79340587957ed82dd61f03b001a3d4cd770f855 100644 (file)
@@ -1,14 +1,14 @@
 # $1 : useless for Linux (Release/Debug)
+# $2 : name of source ex : crea
+# $3 : generationdir ex : /tmp/myGenerationDir
 
 cd $3/creatools_bin/$2Bin
-echo "--------------------------------------in compilemod--------------"
+echo "--------------------------------------in compilemod-- $2 ------------"
 echo $1
 echo $2
 echo $3
 
 make -j 2
-echo " "
-echo $2
 pwd
 sudo make install
 cd ../..
index 0722f602796b5c2bfc85d4d68ec8ec129b167109..6f020d5eac656e5533cd69f0a717cf1a64823477 100644 (file)
@@ -30,5 +30,6 @@ cd ..
 5) Run the whole stuff :
 sh install_thirdparty.sh
 
+
 === === === WINDOWS users === === ===
 
index a1537fd8abdfbc19e971d26864982805adba13bb..ed267b51df32cef002003bcdb219f38ff32481c8 100644 (file)
@@ -1,15 +1,16 @@
 
 #!/bin/sh
 
-if [ $# = 0 ]
-then
-  echo "Use it as :"
-  echo "sh install_thirdparty_all.sh <nameOfTheGenerationDirectory> <installPrefix> <buildType> <OperatingSystem>"
-  echo "with 'OperatingSystem' in {Fedora, Ubuntu, MacOS}" 
-  echo " "
-  echo "ex : sh install_thirdparty_all.sh /tmp/gendir ~/Creatis/myInstallDirectory Debug Ubuntu"
-  exit 0
-fi
+#if [ $# = 0 ]
+#then
+#  echo "Use it as :"
+#  echo "sh install_thirdparty_all.sh <nameOfTheGenerationDirectory> <installPrefix> <buildType> <OperatingSystem>"
+#  echo "with 'OperatingSystem' in {Fedora, Ubuntu, MacOS}" 
+#  echo "with 'installPrefix' : /usr/local or <directory where you want to install>/thirdparty_install
+#  echo " "
+#  echo "ex : sh install_thirdparty_all.sh /tmp/gendir  /tmp/gendir/thirdparty_install Debug Ubuntu"
+#  exit 0
+#fi
 
 echo $#
 echo "----------"
@@ -20,13 +21,14 @@ echo $3
 echo $4
 echo "----------"
 
-if [ $# != 4 ]
+if [ $# = 0 || $# != 4 ]
 then 
   echo "Use it as :"
   echo "sh install_thirdparty_all.sh <nameOfTheGenerationDirectory> <installPrefix> <buildType> <OperatingSystem>"
-  echo "with 'OperatingSystem' in {Fedora, Ubuntu, MacOS}" 
+  echo "with 'OperatingSystem' in {Fedora, Ubuntu, MacOS}"
+  echo "with 'installPrefix' : /usr/local or <directory where you want to install>  
   echo " "
-  echo "ex : sh install_thirdparty_all.sh /tmp/gendir ~/Creatis/myInstallDirectory Debug Ubuntu"
+  echo "ex : sh install_thirdparty_all.sh /tmp/gendir /tmp/gendir/thirdparty_install Debug Ubuntu"
   exit 0
 fi
 
@@ -170,4 +172,25 @@ then
   cd ..
 fi
 
+#deal with create creatools_third_party_libraries_config.sh
+
+THIRDPARTY_INSTALL_DIR=$installPrefix/thirdparty_install
+sudo rm $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh
+
+sudo echo export PATH=$PATH:$THIRDPARTY_INSTALL_DIR/bin             >> $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh
+sudo echo export VTK_DIR=$THIRDPARTY_INSTALL_DIR/lib/vtk-5.6        >> $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh
+sudo echo export ITK_DIR=$THIRDPARTY_INSTALL_DIR/lib/InsightToolkit >> $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh
+sudo echo export GDCM_DIR=$THIRDPARTY_INSTALL_DIR/lib/gdcm          >> $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh
+sudo echo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GDCM_DIR         >> $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh
+sudo echo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ITK_DIR          >> $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh
+sudo echo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$VTK_DIR          >> $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh
+
+#  modify .bashrc
+# - remove line 'sh $installPrefix/thirdparty_install/share/creatools_third_party_libraries_config.sh' if any (with accurate value for ???)
+sed -i -e 's/.*creatools_third_party_library_config.*/  /g' ~/.bashrc
+
+# - add line 'sh $installPrefix/thirdparty_install/share/creatools_third_party_libraries_config.sh' (with accurate value for ???)
+echo sh $THIRDPARTY_INSTALL_DIR/creatools_third_party_libraries_config.sh >> ~/.bashrc 
+
+
 
index cbe59de25ed04714055a412b542ecf6d0842c7e3..a1b7bd1b13fbf1c44d625bfc73c582f59f15e62e 100644 (file)
@@ -1,29 +1,34 @@
 === === ===  UNIX / LINUX users === === ===
 
-0) Make sure everything you'll need is properly installed :
-crea_Developers_tools, crea_ThirdParty_Libraries
+0)  Make sure you are a 'sudoer'.
 have a look at :
-http://www.creatis.insa-lyon.fr/site/fr/CreatoolsDownload
+--sudo configuration--
+https://fedoraproject.org/wiki/Configuring_Sudo
 
-1) Make sure you got the last version of creaToolsTools.
+1) ssh-add
+<type your cvs password>
+
+2) Make sure you got the last version of creaToolsTools.
 cvs update -dP creaToolsTools
 
-2) make sure VTK_DIR environment variable is set properly :
+3) Make sure everything you'll need is properly installed :
+crea_Developers_tools, crea_ThirdParty_Libraries
+have a look at :
+http://www.creatis.insa-lyon.fr/site/fr/CreatoolsDownload
+and/or :
+cd Install_ThirdParty
+follow the Readme.txt
+
+4) make sure VTK_DIR environment variable is set properly :
 echo $VTK_DIR
 Set it, if not OK:
 export VTK_DIR=/usr/local/lib/vtk-5.4, for instance
 
-3) make sure LATEX_COMPILER environment variable is set properly :
+5) make sure LATEX_COMPILER environment variable is set properly :
 echo $LATEX_COMPILER 
 Set it, if not OK:
 export LATEX_COMPILER=/usr/bin/latex, for instance
 
-4) ssh-add
-<type your cvs password>
-
-5) sudo configuration
-https://fedoraproject.org/wiki/Configuring_Sudo
-
 6)cd Install
 cp creatools.sh_TEMPLATE creatools.sh