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