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
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
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!
# $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 ../..
5) Run the whole stuff :
sh install_thirdparty.sh
+
=== === === WINDOWS users === === ===
#!/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 "----------"
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
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
+
+
=== === === 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