wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
#endif
+#if TARGET_API_MAC_OSX
+ // these might be the startup dirs, set them to the 'usual' dir containing the app bundle
+ wxString startupCwd = wxGetCwd() ;
+ if ( startupCwd == wxT("/") || startupCwd.Right(15) == wxT("/Contents/MacOS") )
+ {
+ CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle() ) ;
+ CFURLRef urlParent = CFURLCreateCopyDeletingLastPathComponent( kCFAllocatorDefault , url ) ;
+ CFRelease( url ) ;
+ CFStringRef path = CFURLCopyFileSystemPath ( urlParent , kCFURLPOSIXPathStyle ) ;
+ CFRelease( urlParent ) ;
+ wxString cwd = wxMacCFStringHolder(path).AsString(wxLocale::GetSystemEncoding());
+ wxSetWorkingDirectory( cwd ) ;
+ }
+#endif
wxMacCreateNotifierTable() ;