3 ####################################################################################
4 # File : omniORB-4.0.5.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.5 ${OMNIORBDIR}/lib
23 if [ "$?" -ne "0" ]; then
26 check_lib_version _omnipymodule.so.2.4 ${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
85 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${PRODUCT_DIR}_SRC
86 check_jb tar xfz ${SOURCE_DIR}/omniORBpy-2.5.tar.gz -C ${PRODUCT_DIR}_SRC
87 check_jb tar xfz ${SOURCE_DIR}/omniNotify-2.1.tar.gz -C ${PRODUCT_DIR}_SRC
89 # to generate environment scripts
93 install_source_and_build()
99 makedir ${PRODUCT_DIR}
101 cd ${PRODUCT_DIR}_SRC/${PRODUCT}_SRC
105 check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORB.LOG \
106 ../configure --prefix=${PRODUCT_DIR}
109 cat >> ${PRODUCT_DIR}/MAKE_OMNIORB.LOG <<EOF
112 check_job ${PRODUCT_DIR}/MAKE_OMNIORB.LOG make
113 check_job ${PRODUCT_DIR}/INSTALL_OMNIORB.LOG make install
116 cd ${PRODUCT_DIR}_SRC/omniORBpy-2.5_SRC
120 check_job ${PRODUCT_DIR}/CONFIGURE_OMNIORBPY.LOG \
121 ../configure --prefix=${PRODUCT_DIR}
124 cat >> ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG <<EOF
127 check_job ${PRODUCT_DIR}/MAKE_OMNIORBPY.LOG make
128 check_job ${PRODUCT_DIR}/INSTALL_OMNIORBPY.LOG make install
131 cd ${PRODUCT_DIR}_SRC/omniNotify-2.1_SRC
135 check_job ${PRODUCT_DIR}/CONFIGURE_OMNINOTIFY.LOG \
136 ../configure --prefix=${PRODUCT_DIR}
139 cat >> ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG <<EOF
142 check_job ${PRODUCT_DIR}/MAKE_OMNINOTIFY.LOG make
143 check_job ${PRODUCT_DIR}/INSTALL_OMNINOTIFY.LOG make install
145 cd ${PRODUCT_DIR}/bin
146 sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidl > _omniidl
147 mv -f _omniidl omniidl
149 sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidlrun.py > _omniidlrun.py
150 mv -f _omniidlrun.py omniidlrun.py
151 chmod a+x omniidlrun.py
153 #du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
156 # remove sources and temporary files after building
157 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
158 test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
161 # to generate environment scripts
167 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
168 source ${INSTALL_WORK}/$SHRC
170 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
172 ln -sf ${PRODUCT_DIR} ${INSTALL_ROOT}/omni
174 cd ${PRODUCT_DIR}/bin
175 sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidl > _omniidl
176 mv -f _omniidl omniidl
178 sed -e "s%#\!.*python%#\!/usr/bin/env python%" omniidlrun.py > _omniidlrun.py
179 mv -f _omniidlrun.py omniidlrun.py
180 chmod a+x omniidlrun.py
182 # to generate environment script for sources
187 export INSTALL_WORK=$2;
188 export SOURCE_DIR=$3;
189 export INSTALL_ROOT=$4;
190 export PRODUCT_SEQUENCE=$5;
191 export PRODUCT_TYPE=$6;
192 export INSTALL_PRODUCTS=$7;
195 export PRODUCT="omniORB-4.0.5"
196 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
197 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}