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.

Reverse engineering aliases from CHM

Postby RamonS on Mon Feb 18, 2019 12:47 pm

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?
RamonS
Senior Propellus Maximus
 
Posts: 4286
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Reverse engineering aliases from CHM

Postby Dave Lee on Tue Feb 19, 2019 1:02 am

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.
Dave Lee
Master Propellus Maximus
 
Posts: 5580
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Reverse engineering aliases from CHM

Postby RamonS on Tue Feb 19, 2019 6:32 am

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: 4286
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Reverse engineering aliases from CHM

Postby RamonS on Tue Feb 19, 2019 6:51 am

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.
RamonS
Senior Propellus Maximus
 
Posts: 4286
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Reverse engineering aliases from CHM

Postby Dave Lee on Tue Feb 19, 2019 7:19 am

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?
Dave Lee
Master Propellus Maximus
 
Posts: 5580
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Reverse engineering aliases from CHM

Postby RamonS on Tue Feb 19, 2019 8:07 am

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.
RamonS
Senior Propellus Maximus
 
Posts: 4286
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Reverse engineering aliases from CHM

Postby Dave Lee on Tue Feb 19, 2019 8:33 am

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 " />
Dave Lee
Master Propellus Maximus
 
Posts: 5580
Joined: Mon Mar 05, 2007 8:33 am
Location: UK


Return to Microsoft CHM Help

Who is online

Users browsing this forum: No registered users and 3 guests