major rationalization of use of search paths. ardour now has just 4 functions used to define how external resources are located: ardour_config_search_path() (for system or user specific configuration data), ardour_data_search_path() (for machine, user and system independent data), ardour_dll_directory() (base directory where shared libraries are found) and user_config_directory(). These are now used throughout the code. the config, data and dll paths/directories can be overridden by environment variables. the user config dir is added as the first element of the first two search paths, and use selectively when searching for a few other things.

This commit re-enabes ./waf install, and it is believed that it works fully at this point (more testing likely required)

git-svn-id: svn://localhost/ardour2/branches/3.0@12326 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-05-18 17:24:06 +00:00
parent 433b6651ee
commit 813c5f0af9
33 changed files with 181 additions and 246 deletions

View file

@ -56,7 +56,7 @@ static const char* const devprofile_dir_name = "mcp";
static const char* const devprofile_suffix = ".profile";
static SearchPath
system_devprofile_search_path ()
devprofile_search_path ()
{
bool devprofile_path_defined = false;
sys::path spath_env (Glib::getenv (devprofile_env_variable_name, devprofile_path_defined));
@ -65,7 +65,7 @@ system_devprofile_search_path ()
return spath_env;
}
SearchPath spath (system_data_search_path());
SearchPath spath (ardour_data_search_path());
spath.add_subdirectory_to_paths(devprofile_dir_name);
return spath;
@ -94,8 +94,7 @@ DeviceProfile::reload_device_profiles ()
vector<string> s;
vector<string *> *devprofiles;
PathScanner scanner;
SearchPath spath (system_devprofile_search_path());
spath += user_devprofile_directory ();
SearchPath spath (devprofile_search_path());
devprofiles = scanner (spath.to_string(), devprofile_filter, 0, false, true);
device_profiles.clear ();