]> Creatis software - creaToolsTools.git/blob - Linux/scripts/CreaTools-GenerateBinTGZ.sh
TPLaux for fedora 32 libGLU
[creaToolsTools.git] / Linux / scripts / CreaTools-GenerateBinTGZ.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 #!/bin/bash
25
26 # JPR 2/5/2011
27 #if [ $UID = 0 ] 
28 #then
29   # Set all local variables
30   scriptDir=`pwd`/scripts
31 ##  cd $scriptsDir
32   source scripts/LocalFunctions.sh
33 ##  cd $scriptsDir
34   source scripts/CreaTools-configure.sh
35
36
37   if [ -e $generationdir ]
38   then
39
40 #--------CreaTools-Bin  for Package developers---------------------------------------------------------
41
42         echo generationdir:
43         echo $generationdir
44         cd $generationdir
45         mkdir GenerateBinTGZ
46     cd GenerateBinTGZ
47
48         ln -s $installPrefix creatools_install
49         ln -s $installPrefixThird thirdparty_install
50
51         source creatools_install/share/creatools/Version.sh 
52 #       distanceAdress=davila@tux.creatis.insa-lyon.fr:creatools/creaTools/v$creatoolsMajorVersion.$creatoolsMinorVersion.x/
53         distanceAdress=davila@tux.creatis.insa-lyon.fr:creatools/creaTools/v$creatoolsMajorVersion.x.x/
54         fileTGZ=CreaTools-Bin-Release-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion-`getDistrib`-`getDistribVersion`.tgz
55         fileTGZstring=CreaTools-Bin-Release-\$creatoolsMajorVersion.\$creatoolsMinorVersion.\$creatoolsBuildVersion-\`getDistrib\`-\`getDistribVersion\`
56         tar -cvzf $fileTGZ creatools_install/* thirdparty_install/*
57         scp $fileTGZ $distanceAdress/$fileTGZ 
58
59
60 #--------CreaTools-Final_User---------------------------------------------------------
61
62         creatoolsTPLaux=creatoolsTPLaux
63         rm -rf $creatoolsTPLaux
64         mkdir $creatoolsTPLaux
65         cd $creatoolsTPLaux
66         mkdir bin
67         mkdir lib64
68         mkdir share
69         mkdir share/creatools
70         echo "export PATH=\$PATH:\$1/bin" > share/creatools/creatools_TPLaux_config.sh
71         echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$1/lib64" >> share/creatools/creatools_TPLaux_config.sh
72         cp $scriptDir/TPLaux-bashrc.sh share/creatools/TPLaux-bashrc.sh
73         cd lib64
74
75 # Fedora 31 
76         if [ `getDistribVersion` == 31 ] ; then 
77                 cp /usr/lib64/libwx*-3.0.so.0 .
78                 cp /usr/lib64/libboost_*.so.1.69.0 .
79                 cp /usr/lib64/libm.so.6 .
80                 cp /usr/lib64/libstdc++.so.6 .
81                 cp /usr/lib64/libSDL2-2.0.so.0 .
82                 cp /usr/lib64/libmspack.so.0 .
83                 cp /usr/lib64/libjpeg.so.62 .
84                 cp /usr/lib64/libicudata.so.63 .
85                 cp /usr/lib64/libicui18n.so.63 .
86                 cp /usr/lib64/libicuuc.so.63 .
87         fi
88
89 # Fedora 28
90         if [ `getDistribVersion` == 28 ] ; then 
91                 cp /usr/lib64/libwx*-3.0.so.0 .
92                 cp /usr/lib64/libboost_*.so.1.66.0 .
93                 cp /usr/lib64/libjpeg.so.62 .
94                 cp /usr/lib64/libSDL2-2.0.so.0 .
95                 cp /usr/lib64/libmspack.so.0 .
96                 cp /usr/lib64/libmspack.so.0 .
97                 cp /usr/lib64/libicudata.so.60 .
98                 cp /usr/lib64/libicui18n.so.60 . 
99                 cp /usr/lib64/libicuuc.so.60 . 
100                 ## For Fedora 32
101                 cp /usr/lib64/libGLU.so.1 . 
102         fi
103
104         cd ../..
105         fileTGZaux=$creatoolsTPLaux-`getDistrib`-`getDistribVersion`.tgz
106         rm -rf $fileTGZaux
107         tar -cvzf $fileTGZaux $creatoolsTPLaux
108         scp $fileTGZaux $distanceAdress/$fileTGZaux
109
110
111         fileTGZf28=CreaTools-Bin-Release-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion-Fedora-28.tgz
112         fileTGZauxf28=$creatoolsTPLaux-Fedora-28.tgz
113
114         
115 #--------Script de Instalation :  creatools-Linux-Bin-x.x.x.sh   --------------------------------------------------------
116
117
118         filename_BinVersion=creatools-Linux-Bin-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion.sh
119
120           echo "##" > $filename_BinVersion
121           echo "## Generated by CreaTools-GeneratedBinTGZ.sh" >> $filename_BinVersion
122           echo "##" >> $filename_BinVersion
123
124           cat creatools_install/share/creatools/Version.sh >> $filename_BinVersion
125           cat $scriptDir/LocalFunctions.sh >> $filename_BinVersion
126
127      echo "ETC_BASHRC=\`getbashrc\`" >>  $filename_BinVersion
128
129
130           echo "if [ \"\$1\" = \"FinalUser\" ] ; then" >> $filename_BinVersion
131           echo "   \`getDownloadCommand\` http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.x.x/$fileTGZf28" >> $filename_BinVersion 
132           echo "   tar -xvzf $fileTGZf28" >>  $filename_BinVersion
133           echo "   rm -f $fileTGZf28" >>  $filename_BinVersion
134           echo "   \`getDownloadCommand\` http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.x.x/$fileTGZauxf28" >> $filename_BinVersion 
135           echo "   tar -xvzf $fileTGZauxf28" >>  $filename_BinVersion
136           echo "   rm -f $fileTGZauxf28" >>  $filename_BinVersion
137       echo "   installPrefixTPLaux=\$(pwd)/creatoolsTPLaux #You need this variable in the -barshrc script" >>  $filename_BinVersion
138       echo "   source creatoolsTPLaux/share/creatools/TPLaux-bashrc.sh"  >>  $filename_BinVersion
139
140           echo "else" >> $filename_BinVersion
141           echo "   \`getDownloadCommand\` http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.x.x/$fileTGZstring.tgz" >> $filename_BinVersion 
142           echo "   tar -xvzf $fileTGZstring.tgz" >>  $filename_BinVersion
143           echo "   rm -f $fileTGZstring.tgz" >>  $filename_BinVersion
144       echo "   OperatingSystem=\`getDistrib\`  #You need this variable in the Base-Stuff script" >>  $filename_BinVersion
145       echo "   cd thirdparty_install/share/creatools/"  >>  $filename_BinVersion
146       echo "   source ThirdParty-install-Base-Stuff.sh \$OperatingSystem"  >>  $filename_BinVersion
147       echo "   cd ../../.."  >>  $filename_BinVersion
148           echo "fi" >> $filename_BinVersion
149          
150
151 #EED     echo "source creatools_install/share/creatools/LocalFunctions.sh"  >>  $filename_BinVersion
152      echo "installPrefix=\$(pwd)/creatools_install #You need this variable in the -barshrc script" >>  $filename_BinVersion
153      echo "installPrefixThird=\$(pwd)/thirdparty_install #You need this variable in the -barshrc script" >>  $filename_BinVersion
154      echo "source thirdparty_install/share/creatools/ThirdParty-bashrc.sh"  >>  $filename_BinVersion
155      echo "source creatools_install/share/creatools/CreaTools-bashrc.sh"  >>  $filename_BinVersion
156      echo "echo $fileTGZstring >> Creatools-Bin-Version.txt " >>  $filename_BinVersion
157
158      echo "echo  " >>  $filename_BinVersion
159      echo "echo  " >>  $filename_BinVersion
160      echo "echo  " >>  $filename_BinVersion
161      echo "echo  " >>  $filename_BinVersion
162      echo "echo 'Open a new terminal to run creatools.'" >>  $filename_BinVersion
163      echo "echo '(Close this window and continue....)' " >>  $filename_BinVersion
164      echo "echo  " >>  $filename_BinVersion
165      echo "echo  " >>  $filename_BinVersion
166      echo "echo  Install dir:" >>  $filename_BinVersion
167      echo "pwd"    >>  $filename_BinVersion
168      echo "echo  " >>  $filename_BinVersion
169      echo "read -p 'Press [Enter] key to continue...'" >>  $filename_BinVersion
170      scp $filename_BinVersion $distanceAdress/. 
171      rm creatools_install
172      rm thirdparty_install
173
174
175 #-----------------------------------------------------------------
176
177          cat $scriptDir/Install-Creatools-Bin.sh-downloadTool $scriptDir/Install-Creatools-Bin.sh > Install-Creatools-Bin-tmp.sh
178 ##       cat $scriptDir/Install-Creatools-Bin.sh-downloadTool $scriptDir/Install-Creatools-Final_User.sh > Install-Creatools-Final_User-tmp.sh
179
180      scp Install-Creatools-Bin-tmp.sh $distanceAdress/Install-Creatools-Bin-Release-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion.sh       
181  ##    scp Install-Creatools-Final_User-tmp.sh $distanceAdress/Install-Creatools-Final_User-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion.sh       
182
183          ssh davila@tux.creatis.insa-lyon.fr "cd creatools/creaTools;rm Install-Creatools-Bin-Release.sh;  ln -s v4.x.x/Install-Creatools-Bin-Release-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion.sh  Install-Creatools-Bin-Release.sh"
184          ssh davila@tux.creatis.insa-lyon.fr "cd creatools/creaTools;rm creatools-Linux-Bin.sh;  ln -s v4.x.x/$filename_BinVersion  creatools-Linux-Bin.sh"
185
186 ##       ssh davila@tux.creatis.insa-lyon.fr "cd creatools/creaTools;rm Install-Creatools-Final_User.sh;  ln -s v4.x.x/Install-Creatools-Final_User-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion.sh  Install-Creatools-Final_User.sh"
187
188
189      echo ""
190      echo ""
191      echo ""
192      echo "Creation OK:"
193      echo $fileTGZ
194      echo ""
195      echo $PWD
196         
197   else
198    echo
199    echo "..ERROR.."
200    echo "==================================================="
201    echo "REMEMBER !"
202    echo ""
203    echo "You MUST run before:"
204    echo "   > ./instalscript config"
205    echo "   > ./instalscript 3rd"
206    echo "   > ./instalscript creatools"
207    echo "==================================================="
208    echo
209    echo 
210    read a
211    exit 0 
212   fi  
213   
214
215