#if wxUSE_MIMETYPE
+#include "wx/mac/mimetype.h"
+
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/string.h"
+ #include "wx/intl.h"
+ #include "wx/log.h"
#if wxUSE_GUI
#include "wx/icon.h"
#endif
#endif
-#include "wx/log.h"
#include "wx/file.h"
-#include "wx/intl.h"
#include "wx/confbase.h"
-#include "wx/mac/mimetype.h"
#include "wx/mac/private.h"
// other standard headers
#include <CoreServices.h>
#endif
-
+#ifndef __LP64__
// START CODE SAMPLE FROM TECHNOTE 1002 (http://developer.apple.com/technotes/tn/tn1002.html)
// IsRemoteVolume can be used to find out if the
return result;
}
-
+#endif
//
// On the mac there are two ways to open a file - one is through apple events and the
// finder, another is through mime types.
#else //carbon/classic implementation
+
wxString wxFileTypeImpl::GetCommand(const wxString& verb) const
{
wxASSERT_MSG( m_manager != NULL , wxT("Bad wxFileType") );
if (status != noErr)
{
wxLogDebug(wxT("Could not initialize wxMimeTypesManager!"));
- wxASSERT( false );
+ wxFAIL;
m_hIC = NULL;
return;
infoRec.processInfoLength = sizeof(ProcessInfoRec);
infoRec.processName = NULL;
+#ifndef __LP64__
infoRec.processAppSpec = NULL;
+#endif
if ( pPSN == NULL )
{
//
#include "wx/mac/corefoundation/cfstring.h"
-#include "wx/intl.h" //wxLocale for wxCFString
#define wxCF_RELEASE true
#define wxCF_RETAIN false
// ----------------------------------------------------------------------------
#define wxCFDATA_RELEASEBUFFER 1
-#define wxCFDATA_RETAINBUFFER 0
class wxCFData
{
if (status == noErr)
{
Str255 psCreatorName;
+#ifndef __LP64__
FSSpec dummySpec;
status = FindApplication(creator, false, psCreatorName, &dummySpec);
+#else
+ FSRef fsref;
+ status = LSFindApplicationForInfo( creator, NULL, NULL, &fsref ,NULL);
+ HFSUniStr255 name;
+ status = FSGetCatalogInfo(&fsref, kFSCatInfoNone, NULL, &name, NULL, NULL);
+ CFStringRef str = FSCreateStringFromHFSUniStr( 0 , &name );
+ CFStringGetPascalString(str, psCreatorName, 256, CFStringGetSystemEncoding());
+ CFRelease( str );
+#endif
if (status == noErr)
{