From 011fda6bbe8f279122418c240ed33afc20ac82b2 Mon Sep 17 00:00:00 2001
From: Henry <Henry>
Date: Fri, 10 Jan 2014 10:47:18 +0000
Subject: [PATCH] Added support for ParaView-4.1.0 The default ParaView is now
 4.0.1 pending completion of testing of 4.1.0

---
 .../graphics/PV4Readers/Allwmake              |  2 +-
 .../PV4FoamReader/CMakeLists.txt              | 47 +++++++++----------
 .../PV4FoamReader/PV4FoamReader_SM.xml        | 15 +-----
 etc/bashrc                                    |  2 +-
 etc/config/paraview4.csh                      |  3 +-
 etc/config/paraview4.sh                       |  3 +-
 etc/cshrc                                     |  2 +-
 7 files changed, 30 insertions(+), 44 deletions(-)

diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake b/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake
index 99d54fef06c..a165c8d4749 100755
--- a/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake
@@ -2,7 +2,7 @@
 cd ${0%/*} || exit 1    # run from this directory
 #set -x
 
-if [ "$ParaView_VERSION" == "4.0.1" ]
+if [ "$ParaView_VERSION" == "4.0.1" -o "$ParaView_VERSION" == "4.1.0" ]
     then
     if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
     then
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt
index ed835d3b479..2b7d1c724b7 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt
@@ -49,32 +49,26 @@ ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS
   XML_GROUP sources
 )
 
-ADD_PARAVIEW_PLUGIN(
-    PV4FoamReader_SM "1.0"
-    SERVER_MANAGER_XML PV4FoamReader_SM.xml
-    SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx
-    GUI_INTERFACES ${IFACES}
-    GUI_SOURCES pqPV4FoamReaderPanel.cxx
-        ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
-    GUI_RESOURCE_FILES PV4FoamReader.xml
-)
-
-# #
-# # Define the server-side portion of the reader plugin
-# #
-# ADD_PARAVIEW_PLUGIN(
-#     PV4FoamReader_SM "1.0"
-#     SERVER_MANAGER_XML PV4FoamReader_SM.xml
-#     SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx
-# )
-# #
-# # Define the client-side portion of the reader plugin
-# #
-# ADD_PARAVIEW_PLUGIN(
-#     PV4FoamReader "1.0"
-#     GUI_RESOURCES PV3FoamReader.qrc
-# )
-#
+IF("${PARAVIEW_VERSION_MINOR}" LESS 1)
+    ADD_PARAVIEW_PLUGIN(
+        PV4FoamReader_SM "1.0"
+        SERVER_MANAGER_XML PV4FoamReader_SM.xml
+        SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx
+        GUI_INTERFACES ${IFACES}
+        GUI_SOURCES pqPV4FoamReaderPanel.cxx
+            ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
+        GUI_RESOURCE_FILES PV4FoamReader.xml
+    )
+ELSE("${PARAVIEW_VERSION_MINOR}" LESS 1)
+    ADD_PARAVIEW_PLUGIN(
+        PV4FoamReader_SM "1.0"
+        SERVER_MANAGER_XML PV4FoamReader_SM.xml
+        SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx
+        GUI_INTERFACES ${IFACES}
+        GUI_SOURCES pqPV4FoamReaderPanel.cxx
+            ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
+    )
+ENDIF("${PARAVIEW_VERSION_MINOR}" LESS 1)
 
 TARGET_LINK_LIBRARIES(
     PV4FoamReader_SM
@@ -82,4 +76,5 @@ TARGET_LINK_LIBRARIES(
     finiteVolume
     vtkPV4Foam
 )
+
 #-----------------------------------------------------------------------------
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader_SM.xml b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader_SM.xml
index 8f39ac67b70..8c69ea23a59 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader_SM.xml
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader_SM.xml
@@ -167,19 +167,6 @@
       </Documentation>
     </IntVectorProperty>
 
-    <!-- Force GUI update check box -->
-    <IntVectorProperty
-      name="UpdateGUI"
-      command="SetUpdateGUI"
-      number_of_elements="1"
-      default_values="0"
-      animateable="0">
-      <BooleanDomain name="bool"/>
-      <Documentation>
-        A simple way to cause a reader GUI modification.
-      </Documentation>
-    </IntVectorProperty>
-
     <!--
        | Selections
        -->
@@ -298,6 +285,8 @@
     <Property name="UiShowGroupsOnly" show="0"/>
     <Property name="UiIncludeSets" show="0"/>
     <Property name="UiIncludeZones" show="0"/>
+    <ReaderFactory extensions="OpenFOAM"
+                   file_description="OpenFOAM" />
   </Hints>
 
 
diff --git a/etc/bashrc b/etc/bashrc
index 8e6e6304718..4e129eace79 100644
--- a/etc/bashrc
+++ b/etc/bashrc
@@ -211,7 +211,7 @@ _foamSource $WM_PROJECT_DIR/etc/config/aliases.sh
 
 # Source user setup files for optional packages
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.sh`
+_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview4.sh`
 _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.sh`
 _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/gperftools.sh`
 
diff --git a/etc/config/paraview4.csh b/etc/config/paraview4.csh
index 03b41bb9b79..9fd0ac1286c 100644
--- a/etc/config/paraview4.csh
+++ b/etc/config/paraview4.csh
@@ -39,7 +39,7 @@ if ( $status == 0 ) setenv PATH $cleaned
 
 # determine the cmake to be used
 unsetenv CMAKE_HOME
-foreach cmake ( cmake-2.8.4 cmake-2.8.3 cmake-2.8.1 )
+foreach cmake ( cmake-2.8.12.1 cmake-2.8.8 cmake-2.8.4 cmake-2.8.3 cmake-2.8.1 )
     set cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake
     if ( -r $cmake ) then
         setenv CMAKE_HOME $cmake
@@ -50,6 +50,7 @@ end
 
 #- ParaView version, automatically determine major version:
 setenv ParaView_VERSION 4.0.1
+#setenv ParaView_VERSION 4.1.0
 setenv ParaView_MAJOR detect
 
 
diff --git a/etc/config/paraview4.sh b/etc/config/paraview4.sh
index c497fa6d76c..f380d9413fa 100644
--- a/etc/config/paraview4.sh
+++ b/etc/config/paraview4.sh
@@ -38,7 +38,7 @@ cleaned=`$WM_PROJECT_DIR/bin/foamCleanPath "$PATH" "$WM_THIRD_PARTY_DIR/platform
 
 # determine the cmake to be used
 unset CMAKE_HOME
-for cmake in cmake-2.8.4 cmake-2.8.3 cmake-2.8.1
+for cmake in cmake-2.8.12.1 cmake-2.8.8 cmake-2.8.4 cmake-2.8.3 cmake-2.8.1
 do
     cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake
     if [ -r $cmake ]
@@ -52,6 +52,7 @@ done
 
 #- ParaView version, automatically determine major version
 export ParaView_VERSION=4.0.1
+#export ParaView_VERSION=4.1.0
 export ParaView_MAJOR=detect
 
 
diff --git a/etc/cshrc b/etc/cshrc
index af3a34d21ba..0fa2d502a95 100644
--- a/etc/cshrc
+++ b/etc/cshrc
@@ -201,7 +201,7 @@ _foamSource $WM_PROJECT_DIR/etc/config/aliases.csh
 
 # Source user setup files for optional packages
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.csh`
+_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview4.csh`
 _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.csh`
 
 
-- 
GitLab