![]() | ![]() | ![]() | ![]() | ![]() |
The header file "OL_DOC.DH" provides a powerful range of facilities to allow you to create electronic documentation. It currently supports Windows CHM, OS/2 IPF/INF and straight HTML generation (with and without Java tree navigation applet) but there is no reason this can't be extended in the future. In fact once JavaHelp becomes more reliable I intend to add it.
The IPF, CHM, and HTML versions of the document you are now viewing were produced by the same method.
Note that the facilities provided here much simplify the generation of complex documentation and I would recommend it's use even if you were limiting yourself to a single target output format.
Using the facilities of this header file your source files need contain no IPF or HTML tags, although it is simple to conditionally include your own HTML or IPF tags as required.
If you stick to the macros and facilities provided by the header file your documentation should move to new supported formats without change. So for example even if you are only generating html it would be wise to use "<$P>" instead of "<;p>" etc. For the same reason rather than have the same conditional code all over your document create a macro of your own so that if you do need to change things to get your document to work in a new format all the code will be in one place rather than distributed throughout your document!
The examples batch files (below) will give you an idea of how to invoke ppwizard to generate documentation however please note that it is very important not to hardcode a filename on the /output switch when generating html or ppwizard will fail as each heading will try to update the same file.
For more information have a look at the tags and options documentation as well as the simplistic example source.
This shows a simple batch file which takes a source file and generates one or more HTML pages:
@echo off REM *** Name of the .INF **************************************************** setlocal if "%1" == "" SET INFNAME=TEST if not "%1" == "" SET INFNAME=%1 REM *** Generate the .HTM *************************************************** set DEBUG=/debug set DEBUG= call ppwizard.cmd %INFNAME%.D %DEBUG% /output:out\*.htm /crlf /define:DocType=HTML
Note that the /output switch above specified "out\*.htm", all pages will therefore be generated in the "out" directory and they will all have the extension ".htm".
Note that the "*" is very important, you must not "hardcode" the name of the html file since for html generation each Heading generates a new page and with a hardcoded name each pages will use the same filename (and ppwizard will then fail)!
This shows a simple batch file which takes a source file and generates the IPF source which can then be compiled to generate an OS/2 INF file:
@echo off REM *** Name of the .INF **************************************************** setlocal if "%1" == "" SET INFNAME=TEST if not "%1" == "" SET INFNAME=%1 REM *** Generate the .IPF *************************************************** set DEBUG= set DEBUG=/debug call ppwizard.cmd %INFNAME%.D %DEBUG% /output:out\*.ipf /crlf /define:DocType=IPF if errorlevel 1 goto ERROR REM *** Compile the .IPF to create a .INF *********************************** SETLOCAL CD OUT IPFC.EXE %INFNAME%.IPF /S /INF if errorlevel 1 goto ERROR goto EndBatch :ERROR echo ERROR: Somethings wrong! :EndBatch
![]() | ![]() | ![]() | ![]() | ![]() |