Reverse engineering aliases from CHM

This forum is for all Flare issues related to the Microsoft HTML Help target.
This target produces "CHM" files in the output.
Post Reply
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Reverse engineering aliases from CHM

Post by RamonS »

Got a special project and need to remove content from a CHM, then recompile. Importing and decompiling the CHM was easy as was removing the content. Now hitting a road block with the aliases. After import there were not aliases and map IDs defined. I got the header file from the developer and that imported fine....except that none of the aliases are linked to the topics. Looking at 400 aliases and not very descriptive topic names.

Does anyone have an idea on how to get the alias -> topic links out of the CHM?
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Reverse engineering aliases from CHM

Post by NorthEast »

If I try importing a CHM that was created by Flare, the alias file is blank in the project it creates. So it looks like it doesn't work.

But I can decompile the same CHM using Microsoft HTML Help Workshop (https://www.microsoft.com/en-gb/downloa ... x?id=21138), and the files include the alias file in Data\Alias.xml.
So if you use the alias file from a decompiled project, along with your header file, it should hopefully work.
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Reverse engineering aliases from CHM

Post by RamonS »

Thanks! I give this a try. Did find KeyTools and using the analyze feature to find the alias map in the CHM, but that means reassigning the topics by hand. It is rather tedious work.
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Reverse engineering aliases from CHM

Post by RamonS »

Tried it and there is no Data folder created on decompile. So back to the original plan of patching things up manually...it will be a looong looong day. :roll:
At least I will have a working Flare project in the end and unlike the old tech writer I will put a copy out on the network and into source control.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Reverse engineering aliases from CHM

Post by NorthEast »

Ah, maybe your CHM file wasn't originally created by Flare then - mine was, so it had the alias file.

The original HHP file would contain the mappings, but unfortunately HTML Help Workshop doesn't decompile/reconstruct the HHP file.
I've not used KeyTools, but can that not decompile the HHP file?
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Reverse engineering aliases from CHM

Post by RamonS »

The original CHM was created with WebWorks from a FrameMaker project...and no, I don't have the FM project for importing, which wouldn't have helped me anyway since the mappings were made in WebWorks.
KeyTools shows the ID - topic matches like this:
5521 = VTUG20_Students.03.51.html
5530 = VTUG20_Students.03.53.html
5531 = VTUG20_Students.03.56.html
5540 = VTUG30_Map.05.083.html
With the header file loaded I get the map IDs and aliases. With the info from KeyTools I get the map ID and topic mappings. Ordering the aliases by map ID makes it somewhat easy, but it is still tedious. The rather useless names for the topics are not helping either, neither do the aliases. Aliases and IDs were assigned by the devs, so there is no naming and numbering convention, they just took the last map ID, added 10, and assigned that new ID to the help button in a new form.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Reverse engineering aliases from CHM

Post by NorthEast »

RamonS wrote:
5521 = VTUG20_Students.03.51.html
5530 = VTUG20_Students.03.53.html
5531 = VTUG20_Students.03.56.html
5540 = VTUG30_Map.05.083.html
That's not too bad if you can get it in that format as a text file, as the id and filename have a "=" delimiter.
You could use this in a text editor (or even Excel), and with a bit of find and replace you could reformat it into Flare's alias XML format; e.g.

Code: Select all

<Map Name="5521" Link="/Content/VTUG20_Students.03.51.html " />
Post Reply