diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index d08dfbd6e..17c765614 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -11,7 +11,7 @@ add_subdirectory( mod-script-pipe ) if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" ) if( NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio*") install( DIRECTORY "${_DEST}/modules" - DESTINATION "${_PKGDATA}" ) + DESTINATION "${_PKGLIB}" ) endif() endif() diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp index 3608f8b0c..aa37206dd 100644 --- a/src/AudacityApp.cpp +++ b/src/AudacityApp.cpp @@ -1114,6 +1114,9 @@ bool AudacityApp::OnInit() FilePaths audacityPathList; #ifdef __WXGTK__ + // Make sure install prefix is set so wxStandardPath resolves paths properly + wxStandardPaths::Get().SetInstallPrefix(wxT(INSTALL_PREFIX)); + /* Search path (for plug-ins, translations etc) is (in this order): * The AUDACITY_PATH environment variable * The current directory @@ -1153,6 +1156,8 @@ bool AudacityApp::OnInit() FileNames::AddUniquePathToPathList(wxString::Format(wxT("%s/.%s-files"), home, wxT(AUDACITY_NAME)), audacityPathList); + FileNames::AddUniquePathToPathList(FileNames::ModulesDir(), + audacityPathList); FileNames::AddUniquePathToPathList(wxString::Format(wxT("%s/share/%s"), wxT(INSTALL_PREFIX), wxT(AUDACITY_NAME)), audacityPathList); @@ -1163,6 +1168,8 @@ bool AudacityApp::OnInit() FileNames::AddUniquePathToPathList(wxString::Format(wxT("%s/.audacity-files"), home), audacityPathList) + FileNames::AddUniquePathToPathList(FileNames::ModulesDir(), + audacityPathList); FileNames::AddUniquePathToPathList(wxString::Format(wxT("%s/share/audacity"), wxT(INSTALL_PREFIX)), audacityPathList); diff --git a/src/FileNames.cpp b/src/FileNames.cpp index 5e7f8bb40..cb22c2786 100644 --- a/src/FileNames.cpp +++ b/src/FileNames.cpp @@ -343,7 +343,7 @@ FilePath FileNames::BaseDir() baseDir = PlatformCompatibility::GetExecutablePath(); #else // Linux goes into /*prefix*/share/audacity/ - baseDir = FileNames::LowerCaseAppNameInPath(wxStandardPaths::Get().GetDataDir()); + baseDir = FileNames::LowerCaseAppNameInPath(wxStandardPaths::Get().GetPluginsDir()); #endif return baseDir.GetPath();