/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
-#pragma implementation "utils.h"
+#pragma implementation
#endif
// For compilers that support precompilation, includes "wx.h".
#include "wx/app.h"
#endif
+#include "wx/log.h"
#include "wx/msw/private.h"
#include <windows.h>
#ifdef __GNUWIN32__
#include <sys/unistd.h>
#include <sys/stat.h>
-#ifndef __MINGW32__
-#include <std.h>
-#endif
-
#endif
#ifdef __WIN32__
#endif
#include <stdarg.h>
-IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent)
-IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler)
-
-
#define wxEXECUTE_WIN_MESSAGE 10000
struct wxExecuteData {
*argp++ = '\0';
#ifdef __GNUWIN32__
- result = ShellExecute((HWND) (wxTheApp->GetTopWindow() ? (HWND) wxTheApp->GetT
-opWindow()->GetHWND() : NULL),
- (const wchar_t) "open", (const wchar_t) cl, (const wchar_t) arg
-p,i
+ result = ShellExecute((HWND) (wxTheApp->GetTopWindow() ? (HWND) wxTheApp->GetTopWindow()->GetHWND() : NULL),
+ (const wchar_t) "open", (const wchar_t) cl, (const wchar_t) argp,
(const wchar_t) NULL, SW_SHOWNORMAL);
#else
result = ShellExecute( (HWND) (wxTheApp->GetTopWindow() ? wxTheApp->GetTopWindow()->GetHWND() : NULL),
if (((long)result) <= 32) {
free(cl);
+
+ wxLogSysError(_("Can't execute command '%s'"), command.c_str());
return 0;
}
#endif
}
-// DUMMIES TO SATISFY THE LINKER UNTIL GUILHEM FINISHES THE CODE
-wxProcess::wxProcess(wxEvtHandler *parent, int id)
+long wxExecute(char **argv, bool sync, wxProcess *handler)
{
-}
+ wxString command = "";
-wxProcess::~wxProcess()
-{
-}
-
-void wxProcess::OnTerminate(int pid)
-{
-}
-
-wxProcessEvent::wxProcessEvent(int id, int pid)
-{
+ while (*argv != NULL) {
+ command += *argv;
+ command += ' ';
+ argv++;
+ }
+ command.RemoveLast();
+ return wxExecute(command, sync, handler);
}
-
-