2 #------------------------------------------------------------------------------
4 # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
6 # \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
8 #------------------------------------------------------------------------------
10 # This file is part of OpenFOAM.
12 # OpenFOAM is free software; you can redistribute it and/or modify it
13 # under the terms of the GNU General Public License as published by the
14 # Free Software Foundation; either version 2 of the License, or (at your
15 # option) any later version.
17 # OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
18 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 # You should have received a copy of the GNU General Public License
23 # along with OpenFOAM; if not, write to the Free Software Foundation,
24 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 # Build and install paraview
31 # - run from folder above paraview source folder or place the
32 # paraview source under $WM_THIRD_PARTY_DIR
34 #------------------------------------------------------------------------------
35 .
$WM_PROJECT_DIR/bin
/tools
/buildParaViewFunctions
45 # note: script will try to determine the appropriate python library.
46 # If it fails, specify the path using the PYTHON_LIBRARY variable
49 # PYTHON_LIBRARY="/usr/lib64/libpython2.6.so.1.0"
51 # MESA graphics support:
53 MESA_INCLUDE
="/usr/include/GL"
54 MESA_LIBRARY
="/usr/lib64/libOSMesa.so"
56 # extra QT gui support (useful for re-using the installation for engrid)
59 # Set the path to the Qt-4.3.? qmake if the system Qt is other than this version
60 QMAKE_PATH
=/usr
/local
/Trolltech
/Qt-4.3
.4/bin
/qmake
63 # No further editing below this line
64 #------------------------------------------------------------------------------
68 while [ "$#" -ge 1 ]; do echo "$1"; shift; done
71 usage: $Script [OPTION]
73 -rebuild for repeated builds (-make -install) *use with caution*
74 -mpi with mpi (if not already enabled)
75 -python with python (if not already enabled)
76 -mesa with mesa (if not already enabled)
77 -qt with extra Qt gui support (if not already enabled)
78 -verbose verbose output in Makefiles
79 -version VER specify an alternative version (default: $ParaView_VERSION)
82 For finer control, the build stages can be also selected individually
88 [-envpath] alter absolute paths in CMake files to use env variables
90 Build and install paraview-$ParaView_VERSION
91 - run from folder above the ParaView source folder or place the ParaView
92 source under \$WM_THIRD_PARTY_DIR ($WM_THIRD_PARTY_DIR)
98 #------------------------------------------------------------------------------
101 # add options based on script name:
103 case "$Script" in *-mpi*) withMPI
=true
;; esac
104 case "$Script" in *-python*) withPYTHON
=true
;; esac
105 case "$Script" in *-mesa*) withMESA
=true
;; esac
106 case "$Script" in *-qt*) withQTSUPPORT
=true
;; esac
109 # various building stages
125 -config) # stage 1: config only
132 -make) # stage 2: make only
139 -makedoc) # stage 3: generate html documentation
146 -install) # stage 4: install only
153 -envpath) # optional: change cmake files to use env variables
161 -rebuild) # shortcut for rebuilding
189 [ "$#" -ge 2 ] || usage
"'$1' option requires an argument"
190 export ParaView_VERSION
=$2
194 usage
"unknown option/argument: '$*'"
200 # Set configure options
201 #~~~~~~~~~~~~~~~~~~~~~~
202 addVerbosity
# verbose makefiles
203 addMpiSupport
# set MPI-specific options
204 addPythonSupport
# set Python-specific options
205 addMesaSupport
# set MESA-specific options
206 addQtSupport
# add extra Qt support
208 getPaths
# discover where things are or should be put
213 [ $runCONFIG = true
] && configParaView
214 [ $runMAKE = true
] && makeParaView
215 [ $runMAKEDOC = true
] && makeDocs
216 [ $runINSTALL = true
] && installParaView
217 [ $runENVPATH = true
] && fixCMakeFiles
220 #------------------------------------------------------------------------------