community.borland.com

Article #15434: Making a help group for Borland Pascal

 Technical Information Database

TI434D.txt - Making a help group for Borland Pascal

Category   :Turbo Pascal
Platform   :All
Product    :

Description:



Introduction
------------

      Borland Pascal has many text files in the \BP\DOC directory
      that can be very helpful, but not quickly accessible from
      within Windows.  This document will show you how you can
      create a program group that contains the additional help
      icons by using the GROUPS.EXE program provided with Borland
      Pascal, and creating a text file to tell it where the files
      are.


Instructions
------------

    The steps to create the help group are the following:

    1) You need to load up an editor program with a copy of
       the GROUPS.HLP text file. To do this:

       Load up an editor, the DOS command EDIT for example,
       and either type in the example file below, or load this
       instruction file and strip off all the text except for
       the example code. DO NOT include the --TOP-OF-FILE-- and
       --END-OF-FILE-- in your text file.

       Use the SAVE AS command to save the text file as:
          C:\WINDOWS\GROUPS.HLP
       This will make sure the file is saved under the Windows
       directory.

    2) Change the directories in the example file to match the
       directories on your system.

       In the included example file, the location of the Pascal
       root directory is C:\BP.  If your Pascal files are in the
       directory D:\BP, use a Global Search and Replace to search
       for 'C:\BP' and replace it with 'D:\BP'.  This will let
       the GROUPS program know where your Pascal help
       and icon files are.

       If your Windows files are not located in the C:\WINDOWS
       directory, you will have to do another Global Search and
       Replace and replace 'C:\WINDOWS' with whatever the path
       is to your Windows files, D:\WINDOWS for example.

    3) Under Windows, you will need to run the GROUPS.EXE file
       along with the text file you've just edited as its
       parameter.  To do this, go to the FILE menu and select
       RUN.  In the field for Command Line, type

         GROUPS GROUPS.HLP

       This should run the GROUPS program, and it should ask
       you if you'd like to create a Windows program group.
       Click on Yes.

       If an error box pops up, you can try typing

         C:\WINDOWS\GROUPS C:\WINDOWS\GROUPS.HLP

       assuming that your Windows files are located in the
       C:\WINDOWS directory.

    4) Look at the icons, they should all be yellow question
       marks with titles underneath.  Also double click on some
       of the icons and make sure that an editor screen comes
       up with a copy of the help file in it.

    If there are problems:

       If either the icon is wrong, or the editor shows an empty
       screen, the directory setting for the Pascal files is
       wrong.  Make sure that the Pascal directory entry is of
       the form C:\BP, or D:\BORLANDP, or something similar that
       has a valid path to your Pascal directory.

       If the editor doesn't come up, there is an error with the
       Windows directory path entry.  It should be something
       like C:\WINDOWS.

       If the icons don't appear but the Group Box does appear,
       there is a format error in the GROUPS.HLP file.
       Make sure the file follows the example shown here.

       If the Group Box doesn't appear at all, GROUPS.EXE
       couldn't load the text file GROUPS.HLP.  Make sure the
       path to the file is valid, and that the file exists
       where the path is pointing to.


Example File
------------


IMPORTANT:
    In this example file, the lines after '[icons1]' have been
    split before the '='.  The actual text file must be
    implemented with each help icon command on it's own line.
    You must combine the lines that start with an '=' with the
    line above it.  For example, you could possition the cursor
    on the '=' and press BACKSPACE to bring the line up and
    append it to the line above it.

    Each line should have the form:

    ExecuteFile=WorkingDir,Icon Caption,IconFile

    When this example text file is finished, it should contain
    28 lines only and will create 24 help icons.


NOTE:
    Since \BP\DOC\utils.td is too large to fit into the
    NOTEBOOK.EXE editor, WRITE.EXE has been substituted.


FILENAME: C:\WINDOWS\GROUPS.HLP
------------------------TOP-OF-FILE----------------------------
[group1]
caption=Borland Pascal Help Files
file=BPH7.GRP
[icons1]
WINHELP.EXE C:\BP\BIN\BPW.HLP
=C:\WINDOWS,BPW Reference,C:\BP\BIN\help.ico
WINHELP.EXE C:\BP\BIN\WORKHELP.HLP
=C:\WINDOWS,Workshop Reference,C:\BP\BIN\help.ico
WINHELP.EXE C:\BP\BIN\WINSIGHT.HLP
=C:\WINDOWS,WinSight Reference,C:\BP\BIN\help.ico
WINHELP.EXE C:\BP\BIN\WINSPCTR.HLP
=C:\WINDOWS,WinSpector Reference,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\manual.rw
=C:\WINDOWS,Workshop Manual Update,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\readme.rw
=C:\WINDOWS,Workshop RLE4 Notes,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\custcntl.rw
=C:\WINDOWS,Creating Custom Controls,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\bwccapi.rw
=C:\WINDOWS,Custom Controls Tech Notes,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\bwccstyl.rw
=C:\WINDOWS,Custom Controls Style Notes,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\manual.prf
=C:\WINDOWS,Profiler Manual Update,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\helpme!.prf
=C:\WINDOWS,Profiler Reference,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\readme.td
=C:\WINDOWS,DB/PF/ASM Release Notes,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\manual.td
=C:\WINDOWS,Debugger Manual Update,C:\BP\BIN\help.ico
write.exe C:\BP\DOC\utils.td
=C:\WINDOWS,Debugger Utilities Reference,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\helpme!.td
=C:\WINDOWS,Debugger Tips,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\hdwdebug.td
=C:\WINDOWS,Hardware Interface Notes,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\dbgboard.td
=C:\WINDOWS,Hardware Driver Notes,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\dpmiuser.doc
=C:\WINDOWS,DPMI Reference,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\temc.doc
=C:\WINDOWS,Turbo Macro Reference,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\utils.doc
=C:\WINDOWS,Utilities Reference,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\manual.tv
=C:\WINDOWS,Turbo Vision Reference,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\helpme!.tsm
=C:\WINDOWS,Turbo Assembler Reference,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\readme.tsm
=C:\WINDOWS,PROCDESC PROCTYPE Reference,C:\BP\BIN\help.ico
notepad.exe C:\BP\DOC\tcref.tsm
=C:\WINDOWS,TCREF Reference,C:\BP\BIN\help.ico
------------------------------END-OF-FILE----------------------



Additional Information
----------------------

How it works:

   The GROUPS.EXE program takes a text file as input and creates
   a Windows group according to the data in the file.  The text
   file is of the form:

   ExecuteFile=WorkingDir,Icon Caption,IconFile

   The help files will be displayed with NOTEPAD.EXE in the
   Windows directory.  You can use any Windows editor to display
   the files by changing the first field from 'notepad.exe' to
   whatever editor you'd like to use.

   The WinHelp help files will also be included in
   the help group and are proceded by 'WINHELP.EXE'.  The help
   icon is the same as the original help files, and can be
   changed by naming a different .ICO file in the last field.


   The GROUPS.EXE program is also the same one used by the
   install program to create the Pascal program group.  To
   recreate the original program group, execute the command

      GROUPS GROUPS.B$$

   The GROUPS.B$$ is created by the installation process, and
   is located in the Windows directory.


Reference:
 

3/31/99 10:10:53 AM
 

Last Modified: 01-SEP-99