Quote:
Calls docgen.exe to generate the rtf
Calls makehelp.bat, which calls makehm a bunch of times and then calls hwc.exe to compile the .hlp file using static .hpj and .cnt files.
It:
- Generates the .rtf file help.rtf from the database
- Calls WriteMapFile (see code snippet) to quickly write out the mapping file help.hm by doing a few selects (makehm is not used).
- Calls hcw.exe to read in the help.hpj file (copy below). This generates the mushclient.hlp file.
WriteMapFile (db);
// generate help file
printf ("Generating help file ...\n");
char * args [] =
{"hcw", "/C", "/M", HPJ_FILE, NULL };
if (_execvp (args [0], args) == -1)
perror ("Invoking help compiler");
}
This is the help.hpj file:
; This file is maintained by HCW. Do not modify this file directly.
[OPTIONS]
COMPRESS=12 Hall Zeck
LCID=0xc09 0x0 0x0 ; English (Australian)
REPORT=Yes
CONTENTS=DOC_CONTENTS
TITLE=MUSHclient help
COPYRIGHT=Copyright 2003 Gammon Software Solutions
HLP=..\mushclient.hlp
[FILES]
help.rtf
[MAP]
#include help.hm
[WINDOWS]
main="",,27904,(r14876671),(r12632256),f2
You can see from the above that once you have help.rtf and help.hm files, the help generation is pretty straightforwards.
The contents file is totally a manual process. However after a major change I might do the subsections with a few selects as documented in comments in the docgen program, like this:
select concat("3 ", command_name, "=CMD_", label) FROM commands ORDER BY command_name;
Stuff like the high-level contents, is simply something I did in a text editor. (It practically never changes).
|