#!/bin/sh #------------------------------------------------------------------------------ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation # \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. #------------------------------------------------------------------------------ # 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 3 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, see . # # Script # makeParaView # # Description # Make and install ParaView 4 or 5. # The ParaView sources should be located under one of these locations: # - $WM_THIRD_PARTY_DIR/ParaView-VERSION # - $WM_THIRD_PARTY_DIR/ParaView-vVERSION # # Note the capitalization of ParaView in the directory names. # #------------------------------------------------------------------------------ # Get ParaView_VERSION location from OpenFOAM config file . $WM_PROJECT_DIR/etc/config.sh/functions unset -f _foamAddPath _foamAddLib # get settings only unset ParaView_VERSION # purge current values _foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview) : ${ParaView_VERSION##*-} #------------------------------------------------------------------------------ # Run from third-party directory only cd ${0%/*} || exit 1 wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || { echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR" echo " The environment variables are inconsistent with the installation." echo " Check the OpenFOAM entries in your dot-files and source them." exit 1 } . etc/tools/ThirdPartyFunctions . etc/tools/ParaViewFunctions #------------------------------------------------------------------------------ # # USER DEFAULTS: # ~~~~~~~~~~~~~~ # MESA graphics support: withMESA=false MESA_INCLUDE="/usr/include/GL" MESA_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so" # Python support: # - The script will try to determine the appropriate python library. # If that fails, specify the path using the PYTHON_LIBRARY variable below. withPYTHON=false PYTHON_LIBRARY="" # PYTHON_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libpython2.6.so.1.0" # New rendering backend (starting with paraview 5.0). # Default to auto-config based on paraview version withGL2=auto # # NO FURTHER EDITING BELOW THIS LINE # #----------------------------------------------------------------------------- Script=${0##*/} usage() { : ${ParaView_VERSION:=none} # some dummy value for usage information exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat< addCMakeVariable "VTK_USE_OFFSCREEN=OFF" fi # Set configure options #~~~~~~~~~~~~~~~~~~~~~~ addVerbosity # verbose makefiles addMpiSupport # set MPI-specific options addPythonSupport # set Python-specific options addMesaSupport # set MESA-specific options addGL2Support # new rendering backend addQtSupport # add extra Qt support setParaViewDirs # where things are or should be put # Build and install # ~~~~~~~~~~~~~~~~~ cat<