1 # ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
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.
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
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 # ------------------------------------------------------------------------
29 # Set all local variables
30 scriptDir=`pwd`/scripts
32 source scripts/LocalFunctions.sh
34 source scripts/CreaTools-configure.sh
37 if [ -e $generationdir ]
40 #--------Active SSH agent to the next operations---------------------------------------------------------
41 echo "Active SSH agent to copy files to the Cluster:"
45 #--------CreaTools-Bin for Package developers---------------------------------------------------------
53 ln -s $installPrefix creatools_install
54 ln -s $installPrefixThird thirdparty_install
56 source creatools_install/share/creatools/Version.sh
57 # distanceAdress=davila@tux.creatis.insa-lyon.fr:creatools/creaTools/v$creatoolsMajorVersion.$creatoolsMinorVersion.x/
58 distanceAdress=davila@tux.creatis.insa-lyon.fr:creatools/creaTools/v$creatoolsMajorVersion.x.x/
59 fileTGZ=CreaTools-Bin-Release-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion-`getDistrib`-`getDistribVersion`.tgz
60 fileTGZstring=CreaTools-Bin-Release-\$creatoolsMajorVersion.\$creatoolsMinorVersion.\$creatoolsBuildVersion-\`getDistrib\`-\`getDistribVersion\`
61 tar -cvzf $fileTGZ creatools_install/* thirdparty_install/*
62 scp $fileTGZ $distanceAdress/$fileTGZ
65 #--------CreaTools-Final_User---------------------------------------------------------
67 creatoolsTPLaux=creatoolsTPLaux
68 rm -rf $creatoolsTPLaux
69 mkdir $creatoolsTPLaux
75 echo "export PATH=\$PATH:\$1/bin" > share/creatools/creatools_TPLaux_config.sh
76 echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$1/lib64" >> share/creatools/creatools_TPLaux_config.sh
77 cp $scriptDir/TPLaux-bashrc.sh share/creatools/TPLaux-bashrc.sh
81 if [ `getDistribVersion` == 31 ] ; then
82 cp /usr/lib64/libwx*-3.0.so.0 .
83 cp /usr/lib64/libboost_*.so.1.69.0 .
84 cp /usr/lib64/libm.so.6 .
85 cp /usr/lib64/libstdc++.so.6 .
86 cp /usr/lib64/libSDL2-2.0.so.0 .
87 cp /usr/lib64/libmspack.so.0 .
88 cp /usr/lib64/libjpeg.so.62 .
89 cp /usr/lib64/libicudata.so.63 .
90 cp /usr/lib64/libicui18n.so.63 .
91 cp /usr/lib64/libicuuc.so.63 .
95 if [ `getDistribVersion` == 28 ] ; then
96 cp /usr/lib64/libwx*-3.0.so.0 .
97 cp /usr/lib64/libboost_*.so.1.66.0 .
98 cp /usr/lib64/libjpeg.so.62 .
99 cp /usr/lib64/libSDL2-2.0.so.0 .
100 cp /usr/lib64/libmspack.so.0 .
101 cp /usr/lib64/libmspack.so.0 .
102 cp /usr/lib64/libicudata.so.60 .
103 cp /usr/lib64/libicui18n.so.60 .
104 cp /usr/lib64/libicuuc.so.60 .
106 cp /usr/lib64/libGLU.so.1 .
110 fileTGZaux=$creatoolsTPLaux-`getDistrib`-`getDistribVersion`.tgz
112 tar -cvzf $fileTGZaux $creatoolsTPLaux
113 scp $fileTGZaux $distanceAdress/$fileTGZaux
116 fileTGZf28=CreaTools-Bin-Release-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion-Fedora-28.tgz
117 fileTGZauxf28=$creatoolsTPLaux-Fedora-28.tgz
120 #--------Script de Instalation : creatools-Linux-Bin-x.x.x.sh --------------------------------------------------------
123 filename_BinVersion=creatools-Linux-Bin-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion.sh
125 echo "##" > $filename_BinVersion
126 echo "## Generated by CreaTools-GeneratedBinTGZ.sh" >> $filename_BinVersion
127 echo "##" >> $filename_BinVersion
129 cat creatools_install/share/creatools/Version.sh >> $filename_BinVersion
130 cat $scriptDir/LocalFunctions.sh >> $filename_BinVersion
132 echo "ETC_BASHRC=\`getbashrc\`" >> $filename_BinVersion
135 echo "if [ \"\$1\" = \"FinalUser\" ] ; then" >> $filename_BinVersion
136 echo " \`getDownloadCommand\` http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.x.x/$fileTGZf28" >> $filename_BinVersion
137 echo " tar -xvzf $fileTGZf28" >> $filename_BinVersion
138 echo " rm -f $fileTGZf28" >> $filename_BinVersion
139 echo " \`getDownloadCommand\` http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.x.x/$fileTGZauxf28" >> $filename_BinVersion
140 echo " tar -xvzf $fileTGZauxf28" >> $filename_BinVersion
141 echo " rm -f $fileTGZauxf28" >> $filename_BinVersion
142 echo " installPrefixTPLaux=\$(pwd)/creatoolsTPLaux #You need this variable in the -barshrc script" >> $filename_BinVersion
143 echo " source creatoolsTPLaux/share/creatools/TPLaux-bashrc.sh" >> $filename_BinVersion
145 echo "else" >> $filename_BinVersion
146 echo " \`getDownloadCommand\` http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.x.x/$fileTGZstring.tgz" >> $filename_BinVersion
147 echo " tar -xvzf $fileTGZstring.tgz" >> $filename_BinVersion
148 echo " rm -f $fileTGZstring.tgz" >> $filename_BinVersion
149 echo " OperatingSystem=\`getDistrib\` #You need this variable in the Base-Stuff script" >> $filename_BinVersion
150 echo " cd thirdparty_install/share/creatools/" >> $filename_BinVersion
151 echo " source ThirdParty-install-Base-Stuff.sh \$OperatingSystem" >> $filename_BinVersion
152 echo " cd ../../.." >> $filename_BinVersion
153 echo "fi" >> $filename_BinVersion
156 #EED echo "source creatools_install/share/creatools/LocalFunctions.sh" >> $filename_BinVersion
157 echo "installPrefix=\$(pwd)/creatools_install #You need this variable in the -barshrc script" >> $filename_BinVersion
158 echo "installPrefixThird=\$(pwd)/thirdparty_install #You need this variable in the -barshrc script" >> $filename_BinVersion
159 echo "source thirdparty_install/share/creatools/ThirdParty-bashrc.sh" >> $filename_BinVersion
160 echo "source creatools_install/share/creatools/CreaTools-bashrc.sh" >> $filename_BinVersion
161 echo "echo $fileTGZstring >> Creatools-Bin-Version.txt " >> $filename_BinVersion
163 echo "echo " >> $filename_BinVersion
164 echo "echo " >> $filename_BinVersion
165 echo "echo " >> $filename_BinVersion
166 echo "echo " >> $filename_BinVersion
167 echo "echo 'Open a new terminal to run creatools.'" >> $filename_BinVersion
168 echo "echo '(Close this window and continue....)' " >> $filename_BinVersion
169 echo "echo " >> $filename_BinVersion
170 echo "echo " >> $filename_BinVersion
171 echo "echo Install dir:" >> $filename_BinVersion
172 echo "pwd" >> $filename_BinVersion
173 echo "echo " >> $filename_BinVersion
174 echo "read -p 'Press [Enter] key to continue...'" >> $filename_BinVersion
175 scp $filename_BinVersion $distanceAdress/.
177 rm thirdparty_install
180 #-----------------------------------------------------------------
182 cat $scriptDir/Install-Creatools-Bin.sh-downloadTool $scriptDir/Install-Creatools-Bin.sh > Install-Creatools-Bin-tmp.sh
183 ## cat $scriptDir/Install-Creatools-Bin.sh-downloadTool $scriptDir/Install-Creatools-Final_User.sh > Install-Creatools-Final_User-tmp.sh
185 scp Install-Creatools-Bin-tmp.sh $distanceAdress/Install-Creatools-Bin-Release-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion.sh
186 ## scp Install-Creatools-Final_User-tmp.sh $distanceAdress/Install-Creatools-Final_User-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion.sh
188 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"
189 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"
191 ## 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"
205 echo "==================================================="
208 echo "You MUST run before:"
209 echo " > ./instalscript config"
210 echo " > ./instalscript 3rd"
211 echo " > ./instalscript creatools"
212 echo "==================================================="