-
-bool WriteHPJ(wxChar *filename)
-{
- wxChar hpjFilename[256];
- wxChar helpFile[50];
- wxChar rtfFile[50];
- wxStrcpy(hpjFilename, filename);
- StripExtension(hpjFilename);
- wxStrcat(hpjFilename, _T(".hpj"));
-
- wxStrcpy(helpFile, wxFileNameFromPath(filename));
- StripExtension(helpFile);
- wxStrcpy(rtfFile, helpFile);
- wxStrcat(helpFile, _T(".hlp"));
- wxStrcat(rtfFile, _T(".rtf"));
-
- FILE *fd = wxFopen(hpjFilename, _T("w"));
- if (!fd)
- return FALSE;
-
- wxChar *helpTitle = winHelpTitle;
- if (!helpTitle)
- helpTitle = _T("Untitled");
-
- wxString thePath = wxPathOnly(InputFile);
- if (thePath.IsEmpty())
- thePath = _T(".");
- wxFprintf(fd, _T("[OPTIONS]\n"));
- wxFprintf(fd, _T("BMROOT=%s ; Assume that bitmaps are where the source is\n"), thePath.c_str());
- wxFprintf(fd, _T("TITLE=%s\n"), helpTitle);
- wxFprintf(fd, _T("CONTENTS=Contents\n"));
-
- if (winHelpVersion > 3)
- {
- wxFprintf(fd, _T("; COMPRESS=12 Hall Zeck ; Max compression, but needs lots of memory\n"));
- wxFprintf(fd, _T("COMPRESS=8 Zeck\n"));
- wxFprintf(fd, _T("LCID=0x809 0x0 0x0 ;English (British)\n"));
- wxFprintf(fd, _T("HLP=.\\%s.hlp\n"), wxFileNameFromPath(FileRoot));
- }
- else
- {
- wxFprintf(fd, _T("COMPRESS=HIGH\n"));
- }
- wxFprintf(fd, _T("\n"));