]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Update for Paraview 3.10.1
authorinv <inv@opencascade.com>
Tue, 19 Apr 2011 07:08:52 +0000 (07:08 +0000)
committerinv <inv@opencascade.com>
Tue, 19 Apr 2011 07:08:52 +0000 (07:08 +0000)
config_files/ParaView-3.10.sh

index fdcb3dd05b75197fb33d2cb80fb8aacaccc09651..776c4b57f7285b5d6ac37581053304bc98c4332e 100755 (executable)
 ####################################################################################
 
 #
-# VTK version
+# Paraview version and lib version
 #
-PVVERSION=3.10
+PVVERSION=3.10.1
+PVLIBVERSION=`echo ${PVVERSION} | awk -F. '{printf("%d.%d",$1,$2)}'`
 
 check_version()
 {
 if [ -z "$PARAVIEW" ]; then
    return 1 
 fi
-check_lib_version libvtkCommon.so ${PVHOME}/lib/paraview-${PVVERSION}
+check_lib_version libvtkCommon.so ${PVHOME}/lib/paraview-${PVLIBVERSION}
 if [ "$?" -eq "0" ]; then
    return 0
 fi
@@ -33,11 +34,12 @@ print_env_bin()
 {
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
-export PVVERSION=${PVVERSION}
 export PVHOME=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
 export PATH=\${PVHOME}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${PVHOME}/lib/paraview-\${PVVERSION}:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${PVHOME}/lib/paraview-\${PVVERSION}:\${PVHOME}/lib/paraview-\${PVVERSION}/site-packages:\${PVHOME}/lib/paraview-\${PVVERSION}/site-packages/paraview:\${PYTHONPATH}
+export LD_LIBRARY_PATH=\${PVHOME}/lib/paraview-${PVLIBVERSION}:\${LD_LIBRARY_PATH}
+export PYTHONPATH=\${PVHOME}/lib/paraview-${PVLIBVERSION}:\${PVHOME}/lib/paraview-${PVLIBVERSION}/site-packages:\${PVHOME}/lib/paraview-${PVLIBVERSION}/site-packages/paraview:\${PYTHONPATH}
+export VTK_DIR=\${PVHOME}/lib/paraview-${PVLIBVERSION}
+export PV_PLUGIN_PATH=\${PVHOME}/lib/paraview-${PVLIBVERSION}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -67,11 +69,15 @@ make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}
 source ${INSTALL_WORK}/$SHRC
 
 check_jb tar xfz ${SOURCE_DIR}/${PRODUCT}.tar.gz -C ${INST_ROOT}
-check_jb tar xfz ${SOURCE_DIR}/ParaViewData-${PVVERSION}.tar.gz -C ${INST_ROOT}
+data_archive=${SOURCE_DIR}/ParaViewData-${PVVERSION}.tar.gz
+if [ ! -f ${data_archive} ] ; then
+    data_archive=${SOURCE_DIR}/ParaViewData-${PVLIBVERSION}.tar.gz
+fi
+check_jb tar xfz ${data_archive} -C ${INST_ROOT}
 
 ### patch paraview
-# 1. patch for ParaViewLibraryDepends.cmake problem (ParaView 3.10.0)
-need_patch_depend=1
+# 1. patch for ParaViewLibraryDepends.cmake problem (ParaView 3.10.0) [OBSOLETE]
+need_patch_depend=0
 if [ "${need_patch_depend}" == "1" ] && [ -f patches/paraview-3.10.0-depend.patch ] ; then
     cp patches/paraview-3.10.0-depend.patch ${PRODUCT_SRC_DIR}
     ( cd ${PRODUCT_SRC_DIR} ; patch -p0 < paraview-3.10.0-depend.patch )
@@ -178,8 +184,23 @@ fi
 CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_USE_VISITBRIDGE=ON"
 CMAKE_OPTIONS=$CMAKE_OPTIONS" -DBOOST_ROOT=${BOOSTDIR}"
 
+### Extra options (switch off non-used Paraview plug-ins)
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_CoProcessing:BOOL=OFF"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_Moments:BOOL=OFF"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_Prism:BOOL=OFF"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_SLACTool:BOOL=OFF"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_SierraPlugin:BOOL=OFF"
+
+### Extra options (switch on required Paraview plug-ins)
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_EyeDomeLighting:BOOL=ON"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_ForceTime:BOOL=ON"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_H5PartReader:BOOL=ON"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_PointSprite:BOOL=ON"
+CMAKE_OPTIONS=$CMAKE_OPTIONS" -DPARAVIEW_BUILD_PLUGIN_SurfaceLIC:BOOL=ON"
+
 ### Mesa settings (if pre-installed) [OBSOLETE]
-if [ -n "$MESA_HOME" ]; then
+with_mesa=0
+if [ "${with_mesa}" == "1" ] && [ "$MESA_HOME" != "" ] ; then
   CMAKE_OPTIONS=$CMAKE_OPTIONS" -DOPENGL_INCLUDE_DIR:STRING=${MESA_HOME}/include"
   if test `uname -m` = "x86_64" ; then
       CMAKE_OPTIONS=$CMAKE_OPTIONS" -DOPENGL_gl_LIBRARY:STRING=${MESA_HOME}/lib64/libGL.so"
@@ -208,7 +229,6 @@ check_job ${PRODUCT_DIR}/MAKE.LOG make -j4
 
 ### 'make install` has been replaced by `cpack`
 use_make_install=0
-
 if [ "${use_make_install}" == "1" ] ; then
     check_job ${PRODUCT_DIR}/MAKEINSTALL.LOG make install
    
@@ -216,7 +236,7 @@ if [ "${use_make_install}" == "1" ] ; then
     # 1. patch for missing libvtkPV*.so libraries (ParaView 3.10 development version) [OBSOLETE]
     need_patch_libvtkpv=0
     if [ "${need_patch_libvtkpv}" == "1" ] ; then
-       cd ${PRODUCT_DIR}/lib/paraview-${PVVERSION}
+       cd ${PRODUCT_DIR}/lib/paraview-${PVLIBVERSION}
        for f in `find . -name "vtkPV*.so"` XXX ; do
            if test "$f" == "XXX" ; then continue ; fi
            d=`dirname $f`
@@ -230,8 +250,11 @@ else
     cp -rf ${bindir}/* ${PRODUCT_DIR}
 fi 
 
-# patch Paraview problem (bad VisItBridge configuration)
-sed -i "s%SET(PARAVIEW_USE_VISITBRIDGE \"ON\")%SET(PARAVIEW_USE_VISITBRIDGE \"OFF\")%g" ${PRODUCT_DIR}/lib/paraview-${PVVERSION}/ParaViewConfig.cmake
+# patch Paraview problem for bad VisItBridge configuration), required at least for Paraview 3.10.0 and 3.10.1
+patch_visit_usage=1
+if [ "${patch_visit_usage}" == "1" ] ; then
+    sed -i "s%SET(PARAVIEW_USE_VISITBRIDGE \"ON\")%SET(PARAVIEW_USE_VISITBRIDGE \"OFF\")%g" ${PRODUCT_DIR}/lib/paraview-${PVLIBVERSION}/ParaViewConfig.cmake
+fi
 
 cd ${PRODUCT_DIR}