]> git.saurik.com Git - wxWidgets.git/blame - src/mac/carbon/utilsexc.cpp
we must turn off AA for XOR etc.
[wxWidgets.git] / src / mac / carbon / utilsexc.cpp
CommitLineData
e9576ca5
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: utilsexec.cpp
3// Purpose: Execution-related utilities
a31a5f85 4// Author: Stefan Csomor
5d553c56 5// Modified by:
a31a5f85 6// Created: 1998-01-01
e9576ca5 7// RCS-ID: $Id$
a31a5f85 8// Copyright: (c) Stefan Csomor
65571936 9// Licence: wxWindows licence
e9576ca5
SC
10/////////////////////////////////////////////////////////////////////////////
11
5d553c56
DE
12#include "wx/wxprec.h"
13#ifndef WX_PRECOMP
14 #include "wx/log.h"
15 #include "wx/utils.h"
16#endif //ndef WX_PRECOMP
e9576ca5 17
f5c6eb5c 18#ifndef __DARWIN__
e9576ca5 19
fadb227e 20#include "wx/mac/private.h"
a2b77260 21#include "LaunchServices.h"
fadb227e
DS
22
23long wxExecute(const wxString& command, int flags, wxProcess *WXUNUSED(handler))
e9576ca5 24{
fadb227e
DS
25 wxASSERT_MSG( flags == wxEXEC_ASYNC,
26 wxT("wxExecute: Only wxEXEC_ASYNC is supported") );
27
a2b77260
SC
28 FSRef fsRef ;
29 OSErr err = noErr ;
30 err = wxMacPathToFSRef( command , &fsRef ) ;
31 if ( noErr == err )
32 {
33 err = LSOpenFSRef( &fsRef , NULL ) ;
34 }
fadb227e
DS
35
36 // 0 means execution failed. Returning non-zero is a PID, but not
37 // on Mac where PIDs are 64 bits and won't fit in a long, so we
38 // return a dummy value for now.
a2b77260 39 return ( err == noErr ) ? -1 : 0;
e9576ca5 40}
fadb227e 41
5d553c56 42#endif //ndef __DARWIN__
5fde6fcc 43