]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/corefoundation/stdpaths_cf.cpp
fix another minor bug in DLGC_WANTMESSAGE handling in MSWProcessMessage()
[wxWidgets.git] / src / mac / corefoundation / stdpaths_cf.cpp
index 12c4e3db0467c63f1d6983147db92190cf16142e..fedc3982f09c9c6e554196085e0ae149780fd834 100644 (file)
@@ -151,20 +151,29 @@ wxString wxStandardPathsCF::GetDataDir() const
     return GetFromFunc(CFBundleCopySharedSupportURL);
 }
 
     return GetFromFunc(CFBundleCopySharedSupportURL);
 }
 
+// TODO: implement this using real CoreFoundation API instead of Carbon API
 wxString wxStandardPathsCF::GetExecutablePath() const
 {
 wxString wxStandardPathsCF::GetExecutablePath() const
 {
+#ifdef __WXMAC__
     ProcessInfoRec processinfo;
     ProcessSerialNumber procno ;
     FSSpec fsSpec;
 
     ProcessInfoRec processinfo;
     ProcessSerialNumber procno ;
     FSSpec fsSpec;
 
-    procno.highLongOfPSN = NULL ;
+    procno.highLongOfPSN = 0 ;
     procno.lowLongOfPSN = kCurrentProcess ;
     processinfo.processInfoLength = sizeof(ProcessInfoRec);
     processinfo.processName = NULL;
     processinfo.processAppSpec = &fsSpec;
 
     GetProcessInformation( &procno , &processinfo ) ;
     procno.lowLongOfPSN = kCurrentProcess ;
     processinfo.processInfoLength = sizeof(ProcessInfoRec);
     processinfo.processName = NULL;
     processinfo.processAppSpec = &fsSpec;
 
     GetProcessInformation( &procno , &processinfo ) ;
+#ifdef __LP64__
+    return wxMacFSRefToPath(&fsRef);
+#else
     return wxMacFSSpec2MacFilename(&fsSpec);
     return wxMacFSSpec2MacFilename(&fsSpec);
+#endif
+#else
+    return wxStandardPathsBase::GetExecutablePath();
+#endif
 }
 
 wxString wxStandardPathsCF::GetLocalDataDir() const
 }
 
 wxString wxStandardPathsCF::GetLocalDataDir() const
@@ -196,7 +205,7 @@ wxString wxStandardPathsCF::GetResourcesDir() const
 }
 
 wxString
 }
 
 wxString
-wxStandardPathsCF::GetLocalizedResourcesDir(const wxChar *lang,
+wxStandardPathsCF::GetLocalizedResourcesDir(const wxString& lang,
                                             ResourceCat category) const
 {
     return wxStandardPathsBase::
                                             ResourceCat category) const
 {
     return wxStandardPathsBase::