hhp2cached.cpp 691 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. Converts hhp (HTML Help Workshop) files into cached
  3. version for faster reading
  4. Usage: hhp2cached file.hhp [file2.hhp ...]
  5. */
  6. // For compilers that support precompilation, includes "wx/wx.h".
  7. #include "wx/wxprec.h"
  8. #ifdef __BORLANDC__
  9. #pragma hdrstop
  10. #endif
  11. #ifndef WX_PRECOMP
  12. #include "wx/wx.h"
  13. #endif
  14. #include "wx/html/helpdata.h"
  15. class MyApp : public wxApp
  16. {
  17. public:
  18. virtual bool OnInit();
  19. };
  20. IMPLEMENT_APP(MyApp);
  21. bool MyApp::OnInit()
  22. {
  23. for (int i = 1; i < argc; i++)
  24. {
  25. wxHtmlHelpData data;
  26. wxPrintf(wxT("Processing %s...\n"), argv[i]);
  27. data.SetTempDir(wxPathOnly(argv[i]));
  28. data.AddBook(argv[i]);
  29. }
  30. return false;
  31. }