Commit 2062699a authored by Nikhil Shetty's avatar Nikhil Shetty Committed by Utkarsh Ayachit

Modifying all plugins to have versioned suffix + directory

```-----------------------------------------------
Moving pv version info to a seperate cmake file.
```

-----------------------------------------------
The version information is updated with each new PV release. It is best
if this was in a seperate file.

We add another variable called pv_version_long which is the long suffix
version. This varialble will be used to name directories tarballs of
various plugins.

--------------------------------------------------
Including paraview_version in the top level.
--------------------------------------------------
This pv_version_information is make accessible at the top level. This
will enable various plugin to name their tarballs using this information.

--------------------------------------------------
Modifying all plugins to have versioned suffix + directory
--------------------------------------------------
There is no mechanism to differntiate plugin builds to the ParaView
version they build against. This is potentially problematic when
creating new tarballs for latest releases with the potential for the
older plugins being brought in by accident.

To solve this issue, plugin's tarballs should be genereated with a
proper suffix corriesponding to paraview version it is build against.
We thus build and copy the plugin into a directiory with appropriate
name and suffix. The directory is then zipped into a tarball with the
same name and suffix.

Change-Id: Ice4020bf1ada1b9ee1292bdd8daffafc5644b77d
parent 4927ff07
# We hardcode the version numbers since we cannot determine versions during
# configure stage.
set (pv_version_major 4)
set (pv_version_minor 0)
set (pv_version_patch 0)
set (pv_version_suffix RC2)
set (pv_version "${pv_version_major}.${pv_version_minor}")
set (pv_version_long "${pv_version}.${pv_version_patch}-${pv_version_suffix}")
......@@ -83,6 +83,7 @@ else ()
set (package_suffix "${package_suffix}-32bit")
endif()
include(paraview_version)
option(TRUST_SVN_CERTIFICATES_AUTOMATICALLY
"Trust SVN certificates automatically" ON)
......
add_external_project(acusolve
DEPENDS paraview
......@@ -7,7 +5,11 @@ add_external_project(acusolve
-DParaView_DIR:PATH=${SuperBuild_BINARY_DIR}/paraview/src/paraview-build
INSTALL_COMMAND
${CMAKE_COMMAND} -E tar cfz
${CMAKE_CURRENT_BINARY_DIR}/AcuSolveReaderPlugin-${package_suffix}.tgz
<BINARY_DIR>/${CMAKE_SHARED_LIBRARY_PREFIX}AcuSolveReader${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_COMMAND} -DBINARY_DIR:PATH=<BINARY_DIR>
-DINSTALL_DIR:PATH=<INSTALL_DIR>
-DPARAVIEW_BINARY_DIR:PATH=${ParaViewSuperBuild_BINARY_DIR}/paraview/src/paraview-build
-DTMP_DIR:PATH=<TMP_DIR>
-Dbundle_name:STRING=${CMAKE_CURRENT_BINARY_DIR}/AcuSolveReaderPlugin
-Dbundle_suffix:STRING=${pv_version_long}-${package_suffix}
-P ${CMAKE_CURRENT_LIST_DIR}/install_acusolve.cmake
)
......@@ -15,6 +15,7 @@ add_external_project(cosmologytools
-DINSTALL_DIR:PATH=<INSTALL_DIR>
-DPARAVIEW_BINARY_DIR:PATH=${ParaViewSuperBuild_BINARY_DIR}/paraview/src/paraview-build
-DTMP_DIR:PATH=<TMP_DIR>
-Dbundle_name:STRING=${CMAKE_CURRENT_BINARY_DIR}/CosmologyToolsPlugin-${package_suffix}.tgz
-Dbundle_name:STRING=${CMAKE_CURRENT_BINARY_DIR}/CosmologyToolsPlugin
-Dbundle_suffix:STRING=${pv_version_long}-${package_suffix}
-P ${CMAKE_CURRENT_LIST_DIR}/install_cosmologytools.cmake
)
if (APPLE)
set (SHARED_LIBRARY_PREFIX "lib")
set (SHARED_LIBRARY_SUFFIX ".dylib")
elseif (UNIX)
set (SHARED_LIBRARY_PREFIX "lib")
set (SHARED_LIBRARY_SUFFIX ".so")
elseif (WIN32)
set (SHARED_LIBRARY_PREFIX "")
set (SHARED_LIBRARY_SUFFIX ".dll")
endif()
# Remove any old directory
execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${TMP_DIR}/AcuSolveReaderPlugin-${bundle_suffix}
WORKING_DIRECTORY ${TMP_DIR}
)
# Create a directory to put the plugin under.
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${TMP_DIR}/AcuSolveReaderPlugin-${bundle_suffix}
WORKING_DIRECTORY ${TMP_DIR}
)
# Copy th plugin lib.
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/${SHARED_LIBRARY_PREFIX}AcuSolveReader${SHARED_LIBRARY_SUFFIX} ${TMP_DIR}/AcuSolveReaderPlugin-${bundle_suffix}
WORKING_DIRECTORY ${TMP_DIR}
)
if (APPLE)
execute_process(
COMMAND ${CMAKE_CURRENT_LIST_DIR}/apple/fixup_plugin.py
# The directory containing the plugin dylibs.
${TMP_DIR}/AcuSolveReaderPlugin-${bundle_suffix}
# names to replace (in order)
"${PARAVIEW_BINARY_DIR}/lib/=@executable_path/../Libraries/"
"${INSTALL_DIR}/lib/Qt=@executable_path/../Frameworks/Qt"
"${INSTALL_DIR}/lib/=@executable_path/../Libraries/"
"libhdf5.7.3.0.dylib=@executable_path/../Libraries/libhdf5.1.8.9.dylib"
"libhdf5_hl.7.3.0.dylib=@executable_path/../Libraries/libhdf5.1.8.9.dylib"
"libcgns.3.1.dylib=@executable_path/../Libraries/libcgns.3.1.dylib"
)
endif()
# make tarball
execute_process(
COMMAND ${CMAKE_COMMAND}
-E tar cvfz ${bundle_name}-${bundle_suffix}.tgz AcuSolveReaderPlugin-${bundle_suffix}
WORKING_DIRECTORY ${TMP_DIR})
......@@ -10,19 +10,19 @@ endif()
# Remove any old directory.
execute_process(
COMMAND ${CMAKE_COMMAND} -E remove_directory ${TMP_DIR}/CosmologyToolsPlugin
COMMAND ${CMAKE_COMMAND} -E remove_directory ${TMP_DIR}/CosmologyToolsPlugin-${bundle_suffix}
WORKING_DIRECTORY ${TMP_DIR}
)
# Create a directory to put the plugin under.
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${TMP_DIR}/CosmologyToolsPlugin
COMMAND ${CMAKE_COMMAND} -E make_directory ${TMP_DIR}/CosmologyToolsPlugin-${bundle_suffix}
WORKING_DIRECTORY ${TMP_DIR}
)
# Copy the plugin lib.
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/libs/${SHARED_LIBRARY_PREFIX}PVCosmologyToolsPlugins${SHARED_LIBRARY_SUFFIX} ${TMP_DIR}/CosmologyToolsPlugin
COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/libs/${SHARED_LIBRARY_PREFIX}PVCosmologyToolsPlugins${SHARED_LIBRARY_SUFFIX} ${TMP_DIR}/CosmologyToolsPlugin-${bundle_suffix}
WORKING_DIRECTORY ${TMP_DIR}
)
......@@ -30,7 +30,7 @@ if (APPLE)
execute_process(
COMMAND ${CMAKE_CURRENT_LIST_DIR}/apple/fixup_plugin.py
# The directory containing the plugin dylibs or the plugin itself.
${TMP_DIR}/CosmologyToolsPlugin/${SHARED_LIBRARY_PREFIX}PVCosmologyToolsPlugins${SHARED_LIBRARY_SUFFIX}
${TMP_DIR}/CosmologyToolsPlugin-${bundle_suffix}/${SHARED_LIBRARY_PREFIX}PVCosmologyToolsPlugins${SHARED_LIBRARY_SUFFIX}
# names to replace (in order)
"${PARAVIEW_BINARY_DIR}/lib/=@executable_path/../Libraries/"
"${INSTALL_DIR}/lib/Qt=@executable_path/../Frameworks/Qt"
......@@ -42,6 +42,7 @@ if (APPLE)
endif()
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar cvz ${bundle_name} CosmologyToolsPlugin
COMMAND ${CMAKE_COMMAND}
-E tar cvfz ${bundle_name}-${bundle_suffix}.tgz CosmologyToolsPlugin-${bundle_suffix}
WORKING_DIRECTORY ${TMP_DIR}
)
if (APPLE)
set (SHARED_LIBRARY_PREFIX "lib")
set (SHARED_LIBRARY_SUFFIX ".dylib")
elseif (UNIX)
set (SHARED_LIBRARY_PREFIX "lib")
set (SHARED_LIBRARY_SUFFIX ".so")
elseif (WIN32)
set (SHARED_LIBRARY_PREFIX "")
set (SHARED_LIBRARY_SUFFIX ".dll")
endif()
# Remove any old directory
execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${TMP_DIR}/NektarReaderPlugin-${bundle_suffix}
WORKING_DIRECTORY ${TMP_DIR}
)
# Create a directory to put the plugin under.
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${TMP_DIR}/NektarReaderPlugin-${bundle_suffix}
WORKING_DIRECTORY ${TMP_DIR}
)
# Copy th plugin lib.
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/${SHARED_LIBRARY_PREFIX}pvNektarReader${SHARED_LIBRARY_SUFFIX} ${TMP_DIR}/NektarReaderPlugin-${bundle_suffix}
WORKING_DIRECTORY ${TMP_DIR}
)
if (APPLE)
execute_process(
COMMAND ${CMAKE_CURRENT_LIST_DIR}/apple/fixup_plugin.py
# The directory containing the plugin dylibs.
${TMP_DIR}/NektarReaderPlugin-${bundle_suffix}
# names to replace (in order)
"${PARAVIEW_BINARY_DIR}/lib/=@executable_path/../Libraries/"
"${INSTALL_DIR}/lib/Qt=@executable_path/../Frameworks/Qt"
"${INSTALL_DIR}/lib/=@executable_path/../Libraries/"
"libhdf5.7.3.0.dylib=@executable_path/../Libraries/libhdf5.1.8.9.dylib"
"libhdf5_hl.7.3.0.dylib=@executable_path/../Libraries/libhdf5.1.8.9.dylib"
"libcgns.3.1.dylib=@executable_path/../Libraries/libcgns.3.1.dylib"
)
endif()
# make tarball
execute_process(
COMMAND ${CMAKE_COMMAND}
-E tar cvfz ${bundle_name}-${bundle_suffix}.tgz NektarReaderPlugin-${bundle_suffix}
WORKING_DIRECTORY ${TMP_DIR})
......@@ -12,16 +12,16 @@ elseif (WIN32)
set (PLUGIN_DIR "bin")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${TMP_DIR}/VisTrailsPlugin)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${TMP_DIR}/VisTrailsPlugin)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${SOURCE_DIR}/README ${TMP_DIR}/VisTrailsPlugin)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/${PLUGIN_DIR}/${SHARED_LIBRARY_PREFIX}VisTrailsPlugin${SHARED_LIBRARY_SUFFIX} ${TMP_DIR}/VisTrailsPlugin)
execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${TMP_DIR}/VisTrailsPlugin-${bundle_suffix})
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${TMP_DIR}/VisTrailsPlugin-${bundle_suffix})
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${SOURCE_DIR}/README ${TMP_DIR}/VisTrailsPlugin-${bundle_suffix})
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/${PLUGIN_DIR}/${SHARED_LIBRARY_PREFIX}VisTrailsPlugin${SHARED_LIBRARY_SUFFIX} ${TMP_DIR}/VisTrailsPlugin-${bundle_suffix})
if (APPLE)
execute_process(
COMMAND ${CMAKE_CURRENT_LIST_DIR}/apple/fixup_plugin.py
# The directory containing the plugin dylibs.
${TMP_DIR}/VisTrailsPlugin
${TMP_DIR}/VisTrailsPlugin-${bundle_suffix}
# names to replace (in order)
"${PARAVIEW_BINARY_DIR}/lib/=@executable_path/../Libraries/"
"${INSTALL_DIR}/lib/Qt=@executable_path/../Frameworks/Qt"
......@@ -34,5 +34,5 @@ endif()
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar cvfz ${bundle_name} VisTrailsPlugin
COMMAND ${CMAKE_COMMAND} -E tar cvfz ${bundle_name}-${bundle_suffix}.tgz VisTrailsPlugin-${bundle_suffix}
WORKING_DIRECTORY ${TMP_DIR})
......@@ -8,7 +8,11 @@ add_external_project(nektar_plugin
-DLAPACK_lapack_LIBRARY:FILEPATH=/soft/apps/atlas-3.8.2-gcc-shared/lib/liblapack.a
INSTALL_COMMAND
${CMAKE_COMMAND} -E tar cfz
${CMAKE_CURRENT_BINARY_DIR}/NektarReaderPlugin-${package_suffix}.tgz
<BINARY_DIR>/libpvNektarReader.so
${CMAKE_COMMAND} -DBINARY_DIR:PATH=<BINARY_DIR>
-DINSTALL_DIR:PATH=<INSTALL_DIR>
-DPARAVIEW_BINARY_DIR:PATH=${ParaViewSuperBuild_BINARY_DIR}/paraview/src/paraview-build
-DTMP_DIR:PATH=<TMP_DIR>
-Dbundle_name:STRING=${CMAKE_CURRENT_BINARY_DIR}/NektarReaderPlugin
-Dbundle_suffix:STRING=${pv_version_long}-${package_suffix}
-P ${CMAKE_CURRENT_LIST_DIR}/install_nektar_plugin.cmake
)
# Consolidates platform independent stub for paraview.bundle.cmake files.
# We hardcode the version numbers since we cannot determine versions during
# configure stage.
set (pv_version_major 4)
set (pv_version_minor 0)
set (pv_version_patch 0)
set (pv_version_suffix RC2)
set (pv_version "${pv_version_major}.${pv_version_minor}")
include (paraview_version)
# Enable CPack packaging.
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
......
......@@ -10,6 +10,7 @@ add_external_project(vistrails
-DINSTALL_DIR:PATH=<INSTALL_DIR>
-DPARAVIEW_BINARY_DIR:PATH=${ParaViewSuperBuild_BINARY_DIR}/paraview/src/paraview-build
-DTMP_DIR:PATH=<TMP_DIR>
-Dbundle_name:STRING=${CMAKE_CURRENT_BINARY_DIR}/VisTrailsPlugin-${package_suffix}.tgz
-Dbundle_name:STRING=${CMAKE_CURRENT_BINARY_DIR}/VisTrailsPlugin
-Dbundle_suffix:STRING=${pv_version_long}-${package_suffix}
-P ${CMAKE_CURRENT_LIST_DIR}/install_vistrails.cmake
)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment