X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ac7ad70d4c6d7db2ab9e01a4662611f2a706b6fe..b24442f84535632e6f63bffb7d1b887a7107d255:/src/mac/corefoundation/stdpaths_cf.cpp diff --git a/src/mac/corefoundation/stdpaths_cf.cpp b/src/mac/corefoundation/stdpaths_cf.cpp index 12c4e3db04..f8cf48355a 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 @@ -196,7 +201,7 @@ wxString wxStandardPathsCF::GetResourcesDir() const } wxString -wxStandardPathsCF::GetLocalizedResourcesDir(const wxChar *lang, +wxStandardPathsCF::GetLocalizedResourcesDir(const wxString& lang, ResourceCat category) const { return wxStandardPathsBase::