Sunday, November 04, 2007

Integrating Help2 files into VS 2005 - part 2

The other workaround I hinted in the previous post involves a bit of manual labor the first time (or if you ask nicely, I might just provide the needed parts), if used more than once it is IMO less painful than the ORCA route.

This solution takes advantage of <CustomTable> feature of WiX. By "reverse engineering" the needed table schemas out of the relevant merge module MSHelp2_RegTables__RTL_---_---.msm we can author these tables as <CustomTable>:s and then just add <Row>:s as appropriate.

Next time just edit the row data and you're set.

For brevity, I just post one table here, but the rest can be made available upon request.

The tables I've used are HelpFile, HelpFileToNamespace, HelpNamespace and HelpPlugin.

      <CustomTable Id="HelpFileToNamespace">
<!--
HelpFileToNamespace table definition -->
<
Column
Type="string"
PrimaryKey="yes"
Id="HelpFile_"
Nullable="no"
KeyTable="HelpFile"
KeyColumn="1"
Category="Identifier"
Description="Foreign key into HelpFile table (required)." />
<
Column
Type="string"
Width="72"
PrimaryKey="yes"
Id="HelpNamespace_"
Nullable="no"
KeyTable="HelpNamespace"
KeyColumn="1"
Category="Identifier"
Description="Foreign key into HelpNamespace table (required)."/>

<!--
data -->
<
Row>
<
Data Column="HelpFile_">YourHelpFileKey</Data>
<
Data Column="HelpNamespace_">YourHelpNamespaceKey</Data>
</
Row>
</
CustomTable>

2 comments:

Anonymous said...

Hi, would you mind posting your whole wix file? This would be a great help. I tried what you described but it did not work. The installer runs just fine but did not register the help collection.

Thank you very much.

Immo Landwerth

Anonymous said...

You're missing Width="72" for the first column which result in ICE32 error.