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
61 #QMAKE_PATH=/usr/local/Trolltech/Qt-4.3.5/bin/qmake
62 #QMAKE_PATH=$WM_THIRD_PARTY_DIR/qt-x11-opensource-src-4.3.5/platforms/linux64GccDPOpt/bin/qmake
65 # No further editing below this line
66 #------------------------------------------------------------------------------
70 while [ "$#" -ge 1 ]; do echo "$1"; shift; done
73 usage: $Script [OPTION]
75 -rebuild for repeated builds (-make -install) *use with caution*
76 -mpi with mpi (if not already enabled)
77 -python with python (if not already enabled)
78 -mesa with mesa (if not already enabled)
79 -qt with extra Qt gui support (if not already enabled)
80 -verbose verbose output in Makefiles
81 -version VER specify an alternative version (default: $ParaView_VERSION)
84 For finer control, the build stages can be also selected individually
90 [-envpath] alter absolute paths in CMake files to use env variables
92 Build and install paraview-$ParaView_VERSION
93 - run from folder above the ParaView source folder or place the ParaView
94 source under \$WM_THIRD_PARTY_DIR ($WM_THIRD_PARTY_DIR)
100 #------------------------------------------------------------------------------
103 # add options based on script name:
105 case "$Script" in *-mpi*) withMPI
=true
;; esac
106 case "$Script" in *-python*) withPYTHON
=true
;; esac
107 case "$Script" in *-mesa*) withMESA
=true
;; esac
108 case "$Script" in *-qt*) withQTSUPPORT
=true
;; esac
111 # various building stages
127 -config) # stage 1: config only
134 -make) # stage 2: make only
141 -makedoc) # stage 3: generate html documentation
148 -install) # stage 4: install only
155 -envpath) # optional: change cmake files to use env variables
163 -rebuild) # shortcut for rebuilding
191 [ "$#" -ge 2 ] || usage
"'$1' option requires an argument"
192 export ParaView_VERSION
=$2
196 usage
"unknown option/argument: '$*'"
202 # Set configure options
203 #~~~~~~~~~~~~~~~~~~~~~~
204 addVerbosity
# verbose makefiles
205 addMpiSupport
# set MPI-specific options
206 addPythonSupport
# set Python-specific options
207 addMesaSupport
# set MESA-specific options
208 addQtSupport
# add extra Qt support
210 getPaths
# discover where things are or should be put
215 [ $runCONFIG = true
] && configParaView
216 [ $runMAKE = true
] && makeParaView
217 [ $runMAKEDOC = true
] && makeDocs
218 [ $runINSTALL = true
] && installParaView
219 [ $runENVPATH = true
] && fixCMakeFiles
222 #------------------------------------------------------------------------------