Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 20445: /trunk/gtk/ /trunk/gtk/: help

From: "Luis Ontanon" <luis.ontanon@xxxxxxxxx>
Date: Tue, 16 Jan 2007 05:06:09 +0100
On 1/16/07, Ulf Lamping <ulf.lamping@xxxxxx> wrote:
Luis Ontanon wrote:
> using file:///usr/local/share/wireshark/wsug/%s could be little less
> painful than the "internet way". Specially if the box is not wired to
> the wild.
>

Yes, and I would appreciate it.

It would have another advantage: Lower the actual traffic to the
wireshark.org server. The disadvantage is that the binary distribution
packages will become slightly larger - but there's always a price to pay.
a pkg that probably comes from the same server, at least is gzed.


Two task to add this:
1. the "distributive" script(s) must copy the user's guide to the right
place, e.g.: file:///usr/local/share/wireshark/wsug/ or such
To put the files in the datadir is relatively easy task.

The problem is to build the wsdg:

* does the buildbot that makes the tarball have all the tools needed
to cook the docbook files?
 (fop, xsltproc, xmllint, and a set of working dtds)

* we need a script to generate docbook/Makefile and docbook/catalog.xml
 (autoconf would be THE way, but to get my hands there this close to
release makes me panic)

2. the help system must be enabled to look at this local file

1.)
The task to do is to get the docs at the right place for various UNIX
platforms with both the source and binary "distribution" ways. I don't
have real knowledge how to do this ...

we need to (conditionally, if autoconf knows we got fop etc.)
* build the wsug in the docbook dir
* copy the files down to /trunk/doc/wsug
* add the files EXTRA_DIST macro in trunk/Makefile.am


2.)
Looking for a local file first could be easily added to gtk/help.dlg.c
function help_topic_html(), e.g. based on #ifdef _WIN32 - should be
straightforward to understand what to do - I can help with this if any
questions arise.
In my case the browser.c functions work. (even from Lua)



It could even be done for only a few platforms by simply adding a check
if a local file (e.g.
/usr/local/share/wireshark/wsug/html_chunked/index.html or alike) is
actually existing. I guess the actual place in the filesystem to look
for should be based on config settings - but the UNIX guys will know
that much better than me ;-)

So UNIX based systems could do it much like the current Win32 method:
- first check if a local file exists in /usr/local/... and use it that
way - as Frankie once said: "I did it my way" ;-)))
- if that fails as no local help exists, do the "internet way" (as
already implemented)

So if anyone could have a look at this - it would be welcome ...
I'll try to make it work, after the release has been branched.
Autoconf is evil! Every time I mess with it it works for me but gets
broken for someone else.

--
This information is top security. When you have read it, destroy yourself.
-- Marshall McLuhan