added trivial wxLaunchDefaultApplication() implementation for wxMac; added a test for it to the exec sample

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-08-02 21:49:06 +00:00
parent 9d1c7e8474
commit 979a73474c
2 changed files with 43 additions and 15 deletions

View File

@@ -941,7 +941,11 @@ bool wxLaunchDefaultApplication(const wxString& document, int flags)
{
wxUnusedVar(flags);
#if defined(__UNIX__)
#ifdef __WXMAC__
static const char * const OPEN_CMD = "/usr/bin/open";
if ( wxFileExists(OPEN_CMD) && wxExecute(OPEN_CMD + " " + document) )
return true;
#elif defined(__UNIX__)
// Our best best is to use xdg-open from freedesktop.org cross-desktop
// compatibility suite xdg-utils
// (see http://portland.freedesktop.org/wiki/) -- this is installed on