3 ####################################################################################
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 [ -n "${PYQTDIR}" ] && [ -f ${PYQTDIR}/pyqtconfig.py ] ; then
18 ver=`cd ${PYQTDIR} && python -c "from pyqtconfig import Configuration; c=Configuration();print c.__getattr__('pyqt_version_str')" 2>/dev/null`
19 if [ -n "$ver" ] ; then
20 maj_ver=`echo $ver | awk -F. '{if(NF>0) print $1; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
21 min_ver=`echo $ver | awk -F. '{if(NF>1) print $2; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
22 rel_ver=`echo $ver | awk -F. '{if(NF>2) print $3; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
23 let ver=$maj_ver*10000+$min_ver*100+$rel_ver
24 if [ $ver -eq 031300 ] ; then
34 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
35 #$DELIM ${PRODUCT_TYPE} $DELIM
36 export PYQTDIR=\${INSTALL_ROOT}/${PRODUCT}
37 export PYQT_SIPS=\${PYQTDIR}/sip
38 export PATH=\${PYQTDIR}:\$PATH
39 export PYTHONPATH=\${PYQTDIR}:\${PYTHONPATH}
40 export LD_LIBRARY_PATH=\${PYQTDIR}:\$LD_LIBRARY_PATH
43 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
44 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
49 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
50 #$DELIM ${PRODUCT_TYPE}_src $DELIM
54 (test -w ${PRODUCT_DIR}_SRC && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_DIR}_SRC)
55 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
59 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
60 try_existing ${PRODUCT_DIR}_SRC ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
66 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
67 source ${INSTALL_WORK}/$SHRC
69 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
71 # to generate environment scripts
75 install_source_and_build()
81 makedir ${PRODUCT_DIR}
84 sed -e 's%check_license()$%#check_license()%g' configure.py > configure.py.new
85 mv -f configure.py.new configure.py
87 check_job ${PRODUCT_DIR}/CONFIGURE.LOG \
88 python configure.py -b ${PRODUCT_DIR} -d ${PRODUCT_DIR} -v ${PRODUCT_DIR}/sip
90 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
93 check_job ${PRODUCT_DIR}/MAKE.LOG make
94 check_job ${PRODUCT_DIR}/INSTALL.LOG make install
96 #du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
99 # remove sources and temporary files after building
100 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
101 test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
104 # to generate environment scripts
110 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
111 source ${INSTALL_WORK}/$SHRC
113 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
115 # modify pyqtconfig.py file
117 sed -e "s%\('pyqt_bin_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}',%g" pyqtconfig.py > pyqtconfig.py.1
118 sed -e "s%\('pyqt_mod_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}',%g" pyqtconfig.py.1 > pyqtconfig.py
119 sed -e "s%\('pyqt_sip_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/sip',%g" pyqtconfig.py > pyqtconfig.py.1
120 mv pyqtconfig.py.1 pyqtconfig.py
122 # to generate environment script for sources
127 export INSTALL_WORK=$2;
128 export SOURCE_DIR=$3;
129 export INSTALL_ROOT=$4;
130 export PRODUCT_SEQUENCE=$5;
131 export PRODUCT_TYPE=$6;
132 export INSTALL_PRODUCTS=$7;
135 export PRODUCT="PyQt-3.13"
136 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
137 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}