Multiple Header files in HTMLHelp projects

Avoid contents of header files to show up in FullTextSearch

Situation

If you have a HMTLHelp project creating several CHM files and each of them has it's own header files with context IDs you can't map these for each file (you could do in WWP 2003 and IMHO you should in ePublisher, too).

Quadralay recommends to create an override for template.hhp and list all header files in the [Map] section of template.hhp.

Example:

...
[MAP]
#include akg_dgm_hilfe.h
#include akg_strasse_hilfe.h
#include akg_debu_hilfe.h
#include akg_schlepp_hilfe.h
...

That works and the generated help is context sensitive but ... the content of all header files is compiled into the CHM and is found as untitled if Full Text Search is used with wildcards, f. e. *searchword*.

Solution

Don't create the override and don't list the header files in the [Map] section. Instead use a master header file to reference all the needed .h files and set this using the "target settings" dialog box in ePublisher.

How to create a master header file

  1. Create a list of all the header files in the Files folder of your ePublisher project. The easiest way to do this is to open a Command Shell and use the DOS dir command, f. e. dir /B *.h > master_header.h. With the /B switch only the file names are listed. You'll end up in s.th. like
    akgcadobj_hilfe.h
    akgcv1_scala_hilfe.h
    akgmengen_hilfe.h
    akg_bahnverm_hilfe.h

  2. Edit the master_header.h file so that each line reads #include "akgcadobj_hilfe.h" etc.

    Now you heave a master_header.h in your Files folder that references all the single header files there.

How to add the `master_header.h` to your project

  1. Open the "Target Settings" dialog box in ePublisher.
  2. Select the master_header.h as HTML Help custom map file.

Result: "Clean" HTML file

All the CHM help files of your project will be context sensitive but no header files will be compiled into the CHM and you have no unwanted hits using Full Text search in your CHM.

Note: Seems only to work in the Files folder

I could not get this to work if you reference the header files from another folder on your computer or network. So s.th. like #include "Q:/Sources/Project/Res/akgcadobj_hilfe.h" doesn't work (for me).

HTMLHelpMultipleHeaderFiles (last edited 2009-06-24 12:40:49 by FranzJosefKnelangen)