i've read a lot about CSH and how to connect the application to the help file but i just don't get it.
As far as i understand there are two files: a HeaderFile and an AliasFile.
The HeaderFile maps numeric IDs from the application to so called identifiers.
And the AliasFile maps the identifiers to the actual topic.
Am i right?
So i have a HaederFile that says:
Code: Select all
#define foo 12345
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<CatapultAliasFile>
<Map Name="foo" Link="/Content/Topics/MyFaboulousTopic.htm" />
</CatapultAliasFile>
The problem is it doesn't work.
By "doesn't work" means: When i press the "help key" or the "help button" in some dialog of my application the CHM help opens correctly but instead of the corresponding topic i see the browser message that the page could not be found.
I can see the TOC to the left and selecting an entry in the TOC opens the selected topic. But obviously there is no mapping between those numeric values and the corresponding topic.
Is there a general misunderstanding?
Some background:
My company develops software for about 20 years now.
We used the well known HTML Workshop to create our CHM help files.
The html files were named exactly like the numeric IDs (12345.htm).
There was no alias.xml
CSH worked nicely.
Now we switched to Flare because of single sourcing etc.
I imported one of our old CHM files into Flare.
Since i cannot work with topics that have just numeric filenames i decided to rename them to appropriate titles (12345.htm -> MyFaboulousTopic.htm).
One of my main thoughts where "How to link the dialogs of our software to the corresponding topic of the new help file if the topic name is different now?"
The solution might be those header- and aliasfiles.
I tried to explain my developer that i would need a header-/aliasfile to map the numeric values to the new topics filenames.
No luck. There just is no headerfile or he just did not understand.
So i have to create the header- and aliasfile by myself.
Tough i'm not a programmer but at least a former webdeveloper i created a php script that iterates over all numeric named html files, grabs its <title> inside the file, converts it to proper filenames, renames the files, fixes the links in TOC file and creates the header- and aliasfile automatically. So i don't have to change about 1000 and more files "by hand".
I came up with this result...
Filename:
Code: Select all
12345.htm -> MyFaboulousTopic.htm
Code: Select all
#define MyFaboulousTopic 12345
Code: Select all
<Map Name="MyFaboulousTopic" Link="/Content/Topics/MyFaboulousTopic.htm" />
Code: Select all
<TocEntry Title="MyFaboulousTopic" Link="/Content/Topics/12345.htm"> -> <TocEntry Title="MyFaboulousTopic" Link="/Content/Topics/MyFaboulousTopic.htm">
When i create the target output and view it, everything is okay.
But when i open the CHM file from my application there is just no CSH
I decompiled the old CHM file and the CHM file created with Flare to see what's inside.
The old decompiled CHM file has a primitive folder structure:
Code: Select all
|--- html
| |--- 12345.html
| ...
|
|--- images
| |--- someImage.gif
| ...
|
|--- MyProject.hhc
|--- MyProject.hhk
Code: Select all
|--- Data
| |--- Skinchm
| | |--- lots of images
| |
| |--- Alias.xml
| |--- HelpSystem.xml
|
|--- resources
| |--- images
| |--- stylesheets
|
|--- SkinSupport
| |--- css files
|
|--- topics
| |--- MyFaboulousTopic.htm
|
|--- _Temp.hhc
|--- _Temp.hhk
|--- Glossary.htm
|--- MyProject.xml
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<HelpSystem
DefaultUrl="topics/MyFaboulousTopic.htm"
Glossary="Content/Glossary.htm"
Alias="Content/Data/Alias.xml"
Skin="Data/Skinchm/Skin.xml"
Skins="CHM"
BuildTime="27.03.2014 16:27:05"
BuildVersion="9.1.2.0"
TargetType="HtmlHelp"
SkinTemplateFolder="Skin/"
InPreviewMode="false"
MoveOutputContentToRoot="false"
MakeFileLowerCase="true"
UseCustomTopicFileExtension="false"
/>
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<CatapultAliasFile>
<Map Name="MyFaboulousTopic" Link="topics/myfabouloustopic.htm" ResolvedId="12345" />
</CatapultAliasFile>
How can i check what value is actually passed to the CHM viewer or what is the CHM viewer actually trying to display?
Any help is much apreciated.