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