Skip to content

pmachapman/helpdeco

Repository files navigation

helpdeco -- utility program to dissect Windows help files
Copyright (C) 1996, 1997 Manfred Winterhoff
Copyright (C) 2001 Ben Collver
Copyright (C) 2005 Paul Wise

This file is part of helpdeco; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA, 02111-1307, USA or visit:
http://www.gnu.org

helpdeco has been relicenced to the GNU GPL with permission from Manfred:
> ------------------------------------------------------------------------
> From: 	Manfred Winterhoff <[email protected]>
> Date: 	Sun, 3 Apr 2005 20:47:46 +0200
> 
> Oh, so you developed CHMDeco. So you will know what demand is on the
> Linux side to handle Windows Help files. I can not believe that the
> NetBSD port of HelpDeco does have any audience, but if you want to port
> HelpDeco to Linux, just do it, add your copyright to mine, and release
> your port with source under GPL, so that Debian and all other Linux 
> distributers can include it if they want.
> ------------------------------------------------------------------------

HELPDECO dissects HLP help files of Windows 3.0, 3.1, 3.11, and '95 and
many MVB multi media viewer titles into all files required for a rebuild
using the appropriate help compiler HC30, HC31, HCP, HCW, HCRTF, WMVC,
MMVC or MVC:
HPJ - help project file, use as parameter when calling help compiler
MVP - multi media project file, parameter for multi media help compiler
RTF - text file containing whole content of help file and all footnotes
PH  - phrases file (same as produced by help compiler)
ICO - icon of help file if embedded
BMP/WMF/SHG/MRB - embedded pictures in appropriate format
Baggage - all baggage files contained in help file

HELPDECO
Displays usage

HELPDECO helpfilename
Decompiles help file into all sources needed for a rebuild. All files are
created in current directory (should be empty). Existing files will be
overwritten without asking if option -y was specified.

Options may be appended to the command, separated using blanks, as follows:

-m
May be used to stop parsing macros for topic names. Help compiler will emit
Warning 4131.

-b
May be used to stop resolving browse sequences. Help source file than
contains no + footnotes.

-g
Turns off time consuming guessing of context names. Applicable when
HELPDECO reports 'no context ids found' or when you are not interested in
legible context ids. This doesn't affect functionality.
During guessing HELPDECO tries to reconstruct context ids from topic titles
and keywords. This may produce good results on some help files and no result
at all on others, depending on autoring tool used or working method of help
author.

-i
If you want to see which context ids are guessed by HELPDECO...

-hprefix
HELPDECO tries to guess context ids from topic titles and keywords, possibly
prefixed by idh_ or helpid_. If the help file was created using other
prefixes, they may be added to the table using the -h prefix option.

-a [annotationfilename.ANN]
Adds all annotations from annotationfile as annotations of user ANN into
RTF file. Default annotationfilename is helpfilename.ANN.

-s n
Splits output every n pages into a separate RTF file. For example
  HELPDECO helpdemo -s 100
decompiles helpdeco.hlp and creates different RTF files helpdem1.rtf,
helpdem2.rtf,.. each containing no more than 100 topics.

HELPDECO helpfilename -r
Converts help file into RTF file of same appearance if loaded into WinWord
as if displayed by WinHelp. To print or work with complete content. Specify
additional option -n, if no page breaks should separate topics.

HELPDECO helpfilename -c
Generates a *.CNT file used by WinHlp32, containing all chapters that have
titles assigned in the order they appear in the helpfile. This file should
then be edited using HCW 4.00 or any text editor into a hierarchical order.

HELPDECO helpfilename -e
Lists all references to external help files.

HELPDECO helpfilename -e -f
Lists all references to external help files and titles of topics that
contained these references.

HELPDECO helpfilename -p
Checks references to external help files. Referenced help file need to be
available to HELPDECO. This call doesn't produce any new files and doesn't
modify existing files. Errors are reported to stdout (screen).

HELPDECO helpfilename -d
Displays internal directory of help file. You may supply a *.MVB,*.M??,
*.ANN,*.CAC,*.AUX file instead of a *.HLP file.

HELPDECO helpfilename -x
Displays hex dump of internal directory

HELPDECO helpfilename "internalfilename"
Displays internal file in appropriate format if known, else hex dump. You
may redirect output into a file using >outfile.

HELPDECO helpfilename "internalfilename" -x
Displays hex dump of internal file

HELPDECO helpfilename "internalfilename" -x -t offset
Displays hex dump of internal file starting at offset, which may be
specified in decimal or preceeded with 0x in hex.

HELPDECO helpfilename "internalfilename" filename
Exports internal file into filename

*.ANN, *.CAC, *.AUX
These files are formatted like helpfiles, but HELPDECO can only be used to
display their internal directory or display or export internal files.

HELPDECO was written by
Manfred Winterhoff <[email protected]>, Geschw.-Scholl-Ring 17, 38444 Wolfsburg, Germany

If you have more questions, problems (or answers!), please feel free to
send me an EMail to [email protected]

HELPDECO is based upon HELPDUMP from Pete Davis published in:
The Windows Help File Format, Dr. Dobbs Journal, Sep/Oct 1993
Thanks to Holger Haase, who did a lot of work on picture file formats.
And thanks to Jürgen Müller for pointing out 32-bit differences.
Thanks to Bent Lynggaard for the information on help file free lists
and his contribution on context id guessing.

See HELPFILE.TXT for a description of the Windows help file format
as parsed by HELPDECO and related file formats like MRB/SHG.

The newest public version of HELPDECO is always available at:
http://sourceforge.net/projects/helpdeco/

The use of parts of decompiled help files may constitute a violation of
copyright law.