#include "wx/mac/private.h"
#endif
#include "wx/mac/corefoundation/cfstring.h"
-#include "wx/mac/private.h"
#if defined(__DARWIN__)
#include <CoreFoundation/CFBundle.h>
wxString wxStandardPathsCF::GetDocumentsDir() const
{
+#ifdef __WXMAC__
return wxMacFindFolderNoSeparator
(
#if TARGET_API_MAC_OSX
kDocumentsFolderType,
kCreateFolder
);
+#else
+ return wxFileName::GetHomeDir() + wxT("/Documents");
+#endif
}
// ----------------------------------------------------------------------------
return GetFromFunc(CFBundleCopySharedSupportURL);
}
+// TODO: implement this using real CoreFoundation API instead of Carbon API
+wxString wxStandardPathsCF::GetExecutablePath() const
+{
+#ifdef __WXMAC__
+ ProcessInfoRec processinfo;
+ ProcessSerialNumber procno ;
+ FSSpec fsSpec;
+
+ procno.highLongOfPSN = 0 ;
+ procno.lowLongOfPSN = kCurrentProcess ;
+ processinfo.processInfoLength = sizeof(ProcessInfoRec);
+ processinfo.processName = NULL;
+ processinfo.processAppSpec = &fsSpec;
+
+ GetProcessInformation( &procno , &processinfo ) ;
+ return wxMacFSSpec2MacFilename(&fsSpec);
+#else
+ return wxStandardPathsBase::GetExecutablePath();
+#endif
+}
+
wxString wxStandardPathsCF::GetLocalDataDir() const
{
#ifdef __WXMAC__
}
wxString
-wxStandardPathsCF::GetLocalizedResourcesDir(const wxChar *lang,
+wxStandardPathsCF::GetLocalizedResourcesDir(const wxString& lang,
ResourceCat category) const
{
return wxStandardPathsBase::