X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b136d1fe86f80b4969f2f3fbef74573e5783fd37..ab85e6cd0021eba5d95c1e1e52187a6f256b06de:/utils/HelpGen/src/HelpGen.cpp diff --git a/utils/HelpGen/src/HelpGen.cpp b/utils/HelpGen/src/HelpGen.cpp index 0933ed8297..dc7cd096c7 100644 --- a/utils/HelpGen/src/HelpGen.cpp +++ b/utils/HelpGen/src/HelpGen.cpp @@ -79,7 +79,11 @@ class HelpGenApp: public wxApp public: HelpGenApp() {}; +#if wxUSE_GUI bool OnInit(); +#else + int OnRun(); +#endif }; IMPLEMENT_APP(HelpGenApp); @@ -432,10 +436,10 @@ private: static void usage() { wxString prog = g_argv[0]; - wxString basename = prog.BeforeLast('/'); + wxString basename = prog.AfterLast('/'); #ifdef __WXMSW__ if ( !basename ) - basename = prog.BeforeLast('\\'); + basename = prog.AfterLast('\\'); #endif if ( !basename ) basename = prog; @@ -463,8 +467,9 @@ static void usage() " mode specific options are:\n" " -p do check parameter names (not done by default)\n" "\n", basename.c_str(), basename.c_str()); - +#ifndef wxUSE_GUI exit(1); +#endif } /* @@ -472,7 +477,11 @@ int main(int argc, char **argv) { */ +#if wxUSE_GUI bool HelpGenApp::OnInit() +#else +int HelpGenApp::OnRun() +#endif { enum { @@ -780,7 +789,7 @@ void HelpGenVisitor::VisitClass( spClass& cl ) // the file name is built from the class name by removing the leading "wx" // if any and converting it to the lower case - wxString filename = m_directoryOut; + wxString filename; if ( name(0, 2) == "wx" ) { filename << name.c_str() + 2; } @@ -790,6 +799,7 @@ void HelpGenVisitor::VisitClass( spClass& cl ) filename.MakeLower(); filename += ".tex"; + filename.Prepend(m_directoryOut); if ( !m_overwrite && wxFile::Exists(filename) ) { wxLogError("Won't overwrite existing file '%s' - please use '-f'.", @@ -1930,6 +1940,18 @@ static const char *GetCurrentTime(const char *timeFormat) /* $Log$ + Revision 1.12 2000/10/09 13:53:33 juliansmart + Doc corrections; added HelpGen project files + + Revision 1.11 2000/07/15 19:50:42 cvsuser + merged 2.2 branch + + Revision 1.10.2.2 2000/03/27 15:33:10 VZ + don't trasnform output dir name to lower case + + Revision 1.10 2000/03/11 10:05:23 VS + now compiles with wxBase + Revision 1.9 2000/01/16 13:25:21 VS compilation fixes (gcc)