diff --git a/bin/buildParaView3.5-cvs b/bin/buildParaView
similarity index 72%
rename from bin/buildParaView3.5-cvs
rename to bin/buildParaView
index f12a158973f9ac6c4191f515e333787a8cf64488..76a0264e69baefe1b5503212a49297ccba5c9d4d 100755
--- a/bin/buildParaView3.5-cvs
+++ b/bin/buildParaView
@@ -24,38 +24,38 @@
 #     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 #
 # Script
-#     buildParaView3.5-cvs
+#     buildParaView
 #
 # Description
-#     Build and install ParaView
-#     - run from folder above ParaView source folder or place the
-#       ParaView source under $WM_THIRD_PARTY_DIR
+#     Build and install paraview
+#     - run from folder above paraview source folder or place the
+#       paraview source under $WM_THIRD_PARTY_DIR
 #
 #------------------------------------------------------------------------------
 . $WM_PROJECT_DIR/bin/tools/buildParaViewFunctions
 
-PARAVIEW_SRC=paraview-3.5-cvs
-PARAVIEW_MAJOR_VERSION=3.5
-
 # User options:
 # ~~~~~~~~~~~~~
 
 # MPI support:
-WITH_MPI=OFF
+withMPI=false
 MPI_MAX_PROCS=32
 
 # Python support:
 # note: script will try to determine the appropriate python library.
 #       If it fails, specify the path using the PYTHON_LIBRARY variable
-WITH_PYTHON=OFF
+withPYTHON=false
 PYTHON_LIBRARY=""
-# PYTHON_LIBRARY="/usr/lib64/libpython2.5.so.1.0"
+# PYTHON_LIBRARY="/usr/lib64/libpython2.6.so.1.0"
 
 # MESA graphics support:
-WITH_MESA=OFF
-MESA_INCLUDE_DIR="/usr/include/GL"
+withMESA=false
+MESA_INCLUDE="/usr/include/GL"
 MESA_LIBRARY="/usr/lib64/libOSMesa.so"
 
+# extra QT gui support (useful for re-using the installation for engrid)
+withQTSUPPORT=true
+
 #
 # No further editing below this line
 #------------------------------------------------------------------------------
@@ -65,13 +65,15 @@ usage() {
     while [ "$#" -ge 1 ]; do echo "$1"; shift; done
     cat<<USAGE
 
-usage: ${0##*/} [OPTION]
+usage: $Script [OPTION]
 options:
-  -fast      for repeated builds (-make -install) *use with caution*
-  -mpi       with mpi (if not already enabled)
-  -python    with python (if not already enabled)
-  -mesa      with mesa (if not already enabled)
-  -verbose   verbose output in Makefiles
+  -rebuild      for repeated builds (-make -install) *use with caution*
+  -mpi          with mpi (if not already enabled)
+  -python       with python (if not already enabled)
+  -mesa         with mesa (if not already enabled)
+  -qt           with extra Qt gui support (if not already enabled)
+  -verbose      verbose output in Makefiles
+  -version VER  specify an alternative version (default: $ParaView_VERSION)
   -help
 
 For finer control, the build stages can be also selected individually
@@ -82,25 +84,34 @@ For finer control, the build stages can be also selected individually
   -install
   [-envpath]    alter absolute paths in CMake files to use env variables
 
-Build and install $PARAVIEW_SRC
-  - run from folder above the ParaView source folder or place the
-    ParaView source under \$WM_THIRD_PARTY_DIR
+Build and install paraview-$ParaView_VERSION
+  - run from folder above the ParaView source folder or place the ParaView
+    source under \$WM_THIRD_PARTY_DIR ($WM_THIRD_PARTY_DIR)
 
 USAGE
    exit 1
 }
 
+#------------------------------------------------------------------------------
+
+#
 # add options based on script name:
-case "$Script" in *-mpi*)    WITH_MPI=ON;; esac
-case "$Script" in *-python*) WITH_PYTHON=ON;; esac
-case "$Script" in *-mesa*)   WITH_MESA=ON;; esac
+#
+case "$Script" in *-mpi*)    withMPI=true;; esac
+case "$Script" in *-python*) withPYTHON=true;; esac
+case "$Script" in *-mesa*)   withMESA=true;; esac
+case "$Script" in *-qt*)     withQTSUPPORT=true;; esac
 
+#
+# various building stages
+#
 runCONFIG=true
 runMAKE=true
 runMAKEDOC=true
 runINSTALL=true
 runENVPATH=false
 
+
 # parse options
 while [ "$#" -gt 0 ]
 do
@@ -144,7 +155,7 @@ do
         runENVPATH=true
         shift
         ;;
-    -fast)               # shortcut for rebuild
+    -rebuild)            # shortcut for rebuilding
         runCONFIG=false
         runMAKE=true
         runMAKEDOC=false
@@ -152,36 +163,48 @@ do
         shift
         ;;
     -mpi)
-        WITH_MPI=ON
+        withMPI=true
         shift
         ;;
     -python)
-        WITH_PYTHON=ON
+        withPYTHON=true
         shift
         ;;
     -mesa)
-        WITH_MESA=ON
+        withMESA=true
+        shift
+        ;;
+    -qt)
+        withQTSUPPORT=true
         shift
         ;;
     -verbose)
-        VERBOSE=ON
+        withVERBOSE=true
         shift
         ;;
+    -version)
+        [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
+        export ParaView_VERSION=$2
+        shift 2
+        ;;
     *)
         usage "unknown option/argument: '$*'"
         ;;
     esac
 done
 
+
 # Set configure options
 #~~~~~~~~~~~~~~~~~~~~~~
 addVerbosity        # verbose makefiles
 addMpiSupport       # set MPI-specific options
 addPythonSupport    # set Python-specific options
 addMesaSupport      # set MESA-specific options
+addQtSupport        # add extra Qt support
 
 getPaths            # discover where things are or should be put
 
+
 # Build and install
 # ~~~~~~~~~~~~~~~~~
 [ $runCONFIG  = true ] && configParaView
diff --git a/bin/buildParaView-python b/bin/buildParaView-python
new file mode 120000
index 0000000000000000000000000000000000000000..5c6464acd1fcec5a62526fe789df17e6d3ac8df6
--- /dev/null
+++ b/bin/buildParaView-python
@@ -0,0 +1 @@
+buildParaView
\ No newline at end of file
diff --git a/bin/buildParaView3.5-cvs-python b/bin/buildParaView3.5-cvs-python
deleted file mode 120000
index d3ed3924a892abffc145149dd53de0b9819d6272..0000000000000000000000000000000000000000
--- a/bin/buildParaView3.5-cvs-python
+++ /dev/null
@@ -1 +0,0 @@
-buildParaView3.5-cvs
\ No newline at end of file
diff --git a/bin/engridFoam b/bin/engridFoam
new file mode 100755
index 0000000000000000000000000000000000000000..37e61b05691b7709878d8c647bcb0634e17334a4
--- /dev/null
+++ b/bin/engridFoam
@@ -0,0 +1,66 @@
+#!/bin/sh
+#------------------------------------------------------------------------------
+# =========                 |
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+#  \\    /   O peration     |
+#   \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+#    \\/     M anipulation  |
+#-------------------------------------------------------------------------------
+# License
+#     This file is part of OpenFOAM.
+#
+#     OpenFOAM is free software; you can redistribute it and/or modify it
+#     under the terms of the GNU General Public License as published by the
+#     Free Software Foundation; either version 2 of the License, or (at your
+#     option) any later version.
+#
+#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#     for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with OpenFOAM; if not, write to the Free Software Foundation,
+#     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Script
+#     engridFoam
+#
+# Description
+#     start engrid using the paraview libraries from OpenFOAM
+#
+#------------------------------------------------------------------------------
+usage() {
+    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
+    cat<<USAGE
+
+usage: ${0##*/} [OPTION]
+options:
+  -help
+
+* start engrid using the paraview-$ParaView_VERSION libraries
+  passes through engrid options unmodified
+
+USAGE
+    exit 1
+}
+
+# report usage
+[ "$1" = "-h" -o "$1" = "-help" ] && usage
+
+# set the major version "<digits>.<digits>"
+ParaView_MAJOR_VERSION=$(echo $ParaView_VERSION | \
+    sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/')
+
+
+bindir=$WM_THIRD_PARTY_DIR/engrid/platforms/$WM_ARCH
+libdir="$ParaView_DIR/lib/paraview-$ParaView_MAJOR_VERSION"
+
+[ -x $bindir/engrid ] || usage "engrid executable not found in $bindir"
+[ -d $libdir ] || usage "paraview libraries not found"
+
+export LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH
+echo "starting $bindir/engrid $@"
+eval "exec $bindir/engrid $@ &"
+
+#------------------------------------------------------------------------------
diff --git a/bin/tools/buildParaView3.4 b/bin/tools/buildParaView3.4
deleted file mode 100755
index ebdaae111f771bdb9f774817dc04dd0af9fbf279..0000000000000000000000000000000000000000
--- a/bin/tools/buildParaView3.4
+++ /dev/null
@@ -1,192 +0,0 @@
-#!/bin/sh
-#------------------------------------------------------------------------------
-# =========                 |
-# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-#  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
-#    \\/     M anipulation  |
-#------------------------------------------------------------------------------
-# License
-#     This file is part of OpenFOAM.
-#
-#     OpenFOAM is free software; you can redistribute it and/or modify it
-#     under the terms of the GNU General Public License as published by the
-#     Free Software Foundation; either version 2 of the License, or (at your
-#     option) any later version.
-#
-#     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-#     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-#     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-#     for more details.
-#
-#     You should have received a copy of the GNU General Public License
-#     along with OpenFOAM; if not, write to the Free Software Foundation,
-#     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-#
-# Script
-#     buildParaView3.3-cvs
-#
-# Description
-#     Build and install ParaView
-#     - run from folder above ParaView source folder or place the
-#       ParaView source under $WM_THIRD_PARTY_DIR
-#
-#------------------------------------------------------------------------------
-. $WM_PROJECT_DIR/bin/tools/buildParaViewFunctions
-
-PARAVIEW_SRC=paraview-3.4
-PARAVIEW_MAJOR_VERSION=3.4
-
-# User options:
-# ~~~~~~~~~~~~~
-
-# MPI support:
-WITH_MPI=OFF
-MPI_MAX_PROCS=32
-
-# Python support:
-# note: script will try to determine the appropriate python library.
-#       If it fails, specify the path using the PYTHON_LIBRARY variable
-WITH_PYTHON=OFF
-PYTHON_LIBRARY=""
-# PYTHON_LIBRARY="/usr/lib64/libpython2.5.so.1.0"
-
-# MESA graphics support:
-WITH_MESA=OFF
-
-#
-# No further editing below this line
-#------------------------------------------------------------------------------
-Script=${0##*/}
-
-usage() {
-    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
-    cat<<USAGE
-
-usage: ${0##*/} [OPTION]
-options:
-  -fast      for repeated builds (-make -install) *use with caution*
-  -mpi       with mpi (if not already enabled)
-  -python    with python (if not already enabled)
-  -mesa      with mesa (if not already enabled)
-  -verbose   verbose output in Makefiles
-  -help
-
-For finer control, the build stages can be also selected individually
-(mutually exclusive)
-  -config
-  -make
-  -makedoc
-  -install
-  [-envpath]    alter absolute paths in CMake files to use env variables
-
-Build and install $PARAVIEW_SRC
-  - run from folder above the ParaView source folder or place the
-    ParaView source under \$WM_THIRD_PARTY_DIR
-
-USAGE
-   exit 1
-}
-
-# add options based on script name:
-case "$Script" in *-mpi*)    WITH_MPI=ON;; esac
-case "$Script" in *-python*) WITH_PYTHON=ON;; esac
-case "$Script" in *-mesa*)   WITH_MESA=ON;; esac
-
-runCONFIG=true
-runMAKE=true
-runMAKEDOC=true
-runINSTALL=true
-runENVPATH=false
-
-# parse options
-while [ "$#" -gt 0 ]
-do
-    case "$1" in
-    -h | -help)
-        usage
-        ;;
-    -config)             # stage 1: config only
-        runCONFIG=true
-        runMAKE=false
-        runMAKEDOC=false
-        runINSTALL=false
-        shift
-        ;;
-    -make)               # stage 2: make only
-        runCONFIG=false
-        runMAKE=true
-        runMAKEDOC=false
-        runINSTALL=false
-        shift
-        ;;
-    -makedoc)            # stage 3: generate html documentation
-        runCONFIG=false
-        runMAKE=false
-        runMAKEDOC=true
-        runINSTALL=false
-        shift
-        ;;
-    -install)            # stage 4: install only
-        runCONFIG=false
-        runMAKE=false
-        runMAKEDOC=false
-        runINSTALL=true
-        shift
-        ;;
-    -envpath)            # optional: change cmake files to use env variables
-        runCONFIG=false
-        runMAKE=false
-        runMAKEDOC=false
-        runINSTALL=false
-        runENVPATH=true
-        shift
-        ;;
-    -fast)               # shortcut for rebuild
-        runCONFIG=false
-        runMAKE=true
-        runMAKEDOC=false
-        runINSTALL=true
-        shift
-        ;;
-    -mpi)
-        WITH_MPI=ON
-        shift
-        ;;
-    -python)
-        WITH_PYTHON=ON
-        shift
-        ;;
-    -mesa)
-        WITH_MESA=ON
-        shift
-        ;;
-    -verbose)
-        VERBOSE=ON
-        shift
-        ;;
-    *)
-        usage "unknown option/argument: '$*'"
-        ;;
-    esac
-done
-
-# Set configure options
-#~~~~~~~~~~~~~~~~~~~~~~
-addVerbosity        # verbose makefiles
-addMpiSupport       # set MPI-specific options
-addPythonSupport    # set Python-specific options
-addMesaSupport      # set MESA-specific options
-
-getPaths            # discover where things are or should be put
-
-# Build and install
-# ~~~~~~~~~~~~~~~~~
-[ $runCONFIG  = true ] && configParaView
-[ $runMAKE    = true ] && makeParaView
-[ $runENVPATH = true ] && fixCMakeFiles
-[ $runMAKEDOC = true ] && makeDocs
-[ $runINSTALL = true ] && installParaView
-
-echo "done"
-#------------------------------------------------------------------------------
diff --git a/bin/tools/buildParaViewFunctions b/bin/tools/buildParaViewFunctions
index f1da2c0e3e23f87cf17c380e056d71a90e07ae83..f1c6ffaed6992ccae240f0f48df33ef742d59c3c 100644
--- a/bin/tools/buildParaViewFunctions
+++ b/bin/tools/buildParaViewFunctions
@@ -53,7 +53,7 @@ addCMakeVariable()
 #
 addVerbosity()
 {
-    [ "$VERBOSE" = ON ] && addCMakeVariable  CMAKE_VERBOSE_MAKEFILE=TRUE
+    [ "$withVERBOSE" = true ] && addCMakeVariable  CMAKE_VERBOSE_MAKEFILE=TRUE
 }
 
 
@@ -62,7 +62,7 @@ addVerbosity()
 #
 addMpiSupport()
 {
-    [ "$WITH_MPI" = ON ] || return
+    [ "${withMPI:=false}" = true ] || return
     OBJ_ADD="$OBJ_ADD-mpi"
 
     addCMakeVariable  PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON
@@ -78,7 +78,7 @@ addMpiSupport()
 #
 addPythonSupport()
 {
-    [ "$WITH_PYTHON" = ON ] || return
+    [ "${withPYTHON:=false}" = true ] || return
     OBJ_ADD="$OBJ_ADD-py"
 
     if pythonBin=$(which python 2>/dev/null)
@@ -105,25 +105,18 @@ addPythonSupport()
         [ -e "$PYTHON_LIBRARY" ] || {
             echo "    Please set the variable PYTHON_LIBRARY to the full"
             echo "    path to (and including) libpython, or deactivate"
-            echo "    python support by setting WITH_PYTHON=OFF"
+            echo "    python support by setting withPYTHON=false"
             exit 1
         }
 
         pythonMajor=$(echo $PYTHON_LIBRARY | sed 's/.*libpython\(.*\)\.so.*/\1/')
         pythonInclude=/usr/include/python$pythonMajor
 
-        [ -e "$PYTHON_LIBRARY" ] || {
-            echo "    Please set the variable PYTHON_LIBRARY to the full"
-            echo "    path to (and including) libpython, or deactivate"
-            echo "    python support by setting WITH_PYTHON=OFF"
-            exit 1
-        }
-
         # note - we could also allow for a PYTHON_INCLUDE variable ...
-        [ -e "$pythonInclude" ] || {
-            echo "    No python include headers found"
+        [ -d "$pythonInclude" ] || {
+            echo "    No python headers found in $pythonInclude/"
             echo "    Please install python headers or deactivate "
-            echo "    python support by setting WITH_PYTHON=OFF"
+            echo "    python support by setting withPYTHON=false"
             exit 1
         }
 
@@ -140,8 +133,8 @@ addPythonSupport()
 
         unset pythonBin pythonInclude pythonMajor
     else
-        echo "*** Error: python not installed"
-        echo "***        Deactivate python support by setting WITH_PYTHON=OFF"
+        echo "*** Error: python not found"
+        echo "***        Deactivate python support by setting withPYTHON=false"
         exit 1
     fi
 }
@@ -152,26 +145,33 @@ addPythonSupport()
 #
 addMesaSupport()
 {
-    [ "$WITH_MESA" = ON ] || return
+    [ "${withMESA:=false}" = true ] || return
 
-    if [ -d "$MESA_INCLUDE_DIR" -a -f "$MESA_LIBRARY" ]
+    if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ]
     then
         OBJ_ADD="$OBJ_ADD-mesa"
 
         addCMakeVariable  VTK_OPENGL_HAS_OSMESA=ON
-        addCMakeVariable  OSMESA_INCLUDE_DIR=$MESA_INCLUDE_DIR
+        addCMakeVariable  OSMESA_INCLUDE_DIR=$MESA_INCLUDE
         addCMakeVariable  OSMESA_LIBRARY=$MESA_LIBRARY
 
     else
        echo "*** Error: no MESA information found"
-       echo "***        Deactivate MESA support by setting WITH_MESA=OFF, or"
-       echo "***        correct paths given by:"
-       echo "***        - MESA_INCLUDE_DIR ($MESA_INCLUDE_DIR)"
+       echo "***        Deactivate MESA support by setting withMESA=false, or"
+       echo "***        correct the paths given by:"
+       echo "***        - MESA_INCLUDE ($MESA_INCLUDE)"
        echo "***        - MESA_LIBRARY ($MESA_LIBRARY)"
        exit 1
     fi
 }
 
+addQtSupport()
+{
+    [ "${withQTSUPPORT:=false}" = true ] || return
+
+    addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
+}
+
 
 #
 # discover where things are or should be put
@@ -181,24 +181,32 @@ getPaths()
     # set paraview environment
     for i in $PWD $WM_THIRD_PARTY_DIR
     do
-        ParaView_INST_DIR=$i/$PARAVIEW_SRC
+        ParaView_INST_DIR=$i/paraview-$ParaView_VERSION
         [ -d $ParaView_INST_DIR ] && break
     done
 
     if [ ! -d "$ParaView_INST_DIR" ]
     then
         # last chance: maybe already in the paraview directory
-        [ "${PWD##*/}" = $PARAVIEW_SRC ] && ParaView_INST_DIR=$PWD
+        if [ "${PWD##*/}" = "paraview-$ParaView_VERSION" ]
+        then
+            ParaView_INST_DIR=$PWD
+        fi
 
         [ -d "$ParaView_INST_DIR" ] || {
-            echo "did not find $PARAVIEW_SRC in these directories:"
+            echo "did not find paraview-$ParaView_VERSION in these directories:"
             echo "  PWD=$PWD"
             echo "  WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR"
+            echo
             echo "abort build"
             exit 1
         }
     fi
 
+    # set the major version "<digits>.<digits>"
+    ParaView_MAJOR_VERSION=$(echo $ParaView_VERSION | \
+        sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/')
+
     # ParaView_DIR=$ParaView_INST_DIR/platforms/$WM_ARCH$WM_COMPILER$OBJ_ADD
     ParaView_DIR=$ParaView_INST_DIR/platforms/$WM_ARCH$WM_COMPILER
     echo "ParaView_DIR=$ParaView_DIR"
@@ -221,10 +229,11 @@ configParaView()
     cd $ParaView_DIR
 
     echo "----"
-    echo "Configuring $PARAVIEW_SRC"
-    echo "    MPI support    : $WITH_MPI"
-    echo "    Python support : $WITH_PYTHON"
-    echo "    MESA support   : $WITH_MESA"
+    echo "Configuring paraview-$ParaView_VERSION (major version: $ParaView_MAJOR_VERSION)"
+    echo "    MPI    support : ${withMPI:-false}"
+    echo "    Python support : ${withPYTHON:-false}"
+    echo "    MESA   support : ${withMESA:-false}"
+    echo "    Qt dev support : ${withQTSUPPORT:-false}"
     echo "    Source         : $ParaView_INST_DIR"
     echo "    Target         : $ParaView_DIR"
     echo "----"
@@ -266,10 +275,10 @@ makeParaView()
     fi
     echo "    Done make"
 
-    echo "    For quicker development, linking lib/paraview-$PARAVIEW_MAJOR_VERSION/ -> bin/"
-    rm -rf lib/paraview-$PARAVIEW_MAJOR_VERSION
+    echo "    For quicker development, linking lib/paraview-$ParaView_MAJOR_VERSION/ -> bin/"
+    rm -rf lib/paraview-$ParaView_MAJOR_VERSION
     mkdir lib 2>/dev/null
-    ( cd lib && ln -s ../bin paraview-$PARAVIEW_MAJOR_VERSION )
+    ( cd lib && ln -s ../bin paraview-$ParaView_MAJOR_VERSION )
 }
 
 
@@ -317,7 +326,7 @@ fixCMakeFiles()
     fixHardLinks ParaView_INST_DIR "$ParaView_INST_DIR" '*.cmake'
 
     # Replace path with env variable: MPI_ARCH_PATH
-    if [ "$WITH_MPI" = ON ]
+    if [ "${withMPI:=false}" = true ]
     then
         fixHardLinks MPI_ARCH_PATH "$MPI_ARCH_PATH" '*.cmake'
     fi
@@ -359,10 +368,10 @@ installParaView()
     echo "disabled 'make install' for now, just use links"
 
     # about.txt may be missing
-    paraviewLibDir="$ParaView_DIR/lib/paraview-$PARAVIEW_MAJOR_VERSION"
+    paraviewLibDir="$ParaView_DIR/lib/paraview-$ParaView_MAJOR_VERSION"
     if [ -d "$paraviewLibDir" -a ! -e "$paraviewLibDir/about.txt" ]
     then
-        echo "paraview-$PARAVIEW_MAJOR_VERSION installed - $(date)" > $paraviewLibDir/about.txt
+        echo "paraview-$ParaView_MAJOR_VERSION installed - $(date)" > $paraviewLibDir/about.txt
     fi
 
 cat<< INFO
@@ -380,9 +389,9 @@ INFO
 
 
 # clear all the variables used before using any of the functions
-unset VERBOSE
-unset WITH_MPI WITH_MESA
-unset WITH_PYTHON PYTHON_LIBRARY
+unset withMPI withQTSUPPORT withVERBOSE
+unset withMESA   MESA_INCLUDE   MESA_LIBRARY
+unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY
 unset CMAKE_VARIABLES
 unset OBJ_ADD
 
diff --git a/etc/aliases.csh b/etc/aliases.csh
index a86caa89ef7e7475f4ed1bc625e7b11e166dbf07..fd7f183a368a39d2d60c7ba5d758bbc1af03a0f5 100644
--- a/etc/aliases.csh
+++ b/etc/aliases.csh
@@ -56,5 +56,6 @@ alias app 'cd $FOAM_APP'
 alias util 'cd $FOAM_UTILITIES'
 alias sol 'cd $FOAM_SOLVERS'
 alias tut 'cd $FOAM_TUTORIALS'
+alias foam3rdParty 'cd $WM_THIRD_PARTY_DIR'
 
 # -----------------------------------------------------------------------------
diff --git a/etc/aliases.sh b/etc/aliases.sh
index a1d8685ba6ebc6b5e920086163c44e67ecbdfa07..b193802246982261a6a18ade4442d2ed3cd5f036 100644
--- a/etc/aliases.sh
+++ b/etc/aliases.sh
@@ -56,5 +56,6 @@ alias app='cd $FOAM_APP'
 alias util='cd $FOAM_UTILITIES'
 alias sol='cd $FOAM_SOLVERS'
 alias tut='cd $FOAM_TUTORIALS'
+alias foam3rdParty='cd $WM_THIRD_PARTY_DIR'
 
 # -----------------------------------------------------------------------------
diff --git a/etc/apps/cint/bashrc b/etc/apps/cint/bashrc
index 577923968a034bc1565491eaaa20fdefc7c62108..51b9a3400e4beb0308e72e3b8fbb16796cc3471e 100644
--- a/etc/apps/cint/bashrc
+++ b/etc/apps/cint/bashrc
@@ -27,7 +27,7 @@
 #
 # Description
 #     Setup file for cint
-#     Sourced from OpenFOAM-?.?/etc/bashrc
+#     Sourced from OpenFOAM-*/etc/bashrc
 #
 #------------------------------------------------------------------------------
 
diff --git a/etc/apps/cint/cshrc b/etc/apps/cint/cshrc
index 6807b32a3d61eb77fba6841792828aae245d0d9b..f2c38c481a3ebca703415c4e094137bb8efc43db 100644
--- a/etc/apps/cint/cshrc
+++ b/etc/apps/cint/cshrc
@@ -26,8 +26,8 @@
 #     cint/cshrc
 #
 # Description
-#     Startup File for cint
-#     Sourced from OpenFOAM-?.?/etc/cshrc
+#     Setup file for cint
+#     Sourced from OpenFOAM-*/etc/cshrc
 #
 #------------------------------------------------------------------------------
 
diff --git a/etc/apps/ensight/bashrc b/etc/apps/ensight/bashrc
index ffd07ab71de68d35d3a75254b3e04bc31f0de2ee..100f65ae5db4efe53a673d032fddef3d74bc3241 100644
--- a/etc/apps/ensight/bashrc
+++ b/etc/apps/ensight/bashrc
@@ -23,11 +23,11 @@
 #     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 #
 # Script
-#     ensightFoam/bashrc
+#     ensight/bashrc
 #
 # Description
 #     Setup file for Ensight 8.?
-#     Sourced from OpenFOAM-?.?/etc/bashrc
+#     Sourced from OpenFOAM-*/etc/bashrc
 #
 #------------------------------------------------------------------------------
 
diff --git a/etc/apps/ensight/cshrc b/etc/apps/ensight/cshrc
index 52335c6b56de79f98b67cf91cf83c3badb90722b..ae7f3d6095763ddbbfd56fdae6023007d67115c2 100644
--- a/etc/apps/ensight/cshrc
+++ b/etc/apps/ensight/cshrc
@@ -23,11 +23,11 @@
 #     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 #
 # Script
-#     ensightFoam/cshrc
+#     ensight/cshrc
 #
 # Description
-#     Startup File for Ensight 8.?.
-#     Sourced from OpenFOAM-?.?/etc/cshrc
+#     Setup file for Ensight 8.?
+#     Sourced from OpenFOAM-*/etc/cshrc
 #
 #------------------------------------------------------------------------------
 
diff --git a/etc/apps/paraview/bashrc b/etc/apps/paraview/bashrc
index f31ec9058a6780e8ff14eaa83dfcb25b051303f5..a6e2c08051a3db1fcb293cdfec30f56116d51909 100644
--- a/etc/apps/paraview/bashrc
+++ b/etc/apps/paraview/bashrc
@@ -26,22 +26,29 @@
 #     paraview/bashrc
 #
 # Description
-#     Setup file for Paraview.
-#     Sourced from OpenFOAM-?.?/etc/bashrc
+#     Setup file for paraview-2.x
+#     Sourced from OpenFOAM-*/etc/bashrc
 #
 #------------------------------------------------------------------------------
 
-export CMAKE_HOME=$WM_THIRD_PARTY_DIR/cmake-2.4.6/platforms/$WM_ARCH
-
-if [ -r $CMAKE_HOME ]
-then
-    export PATH=$CMAKE_HOME/bin:$PATH
-fi
+# determine the cmake to be used
+unset CMAKE_HOME
+for cmake in cmake-2.6.4 cmake-2.6.2 cmake-2.4.6
+do
+    cmake=$WM_THIRD_PARTY_DIR/$cmake/platforms/$WM_ARCH
+    if [ -r $cmake ]
+    then
+        export CMAKE_HOME=$cmake
+        export PATH=$CMAKE_HOME/bin:$PATH
+        break
+    fi
+done
 
+paraviewMajor=paraview-2.4
 export ParaView_VERSION=2.4.4
 
 export ParaView_INST_DIR=$WM_THIRD_PARTY_DIR/ParaView$ParaView_VERSION
-export ParaView_DIR=$ParaView_INST_DIR/lib/paraview-2.4
+export ParaView_DIR=$ParaView_INST_DIR/lib/$paraviewMajor
 
 if [ -r $ParaView_INST_DIR ]
 then
@@ -56,4 +63,5 @@ then
     export VTK_DIR=$ParaView_DIR/VTK
 fi
 
+unset cmake paraviewMajor
 # -----------------------------------------------------------------------------
diff --git a/etc/apps/paraview/cshrc b/etc/apps/paraview/cshrc
index 130efc110285c88afafda273390f47d4d1441233..a1552a511686013ff9eef29b79d8153a07e9448d 100644
--- a/etc/apps/paraview/cshrc
+++ b/etc/apps/paraview/cshrc
@@ -26,21 +26,27 @@
 #     paraview/cshrc
 #
 # Description
-#     Startup File for Paraview.
-#     Sourced from OpenFOAM-?.?/etc/cshrc
+#     Setup file for paraview-2.x
+#     Sourced from OpenFOAM-*/etc/cshrc
 #
 #------------------------------------------------------------------------------
 
-setenv CMAKE_HOME $WM_THIRD_PARTY_DIR/cmake-2.4.6/platforms/$WM_ARCH
-
-if ( -r $CMAKE_HOME ) then
-    set path=($CMAKE_HOME/bin $path)
-endif
-
+# determine the cmake to be used
+unsetenv CMAKE_HOME
+foreach cmake ( cmake-2.6.4 cmake-2.6.2 cmake-2.4.6 )
+    set cmake=$WM_THIRD_PARTY_DIR/$cmake/platforms/$WM_ARCH
+    if ( -r $cmake ) then
+        setenv CMAKE_HOME $cmake
+        set path=($CMAKE_HOME/bin $path)
+        break
+    endif
+end
+
+set paraviewMajor=paraview-2.4
 setenv ParaView_VERSION 2.4.4
 
 setenv ParaView_INST_DIR $WM_THIRD_PARTY_DIR/ParaView$ParaView_VERSION
-setenv ParaView_DIR $ParaView_INST_DIR/lib/paraview-2.4
+setenv ParaView_DIR $ParaView_INST_DIR/lib/$paraviewMajor
 
 if ( -r $ParaView_INST_DIR ) then
     setenv PV_INTERFACE_PATH $FOAM_UTILITIES/postProcessing/graphics/PVFoamReader/PVFoamReader/Make
@@ -53,4 +59,5 @@ if ( -r $ParaView_DIR ) then
     setenv VTK_DIR $ParaView_DIR/VTK
 endif
 
+unset cmake paraviewMajor
 # -----------------------------------------------------------------------------
diff --git a/etc/apps/paraview3/bashrc b/etc/apps/paraview3/bashrc
index 2120bf5d562175e2aee7035fd62ef05c1c0405e7..f49288b36ec26ad2c712a9f824cfd5b3ddc4a9ce 100644
--- a/etc/apps/paraview3/bashrc
+++ b/etc/apps/paraview3/bashrc
@@ -27,7 +27,7 @@
 #
 # Description
 #     Setup file for paraview-3.x
-#     Sourced from OpenFOAM-?.?/etc/bashrc
+#     Sourced from OpenFOAM-*/etc/bashrc
 #
 # Note
 #     The env. variable 'ParaView_DIR' is required for building plugins
@@ -35,7 +35,7 @@
 
 # determine the cmake to be used
 unset CMAKE_HOME
-for cmake in cmake-2.6.2 cmake-2.4.6
+for cmake in cmake-2.6.4 cmake-2.6.2 cmake-2.4.6
 do
     cmake=$WM_THIRD_PARTY_DIR/$cmake/platforms/$WM_ARCH
     if [ -r $cmake ]
diff --git a/etc/apps/paraview3/cshrc b/etc/apps/paraview3/cshrc
index 5ad99a1030d0b7ab8c6506418c94ce9951504d5d..1c500f4962544271b887b812dff67f268cf89c04 100644
--- a/etc/apps/paraview3/cshrc
+++ b/etc/apps/paraview3/cshrc
@@ -26,8 +26,8 @@
 #     paraview3/cshrc
 #
 # Description
-#     Startup File for paraview-3.x
-#     Sourced from OpenFOAM-?.?/etc/cshrc
+#     Setup file for paraview-3.x
+#     Sourced from OpenFOAM-*/etc/cshrc
 #
 # Note
 #     The env. variable 'ParaView_DIR' is required for building plugins
@@ -35,7 +35,7 @@
 
 # determine the cmake to be used
 unsetenv CMAKE_HOME
-foreach cmake ( cmake-2.6.2 cmake-2.4.6 )
+foreach cmake ( cmake-2.6.4 cmake-2.6.2 cmake-2.4.6 )
     set cmake=$WM_THIRD_PARTY_DIR/$cmake/platforms/$WM_ARCH
     if ( -r $cmake ) then
         setenv CMAKE_HOME $cmake