From 71996e8d93b82ad25105f691d001188b5972d922 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Fri, 8 Nov 2019 05:23:32 -0800 Subject: 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 Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall --- cmake/modules/FindXSLTPROC.cmake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'cmake/modules/FindXSLTPROC.cmake') 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|ers Guide|" - < ${_dbk_source} - > ${_docbook_plain_title} + -e "s|Wireshark.*s Guide|${_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} -- cgit v1.2.3