3 ####################################################################################
4 # File : omniORB-4.1.0.sh
5 # Created : Thu Dec 18 12:01:00 2002
6 # Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
8 # Module : Installation Wizard
9 # Copyright : 2002-2007 CEA
11 # This script is the part of the SALOME installation procedure.
13 ####################################################################################
17 if [ -z "${OMNIORBDIR}" ]; then
18 #echo "OMNIORBDIR doesn't set"
21 python_version="`python -c 'import sys; print sys.version[:3]'`"
22 check_lib_version libomniORB4.so.1.0 ${OMNIORBDIR}/lib
23 if [ "$?" -ne "0" ]; then
26 check_lib_version _omnipymodule.so.3.0 ${OMNIORBDIR}/lib/python${python_version}/site-packages
27 if [ "$?" -ne "0" ]; then
30 check_lib_version libCOSNotify4.so.0.1 ${OMNIORBDIR}/lib
31 if [ "$?" -ne "0" ]; then
34 check_lib_version notifd ${OMNIORBDIR}/bin
35 if [ "$?" -ne "0" ]; then
44 if test `uname -m` = "x86_64" ; then
45 export OMNI_LIB_PREFIX="64"
48 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
49 #$DELIM ${PRODUCT_TYPE} $DELIM
50 export OMNIORBDIR=\${INSTALL_ROOT}/${PRODUCT}
51 export OMNIORB_CONFIG=\${OMNIORBDIR}/.omniORB.cfg
52 export PYTHONPATH=\${OMNIORBDIR}/lib${OMNI_LIB_PREFIX}:\${OMNIORBDIR}/lib${OMNI_LIB_PREFIX}/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
53 export PATH=\$OMNIORBDIR/bin:\$PATH
54 export LD_LIBRARY_PATH=\$OMNIORBDIR/lib:\$LD_LIBRARY_PATH
57 if [ $PROCEDURE != "try_preinstalled" ] && [ -w ${PRODUCT_DIR} ] ; then
58 cat > ${PRODUCT_DIR}/.omniORB.cfg <<EOF
59 InitRef = NameService=corbaname::`hostname`:2810
62 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
63 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
68 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
69 #$DELIM ${PRODUCT_TYPE}_src $DELIM
73 (test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
74 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
78 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
79 try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
85 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
86 source ${INSTALL_WORK}/$SHRC
88 makedir ${PRODUCT_DIR}_SRC
90 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}_SRC
91 check_jb tar xfz ${SOURCE_DIR}/omniORBpy-3.0.tar.gz -C ${PRODUCT_DIR}_SRC
92 check_jb tar xfz ${SOURCE_DIR}/omniNotify-2.1.tar.gz -C ${PRODUCT_DIR}_SRC
94 # to generate environment scripts
98 install_source_and_build()
104 makedir ${PRODUCT_DIR}
106 cd ${PRODUCT_DIR}_SRC/omniORB-4.1.0_SRC
110 if [ -e /etc/redhat-release ] ; then
111 grep -e "Red Hat" /etc/redhat-release > /dev/null
112 if [ $? == 0 ] ; then is_redhat=1 ; fi
115 if [ "X$is_redhat" == "X1" ] ; then
116 check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORB.LOG ../configure --prefix=${PRODUCT_DIR} --disable-ipv6
118 check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORB.LOG ../configure --prefix=${PRODUCT_DIR}
122 cat >> ${PRODUCT_DIR}/MAKE_OMNIORB.LOG <<EOF
125 check_job ${PRODUCT_DIR}/MAKE_OMNIORB.LOG make
126 check_job ${PRODUCT_DIR}/INSTALL_OMNIORB.LOG make install
128 if test `uname -m` = "x86_64" ; then
129 cd ${PRODUCT_DIR}/lib; ln -s ../lib64/python2.4 .
133 cd ${PRODUCT_DIR}_SRC/omniORBpy-3.0_SRC
137 check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORBPY.LOG \
138 ../configure --prefix=${PRODUCT_DIR}
141 cat >> ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG <<EOF
144 check_job ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG make
145 check_job ${PRODUCT_DIR}/INSTALL_OMNIORBPY.LOG make install
148 cd ${PRODUCT_DIR}_SRC/omniNotify-2.1_SRC
153 check_job ${PRODUCT_DIR}/CONFIGURE_OMNINOTIFY.LOG \
154 ../configure --prefix=${PRODUCT_DIR}
157 cat >> ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG <<EOF
160 check_job ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG make
161 check_job ${PRODUCT_DIR}/INSTALL_OMNINOTIFY.LOG make install
163 cd ${PRODUCT_DIR}/bin
164 sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidl > _omniidl
165 mv -f _omniidl omniidl
167 sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidlrun.py > _omniidlrun.py
168 mv -f _omniidlrun.py omniidlrun.py
169 chmod a+x omniidlrun.py
171 #du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
174 # remove sources and temporary files after building
175 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
176 test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
179 # to generate environment scripts
185 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
186 source ${INSTALL_WORK}/$SHRC
188 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
190 ln -sf ${PRODUCT_DIR} ${INSTALL_ROOT}/omni
192 cd ${PRODUCT_DIR}/bin
193 sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidl > _omniidl
194 mv -f _omniidl omniidl
196 sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidlrun.py > _omniidlrun.py
197 mv -f _omniidlrun.py omniidlrun.py
198 chmod a+x omniidlrun.py
200 # to generate environment script for sources
205 export INSTALL_WORK=$2;
206 export SOURCE_DIR=$3;
207 export INSTALL_ROOT=$4;
208 export PRODUCT_SEQUENCE=$5;
209 export PRODUCT_TYPE=$6;
210 export INSTALL_PRODUCTS=$7;
213 export PRODUCT="omniORB-4.1.0"
214 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
215 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}