Merging WinHelp Projects
Previous Topic  Next Topic 

Merging multiple WinHelp Projects together is a lot easier than in HtmlHelp and does not have the same bugs that HtmlHelp v1.4 has. But before you go and dissect your carefully crafted 500 page project into multiple projects please take a few moments to run through this tutorial so that you understand the concept completely first.

In this scenario we have a holiday company who want to showcase their specialized holiday destinations which are categorized as "Cheap and Cheerful" and "Ghastly Expensive". They want most of their clients to see the "Cheap and Cheerful" destinations but only some of their clients will want to see both and some will want to only see the "Ghastly Expensive" options. So they create two projects as follows:-

Master Project

  1. Select "File | New Project" and type in a new Project name of "Holidays", a Title of "Great Holidays" and whatever folder you choose, but remember this folder, as we will need it in a moment.
  2. Add a new Heading and call it "Cheap and Cheerful Destinations" and two new Topics beneath it called "Iraq" and "Afghanistan"
  3. Now compile and see what you've created.

Slave Project

  1. Select "File | New Project" again and type in a new Project name of "GhastlyExpensive" (no spaces), a Title of "Great Holidays" and the same folder as you chose for the Master Project. Note: You can choose a different project and then simply copy the compiled files to the Master Project folder after compiling, but keeping the folders the same cuts out this step.
  2. Add a new Heading and call it "Ghastly Expensive" and two new Topics beneath it called "Hawaii" and "Antarctica"
  3. Now compile and see what you've created.

Merge the Two!

Now let's go back to the Master Project and add in our Slave Project:

  1. Select "File" and the last entry should be "Holidays", select it and the Master Project will open.
  2. We will now tell the Project about the files we want Merged together. Select "Project | WinHelp Compiler Options" and click on the "Contents Properties" on the left. There are three tabs, but we are only interested in the "Index Files" tab, which allows us to search all the Slave index's. Click on this tab and type in
      "Search me too=GhastlyExpensive.hlp" and click [OK]
    Note: The "Search me too" text will appear if the user selects "Custom" in the Find Setup Wizard, so you can replace it with whatever you like.
  3. Now we will tell the Master Project to merge the Contents files of the Slave Projects. On the "Help Text" tab, in Contents, move to the last entry and select "Insert | Merge another Contents" and type in the compiled Project name followed by ".cnt" i.e.:-
  4. Now compile. You should see that the Contents for the Master Project now show both Projects as in the screen shot below. If you check the Index you will see that it has also merged and you can search across all Slave projects too. If you have any problems please go back over all the steps to see what went wrong.