This chapter contains detailed information about dHelp usage and formats of input and output files. Here you can find information about:
dHelp has number of command line parameters that define program behavior and allow you to include dHelp into automatic generation routines. The format of the command line of the dHelp Pro program is:
dHelp <op_type> <project_file> [[-<parameter_1> [-<parameter_2> [...]]]]
<op_type> – this parameter can have
one of the following values:
|
Value |
Description |
|---|---|
|
b |
Generates help file without showing dHelp manager. If this option is specified in the command line program finishes after help generation is completed. |
| i | Installs help file into Delphi/C++ Builder help. |
| u | Uninstalls help file from Delphi/C++ Builder help. |
<project_file>–specifies the name of the file with project options.
Note: When <op_type> is i or u then <project_file> must be a name of the help file, which will be installed or uninstalled.
Parameters - a set of the following parameters:
|
Value |
Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DEFxxx | Specifies defines xxx. Multiple items can be separated with semicolon. | ||||||||||||||||
| IDEFxxx | Specifies ignore defines xxx. Multiple items can be separated with semicolon. | ||||||||||||||||
| INCxxx | Specifies include path xxx. Multiple items can be separated with semicolon. | ||||||||||||||||
| VERxx | Specifies
version of the Delphi or C++ Builder to which help file should be linked:
|
||||||||||||||||
| IGNDPU | Determines whether to ignore existing DPU files. If parameter is not specified, parser will use previously compiled information for modules that have not been changed. | ||||||||||||||||
| KIND | Specifies
the type of creating help file:
|
||||||||||||||||
| F |
When this parameter is specified in the command line program will not stop
after help is generated.
By default when dHelp generates help messages window with help processing results is shown. Program will finish only when messages window is closed by user. |
Here is the sample command line that can be passed to dHelp:
|
dHelp b help.hpc -DEFDebug -IDEFProfile -INCC:\UNITS;..\..\UNITS -VERD5 -IGNDPU -F |
You can use main menu to open, save, and to add new units to the open project.
File - group contains controls for help projects loading and
savings.
|
Item |
Description |
|---|---|
| New | Creates a new project and initializes its properties. |
| Load | Loads existing projects. |
| Save | Saves the current help project using its current name |
| Save As ... | Saves the current help project using a new name. |
| Team work support |
dHelp supports team work on a single help project. Each
member of a team writes help in separate files in plain
text format. Team leader can distribute task in the form of description
frames . To do so he can export
empty topics description to files with plain text format and then merge team
members' work in a help project using importing
descriptions of the topics from text files. Export can be used for further storing topics description in archive. Export/Import options are also very useful if you need to share the description of several topics between several help projects. |
| Exit | Closes the open project and exits dHelp. |
Help project is stored in a single “.hpc” file. It contains project options, the list of source code units and entered help descriptions. Information stored in project file allows you to work on the help project even if you have no source code of the units.
Use Project menu to manage project
options. Here you can add new units to the open project, update the project
contents using the latest changes in source code, customize different project options
and build help files.
|
Item |
Description |
|---|---|
| Add units | Chooses 'Add units' item to add source code units into open help project. |
| Refresh contents tree | Rescans the source units and updates the help contents. New topics will be added into contents section. dHelp will inform user about topics that are no longer exist and suggest you to choose whether to delete inactive descriptions or store them in files with plain text format. |
| Build help | Generates help file. When you select this file help building options dialog is displayed as a start of help building process. |
| Options | Shows dialog for customizing help project options. |
Use View menu to manage the current view of the project contents section. Here you can highlight not described or partially described topics, manage the contents section and customize what diagnostic windows are displayed by the program.
|
Item |
Description |
|---|---|
| Highlight partially described topics | Allows
to mark out topics that have not completed description.
Description for each topic consists of two parts: short and long descriptions. Short description contains brief information about the main topics functionality and purpose. Long description contains more substantial description of the topic functionality, enlist and describe every parameters if any exists and so on. Topics that have one of the description part empty are considered as partially described. When 'Highlight partially described topics' is checked in all partially described topics will be displayed with bold font in contents section. |
| Highlight not described topics | Marks out topics that have neither long nor brief description. When 'Highlight not described topics' is checked in all not described topics will be displayed with bold font in contents section. |
| Disable topics grouping |
When 'Disable topics grouping' item is checked in classes,
interface, types and procedures will not be grouped in alphabetical lists.
All items will be only sorted in alphabetical order and setting in 'Help
contents setting' option will be ignored.
Note: This option works only while designing help. When the help is generated topics are grouped depending on the settings in project options. |
| Show messages window | Shows/Hides window with processing messages list. List is refreshed each time the contents tree or help file are built. It contains diagnostic information, warnings and error messages generated generated during source code units parsing, topics list processing and help building process. |
Use the Help menu to access the online Help system, which is displayed in a special Help window.
Main help project options are divided into three groups:
|
Item |
Description |
|---|---|
| Used units | Specify
source units used in the project.
Note: You can use INT files as well cause only interface section is processed |
| Include protected methods and properties |
Determines whether protected methods and properties are included in the generated help. |
| Help window title | Specifies the title of the help window and contents section. |
| Used units compiler |
Specifies the version of Delphi/CPB for which the help will be generated. This value is also used to make the links to standard VCL help. Note: You can specify version in the command line in -VER parameter. When -VER is specified it has higher priority. |
|
Item |
Description |
|---|---|
| Destination | Determines the folder where intermediate files and resulting help file will
be placed.
By default dHelp creates help file in the folder where project file is located. |
| Include folders |
Specifies the location of your source files. If you try to parse modules that are not located on the search path they will be considered as empty. The search path for standard VCL units is added automatically. You can separate multiple folders with semicolons. Note: Folders that are passed from the command line through -INC parameter will be added automatically to the end of this list. If you use .DPU files instead of source code units you must specify their location in IncludeFolders field. |
| Log folder |
Defines the folder where files with diagnostic information will be placed when creating diagnostic files is enabled on 'Help generation' tab. |
| Conditional defines |
Specifies defines that will be used when parsing the source code. You can separate multiple defines with semicolons. Note: Defines that are passed from the command line through -DEF parameter will be added automatically to the end of the list of specified defines . |
| Ignoring defines |
Specifies defines that will be ignored when parsing the source code. You can separate multiple defines with semicolons. Note: Defines that are passed from the command line through -IDEF parameter will be added automatically to the end of the ignore defines list. |
| Unit aliases | This option is useful for backward compatibility. The format is <oldunit>=<newunit>. You can separate multiple aliases with semicolons. |
|
Item |
Description |
|
|---|---|---|
| Images protected | Specifies the file with image that will be used to mark protected properties. | |
| Images published | Specifies the file with image that will be used to mark published properties. | |
| Images read only | Specifies the file with image that will be used to mark read only properties. | |
| Images abstract | Specifies the file with image that will be used to mark abstract methods. | |
| Maximal deep in ... alphabetical list | Specifies the maximal depth of the alphabetical list of topics (classes, interfaces, types or procedures). | |
| Max number of ... in a group | Specifies the maximal number of topics included in a single alphabetical group. | |
| Don't show same prefix |
dHelp have special feature that allow you to cut off the same
prefixes for topics while grouping in alphabetical groups. It is designed to
increase efficiency of contents section. For example if all participating
procedures have the same prefix DC it can be removed from the group names:
|
|
| Generate diagnostic files |
Determines whether to create files with diagnostic information (.log files). These files contain the information about duplicate descriptions, failed topics, bad links in topic descriptions, not described or partially described topics, information about functions that are not included into any category, etc. |
Help building option dialog contains options that are important for building
help. Here you can specify the kind of generated help file and the location of
help compilers. Help building options dialog starts the help generation process. All
options specified in this dialog are saved in the help project file
along with other options.
|
Item |
Description |
|---|---|
| Kind of help | Specifies
what kind of help file will be generated. dHelp support following
kinds of help/manuals:
|
| Delete temporary file |
Indicates whether the temporary files will be deleted after the help is
generated. When program generates
help file it creates temporary files with topic descriptions in RTF or HTML
format in the project destination folder.
These files are used by a help compiler. |
| Ignore existent DPU files | Determines whether to ignore existing DPU files. If this parameter is not specified, parser will use previously compiled information for modules that have not been changed. Parameter can also be set from the command line through the -IGNDPU parameter. |
| Path to the help compilers |
Specifies the location of the compiler which can be used to generate the help in the format specified in Kind of help property. dHelp finds installed compiler itself. If you don't have help compiler installed you can download it from: Microsoft Help
Workshop (HLP compiler): http://support.microsoft.com/download/support/mslfiles/HCWSETUP.EXE HTML Help Workshop (CHM compiler): |
dHelp uses text files for storing topic descriptions. When file with descriptions is imported by dHelp, the following rules take place:
Topics can include only tags with reserved names, other tags are treated
as a start of the new topic description and tag name serves as the name of
the topic. Units, procedures, variables, types and classes are shown by
their name. For methods, properties and events you must indicate class name
before topic name and separate them with dot.
| <MyUnit>
<MyClass> <MyClass.NewProperty> <MyClass.CustomEvent> <MyProcedure> |
Every tag name is started from open triangle bracket "<" and ended with close triangle bracket ">". The tag contents continues until the next tag definition.
File can have comments enclosed in “<!--” and “-->” symbols. The text inside these symbols is ignored when descriptions are imported.
Here is an example of the descriptions file structure:
|
<TPSCCalendar.Multiselect> |
Description can contain the following tags:
<Definition> - the contents of this tag is ignored during help file generation. When dHelp generates empty frames for the topic descriptions it inserts there an example of the topic declaration as it will be displayed in the generated help.
<Description> - tag contains the full description of the topic.
<See Also> - heads reference section. All elements must be a reference to the valid topic within your library or standard VCL library. When you reference to the topic you must specify it's name using the following rules:
Procedures, variables, types and classes are referenced by their names.
Class members (methods, properties, events) must be referenced with the class name before it (for example: TPSCCalendar.Multiselect). If topic is a member of the class that is currently described class name can be omitted. Multiple elements can be separated by comma or entered in the separate lines.
Brief description must be included in the section right after new topic is started.
Warning: '<' and '>' symbols are
reserved words. If you want to use such characters in your description you must
use two sequential brackets. For example:
|
<Description> .. procedure returns the full path: "C:\WINDOWS>>" ... |
Note: You can point program to get topic description from another topic. In this case dHelp will ignore Brief description, Description, See Also sections of the topic and substitute them by the corresponding sections from the referenced topic. To do this you must specify the referenced topic inside the tag that begins topic with '=' symbol between topic and referenced topic.
<Topic=Referencing_Topic>
Example:
| <TPSCCustomDateEdit.Kind=TPSCPopupCalendar.PopupKind> |
dHelp validates description files and informs about errors using pscFH_FailedTopic, pscFH_NoBodyDesc, pscFH_NoBriefDesc, pscFH_BadLinks diagnostic files.
dHelp uses source code parser that processes Delphi units. Unit parser stores information about every parsed unit in files with DPU extension so that the next time it needs to parse the file it loads DPU file which is much faster. dHelp creates directory DPU_<Compiler_Version> in folder for temporary files and generates DPU files there.
To use DPU files for the VCL, you must specify path where these DPU files are stored in the -INC parameter of the dHelp command line.
Example:
|
-INCC:\DHELP\LIB\DPU_D5 |