]> Creatis software - creaToolsTools.git/blob - Linux/scripts/ThirdParty-install-Base-Stuff.sh
split ThirdParty-install.sh into elementary steps
[creaToolsTools.git] / Linux / scripts / ThirdParty-install-Base-Stuff.sh
1 #!/bin/bash
2  if [ ! -f $PWD/scripts/CreaTools-configure.sh ]
3  then 
4    echo
5    echo "..ERROR.."
6    echo "==================================================="
7    echo "REMEMBER !"
8    echo ""
9    echo "YOU NEED TO RUN 'Configure' (0) First !"
10    echo "==================================================="
11    echo
12    echo
13    exit 0
14 fi
15
16
17 scriptDir=$PWD
18 sourcesDir=$generationdir/thirdparty_sources
19 binDir=$generationdir/thirdparty_bin
20
21 if [ ! -e $generationdir ]
22 then
23    mkdir $generationdir
24    chown $loginUserName  $generationdir
25    chgrp $loginGroupName $generationdir
26
27 fi
28 if [ ! -e $sourcesDir ]
29 then
30    mkdir $sourcesDir
31    #was : (pb on MacOS?)
32    #chown $loginUserName:$loginGroupName $sourcesDir
33    chown $loginUserName  $sourcesDir
34    chgrp $loginGroupName $sourcesDir
35 fi
36
37 if [ ! -e $binDir ]
38 then
39    mkdir $binDir
40    chown $loginUserName  $binDir
41    chgrp $loginGroupName $binDir
42 fi
43
44 # the following stupid test is used at debug time; Please don't remove!
45 if [ true = true ]
46 #if [ true = false ]
47 then
48   # ///\TODO what about SuSE? Debian? Mandriva? Gentoo?
49   case "$OperatingSystem" in
50   Fedora)
51      yum install cmake                -y 
52      yum install cmake-gui            -y 
53      yum install doxygen              -y
54      yum install graphviz             -y
55      yum install texlive              -y
56      yum install latex2html           -y
57      yum install wxGTK-devel wxBase   -y
58      yum install boost-devel          -y
59      yum install sqlite-devel         -y
60      yum install qt-devel             -y
61      yum install mesa-libOSMesa-devel -y
62      ;;
63   Ubuntu)  
64      apt-get --yes install build-essential  # esta linea instala las librerias necesarias para compilar en ubuntu, g++ gcc etc etc etc.
65      apt-get --yes install cmake
66      apt-get --yes install cmake-gui
67      apt-get --yes install cmake-curses-gui
68      apt-get --yes install doxygen
69      apt-get --yes install graphviz
70      apt-get --yes install texlive
71      apt-get --yes install latex2html
72      apt-get --yes install libgtk2.0-dev #GTK
73      apt-get --yes install libwxgtk2.8-dev #Wx GTK
74      apt-get --yes install libwxbase2.8-dev #Wx solito
75      apt-get --yes install libboost-dev  #Boost
76      apt-get --yes install libboost-all-dev #Boost
77      apt-get --yes install libqt4-dev #QT4
78      apt-get --yes install sqlite
79      apt-get --yes install libsqlite0-dev
80      apt-get --yes install libosmesa6-dev #Mesa6
81      apt-get --yes install uuid-dev # uuid para la instalacion de itk
82      apt-get --yes install libxaw7-dev # X11
83      ;;
84   MacOS)
85      port selfupdate
86      port install cmake                -y
87      port install doxygen              -y
88      port install graphviz             -y
89     # port install tetex                -y   (replaced by texlive) # cf EED : http://www.creatis.insa-lyon.fr/site/fr/CreatoolsInstallInstructionsv2.0.1MacOsv10.5.6-Developpers
90      port install texlive              -y
91      port install latex2html           -y
92      port install wxGTK                -y
93      port install boost                -y
94         ln -s libboost_signals-xgcc40-mt-1_38.dylib    libboost_signals.dylib    /opt/local/lib # cf EED : http://www.creatis.insa-lyon.fr/site
95         ln -s libboost_signals-xgcc40-mt-1_38.dylib    libboost_signals.dylib    /opt/local/lib # cf EED
96         ln -s libboost_filesystem-xgcc40-mt-1_38.dylib libboost_filesystem.dylib /opt/local/lib # cf EE
97         ln -s libboost_system-xgcc40-mt-1_38.dylib     libboost_system.dylib     /opt/local/lib # cf EE 
98      port install sqlite3              -y
99      port install qt4-mac              -y
100         ln -s qmake-mac qmake /opt/local/bin  # cf EED
101      port install mesa                 -y
102      ;;
103   *)
104      #echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem "
105      echo " Allowed values are (right now) Fedora, Ubuntu, MacOS "
106      exit 0
107      ;;
108   esac             
109 fi