File: hhp2cached.cpp

package info (click to toggle)
wxpython4.0 4.0.7%2Bdfsg-10
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 210,992 kB
  • sloc: cpp: 888,989; python: 226,808; makefile: 52,078; ansic: 45,837; sh: 3,014; xml: 1,534; javascript: 436; perl: 264
file content (42 lines) | stat: -rw-r--r-- 691 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
  Converts hhp (HTML Help Workshop) files into cached
  version for faster reading

  Usage: hhp2cached file.hhp [file2.hhp ...]

*/

// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"

#ifdef __BORLANDC__
#pragma hdrstop
#endif

#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif

#include "wx/html/helpdata.h"


class MyApp : public wxApp
{
public:
    virtual bool OnInit();
};

IMPLEMENT_APP(MyApp);

bool MyApp::OnInit()
{
    for (int i = 1; i < argc; i++)
    {
        wxHtmlHelpData data;
        wxPrintf(wxT("Processing %s...\n"), argv[i]);
        data.SetTempDir(wxPathOnly(argv[i]));
        data.AddBook(argv[i]);
    }

    return false;
}