Commit bbb9a40f authored by Sebastien Jourdain's avatar Sebastien Jourdain

Fix ParaViewWeb to properly use the VTK-web components

Change-Id: I8b430cd0f7467a1a025a133b68cdb3f5b31c7d83
parent 9456022b

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -43,7 +43,7 @@ macro(cleanup_bundle app app_root libdir pluginsdir)
endforeach()
# Package web server content
file(INSTALL ${libdir}/www DESTINATION ${app_root}/Contents)
# FIXME file(INSTALL ${libdir}/www DESTINATION ${app_root}/Contents)
# package other executables such as pvserver.
get_filename_component(bin_dir "${app_root}" PATH)
......
......@@ -449,44 +449,6 @@ function (pv_executable_install name exe_suffix)
endif()
endfunction()
#------------------------------------------------------------------------------
# Function used to copy a Python package into the binary directory and compile
# it.
# package     :- The name of the Python package.
# source_dir  :- The directory containing the Python source.
# binary_dir  :- The directory to copy files to and compile into.
#------------------------------------------------------------------------------
function(build_python_package package source_dir binary_dir)
set (copy-complete "${binary_dir}/${package}-copy-complete")
copy_files_recursive("${source_dir}"
DESTINATION "${binary_dir}"
REGEX "^(.*\\.py)$"
OUTPUT ${copy-complete}
LABEL "Copying ${package} files")
set(CMAKE_CONFIGURABLE_FILE_CONTENT
"from compileall import compile_dir
compile_dir('${binary_dir}')
file = open('${binary_dir}/${package}_complete', 'w')
file.write('Done')
")
configure_file(${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in
"${CMAKE_CURRENT_BINARY_DIR}/compile_py" @ONLY)
unset(CMAKE_CONFIGURABLE_FILE_CONTENT)
add_custom_command(
COMMAND ${PYTHON_EXECUTABLE} ARGS ${CMAKE_CURRENT_BINARY_DIR}/compile_py
COMMAND ${PYTHON_EXECUTABLE} ARGS -O ${CMAKE_CURRENT_BINARY_DIR}/compile_py
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/compile_py
${copy-complete}
OUTPUT "${binary_dir}/${package}_complete"
COMMENT "Compiling Python files")
add_custom_target(${package} ALL DEPENDS "${binary_dir}/${package}_complete")
endfunction()
#------------------------------------------------------------------------------
# Function used to copy arbitrary files matching certain patterns.
# Usage:
......
......@@ -486,21 +486,12 @@ list (APPEND PARAVIEW_MODULE_ROOTS
CoProcessing/TestDriver)
add_custom_target(ParaViewDoc)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/www.stamp
COMMAND ${CMAKE_COMMAND} -E make_directory "${PARAVIEW_WWW_DIR}"
COMMAND ${CMAKE_COMMAND} -E touch "${CMAKE_CURRENT_BINARY_DIR}/www.stamp")
add_custom_target(ParaViewWWW ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/www.stamp)
install(DIRECTORY "${PARAVIEW_WWW_DIR}"
DESTINATION ${VTK_INSTALL_LIBRARY_DIR}
COMPONENT Runtime)
if (PARAVIEW_ENABLE_WEB)
list (APPEND PARAVIEW_MODULE_ROOTS Web)
set (vtkWeb_WWW_DEST ${PARAVIEW_WWW_DIR})
if (PARAVIEW_BUILD_WEB_DOCUMENTATION)
list (APPEND ParaViewModulesDirs Web/Documentation)
endif()
......@@ -522,7 +513,9 @@ mark_as_advanced(
VTK_Group_Qt
VTK_Group_Rendering
VTK_Group_StandAlone
VTK_Group_Tk
VTK_Group_Views
VTK_Group_Web
VTK_USE_TK
VTK_WRAP_JAVA
VTK_WRAP_TCL)
......
......@@ -11,7 +11,7 @@ vtk_module(vtkPVClientServerCoreRendering
vtkFiltersAMR
vtkPVClientServerCoreCore
vtkPVVTKExtensionsRendering
vtkPVVTKExtensionsWebGLExporter
vtkWebGLExporter
vtkRenderingLabel
vtkRenderingVolumeAMR
vtkRenderingVolumeOpenGL
......
#==========================================================================
#
# Program: ParaView
#
# Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
# All rights reserved.
#
# ParaView is a free software; you can redistribute it and/or modify it
# under the terms of the ParaView license version 1.2.
#
# See License_v1.2.txt for the full ParaView license.
# A copy of this license can be obtained by contacting
# Kitware Inc.
# 28 Corporate Drive
# Clifton Park, NY 12065
# USA
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#==========================================================================
#
# The exporter will behave as any other ParaView exporter (VRML, X3D, POV...)
# but will generate several types of files. The main one is the scene graph
# description define as a JSON object with all the corresponding binary+base64
# pieces that come along with it. But also with it come a single standalone HTML
# file that can directly be used to see the data in a browser without any plugin.
#
# This code base should be cleaned up to follow VTK standard and even be
# integrated into VTK itself. But for now it is provided as is.
set(Module_SRCS
vtkPVWebGLExporter.cxx
vtkWebGLDataSet.cxx
vtkWebGLExporter.cxx
vtkWebGLObject.cxx
vtkWebGLPolyData.cxx
vtkWebGLWidget.cxx
md5.cxx
)
set_source_files_properties(md5.cxx WRAP_EXCLUDE)
set(JAVASCRIPT_SRCS
webglRenderer
glMatrix
)
foreach(file ${JAVASCRIPT_SRCS})
set(src ${CMAKE_CURRENT_SOURCE_DIR}/${file}.js)
set(res ${CMAKE_CURRENT_BINARY_DIR}/${file}.h)
add_custom_command(
OUTPUT ${res}
DEPENDS ${src}
COMMAND vtkEncodeString
ARGS ${res} ${src} ${file}
)
list(APPEND Module_SRCS ${res})
set_source_files_properties(${res} WRAP_EXCLUDE)
endforeach()
vtk_module_library(vtkPVVTKExtensionsWebGLExporter ${Module_SRCS})
This diff is collapsed.
This diff is collapsed.
/* MD5
converted to C++ class by Frank Thilo (thilo@unix-ag.org)
for bzflag (http://www.bzflag.org)
based on:
md5.h and md5.c
reference implementation of RFC 1321
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
rights reserved.
License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.
License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD5 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this
documentation and/or software.
*/
#ifndef BZF_MD5_H
#define BZF_MD5_H
#include <string>
#include <iostream>
// a small class for calculating MD5 hashes of strings or byte arrays