forked from osmocom/wireshark
Remove Lynx.
Use tools/html2text.py to convert HTML to text. Remove some now-obsolete documentation. Change-Id: Ib21a1ab10c789182da5fcc68e98917a00f2fa650 Reviewed-on: https://code.wireshark.org/review/25733 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
parent
3b940d2a83
commit
8ebbf99173
|
@ -89,26 +89,23 @@ if(ASCIIDOCTOR_EXECUTABLE)
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
|
||||||
MACRO( ASCIIDOCTOR2TXT _asciidocsource )
|
MACRO( ASCIIDOCTOR2TXT _asciidocsource )
|
||||||
if( LYNX_EXECUTABLE )
|
GET_FILENAME_COMPONENT( _source_base_name ${_asciidocsource} NAME_WE )
|
||||||
GET_FILENAME_COMPONENT( _source_base_name ${_asciidocsource} NAME_WE )
|
set( _output_html ${_source_base_name}.html )
|
||||||
set( _output_html ${_source_base_name}.html )
|
set( _output_txt ${_source_base_name}.txt )
|
||||||
set( _output_txt ${_source_base_name}.txt )
|
|
||||||
|
|
||||||
ADD_CUSTOM_COMMAND(
|
ADD_CUSTOM_COMMAND(
|
||||||
OUTPUT
|
OUTPUT
|
||||||
${_output_txt}
|
${_output_txt}
|
||||||
COMMAND ${LYNX_EXECUTABLE}
|
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/html2text.py
|
||||||
-dump
|
${_output_html}
|
||||||
${_output_html}
|
> ${_output_txt}
|
||||||
> ${_output_txt}
|
DEPENDS
|
||||||
DEPENDS
|
${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${_asciidocsource}
|
${_output_html}
|
||||||
${_output_html}
|
${ARGN}
|
||||||
${ARGN}
|
)
|
||||||
)
|
unset(_output_html)
|
||||||
unset(_output_html)
|
unset(_output_txt)
|
||||||
unset(_output_txt)
|
|
||||||
endif( LYNX_EXECUTABLE )
|
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
|
||||||
# news: release-notes.txt
|
# news: release-notes.txt
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
#
|
|
||||||
# This module looks for an HTML to plain text converter which accepts
|
|
||||||
# a "-dump" argument.
|
|
||||||
#
|
|
||||||
# Lynx is preferred since it generates URL footnotes.
|
|
||||||
#
|
|
||||||
|
|
||||||
INCLUDE(FindCygwin)
|
|
||||||
|
|
||||||
FIND_PROGRAM(LYNX_EXECUTABLE
|
|
||||||
NAMES
|
|
||||||
lynx w3m links
|
|
||||||
PATHS
|
|
||||||
${CYGWIN_INSTALL_PATH}/bin
|
|
||||||
/bin
|
|
||||||
/usr/bin
|
|
||||||
/usr/local/bin
|
|
||||||
/sbin
|
|
||||||
)
|
|
||||||
|
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LYNX DEFAULT_MSG LYNX_EXECUTABLE)
|
|
||||||
|
|
||||||
MARK_AS_ADVANCED(LYNX_EXECUTABLE)
|
|
|
@ -463,12 +463,6 @@ AS_IF([test ! -x "$XSLTPROC"],
|
||||||
|
|
||||||
AM_CONDITIONAL(BUILD_USER_GUIDE, [test "x$have_wsug" = xyes -a "x$want_wsug" != xno])
|
AM_CONDITIONAL(BUILD_USER_GUIDE, [test "x$have_wsug" = xyes -a "x$want_wsug" != xno])
|
||||||
|
|
||||||
# HTML to text processor. Executable must support "-dump".
|
|
||||||
AC_MSG_CHECKING([for an HTML to text processor])
|
|
||||||
AC_PATH_PROGS(LYNX, [lynx w3m links])
|
|
||||||
AC_CHECK_PROGS(HAVE_LYNX, [lynx w3m links], "yes", "no")
|
|
||||||
AM_CONDITIONAL(HAVE_LYNX, test x$HAVE_LYNX = xyes)
|
|
||||||
|
|
||||||
# RPM
|
# RPM
|
||||||
AC_CHECK_PROGS(RPMBUILD, [rpmbuild], [rpmbuild])
|
AC_CHECK_PROGS(RPMBUILD, [rpmbuild], [rpmbuild])
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
# - Make the build targets top-level on Windows, similar to the NSIS,
|
# - Make the build targets top-level on Windows, similar to the NSIS,
|
||||||
# WiX, and PortableApps targets?
|
# WiX, and PortableApps targets?
|
||||||
|
|
||||||
find_package( LYNX )
|
|
||||||
find_package( Asciidoctor 1.5 )
|
find_package( Asciidoctor 1.5 )
|
||||||
find_package( XSLTPROC )
|
find_package( XSLTPROC )
|
||||||
|
|
||||||
|
|
|
@ -458,10 +458,8 @@ wsdg_html_chunked/index.html: developer-guide.xml
|
||||||
# Release notes
|
# Release notes
|
||||||
if HAVE_ASCIIDOCTOR
|
if HAVE_ASCIIDOCTOR
|
||||||
release_note_deps = release-notes.html
|
release_note_deps = release-notes.html
|
||||||
if HAVE_LYNX
|
|
||||||
release_note_deps += release-notes.txt
|
release_note_deps += release-notes.txt
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
release_notes: $(release_note_deps)
|
release_notes: $(release_note_deps)
|
||||||
|
|
||||||
# create html single page file
|
# create html single page file
|
||||||
|
@ -475,8 +473,7 @@ release-notes.html: $(RELEASE_NOTES_SOURCE)
|
||||||
# create txt single page file (through HTML)
|
# create txt single page file (through HTML)
|
||||||
release-notes.txt: release-notes.html
|
release-notes.txt: release-notes.html
|
||||||
@ echo --- RELEASE NOTES - TXT ---
|
@ echo --- RELEASE NOTES - TXT ---
|
||||||
$(LYNX) \
|
$(PYTHON) $(srcdir)/tools/html2text.py \
|
||||||
-dump \
|
|
||||||
$(builddir)/release-notes.html \
|
$(builddir)/release-notes.html \
|
||||||
> $(builddir)/release-notes.txt
|
> $(builddir)/release-notes.txt
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,8 @@ formats is done via the following steps:
|
||||||
|
|
||||||
Ultimately we'd like to reduce the toolchain requirements to AsciidoctorJ
|
Ultimately we'd like to reduce the toolchain requirements to AsciidoctorJ
|
||||||
alone, but that's not yet possible. Additional tooling is required for
|
alone, but that's not yet possible. Additional tooling is required for
|
||||||
the HTML,
|
the HTML and HTMLHelp targets. See the Developer's Guide for instructions
|
||||||
|
on installing required packages for your platform.
|
||||||
|
|
||||||
== AsciidoctorJ (recommended) or Asciidoctor
|
== AsciidoctorJ (recommended) or Asciidoctor
|
||||||
|
|
||||||
|
@ -56,12 +57,6 @@ formats based on XSL stylesheets. It either ships as part of the
|
||||||
operating system or is available via an installable package on
|
operating system or is available via an installable package on
|
||||||
most Linux distributions.
|
most Linux distributions.
|
||||||
|
|
||||||
== Lynx
|
|
||||||
|
|
||||||
https://invisible-island.net/lynx/[Lynx] is a text based web browser which can
|
|
||||||
convert HTML to plain text. We may add w3m, elinks, or other alternatives
|
|
||||||
in the future.
|
|
||||||
|
|
||||||
== HTML Help Workshop (Windows only)
|
== HTML Help Workshop (Windows only)
|
||||||
|
|
||||||
The HTML Help compiler is part of the
|
The HTML Help compiler is part of the
|
||||||
|
@ -147,128 +142,3 @@ which isn't currently supported by Asciidoctor or via DocBook XSL.
|
||||||
The default help application (Qt Assistant) is ugly. We'd probably want
|
The default help application (Qt Assistant) is ugly. We'd probably want
|
||||||
to write our own help viewer app or integrate help directly via
|
to write our own help viewer app or integrate help directly via
|
||||||
QHelpEngine.
|
QHelpEngine.
|
||||||
|
|
||||||
= Packages For Windows
|
|
||||||
|
|
||||||
Installing the asciidoc package will pull in almost all the other required Cygwin packages.
|
|
||||||
You may need to run "build-docbook-catalog" from a Cygwin bash prompt in order to register your catalog properly.
|
|
||||||
|
|
||||||
Tool/File Cygwin Package Opt./Mand. Comments
|
|
||||||
--------- -------------- ---------- --------
|
|
||||||
asciidoc Doc/asciidoc M cygwin python is a dependency and will also be installed (if not installed)
|
|
||||||
xsltproc: Libs/libxslt M
|
|
||||||
xsl stylesheets: Text/docbook-xsl M docbook.xsl, chunk.xsl and htmlhelp.xsl
|
|
||||||
docbookx.dtd: Text/docbook-xml42 M a later version may be required (e.g. Doc/docbook-xml45), depending on your asciidoc installation
|
|
||||||
docbookx.dtd: Text/docbook-xml45 M current asciidoc installations require this
|
|
||||||
lynx: Web/lynx M
|
|
||||||
dblatex Text/dblatex O A number of dependencies will also be installed
|
|
||||||
fop: - O URL: http://xml.apache.org/fop/ - install it into docbok\fop-1.x or wireshark_lib_dir\fop-1.x
|
|
||||||
hhc: - O URL: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/hwMicrosoftHTMLHelpDownloads.asp
|
|
||||||
zip: Archive/zip O
|
|
||||||
getopt: Base/util-linux O Required to run "build-docbook-catalog"
|
|
||||||
|
|
||||||
|
|
||||||
Packages for Suse 9.3
|
|
||||||
---------------------
|
|
||||||
Tool/File Package Opt./Mand. Comments
|
|
||||||
--------- ------- ---------- --------
|
|
||||||
xsltproc: libxslt M
|
|
||||||
xsl stylesheets: docbook-xsl-stylesheets M docbook.xsl and chunk.xsl
|
|
||||||
docbookx.dtd: docbook_4 M
|
|
||||||
fop: fop O
|
|
||||||
|
|
||||||
|
|
||||||
Packages for Gentoo
|
|
||||||
-------------------
|
|
||||||
Like with all packages do ...
|
|
||||||
Check dependencies: emerge -p <package>
|
|
||||||
Install it: emerge <package>
|
|
||||||
|
|
||||||
Tool/File Package Opt./Mand. Comments
|
|
||||||
--------- ------- ---------- --------
|
|
||||||
xsltproc: libxslt M
|
|
||||||
xsl stylesheets: docbook-xsl-stylesheets M docbook.xsl and chunk.xsl
|
|
||||||
Necessary docbook catalogs are built automatically by portage in /etc/xml and /etc/sgml
|
|
||||||
docbook.xsl and chunk.xsl using "/usr/bin/build-docbook-catalog".
|
|
||||||
So docbook runs out of the box on Gentoo.
|
|
||||||
docbookx.dtd: docbook-xml-dtd M
|
|
||||||
fop: fop O Has a lot of JAVA dependencies.
|
|
||||||
Quanta+ quanta or kdewebdev O Nice HTML/XML/SGML and Docbook editor with Syntaxhighlighting, Autocompletion, etc.
|
|
||||||
|
|
||||||
Tip: The actual DTD version of Gentoo is 4.4, but wireshark docs still use 4.2.
|
|
||||||
To be able to generate the docs, change the version in the second line of
|
|
||||||
developer-guide.xml or install an older version of the DTD.
|
|
||||||
See into the Gentoo handbook howto unmask old versions.
|
|
||||||
|
|
||||||
|
|
||||||
Packages for Fedora
|
|
||||||
-------------------
|
|
||||||
Tool/File Package Opt./Mand. Comments
|
|
||||||
--------- ------- ---------- --------
|
|
||||||
xsltproc: libxslt M
|
|
||||||
xsl stylesheets: docbook-style-xsl M docbook.xsl and chunk.xsl
|
|
||||||
docbookx.dtd: docbook-dtds M provides v4.1, v4.2, v4.3, v4.4 DTDs
|
|
||||||
asciidoc: ascidoc M
|
|
||||||
|
|
||||||
fop: fop O See above
|
|
||||||
|
|
||||||
Note: There are required dependencies (such as xml-common and sgml-common);
|
|
||||||
yum is your friend for doing package installs including required
|
|
||||||
dependencies.
|
|
||||||
|
|
||||||
|
|
||||||
Packages for Debian
|
|
||||||
-------------------
|
|
||||||
Tool/File Package Opt./Mand. Comments
|
|
||||||
--------- ------- ---------- --------
|
|
||||||
xsltproc: libxslt M
|
|
||||||
xsl stylesheets: docbook-xsl M
|
|
||||||
chunk.xsl: docbook-xsl M
|
|
||||||
htmlhelp.xsl: docbook-xsl M
|
|
||||||
docbookx.dtd: docbook-xml M
|
|
||||||
fop: fop O See above
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Makefile:
|
|
||||||
--------------------------
|
|
||||||
There are several ways and tools to do these conversion, following is a short
|
|
||||||
description of the way the makefile targets are doing things and which output
|
|
||||||
files required for a release in that format.
|
|
||||||
|
|
||||||
all
|
|
||||||
Will generate both guides in all available output formats (see below).
|
|
||||||
|
|
||||||
make wsug
|
|
||||||
Will generate Wireshark User's Guide in all available output formats.
|
|
||||||
|
|
||||||
make wsug_html
|
|
||||||
The HTML file is generated using xsltproc and the XSL stylesheets from
|
|
||||||
Norman Walsh. This is a conversion into a single HTML page.
|
|
||||||
output: wsug_html
|
|
||||||
|
|
||||||
make wsug_html_chunked
|
|
||||||
The HTML files are generated using xsltproc and the XSL stylesheets from
|
|
||||||
Norman Walsh. This is a conversion into chunked (multiple) HTML pages.
|
|
||||||
output: wsug_html_chunked
|
|
||||||
|
|
||||||
make wsug_pdf_us
|
|
||||||
make wsug_pdf_a4
|
|
||||||
The PDF is generated using an intermediate format named XSL-FO (XSL
|
|
||||||
formatting objects). xsltproc converts the XML to a FO file, and then FOP
|
|
||||||
(Apache's formatting object processor) is used to generate the PDF document,
|
|
||||||
in US letter or A4 paper format.
|
|
||||||
Tip: You will get lot's of INFO/WARNING/ERROR messages when generating PDF,
|
|
||||||
but the conversion works just fine.
|
|
||||||
output: user-guide-us.pdf user-guide-a4.pdf
|
|
||||||
|
|
||||||
make wsug_chm
|
|
||||||
On Win32 platforms, the "famous" HTML help format can be generated by using a
|
|
||||||
special HTML chunked conversion and then use the htmlhelp compiler from
|
|
||||||
Microsoft.
|
|
||||||
output: htmlhelp.chm
|
|
||||||
|
|
||||||
Using the prefix wsdg_ instead of wsug_ will build the same targets but for the
|
|
||||||
Wireshark Developer's Guide.
|
|
||||||
|
|
||||||
The makefile is written to be run with make on UNIX/Linux platforms.
|
|
||||||
|
|
|
@ -54,8 +54,8 @@ BASIC_LIST="libgtk2.0-dev libpcap-dev bison flex make automake \
|
||||||
libtool python perl libgcrypt-dev"
|
libtool python perl libgcrypt-dev"
|
||||||
|
|
||||||
ADDITIONAL_LIST="libnl-3-dev qttools5-dev qttools5-dev-tools libgtk-3-dev \
|
ADDITIONAL_LIST="libnl-3-dev qttools5-dev qttools5-dev-tools libgtk-3-dev \
|
||||||
libc-ares-dev libkrb5-dev libqt5svg5-dev lynx libsmi2-dev \
|
libc-ares-dev libkrb5-dev libqt5svg5-dev libsmi2-dev \
|
||||||
portaudio19-dev asciidoc libsbc-dev libgeoip-dev \
|
portaudio19-dev asciidoctor libsbc-dev libgeoip-dev \
|
||||||
qtmultimedia5-dev liblua5.2-dev libnl-cli-3-dev \
|
qtmultimedia5-dev liblua5.2-dev libnl-cli-3-dev \
|
||||||
libparse-yapp-perl qt5-default cmake libcap-dev \
|
libparse-yapp-perl qt5-default cmake libcap-dev \
|
||||||
liblz4-dev libsnappy-dev libspandsp-dev libxml2-dev"
|
liblz4-dev libsnappy-dev libspandsp-dev libxml2-dev"
|
||||||
|
|
|
@ -87,8 +87,8 @@ $PCAP $ZLIB lua-devel lua $CARES $GTK3 $GTK2 desktop-file-utils $QT fop
|
||||||
asciidoc git git-review $PERLPODS"
|
asciidoc git git-review $PERLPODS"
|
||||||
|
|
||||||
PKGS_OPT="libnl3-devel libnghttp2-devel $NGHTTP2 $SNAPPY $LZ4 libcap $CAP_PROGS
|
PKGS_OPT="libnl3-devel libnghttp2-devel $NGHTTP2 $SNAPPY $LZ4 libcap $CAP_PROGS
|
||||||
libcap-devel lynx $GEOIP libgcrypt-devel $GNUTLS $GETTEXT libssh-devel
|
libcap-devel $GEOIP libgcrypt-devel $GNUTLS $GETTEXT libssh-devel
|
||||||
krb5-devel perl-Parse-Yapp sbc-devel libsmi-devel $POD2HTML $QT5"
|
krb5-devel perl-Parse-Yapp sbc-devel libsmi-devel $POD2HTML $QT5 asciidoctor"
|
||||||
|
|
||||||
echo "Run this command (as root):"
|
echo "Run this command (as root):"
|
||||||
echo
|
echo
|
||||||
|
|
|
@ -37,7 +37,7 @@ BASIC_LIST="autoconf automake libtool gcc flex bison python perl lua-devel lua \
|
||||||
desktop-file-utils fop asciidoc git git-review gtk2-devel gtk3-devel glib2-devel \
|
desktop-file-utils fop asciidoc git git-review gtk2-devel gtk3-devel glib2-devel \
|
||||||
libpcap-devel zlib-devel"
|
libpcap-devel zlib-devel"
|
||||||
|
|
||||||
ADDITIONAL_LIST="libnl3-devel libnghttp2-devel libcap libcap-devel lynx \
|
ADDITIONAL_LIST="libnl3-devel libnghttp2-devel libcap libcap-devel \
|
||||||
libgcrypt-devel libssh-devel krb5-devel perl-Parse-Yapp sbc-devel libsmi-devel \
|
libgcrypt-devel libssh-devel krb5-devel perl-Parse-Yapp sbc-devel libsmi-devel \
|
||||||
snappy-devel lz4"
|
snappy-devel lz4"
|
||||||
|
|
||||||
|
@ -133,6 +133,9 @@ echo "Gettext devel is unavailable" >&2
|
||||||
add_package ADDITIONAL_LIST perl-Pod-Html ||
|
add_package ADDITIONAL_LIST perl-Pod-Html ||
|
||||||
echo "perl-Pod-Html is unavailable" >&2
|
echo "perl-Pod-Html is unavailable" >&2
|
||||||
|
|
||||||
|
add_package ADDITIONAL_LIST asciidoctor ||
|
||||||
|
echo "asciidoctor is unavailable" >&2
|
||||||
|
|
||||||
$PM install $BASIC_LIST
|
$PM install $BASIC_LIST
|
||||||
|
|
||||||
# Now arrange for optional support libraries
|
# Now arrange for optional support libraries
|
||||||
|
|
Loading…
Reference in New Issue