Omni Systems, Inc. |  | Mif2Go User's Guide, Version 55 |  |  |  |  |

> 8 Generating WinHelp > 8.2 Setting up a WinHelp project > 8.2.13 Compiling a WinHelp project

### 8.2.13 Compiling a WinHelp project

To compile the RTF files Mif2Go produces, you need Microsoft Help Workshop (hcw.exe). Make sure you have the latest version of Help Workshop. If hcw.exe is not on your system PATH, you must tell Mif2Go where to find it:

[HelpOptions]

; Compiler = path\to\hcw; can include run parameters

Compiler = hcw /c /e

You can have the compiler display a copyright statement and a compile date in the WinHelp Version Information dialog:

[HelpOptions]

HelpCopyright = your copyright statement

HelpCopyDate = Yes

For example:

[HelpOptions]

HelpCopyright = (c) 2001-2012 Omni Systems, Inc.

HelpCopyDate = Yes

These settings resulted in the following, displayed in the WinHelp Version Information dialog:

(c) 2001-2012 Omni Systems, Inc.

Monday, February 20, 2012 18:24:39

When you check Compile Help in the Mif2Go Export dialog (see §3.6 Converting documents), or specify the following options in the configuration file, Mif2Go automatically runs the WinHelp compiler after generating output files:

[Automation]

; CompileHelp = No (default, run Help compiler separately), or Yes

CompileHelp=Yes

To have Mif2Go copy the .hpj file to another directory for compiling, specify the following:

[Automation]

; WrapPath = path to dir for compiling and distribution,

; default is output dir

WrapPath=.\help

See §35.6 Assembling files for distribution.

Compiling from Mif2Go not recommended

Despite the fact that a Compile Help option appears in the Mif2Go Export dialog (see Figure 3-5), it is not a good idea to compile help from within Mif2Go. If your file is large, you will likely encounter a memory allocation failure.

Compile from Help Workshop

Instead, open Help Workshop. From within Help Workshop open MyBook.hpj; to compile your help project, click the button that looks like a food grinder. You can keep Help Workshop open while you are using Mif2Go, and click the compile button whenever you make a new set of RTF files. This method is simple to use, avoids memory problems, and shows you helpful diagnostic messages.

If you still get memory errors, or if compilation does not happen, check the version of Help Workshop you are actually using (not just the hcw.exe you see in Explorer): double-click MyBook.hpj and look at the number displayed when you click Help > Version...; it should be 4.03.0002.

Help compiler must be on the system PATH

That said, if you really must compile from within Mif2Go, make sure the Windows system can find file hcrtf.exe. This is best accomplished by including the name of the directory where you installed Help Workshop in the system PATH by modifying environment variable PATH. Or, you can copy the .exe files (at least hcw.exe and hcrtf.exe) and the .dll to the \windows\system directory, or to some other directory that is already on the system PATH.

Also, you might want to specify the following setting, so you can see any error messages that result:

[Automation]

; KeepCompileWindow = No (default)

; or Yes (so any error messages can be seen)

KeepCompileWindow=Yes

When KeepCompileWindow=Yes, a system window opens when the compiler runs. If there are no compilation errors, you will see only a command prompt when compilation finishes. You must dismiss the window before Mif2Go can continue processing.

Tell the Help compiler where to find graphics

If your graphics are in more than one place, you can add multiple BMROOT= entries to the [OPTIONS] section of your Help Project (.hpj) file. For example:

[OPTIONS]

BMROOT=..\MyGraphics

BMROOT=..\Test\Graphics

Edit the .hpj if you add / remove / rename files

If you add, remove, or rename any files in your FrameMaker book after Mif2Go has generated the .hpj file for that book, before you compile WinHelp you must edit the [Files] section of the .hpj file to reflect those changes. Use a text editor such as Notepad.

> 8 Generating WinHelp > 8.2 Setting up a WinHelp project > 8.2.13 Compiling a WinHelp project

| Mif2Go User's Guide: 8.2.12 Integrating WinHelp from RoboHelp |  | Mif2Go User's Guide: 8.2.14 Checking WinHelp RTF files for Mif2Go version |