3 ####################################################################################
4 # File : PyQt-3.14.1.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 [ -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 031401 ] ; 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 if test `uname -m` = "x86_64" ; then
85 export CFLAGS=-m64 CXXFLAGS=-m64
88 sed -e 's%check_license()$%#check_license()%g' configure.py > configure.py.new
89 mv -f configure.py.new configure.py
91 check_job ${PRODUCT_DIR}/CONFIGURE.LOG \
92 python configure.py -b ${PRODUCT_DIR} -d ${PRODUCT_DIR} -v ${PRODUCT_DIR}/sip
94 cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
97 check_job ${PRODUCT_DIR}/MAKE.LOG make
98 check_job ${PRODUCT_DIR}/INSTALL.LOG make install
100 #du -sk ${PRODUCT_DIR}_SRC > ${PRODUCT_DIR}/size.log
103 # remove sources and temporary files after building
104 if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
105 test -d ${PRODUCT_DIR}_SRC && rm -fr ${PRODUCT_DIR}_SRC
108 # to generate environment scripts
114 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
115 source ${INSTALL_WORK}/$SHRC
117 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INSTALL_ROOT}
119 # modify pyqtconfig.py file
121 sed -e "s%\('pyqt_bin_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}',%g" pyqtconfig.py > pyqtconfig.py.1
122 sed -e "s%\('pyqt_mod_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}',%g" pyqtconfig.py.1 > pyqtconfig.py
123 sed -e "s%\('pyqt_sip_dir':[[:space:]]*\).*%\1'${PRODUCT_DIR}/sip',%g" pyqtconfig.py > pyqtconfig.py.1
124 mv pyqtconfig.py.1 pyqtconfig.py
126 # to generate environment script for sources
131 export INSTALL_WORK=$2;
132 export SOURCE_DIR=$3;
133 export INSTALL_ROOT=$4;
134 export PRODUCT_SEQUENCE=$5;
135 export PRODUCT_TYPE=$6;
136 export INSTALL_PRODUCTS=$7;
139 export PRODUCT="PyQt-3.14.1"
140 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
141 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}