Exporting a header file as .def

This forum is for all Flare issues related to the Microsoft HTML Help target.
This target produces "CHM" files in the output.
Post Reply
davidgolden99
Propeller Head
Posts: 29
Joined: Thu Apr 10, 2008 11:17 am

Exporting a header file as .def

Post by davidgolden99 »

I'm documenting an application built in FoxPro. Is it possible to export the header file as a .def?
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Exporting a header file as .def

Post by RamonS »

Not as far as I know, but what is the format of a .def file for FoxPro. I'd think that renaming the extension and making a few find & replace modification might to the trick. Can you post a sample format?
davidgolden99
Propeller Head
Posts: 29
Joined: Thu Apr 10, 2008 11:17 am

Re: Exporting a header file as .def

Post by davidgolden99 »

This is a sample of the legacy format from help.def:

&& File Menu
#DEFINE _H_KFlExprtData 211010000 && Export Data dialog
#DEFINE _H_KFlBatLink 211020000 && Batch-Link dialog
#DEFINE _H_KFlChUser 111030000 && Change User dialog
#DEFINE _H_KFlCalc 111040000 && Calculator
#DEFINE _H_KFlCalendr 111050000 && Calendar

This is how it looks in Flare. The comment describing the topic & code has been lost, as well as the ordering & grouping of the topics. The _H_ prefix was stripped. The ID numbers were converted to hex. (Should I be frightened that the developer was able to read the hex codes and tell me the decimal equivalents?)

#define KFlExprtData 0xc93c1d0
#define Setup_menu_options 0x310f
#define Quantity 0x3e96
#define Shipping_Screen_Builder_window 0x2718

It looks like the formatting from the help.def file was actually lost when it was converted by RoboHelp X5 a couple of years ago. I'm picking up the pieces of this legacy help and trying to restore context-sensitive help. The legacy file is actually in .HPJ format and can't be imported directly into Flare as far as I can tell.
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Exporting a header file as .def

Post by RamonS »

Do you still have RH around? You could use RH to convert the help file to a CHM project and then use that to import it into Flare. You will get something, but I have no clue if that result will have any resemblance with the original, but it should be worth a try.
That will not get you around the .def file issues. I hoped for the FoxPro .def format to be a bit more supportive of this endeavour, but I guess not. What seems to be hex in the Flare file is apparently decimal in the FoxPro file (maybe there is an option in Flare - don't have Flare handy right now) and there are also none of the strings at the end with the && prefix. It would be interesting to know which significance those strings have and if they are really necessary. Same for the && File Menu line, where I assume that there are several more such lines in the FoxPro .def file. If not, there may be some hope and the developers may come up with a quick'n'dirty converter program that could also be run as part of an automated build, because then there is only a string replacement and a hex to decimal conversion necessary.
Other than that I don't have any better idea than to have you ask FoxPro .def files to be generated by Flare as an enhancement request. Given the popularity of FoxPro I wouldn't put my hopes too high, but here is the link for the wish list submission:
https://www.madcapsoftware.com/bugs/submit.aspx
davidgolden99
Propeller Head
Posts: 29
Joined: Thu Apr 10, 2008 11:17 am

Re: Exporting a header file as .def

Post by davidgolden99 »

I found a coouple of things. The help.def file I was provided needs to be edited so that
a. #define must be lower case
b. comments are indicated by // rather than &&
c. it has an .hh suffix

When I export the help file back to the developer I may have to convert the comment indicators to &&. I should be able to saved it with a.def suffix for him to use with the FoxPro application.
Post Reply