1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-03 17:19:43 +02:00

Change Mac search paths to be in-app

This commit is contained in:
James Crook 2016-12-12 18:00:53 +00:00
parent 8f28382525
commit 28b3461bb2
2 changed files with 16 additions and 11 deletions

View File

@ -97,9 +97,10 @@ wxString FileNames::DataDir()
// the prefs are stored in the user data dir provided by the OS.
wxFileName exePath(PlatformCompatibility::GetExecutablePath());
#if defined(__WXMAC__)
// This removes (for instance) "Audacity.app/Contents/MacOSX"
exePath.RemoveLastDir();
exePath.RemoveLastDir();
// Path ends for example in "Audacity.app/Contents/MacOSX"
//exePath.RemoveLastDir();
//exePath.RemoveLastDir();
// just remove the MacOSX part.
exePath.RemoveLastDir();
#endif
wxFileName portablePrefsPath(exePath.GetPath(), wxT("Portable Settings"));
@ -129,9 +130,10 @@ wxString FileNames::HtmlHelpDir()
{
#if defined(__WXMAC__)
wxFileName exePath(PlatformCompatibility::GetExecutablePath());
// This removes (for instance) "Audacity.app/Contents/MacOSX"
exePath.RemoveLastDir();
exePath.RemoveLastDir();
// Path ends for example in "Audacity.app/Contents/MacOSX"
//exePath.RemoveLastDir();
//exePath.RemoveLastDir();
// just remove the MacOSX part.
exePath.RemoveLastDir();
return wxFileName( exePath.GetPath()+wxT("/help/manual"), wxEmptyString ).GetFullPath();
@ -182,9 +184,10 @@ wxString FileNames::BaseDir()
#if defined(__WXMAC__)
baseDir = PlatformCompatibility::GetExecutablePath();
// This removes (for instance) "Audacity.app/Contents/MacOSX/"
baseDir.RemoveLastDir();
baseDir.RemoveLastDir();
// Path ends for example in "Audacity.app/Contents/MacOSX"
//baseDir.RemoveLastDir();
//baseDir.RemoveLastDir();
// just remove the MacOSX part.
baseDir.RemoveLastDir();
#elif defined(__WXMSW__)
// Don't use wxStandardPaths::Get().GetDataDir() since it removes

View File

@ -1447,8 +1447,10 @@ void PluginManager::FindFilesInPathList(const wxString & pattern,
// Add the "Audacity" plug-ins directory
wxFileName ff = PlatformCompatibility::GetExecutablePath();
#if defined(__WXMAC__)
ff.RemoveLastDir();
ff.RemoveLastDir();
// Path ends for example in "Audacity.app/Contents/MacOSX"
//ff.RemoveLastDir();
//ff.RemoveLastDir();
// just remove the MacOSX part.
ff.RemoveLastDir();
#endif
ff.AppendDir(wxT("plug-ins"));