#pragma hdrstop
#endif
-// for all others, include the necessary headers (this file is usually all you
-// need because it includes almost all "standard" wxWindows headers
+// for all others, include the necessary headers
#ifndef WX_PRECOMP
- #include "wx/wx.h"
+ #include "wx/app.h"
+ #include "wx/log.h"
#endif
#include "wx/cmdline.h"
class XmlResApp : public wxAppConsole
{
public:
+ // don't use builtin cmd line parsing:
+ virtual bool OnInit() { return true; }
virtual int OnRun();
int retCode;
};
-IMPLEMENT_APP(XmlResApp)
+IMPLEMENT_APP_CONSOLE(XmlResApp)
int XmlResApp::OnRun()
{
{
case -1:
return 0;
+ #if 0
+ // break is unreachable because of return earlier
break;
+ #endif
case 0:
retCode = 0;
else
CompileRes();
return retCode;
+ #if 0
+ // break is unreachable because of return earlier
break;
+ #endif
+ #if 0
+ // default return moved outside of switch to avoid warning about lack of return in function
default:
return 1;
break;
+ #endif
}
+ return 1;
}
parFuncname = _T("InitXmlResource");
for (size_t i = 0; i < cmdline.GetParamCount(); i++)
+ {
+#ifdef __WINDOWS__
+ wxString fn=wxFindFirstFile(cmdline.GetParam(i), wxFILE);
+ while (!fn.IsEmpty())
+ {
+ parFiles.Add(fn);
+ fn=wxFindNextFile();
+ }
+#else
parFiles.Add(cmdline.GetParam(i));
+#endif
+ }
}