renamed buildParaView3.5-cvs -> buildParaView and reworked
- get version from $ParaView_VERSION or from -version option - added QT gui support (useful when compiling enGrid) - update files for finding cmake-2.6.4 as well - added bin/engridFoam for calling a version of enGrid that uses the paraview libraries compiled with/for OpenFOAM - added foam3rdParty change directory alias
This commit is contained in:
parent
72362de6b1
commit
2aec8f2820
@ -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
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# add options based on script name:
|
||||
#
|
||||
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
|
1
bin/buildParaView-python
Symbolic link
1
bin/buildParaView-python
Symbolic link
@ -0,0 +1 @@
|
||||
buildParaView
|
@ -1 +0,0 @@
|
||||
buildParaView3.5-cvs
|
66
bin/engridFoam
Executable file
66
bin/engridFoam
Executable file
@ -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 $@ &"
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -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"
|
||||
#------------------------------------------------------------------------------
|
@ -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
|
||||
|
||||
|
@ -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'
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
@ -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'
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
@ -27,7 +27,7 @@
|
||||
#
|
||||
# Description
|
||||
# Setup file for cint
|
||||
# Sourced from OpenFOAM-?.?/etc/bashrc
|
||||
# Sourced from OpenFOAM-*/etc/bashrc
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
@ -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
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
@ -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
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
@ -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
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
@ -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
|
||||
# -----------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
# -----------------------------------------------------------------------------
|
||||
|
@ -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 ]
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user