X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5851504dfcb674fc273dfb86e8c31298ad1c49dc..b6e2eddeaf7e559589ce41ac41e88f9bd71c5a08:/utils/wxrc/wxrc.cpp diff --git a/utils/wxrc/wxrc.cpp b/utils/wxrc/wxrc.cpp index 349a00321a..39550b591c 100644 --- a/utils/wxrc/wxrc.cpp +++ b/utils/wxrc/wxrc.cpp @@ -27,30 +27,19 @@ #endif #include "wx/cmdline.h" -#include "wx/xrc/xml.h" +#include "wx/xml/xml.h" #include "wx/ffile.h" #include "wx/filename.h" #include "wx/wfstream.h" - - - -/* -#if wxUSE_GUI -#error "You must compile the resource compiler with wxBase!" -#endif -*/ - -class XmlResApp : public wxApp +class XmlResApp : public wxAppConsole { public: + // don't use builtin cmd line parsing: + virtual bool OnInit() { return true; } -#if wxUSE_GUI - bool OnInit(); -#else virtual int OnRun(); -#endif private: @@ -75,13 +64,9 @@ private: int retCode; }; -IMPLEMENT_APP(XmlResApp) +IMPLEMENT_APP_NO_THEMES(XmlResApp) -#if wxUSE_GUI -bool XmlResApp::OnInit() -#else int XmlResApp::OnRun() -#endif { static const wxCmdLineEntryDesc cmdLineDesc[] = { @@ -118,19 +103,11 @@ int XmlResApp::OnRun() OutputGettext(); else CompileRes(); -#if wxUSE_GUI - return FALSE; -#else return retCode; -#endif break; default: -#if wxUSE_GUI - return FALSE; -#else return 1; -#endif break; } } @@ -169,7 +146,18 @@ void XmlResApp::ParseParams(const wxCmdLineParser& cmdline) 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 + } }