X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ac7ad70d4c6d7db2ab9e01a4662611f2a706b6fe..4e1fd51de7349097a30b3b994e5c6e9b074de77c:/src/mac/corefoundation/stdpaths_cf.cpp?ds=sidebyside diff --git a/src/mac/corefoundation/stdpaths_cf.cpp b/src/mac/corefoundation/stdpaths_cf.cpp index 12c4e3db04..925d220ecf 100644 --- a/src/mac/corefoundation/stdpaths_cf.cpp +++ b/src/mac/corefoundation/stdpaths_cf.cpp @@ -151,13 +151,15 @@ wxString wxStandardPathsCF::GetDataDir() const 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 = NULL ; + procno.highLongOfPSN = 0 ; procno.lowLongOfPSN = kCurrentProcess ; processinfo.processInfoLength = sizeof(ProcessInfoRec); processinfo.processName = NULL; @@ -165,6 +167,9 @@ wxString wxStandardPathsCF::GetExecutablePath() const GetProcessInformation( &procno , &processinfo ) ; return wxMacFSSpec2MacFilename(&fsSpec); +#else + return wxStandardPathsBase::GetExecutablePath(); +#endif } wxString wxStandardPathsCF::GetLocalDataDir() const