aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2021-06-01 17:02:08 -0700
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-06-04 08:57:32 +0000
commit6bfab69d14d39863730f1c6c7bd278ec9f1e1673 (patch)
tree8458cdf5f6e28739bdf2cbe69f9736d4a541622f /cmake/modules
parent6846271b76dbdf7fa96a904d1bfefeaddceeb66a (diff)
Windows: Switch from HTML Help to plain HTML.
Switch from HTML Help to plain HTML files. In the NSIS and WiX installers, place the help assets in a directory with a friendly name.
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/FindHTMLHelp.cmake58
-rw-r--r--cmake/modules/FindXSLTPROC.cmake55
-rw-r--r--cmake/modules/hhc.cmake12
3 files changed, 0 insertions, 125 deletions
diff --git a/cmake/modules/FindHTMLHelp.cmake b/cmake/modules/FindHTMLHelp.cmake
deleted file mode 100644
index c223d3ee9f..0000000000
--- a/cmake/modules/FindHTMLHelp.cmake
+++ /dev/null
@@ -1,58 +0,0 @@
-# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
-# file Copyright.txt or https://cmake.org/licensing for details.
-
-#.rst:
-# FindHTMLHelp
-# ------------
-#
-# This module looks for Microsoft HTML Help Compiler
-#
-# It defines:
-#
-# ::
-#
-# HTML_HELP_COMPILER : full path to the Compiler (hhc.exe)
-# HTML_HELP_INCLUDE_PATH : include path to the API (htmlhelp.h)
-# HTML_HELP_LIBRARY : full path to the library (htmlhelp.lib)
-
-if(WIN32)
-
- find_program(HTML_HELP_COMPILER
- NAMES hhc
- PATHS
- "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]"
- PATH_SUFFIXES "HTML Help Workshop"
- )
-
- get_filename_component(HTML_HELP_COMPILER_PATH "${HTML_HELP_COMPILER}" PATH)
-
- find_path(HTML_HELP_INCLUDE_PATH
- NAMES htmlhelp.h
- PATHS
- "${HTML_HELP_COMPILER_PATH}/include"
- "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/include"
- PATH_SUFFIXES "HTML Help Workshop/include"
- )
-
- find_library(HTML_HELP_LIBRARY
- NAMES htmlhelp
- PATHS
- "${HTML_HELP_COMPILER_PATH}/lib"
- "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/lib"
- PATH_SUFFIXES "HTML Help Workshop/lib"
- )
-
- # handle the QUIETLY and REQUIRED arguments and set HTMLHelp_FOUND to TRUE if
- # all listed variables are TRUE
- INCLUDE(FindPackageHandleStandardArgs)
- FIND_PACKAGE_HANDLE_STANDARD_ARGS(HTMLHelp
- REQUIRED_VARS HTML_HELP_COMPILER HTML_HELP_INCLUDE_PATH HTML_HELP_LIBRARY
- )
-
- mark_as_advanced(
- HTML_HELP_COMPILER
- HTML_HELP_INCLUDE_PATH
- HTML_HELP_LIBRARY
- )
-
-endif()
diff --git a/cmake/modules/FindXSLTPROC.cmake b/cmake/modules/FindXSLTPROC.cmake
index adf9a6a713..f23082d646 100644
--- a/cmake/modules/FindXSLTPROC.cmake
+++ b/cmake/modules/FindXSLTPROC.cmake
@@ -145,58 +145,3 @@ MACRO(XML2HTML _target_dep _dir_pfx _mode _dbk_source _gfx_sources)
)
ENDIF()
ENDMACRO(XML2HTML)
-
-# Translate XML to HHP
-#XML2HHP(
-# wsug or wsdg
-# user-guide.xml or developer-guide.xml
-#)
-MACRO(XML2HHP _target_dep _guide _title _dbk_source)
- # We depend on the docbook target to avoid parallel builds.
- SET(_dbk_dep ${_target_dep}_docbook)
- GET_FILENAME_COMPONENT( _source_base_name ${_dbk_source} NAME_WE )
- set( _output_chm ${_source_base_name}.chm )
- set( _output_hhp ${_source_base_name}.hhp )
- set( _output_toc_hhc ${_source_base_name}-toc.hhc )
- set( _docbook_plain_title ${_source_base_name}-plain-title.xml )
- get_docbook_xml_depends(_dbk_xml_deps "${_dbk_source}")
-
- SET(_gfxdir ${_guide}_graphics)
- SET(_basedir ${_guide}_chm)
- ADD_CUSTOM_COMMAND(
- OUTPUT
- ${_output_hhp}
- ${_output_toc_hhc}
- COMMAND ${CMAKE_COMMAND} -E make_directory ${_basedir}
- COMMAND ${CMAKE_COMMAND} -E make_directory ${_basedir}/${_gfxdir}
- COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/${_gfxdir} ${_basedir}/${_gfxdir}
- COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/common_graphics ${_basedir}/${_gfxdir}
- # Dumb down our title. HTML Help can render most of our content
- # correctly because we tell it to use the IE9 rendering engine in
- # custom_layer_chm.xsl. However, this doesn't apply to the window
- # title or TOC. Neither "’" nor "&#8217;" will render correctly,
- # so just add a _title argument and set it in CMakeLists.txt.
- COMMAND ${PERL_EXECUTABLE} -p
- -e "s|<title>Wireshark.*s Guide</title>|<title>${_title}</title>|"
- < ${_dbk_source}
- > ${_docbook_plain_title}
- COMMAND ${XSLTPROC_EXECUTABLE}
- --path "${_xsltproc_path}"
- --stringparam base.dir ${_basedir}/
- --stringparam htmlhelp.title ${_title}
- --stringparam htmlhelp.chm ${_output_chm}
- --stringparam htmlhelp.hhp ${_output_hhp}
- --stringparam htmlhelp.hhc ${_output_toc_hhc}
- ${_common_xsltproc_args}
- --stringparam admon.graphics.path ${_gfxdir}/
- --nonet custom_layer_chm.xsl
- ${_docbook_plain_title}
- DEPENDS
- ${_dbk_xml_deps}
- ${_dbk_dep}
- # AsciiDoc uses UTF-8 by default, which is unsupported by HTML
- # Help. We may want to render an ISO-8859-1 version, or get rid
- # of HTML Help.
- custom_layer_chm.xsl
- )
-ENDMACRO(XML2HHP)
diff --git a/cmake/modules/hhc.cmake b/cmake/modules/hhc.cmake
deleted file mode 100644
index 6855ee7789..0000000000
--- a/cmake/modules/hhc.cmake
+++ /dev/null
@@ -1,12 +0,0 @@
-# hhc.exe returns 1 on success - which cmake instprets as failure in case
-# of add_custom_command.
-
-# Params are
-# cmake -P /path/to/hhc.cmake "/path/to/hhc.exe" project.hhp
-set(_hhc_executable ${CMAKE_ARGV3})
-set(_project_file ${CMAKE_ARGV4})
-
-execute_process(
- COMMAND ${_hhc_executable} ${_project_file}
- RESULT_VARIABLE _return_code
-)