if [ -e $generationdir ]
then
+#--------CreaTools-Bin for Package developers---------------------------------------------------------
+
echo generationdir:
echo $generationdir
cd $generationdir
source creatools_install/share/creatools/Version.sh
# distanceAdress=davila@tux.creatis.insa-lyon.fr:creatools/creaTools/v$creatoolsMajorVersion.$creatoolsMinorVersion.x/
distanceAdress=davila@tux.creatis.insa-lyon.fr:creatools/creaTools/v$creatoolsMajorVersion.x.x/
-
fileTGZ=CreaTools-Bin-Release-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion-`getDistrib`-`getDistribVersion`.tgz
fileTGZstring=CreaTools-Bin-Release-\$creatoolsMajorVersion.\$creatoolsMinorVersion.\$creatoolsBuildVersion-\`getDistrib\`-\`getDistribVersion\`
+ tar -cvzf $fileTGZ creatools_install/* thirdparty_install/*
+ scp $fileTGZ $distanceAdress/$fileTGZ
+
+
+#--------CreaTools-Final_User---------------------------------------------------------
+
+ creatoolsTPLaux=creatoolsTPLaux
+ rm -rf $creatoolsTPLaux
+ mkdir $creatoolsTPLaux
+ cd $creatoolsTPLaux
+ mkdir bin
+ mkdir lib64
+ mkdir share
+ mkdir share/creatools
+ echo "export PATH=\$PATH:\$1/bin" > share/creatools/creatools_TPLaux_config.sh
+ echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$1/lib64" >> share/creatools/creatools_TPLaux_config.sh
+ cp $scriptDir/TPLaux-bashrc.sh share/creatools/TPLaux-bashrc.sh
+ cd lib64
+
+# Fedora 31
+ if [ `getDistribVersion` == 31 ] ; then
+ cp /usr/lib64/libwx*-3.0.so.0 .
+ cp /usr/lib64/libboost_*.so.1.69.0 .
+ cp /usr/lib64/libm.so.6 .
+ cp /usr/lib64/libstdc++.so.6 .
+ cp /usr/lib64/libSDL2-2.0.so.0 .
+ cp /usr/lib64/libmspack.so.0 .
+ cp /usr/lib64/libjpeg.so.62 .
+ cp /usr/lib64/libicudata.so.63 .
+ cp /usr/lib64/libicui18n.so.63 .
+ cp /usr/lib64/libicuuc.so.63 .
+ fi
+
+# Fedora 28
+ if [ `getDistribVersion` == 28 ] ; then
+ cp /usr/lib64/libwx*-3.0.so.0 .
+ cp /usr/lib64/libboost_*.so.1.66.0 .
+ cp /usr/lib64/libjpeg.so.62 .
+ cp /usr/lib64/libSDL2-2.0.so.0 .
+ cp /usr/lib64/libmspack.so.0 .
+ cp /usr/lib64/libmspack.so.0 .
+ cp /usr/lib64/libicudata.so.60 .
+ cp /usr/lib64/libicui18n.so.60 .
+ cp /usr/lib64/libicuuc.so.60 .
+ fi
+
+ cd ../..
+ fileTGZaux=$creatoolsTPLaux-`getDistrib`-`getDistribVersion`.tgz
+ rm -rf $fileTGZaux
+ tar -cvzf $fileTGZaux $creatoolsTPLaux
+ scp $fileTGZaux $distanceAdress/$fileTGZaux
+
+
+ fileTGZf28=CreaTools-Bin-Release-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion-Fedora-28.tgz
+ fileTGZauxf28=$creatoolsTPLaux-Fedora-28.tgz
- tar -cvzf $fileTGZ creatools_install/* thirdparty_install/*
-
+
+#--------Script de Instalation : creatools-Linux-Bin-x.x.x.sh --------------------------------------------------------
- scp $fileTGZ $distanceAdress/$fileTGZ
- filename_BinVersion=creatools-Linux-Bin-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion.sh
+ filename_BinVersion=creatools-Linux-Bin-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion.sh
echo "##" > $filename_BinVersion
echo "## Generated by CreaTools-GeneratedBinTGZ.sh" >> $filename_BinVersion
cat creatools_install/share/creatools/Version.sh >> $filename_BinVersion
cat $scriptDir/LocalFunctions.sh >> $filename_BinVersion
- echo "\`getDownloadCommand\` http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.x.x/$fileTGZstring.tgz" >> $filename_BinVersion
- echo "tar -xvzf $fileTGZstring.tgz" >> $filename_BinVersion
- echo "rm -f $fileTGZstring.tgz" >> $filename_BinVersion
+ echo "ETC_BASHRC=\`getbashrc\`" >> $filename_BinVersion
+
+
+ echo "if [ \"\$1\" = \"FinalUser\" ] ; then" >> $filename_BinVersion
+ echo " \`getDownloadCommand\` http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.x.x/$fileTGZf28" >> $filename_BinVersion
+ echo " tar -xvzf $fileTGZf28" >> $filename_BinVersion
+ echo " rm -f $fileTGZf28" >> $filename_BinVersion
+ echo " \`getDownloadCommand\` http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.x.x/$fileTGZauxf28" >> $filename_BinVersion
+ echo " tar -xvzf $fileTGZauxf28" >> $filename_BinVersion
+ echo " rm -f $fileTGZauxf28" >> $filename_BinVersion
+ echo " installPrefixTPLaux=\$(pwd)/creatoolsTPLaux #You need this variable in the -barshrc script" >> $filename_BinVersion
+ echo " source creatoolsTPLaux/share/creatools/TPLaux-bashrc.sh" >> $filename_BinVersion
+
+ echo "else" >> $filename_BinVersion
+ echo " \`getDownloadCommand\` http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/v\$creatoolsMajorVersion.x.x/$fileTGZstring.tgz" >> $filename_BinVersion
+ echo " tar -xvzf $fileTGZstring.tgz" >> $filename_BinVersion
+ echo " rm -f $fileTGZstring.tgz" >> $filename_BinVersion
+ echo " OperatingSystem=\`getDistrib\` #You need this variable in the Base-Stuff script" >> $filename_BinVersion
+ echo " cd thirdparty_install/share/creatools/" >> $filename_BinVersion
+ echo " source ThirdParty-install-Base-Stuff.sh \$OperatingSystem" >> $filename_BinVersion
+ echo " cd ../../.." >> $filename_BinVersion
+ echo "fi" >> $filename_BinVersion
#EED echo "source creatools_install/share/creatools/LocalFunctions.sh" >> $filename_BinVersion
- echo "ETC_BASHRC=\`getbashrc\`" >> $filename_BinVersion
echo "installPrefix=\$(pwd)/creatools_install #You need this variable in the -barshrc script" >> $filename_BinVersion
echo "installPrefixThird=\$(pwd)/thirdparty_install #You need this variable in the -barshrc script" >> $filename_BinVersion
- echo "OperatingSystem=\`getDistrib\` #You need this variable in the Base-Stuff script" >> $filename_BinVersion
-
- echo "cd thirdparty_install/share/creatools/" >> $filename_BinVersion
- echo "source ThirdParty-install-Base-Stuff.sh \$OperatingSystem" >> $filename_BinVersion
- echo "cd ../../.." >> $filename_BinVersion
-
echo "source thirdparty_install/share/creatools/ThirdParty-bashrc.sh" >> $filename_BinVersion
echo "source creatools_install/share/creatools/CreaTools-bashrc.sh" >> $filename_BinVersion
-
echo "echo $fileTGZstring >> Creatools-Bin-Version.txt " >> $filename_BinVersion
echo "echo " >> $filename_BinVersion
echo "echo " >> $filename_BinVersion
echo "read -p 'Press [Enter] key to continue...'" >> $filename_BinVersion
scp $filename_BinVersion $distanceAdress/.
+ rm creatools_install
+ rm thirdparty_install
+
+
+#-----------------------------------------------------------------
- rm creatools_install
- rm thirdparty_install
+ cat $scriptDir/Install-Creatools-Bin.sh-downloadTool $scriptDir/Install-Creatools-Bin.sh > Install-Creatools-Bin-tmp.sh
+## cat $scriptDir/Install-Creatools-Bin.sh-downloadTool $scriptDir/Install-Creatools-Final_User.sh > Install-Creatools-Final_User-tmp.sh
+ scp Install-Creatools-Bin-tmp.sh $distanceAdress/Install-Creatools-Bin-Release-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion.sh
+ ## scp Install-Creatools-Final_User-tmp.sh $distanceAdress/Install-Creatools-Final_User-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion.sh
- cd $scriptsDir
- scp $scriptDir/Install-Creatools-Bin.sh $distanceAdress/Install-Creatools-Bin-Release-$creatoolsMajorVersion.$creatoolsMinorVersion.$creatoolsBuildVersion.sh
-
- 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"
+ 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"
+ 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"
- 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"
+## 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"
echo ""
--- /dev/null
+#!/bin/bash
+
+#File generated by 'installscript'
+#DO NOT edit !
+#(except if you *do* know what you do)
+
+OperatingSystem=Fedora
+corenumber=4
+generationdir=/home/davila/Creatis/C10
+installPrefix=/home/davila/Creatis/C10/ci
+installPrefixThird=/home/davila/Creatis/C10/tpli
+docgeneration=OFF
+sourcesFrom=GIT
+loginUserName=davila
+loginGroupName=davila
+buildType=Release
+gdcmVersion=GDCM1
+ITKVersion=ITK4
+ETC_BASHRC=/home/davila/.bashrc
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-# pour la Santé)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-#
-# This software is governed by the CeCILL-B license under French law and
-# abiding by the rules of distribution of free software. You can use,
-# modify and/ or redistribute the software under the terms of the CeCILL-B
-# license as circulated by CEA, CNRS and INRIA at the following URL
-# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-# or in the file LICENSE.txt.
-#
-# As a counterpart to the access to the source code and rights to copy,
-# modify and redistribute granted by the license, users are provided only
-# with a limited warranty and the software's author, the holder of the
-# economic rights, and the successive licensors have only limited
-# liability.
-#
-# The fact that you are presently reading this means that you have had
-# knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------
-#!/bin/bash -e
-###########################################
-function getDistrib {
- local OS=`uname`
- if [ "$OS" == Darwin ] ; then OS=MacOS;
-##EED2016-10-15
-## elif [ "$OS" == Linux ] ; then OS=$(lsb_release -i | awk '{print $3}')
- elif [ "$OS" == Linux ] ; then OS=`awk 'NR==1{print $1}' /etc/system-release`
- else OS=""
- fi
-# checkDistrib $OS
- echo $OS
-}
-
-
-OperatingSystem=`getDistrib`
-
- case "$OperatingSystem" in
- Mandriva)
- echo Root password:
- su -c "urpmi aria2"
- downloadCommand=aria2c
- ;;
- Fedora)
- ARIA2EXIST=$(rpm -qa | grep aria2 | wc -l)
- if [ "$ARIA2EXIST" -eq '1' ]; then
- echo Root password:
- su -c "dnf install aria2 -y"
+if [ "$#" -ne 1 ]; then
+ echo " Help: Install-Creatools-Bin.sh [pkg-dev|FinalUser]"
+ echo
+else
+ CREATOOLSBINDIR=Creatools-Bin
+ rm -rf $CREATOOLSBINDIR
+ mkdir $CREATOOLSBINDIR
+ cd $CREATOOLSBINDIR
+ $downloadCommand http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/creatools-Linux-Bin.sh
+ if [ "$1" = "pkg-dev" ]; then
+ echo "Installing creaTools pkg-dev ..."
+ source creatools-Linux-Bin.sh
+ elif [ "$1" = "FinalUser" ]; then
+ echo "Installing creaTools FinalUser ..."
+ source creatools-Linux-Bin.sh FinalUser
+ else
+ echo "Error. Input parameter"
fi
- downloadCommand=aria2c
- ;;
- Ubuntu)
- echo Root password:
- su -c "apt-get --yes install wget"
- downloadCommand=wget
- ;;
- MacOS)
- port install curl -y
- downloadCommand=curl
- ;;
- *)
- echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem "
- echo " Allowed values are (right now) Fedora, Ubuntu, MacOS "
-// exit 0
- ;;
- esac
-
-CREATOOLSBINDIR=Creatools-Bin
-rm -rf $CREATOOLSBINDIR
-mkdir $CREATOOLSBINDIR
-cd $CREATOOLSBINDIR
-$downloadCommand http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/creatools-Linux-Bin.sh
-source creatools-Linux-Bin.sh
-cd ..
-
+ cd ..
+fi
--- /dev/null
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Santé)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# The fact that you are presently reading this means that you have had
+# knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------
+
+#!/bin/bash -e
+
+###########################################
+function getDistrib {
+ local OS=`uname`
+
+ if [ "$OS" == Darwin ] ; then OS=MacOS;
+##EED2016-10-15
+## elif [ "$OS" == Linux ] ; then OS=$(lsb_release -i | awk '{print $3}')
+ elif [ "$OS" == Linux ] ; then
+ OS=`awk 'NR==1{print $1}' /etc/system-release`
+ if [ "$OS" == "" ] ; then
+ OS=$(lsb_release -i | awk '{print $3}')
+ fi
+ else OS=""
+ fi
+# checkDistrib $OS
+ echo $OS
+}
+
+
+OperatingSystem=`getDistrib`
+
+echo
+echo
+echo $OperatingSystem
+echo
+ case "$OperatingSystem" in
+ Mandriva)
+ ARIA2EXIST=$(rpm -qa | grep aria2 | wc -l)
+ if [ "$ARIA2EXIST" = "0" ]; then
+ echo "Install aria2 (download tool) Root password:"
+ su -c "urpmi aria2"
+ fi
+ downloadCommand=aria2c
+ ;;
+ Fedora)
+ ARIA2EXIST=$(rpm -qa | grep aria2 | wc -l)
+ if [ "$ARIA2EXIST" = "0" ]; then
+ echo "Install aria2 (download tool) Root password:"
+ su -c "dnf install aria2 -y"
+ fi
+ downloadCommand=aria2c
+ ;;
+ Debian)
+ WGETEXIST=$(dpkg -l | grep wget | wc -l)
+ if [ "$WGETEXIST" = "0" ]; then
+ echo "Install wget (download tool) Root password:"
+ su -c "apt-get --yes install wget "
+ fi
+ downloadCommand=wget
+ ;;
+ Ubuntu)
+ WGETEXIST=$(dpkg -l | grep wget | wc -l)
+ if [ "$WGETEXIST" = "0" ]; then
+ echo "Install wget (download tool) Root password:"
+ su -c "apt-get --yes install wget"
+ fi
+ downloadCommand=wget
+ ;;
+ MacOS)
+ port install curl -y
+ downloadCommand=curl
+ ;;
+ *)
+ echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem "
+ echo " Allowed values are (right now) Fedora, Ubuntu, MacOS "
+// exit 0
+ ;;
+ esac
+
+
###########################################
function checkDistrib {
local OS=$1
- if [ "`checkVal $OS MacOS Fedora Ubuntu Mandriva CentOS`" == "false" ] ; then
+ if [ "`checkVal $OS MacOS Fedora Ubuntu Mandriva CentOS Debian`" == "false" ] ; then
echo "Operating System not supported: $OS"
echo "Currently supported system: Fedora Ubuntu MacOS"
exit 1
elif [ "$DISTRIB" == Fedora ] ; then OSVersion=`awk 'NR==1{print $3}' /etc/system-release`
elif [ "$DISTRIB" == Ubuntu ] ; then OSVersion=`awk 'NR==1{print $2}' /etc/issue`
elif [ "$DISTRIB" == CentOS ] ; then OSVersion=`awk 'NR==1{print $3}' /etc/issue`
+ elif [ "$DISTRIB" == Debian ] ; then OSVersion=`awk 'NR==1{print $3}' /etc/issue`
else OSVersion="VOID_EED"
fi
echo $OSVersion
elif [ "$DISTRIB" == Fedora ] ; then KernelVersion=$(uname -a | awk '{print $3}')
elif [ "$DISTRIB" == Ubuntu ] ; then KernelVersion=$(uname -a | awk '{print $3}')
elif [ "$DISTRIB" == CentOS ] ; then KernelVersion=$(uname -a | awk '{print $3}')
+ elif [ "$DISTRIB" == Debian ] ; then KernelVersion=$(uname -a | awk '{print $3}')
else KernelVersion="VOID_EED"
fi
echo $KernelVersion
elif [ "$DISTRIB" == Fedora ] ; then downloadCommand='aria2c -x 16'
elif [ "$DISTRIB" == CentOs ] ; then downloadCommand='aria2c -x 16'
elif [ "$DISTRIB" == Ubuntu ] ; then downloadCommand=wget
+ elif [ "$DISTRIB" == Debian ] ; then downloadCommand=wget
else downloadCommand="VOID_EED"
fi
echo $downloadCommand
--- /dev/null
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Santé)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# The fact that you are presently reading this means that you have had
+# knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------
+
+
+#!/bin/bash
+
+echo "---TPLaux-bashrc.sh---"
+echo $ETC_BASHRC
+echo "installPrefixTPLaux: " $installPrefixTPLaux
+
+# Cleanning line in .bashrc file
+sed -i -e '/.*installPrefixTPLaux*/ d' $ETC_BASHRC
+sed -i -e '/.*creatools_TPLaux_config.*/ d' $ETC_BASHRC
+
+echo "====================================================ETC_BASHRC " $ETC_BASHRC
+echo installPrefixTPLaux=$installPrefixTPLaux >> $ETC_BASHRC
+echo '[ -f "$installPrefixTPLaux/share/creatools/creatools_TPLaux_config.sh" ] && source $installPrefixTPLaux/share/creatools/creatools_TPLaux_config.sh $installPrefixTPLaux' >> $ETC_BASHRC
+
bash ThirdParty-install-Base-rpm.sh $OperatingSystem
else
# must log as root
- echo "Please enter the root passwd to add necessary packages:";
+ echo "Creatools need to install some RPM pakages. Please enter the root passwd :";
if [ "Ubuntu" == $OperatingSystem ] ; then
sudo bash ThirdParty-install-Base-rpm.sh $OperatingSystem
elif [ "MacOS" == $OperatingSystem ] ; then
apt-get --yes install graphviz
apt-get --yes install texlive
apt-get --yes install latex2html
- apt-get --yes install libgtk2.0-dev #GTK
- apt-get --yes install libwxgtk2.8-dev #Wx GTK
- apt-get --yes install libwxbase2.8-dev #Wx solito
+
+# apt-get --yes install libgtk2.0-dev #GTK
+ apt-get --yes install libgtk-3-dev #GTK
+# apt-get --yes install libwxgtk2.8-dev #Wx GTK
+ apt-get --yes install libwxgtk3.0-dev #Wx GTK
+# apt-get --yes install libwxbase2.8-dev #Wx solito
+ apt-get --yes install libwxbase3.0-dev #Wx solito
apt-get --yes install wx-common #wxrc
+
apt-get --yes install libboost-dev #Boost
apt-get --yes install libboost-all-dev #Boost
apt-get --yes install libqt4-dev #QT4