3 ####################################################################################
4 # File : omniORB-4.0.6.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.0.6 ${OMNIORBDIR}/lib
23 if [ "$?" -ne "0" ]; then
26 check_lib_version _omnipymodule.so.2.6 ${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
43 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
44 #$DELIM ${PRODUCT_TYPE} $DELIM
45 export OMNIORBDIR=\${INSTALL_ROOT}/${PRODUCT}
46 export OMNIORB_CONFIG=\${OMNIORBDIR}/.omniORB.cfg
47 export PYTHONPATH=\${OMNIORBDIR}/lib:\${OMNIORBDIR}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
48 export PATH=\$OMNIORBDIR/bin:\$PATH
49 export LD_LIBRARY_PATH=\$OMNIORBDIR/lib:\$LD_LIBRARY_PATH
52 if [ $PROCEDURE != "try_preinstalled" ] && [ -w ${PRODUCT_DIR} ] ; then
53 cat > ${PRODUCT_DIR}/.omniORB.cfg <<EOF
54 InitRef = NameService=corbaname::`hostname`:2810
57 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
58 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
63 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
64 #$DELIM ${PRODUCT_TYPE}_src $DELIM
68 (test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
69 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
73 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
74 try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
80 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
81 source ${INSTALL_WORK}/$SHRC
83 makedir ${PRODUCT_DIR}_SRC
86 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}_SRC
87 check_jb tar xfz ${SOURCE_DIR}/omniORBpy-2.6.tar.gz -C ${PRODUCT_DIR}_SRC
88 check_jb tar xfz ${SOURCE_DIR}/omniNotify-2.1.tar.gz -C ${PRODUCT_DIR}_SRC
90 # to generate environment scripts
94 install_source_and_build()
100 makedir ${PRODUCT_DIR}
102 cd ${PRODUCT_DIR}_SRC/${PRODUCT}_SRC
106 check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORB.LOG \
107 ../configure --prefix=${PRODUCT_DIR}
110 cat >> ${PRODUCT_DIR}/MAKE_OMNIORB.LOG <<EOF
113 check_job ${PRODUCT_DIR}/MAKE_OMNIORB.LOG make
114 check_job ${PRODUCT_DIR}/INSTALL_OMNIORB.LOG make install
117 cd ${PRODUCT_DIR}_SRC/omniORBpy-2.6_SRC
121 check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORBPY.LOG \
122 ../configure --prefix=${PRODUCT_DIR}
125 cat >> ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG <<EOF
128 check_job ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG make
129 check_job ${PRODUCT_DIR}/INSTALL_OMNIORBPY.LOG make install
132 cd ${PRODUCT_DIR}_SRC/omniNotify_SRC
136 check_job ${PRODUCT_DIR}/CONFIGURE_OMNINOTIFY.LOG \
137 ../configure --prefix=${PRODUCT_DIR}
140 cat >> ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG <<EOF
143 check_job ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG make
144 check_job ${PRODUCT_DIR}/INSTALL_OMNINOTIFY.LOG make install
146 cd ${PRODUCT_DIR}/bin
147 sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidl > _omniidl
148 mv -f _omniidl omniidl
150 sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidlrun.py > _omniidlrun.py
151 mv -f _omniidlrun.py omniidlrun.py
152 chmod a+x omniidlrun.py
154 #du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
157 # remove sources and temporary files after building
158 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
159 test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
162 # to generate environment scripts
168 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
169 source ${INSTALL_WORK}/$SHRC
171 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
173 ln -sf ${PRODUCT_DIR} ${INSTALL_ROOT}/omni
175 cd ${PRODUCT_DIR}/bin
176 sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidl > _omniidl
177 mv -f _omniidl omniidl
179 sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidlrun.py > _omniidlrun.py
180 mv -f _omniidlrun.py omniidlrun.py
181 chmod a+x omniidlrun.py
183 # to generate environment script for sources
188 export INSTALL_WORK=$2;
189 export SOURCE_DIR=$3;
190 export INSTALL_ROOT=$4;
191 export PRODUCT_SEQUENCE=$5;
192 export PRODUCT_TYPE=$6;
193 export INSTALL_PRODUCTS=$7;
196 export PRODUCT="omniORB-4.0.6"
197 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
198 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}