diff options
-rw-r--r-- | cmake/modules/FindXSLTPROC.cmake | 14 | ||||
-rw-r--r-- | docbook/CMakeLists.txt | 4 | ||||
-rw-r--r-- | docbook/custom_layer_chm.xsl | 6 |
3 files changed, 10 insertions, 14 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} diff --git a/docbook/CMakeLists.txt b/docbook/CMakeLists.txt index 2742ce5b2b..d93fad6750 100644 --- a/docbook/CMakeLists.txt +++ b/docbook/CMakeLists.txt @@ -427,7 +427,7 @@ if(ASCIIDOCTOR_FOUND AND ASCIIDOCTOR_PDF_EXECUTABLE) endif() if(WIN32 AND ASCIIDOCTOR_FOUND) - XML2HHP(user_guide wsug user-guide.xml) + XML2HHP(user_guide wsug "Wireshark User's Guide" user-guide.xml) HHP2CHM(user-guide.hhp) add_custom_target( user_guide_chm @@ -479,7 +479,7 @@ if(ASCIIDOCTOR_FOUND AND ASCIIDOCTOR_PDF_EXECUTABLE) endif() if(WIN32 AND ASCIIDOCTOR_FOUND) - XML2HHP(developer_guide wsdg developer-guide.xml) + XML2HHP(developer_guide wsdg "Wireshark Developer's Guide" developer-guide.xml) HHP2CHM(developer-guide.hhp) add_custom_target( developer_guide_chm diff --git a/docbook/custom_layer_chm.xsl b/docbook/custom_layer_chm.xsl index 47029d3d6e..74c053eb37 100644 --- a/docbook/custom_layer_chm.xsl +++ b/docbook/custom_layer_chm.xsl @@ -7,11 +7,7 @@ <!-- import the main stylesheet --> <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl"/> -<!-- use graphics for admons (note, tip, ...) -<xsl:param name="admon.graphics" select="1"/> -<xsl:param name="admon.graphics.path">common_graphics/</xsl:param> -<xsl:param name="admon.graphics.extension" select="'.svg'"/> ---> +<xsl:param name="htmlhelp.window.geometry">[160,100,950,750]</xsl:param> <!-- Tell the WebBrowser control to use the IE9 rendering engine if present so |