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 cat > ${PRODUCT_DIR}/.omniORB.cfg <<EOF
53 InitRef = NameService=corbaname::`hostname`:2810
55 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
56 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
59 # looks for the native product and collects it's environment (used by make_env())
62 if [ $? -eq 0 ] ; then
63 python_version="`python -c 'import sys; print sys.version[:3]'`"
64 tmp="\${OMNIORBDIR}/bin ${OMNIORBDIR}/bin \${PATH} ${PATH}";
65 path=`sort_path ${tmp}`
66 tmp="\${OMNIORBDIR}/lib ${OMNIORBDIR}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}";
67 ld_library_path=`sort_path ${tmp}`
68 tmp="\${OMNIORBDIR}/lib:\${OMNIORBDIR}/lib/python\${PYTHON_VERSION}/site-packages ${OMNIORBDIR}/lib:${OMNIORBDIR}/lib/python${python_version}/site-packages \${PYTHONPATH} ${PYTHONPATH}";
69 pythonpath=`sort_path ${tmp}`
70 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
71 #$DELIM ${PRODUCT_TYPE} $DELIM
72 export OMNIORBDIR=${OMNIORBDIR}
73 export OMNIORB_CONFIG=\${OMNIORBDIR}/.omniORB.cfg
74 export PYTHONPATH=${pythonpath}
76 export LD_LIBRARY_PATH=${ld_library_path}
79 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
86 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
92 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
93 source ${INSTALL_WORK}/$SHRC
95 makedir ${PRODUCT_DIR}
97 check_jb tar xfz ${SOURCE_DIR}/omniORB-4.0.5.tar.gz -C ${INSTALL_WORK}
98 check_jb tar xfz ${SOURCE_DIR}/omniORBpy-2.5.tar.gz -C ${INSTALL_WORK}
99 check_jb tar xfz ${SOURCE_DIR}/omniNotify-2.1.tar.gz -C ${INSTALL_WORK}
102 cd ${INSTALL_WORK}/omniORB-4.0.5
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 ${INSTALL_WORK}/omniORBpy-2.5
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 ${INSTALL_WORK}/omniNotify
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_WORK} > ${PRODUCT_DIR}/size.log
156 rm -fr ${INSTALL_WORK}/omniORB-4.0.5
157 rm -fr ${INSTALL_WORK}/omniORBpy-2.5
158 rm -fr ${INSTALL_WORK}/omniNotify
164 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
165 source ${INSTALL_WORK}/$SHRC
167 check_jb tar xfz ${SOURCE_DIR}/omniORB-4.0.5.tar.gz -C ${INSTALL_ROOT}
169 ln -sf ${PRODUCT_DIR} ${INSTALL_ROOT}/omni
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
183 export INSTALL_WORK=$2;
184 export SOURCE_DIR=$3;
185 export INSTALL_ROOT=$4;
186 export PRODUCT_SEQUENCE=$5;
187 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="omni" ; fi
188 export PRODUCT="omniORB-4.0.5"
189 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
190 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}