]> Creatis software - creaToolsTools.git/blob - Linux/scripts/ThirdParty-install-Base-Stuff.sh
#2493 creaToolsTools Feature New Normal - Prepare and Install binary CreaTools...
[creaToolsTools.git] / Linux / scripts / ThirdParty-install-Base-Stuff.sh
1 # ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
4 #                        pour la Santé)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 #
7 #  This software is governed by the CeCILL-B license under French law and 
8 #  abiding by the rules of distribution of free software. You can  use, 
9 #  modify and/ or redistribute the software under the terms of the CeCILL-B 
10 #  license as circulated by CEA, CNRS and INRIA at the following URL 
11 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
12 #  or in the file LICENSE.txt.
13 #
14 #  As a counterpart to the access to the source code and  rights to copy,
15 #  modify and redistribute granted by the license, users are provided only
16 #  with a limited warranty  and the software's author,  the holder of the
17 #  economic rights,  and the successive licensors  have only  limited
18 #  liability. 
19 #
20 #  The fact that you are presently reading this means that you have had
21 #  knowledge of the CeCILL-B license and that you accept its terms.
22 # ------------------------------------------------------------------------  
23
24
25 #!/bin/bash
26
27  if [ ! -f $PWD/scripts/CreaTools-configure.sh ]
28  then 
29    echo
30    echo "..ERROR.."
31    echo "==================================================="
32    echo "REMEMBER !"
33    echo ""
34    echo "YOU NEED TO RUN 'Configure' (0) First !"
35    echo "==================================================="
36    echo
37    echo
38    exit 0
39 fi
40
41 source $PWD/scripts/CreaTools-configure.sh
42
43 scriptDir=$PWD
44 sourcesDir=$generationdir/thirdparty_sources
45 binDir=$generationdir/thirdparty_bin
46
47 if [ ! -e $generationdir ]
48 then
49    mkdir -p $generationdir
50    chown -R $loginUserName  $generationdir
51    chgrp -R $loginGroupName $generationdir
52 fi
53
54 if [ ! -e $sourcesDir ]
55 then
56    mkdir -p $sourcesDir
57    #was : (pb on MacOS?)
58    #chown -R $loginUserName:$loginGroupName $sourcesDir
59    chown -R $loginUserName  $sourcesDir
60    chgrp -R $loginGroupName $sourcesDir
61 fi
62
63 if [ ! -e $binDir ]
64 then
65    mkdir -p $binDir
66    chown -R $loginUserName  $binDir
67    chgrp -R $loginGroupName $binDir
68 fi
69
70 # the following stupid test is used at debug time; Please don't remove!
71 if [ true = true ]
72 #if [ true = false ]
73 then
74   # ///\TODO what about SuSE? Debian? Mandriva? Gentoo?
75   case "$OperatingSystem" in
76   Mandriva)
77      urpmi cmake                
78      urpmi cmake-qtgui            
79      urpmi doxygen              
80      urpmi graphviz             
81      urpmi texlive              
82      urpmi latex2html           
83      urpmi libwxgtk2.8    
84      urpmi lib64wxgtk2.8    
85      urpmi boost-devel          
86      urpmi sqlite-devel         
87      urpmi qt4-common
88      urpmi libqt4-devel             
89      urpmi lib64qt4-devel             
90      #urpmi mesa-libOSMesa-devel 
91      urpmi lib64mesagl1-devel
92      urpmi libmesagl1-devel
93      urpmi lib64xt-devel
94      urpmi libxt-devel
95      urpmi lib64wxgtk2.8-devel
96      urpmi libwxgtk2.8-devel
97      urpmi gcc-c++
98      urpmi git
99      urpmi rpm-build
100      urpmi patch ### EED It's working ???
101
102      ;;
103   Fedora)
104      yum install wget                 -y
105      yum install unzip                -y
106      yum install cmake                -y
107      yum install cmake-gui            -y
108      yum install doxygen              -y
109      yum install graphviz             -y
110      yum install texlive              -y
111      yum install latex2html           -y
112      yum install wxGTK-devel wxBase   -y
113      yum install boost-devel          -y
114      yum install sqlite-devel         -y
115      yum install qt-devel             -y
116      yum install mesa-libOSMesa-devel -y
117      yum install gcc                  -y
118      yum install gcc-c++              -y
119      yum install xerces-c-devel       -y
120      yum install git                  -y
121      yum install qtwebkit-devel       -y
122      yum install patch                -y
123
124      ;;
125   Ubuntu)
126      apt-get --yes install build-essential  # esta linea instala las librerias necesarias para compilar en ubuntu, g++ gcc etc etc etc.
127      apt-get --yes install git
128      apt-get --yes install cmake
129      apt-get --yes install cmake-gui
130      apt-get --yes install cmake-curses-gui
131      apt-get --yes install doxygen
132      apt-get --yes install graphviz
133      apt-get --yes install texlive
134      apt-get --yes install latex2html
135      apt-get --yes install libgtk2.0-dev #GTK
136      apt-get --yes install libwxgtk2.8-dev #Wx GTK
137      apt-get --yes install libwxbase2.8-dev #Wx solito
138      apt-get --yes install wx-common #wxrc
139      apt-get --yes install libboost-dev  #Boost
140      apt-get --yes install libboost-all-dev #Boost
141      apt-get --yes install libqt4-dev #QT4
142      apt-get --yes install libxerces-c-dev
143      apt-get --yes install patch
144      ## CLAIRE - JGRR
145      apt-get --yes install qt4-qmake #QT4 qmake
146      apt-get --yes install libsqlite0-dev
147      apt-get --yes install libsqlite3-dev
148      apt-get --yes install libosmesa6-dev #Mesa6
149      apt-get --yes install uuid-dev # uuid para la instalacion de itk
150      apt-get --yes install libxaw7-dev # X11
151      ;;
152   MacOS)
153      port selfupdate
154      port install cmake                -y
155      port install doxygen              -y
156      port install graphviz             -y
157     # port install tetex               -y   (replaced by texlive) # cf EED : http://www.creatis.insa-lyon.fr/site/fr/CreatoolsInstallInstructionsv2.0.1MacOsv10.5.6-Developpers
158      port install texlive              -y
159      port install latex2html           -y
160      port install wxGTK                -y
161      port install boost                -y
162      ln -s libboost_signals-xgcc40-mt-1_38.dylib    libboost_signals.dylib    /opt/local/lib # cf EED : http://www.creatis.insa-lyon.fr/site
163      ln -s libboost_signals-xgcc40-mt-1_38.dylib    libboost_signals.dylib    /opt/local/lib # cf EED
164      ln -s libboost_filesystem-xgcc40-mt-1_38.dylib libboost_filesystem.dylib /opt/local/lib # cf EE
165      ln -s libboost_system-xgcc40-mt-1_38.dylib     libboost_system.dylib     /opt/local/lib # cf EE 
166      port install sqlite3              -y
167      port install qt4-mac              -y
168      ln -s qmake-mac qmake /opt/local/bin  # cf EED
169      port install mesa                 -y
170      ;;
171   *)
172      echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem "
173      echo " Allowed values are (right now) Fedora, Ubuntu, MacOS "
174      exit 0
175      ;;
176   esac
177 fi