diff options
author | Gerald Combs <gerald@wireshark.org> | 2019-11-08 05:23:32 -0800 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2019-11-08 20:27:15 +0000 |
commit | 71996e8d93b82ad25105f691d001188b5972d922 (patch) | |
tree | 120932a72bd395a036bb1b3ed406302b1153a2b1 /cmake/modules/FindXSLTPROC.cmake | |
parent | bf5d699cf07f7dfd0ff42bec13c66199b48cffed (diff) |
CMake+docbook: Fixup our .chm titles.
Some parts of HTML Help have issues displaying curly quotes. Add a
title argument to the XML2HHP macro so that we can set one with a
straight quote. Set the title using the htmlhelp.title XSL parameter
instead of relying on HTML Help to derive it for us. This seems to keep
"???TITLE???" from being mysteriously appended to the title.
Try setting htmlhelp.window.geometry while we're here.
Bug: 16183
Change-Id: I0bf2dbeeb811dc65010ab5223725d6b5cdc96966
Reviewed-on: https://code.wireshark.org/review/35031
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'cmake/modules/FindXSLTPROC.cmake')
-rw-r--r-- | cmake/modules/FindXSLTPROC.cmake | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cmake/modules/FindXSLTPROC.cmake b/cmake/modules/FindXSLTPROC.cmake index e2a5d3fd8d..adf9a6a713 100644 --- a/cmake/modules/FindXSLTPROC.cmake +++ b/cmake/modules/FindXSLTPROC.cmake @@ -151,7 +151,7 @@ ENDMACRO(XML2HTML) # wsug or wsdg # user-guide.xml or developer-guide.xml #) -MACRO(XML2HHP _target_dep _guide _dbk_source) +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 ) @@ -174,16 +174,16 @@ MACRO(XML2HHP _target_dep _guide _dbk_source) # 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. Neither "’", "'", nor "’" will render correctly, so - # just remove everything between "Developer", "User", and their - # respective trailing "s"es. + # title or TOC. Neither "’" nor "’" will render correctly, + # so just add a _title argument and set it in CMakeLists.txt. COMMAND ${PERL_EXECUTABLE} -p - -e "s|er.*s Guide</title>|ers Guide</title>|" - < ${_dbk_source} - > ${_docbook_plain_title} + -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} |