3 ####################################################################################
4 # File : omniORB-4.0.7.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
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-2.7.tar.gz -C ${PRODUCT_DIR}_SRC
92 check_jb tar xfz ${SOURCE_DIR}/omniNotify-2.1.tar.gz -C ${PRODUCT_DIR}_SRC
94 # apply patches for 64-bit platforms
95 if test `uname -m` = "x86_64" ; then
96 if [ -f patches/omniORB-4.0.7-lib64.patch ] ; then
97 cp patches/omniORB-4.0.7-lib64.patch ${PRODUCT_DIR}_SRC/${PRODUCT}_SRC
98 ( cd ${PRODUCT_DIR}_SRC/${PRODUCT}_SRC ; patch -p1 < omniORB-4.0.7-lib64.patch )
100 if [ -f patches/omniORBpy-2.7-lib64.patch ] ; then
101 cp patches/omniORBpy-2.7-lib64.patch ${PRODUCT_DIR}_SRC/omniORBpy-2.7_SRC
102 ( cd ${PRODUCT_DIR}_SRC/omniORBpy-2.7_SRC ; patch -p1 < omniORBpy-2.7-lib64.patch )
104 if [ -f patches/omniNotify-2.1-lib64.patch ] ; then
105 cp patches/omniNotify-2.1-lib64.patch ${PRODUCT_DIR}_SRC/omniNotify-2.1_SRC
106 ( cd ${PRODUCT_DIR}_SRC/omniNotify-2.1_SRC ; patch -p1 < omniNotify-2.1-lib64.patch )
110 # to generate environment scripts
114 install_source_and_build()
120 makedir ${PRODUCT_DIR}
122 cd ${PRODUCT_DIR}_SRC/omniORB-4.0.7_SRC
126 check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORB.LOG \
127 ../configure --prefix=${PRODUCT_DIR}
130 cat >> ${PRODUCT_DIR}/MAKE_OMNIORB.LOG <<EOF
133 check_job ${PRODUCT_DIR}/MAKE_OMNIORB.LOG make
134 check_job ${PRODUCT_DIR}/INSTALL_OMNIORB.LOG make install
136 if test `uname -m` = "x86_64" ; then
137 cd ${PRODUCT_DIR}/lib; ln -s ../lib64/python2.4 .
141 cd ${PRODUCT_DIR}_SRC/omniORBpy-2.7_SRC
145 check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORBPY.LOG \
146 ../configure --prefix=${PRODUCT_DIR}
149 cat >> ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG <<EOF
152 check_job ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG make
153 check_job ${PRODUCT_DIR}/INSTALL_OMNIORBPY.LOG make install
156 cd ${PRODUCT_DIR}_SRC/omniNotify-2.1_SRC
161 check_job ${PRODUCT_DIR}/CONFIGURE_OMNINOTIFY.LOG \
162 ../configure --prefix=${PRODUCT_DIR}
165 cat >> ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG <<EOF
168 check_job ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG make
169 check_job ${PRODUCT_DIR}/INSTALL_OMNINOTIFY.LOG make install
171 cd ${PRODUCT_DIR}/bin
172 sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidl > _omniidl
173 mv -f _omniidl omniidl
175 sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidlrun.py > _omniidlrun.py
176 mv -f _omniidlrun.py omniidlrun.py
177 chmod a+x omniidlrun.py
179 #du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
182 # remove sources and temporary files after building
183 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
184 test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
187 # to generate environment scripts
193 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
194 source ${INSTALL_WORK}/$SHRC
196 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
198 ln -sf ${PRODUCT_DIR} ${INSTALL_ROOT}/omni
200 cd ${PRODUCT_DIR}/bin
201 sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidl > _omniidl
202 mv -f _omniidl omniidl
204 sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidlrun.py > _omniidlrun.py
205 mv -f _omniidlrun.py omniidlrun.py
206 chmod a+x omniidlrun.py
208 # to generate environment script for sources
213 export INSTALL_WORK=$2;
214 export SOURCE_DIR=$3;
215 export INSTALL_ROOT=$4;
216 export PRODUCT_SEQUENCE=$5;
217 export PRODUCT_TYPE=$6;
218 export INSTALL_PRODUCTS=$7;
221 export PRODUCT="omniORB-4.0.7"
222 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
223 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}