31 #ifdef PLATFORM_WINDOWS
38 const char *
const backend_env_variable_name =
"ARDOUR_BACKEND_PATH";
39 const char *
const surfaces_env_variable_name =
"ARDOUR_SURFACES_PATH";
40 const char *
const export_env_variable_name =
"ARDOUR_EXPORT_FORMATS_PATH";
41 const char *
const ladspa_env_variable_name =
"LADSPA_PATH";
42 const char *
const midi_patch_env_variable_name =
"ARDOUR_MIDI_PATCH_PATH";
43 const char *
const panner_env_variable_name =
"ARDOUR_PANNER_PATH";
57 spath +=
Searchpath(Glib::getenv(backend_env_variable_name));
68 spath +=
Searchpath(Glib::getenv(surfaces_env_variable_name));
78 bool export_formats_path_defined =
false;
79 Searchpath spath_env (Glib::getenv(export_env_variable_name, export_formats_path_defined));
81 if (export_formats_path_defined) {
91 Searchpath spath_env (Glib::getenv(ladspa_env_variable_name));
98 #ifndef PLATFORM_WINDOWS
99 spath.push_back (
"/usr/local/lib64/ladspa");
100 spath.push_back (
"/usr/local/lib/ladspa");
101 spath.push_back (
"/usr/lib64/ladspa");
102 spath.push_back (
"/usr/lib/ladspa");
106 spath.push_back (
path_expand (
"~/Library/Audio/Plug-Ins/LADSPA"));
107 spath.push_back (
"/Library/Audio/Plug-Ins/LADSPA");
110 return spath_env + spath;
128 bool midi_patch_path_defined =
false;
129 Searchpath spath_env (Glib::getenv(midi_patch_env_variable_name, midi_patch_path_defined));
131 if (midi_patch_path_defined) {
145 spath +=
Searchpath(Glib::getenv(panner_env_variable_name));
166 #ifdef PLATFORM_WINDOWS
171 DWORD dwType = REG_SZ;
178 if (ERROR_SUCCESS == RegOpenKeyExA (HKEY_CURRENT_USER,
"Software\\VST", 0, KEY_READ, &hKey)) {
180 if (ERROR_SUCCESS == RegQueryValueExA (hKey,
"VSTPluginsPath", 0, &dwType, (LPBYTE)tmp, &dwSize))
181 p = g_build_filename (Glib::locale_to_utf8(tmp).c_str(), NULL);
187 if (ERROR_SUCCESS == RegOpenKeyExA (HKEY_LOCAL_MACHINE,
"Software\\VST", 0, KEY_READ, &hKey))
190 if (ERROR_SUCCESS == RegQueryValueExA (hKey,
"VSTPluginsPath", 0, &dwType, (LPBYTE)tmp, &dwSize))
191 p = g_build_filename (Glib::locale_to_utf8(tmp).c_str(), NULL);
203 if ((pVSTx86 = g_build_filename (pProgFilesX86,
"Steinberg",
"VSTPlugins", NULL)))
205 if (Glib::file_test (pVSTx86, Glib::FILE_TEST_EXISTS))
206 if (Glib::file_test (pVSTx86, Glib::FILE_TEST_IS_DIR))
207 p = g_build_filename (pVSTx86, NULL);
212 g_free (pProgFilesX86);
221 if ((pVST = g_build_filename (pProgFiles,
"Steinberg",
"VSTPlugins", NULL))) {
222 if (Glib::file_test (pVST, Glib::FILE_TEST_EXISTS))
223 if (Glib::file_test (pVST, Glib::FILE_TEST_IS_DIR))
224 p = g_build_filename (pVST, NULL);
236 user_home = (
char*) g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
238 p = g_build_filename (user_home,
"Plugins",
"VST", NULL);
240 user_home = g_build_filename(g_get_home_dir(),
"My Documents", NULL);
242 p = g_build_filename (user_home,
"Plugins",
"VST", NULL);
246 user_home = (
char*) g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
249 p = g_build_path (
";", p, g_build_filename(user_home,
"Plugins",
"VST", NULL), NULL);
251 user_home = g_build_filename(g_get_home_dir(),
"My Documents", NULL);
254 p = g_build_path (
";", p, g_build_filename (user_home,
"Plugins",
"VST", NULL), NULL);
271 return "/usr/local/lib/vst:/usr/lib/vst";
274 #endif // PLATFORM_WINDOWS
LIBPBD_API std::string path_expand(std::string path)
LIBARDOUR_API const char *const export_formats_dir_name
LIBARDOUR_API PBD::Searchpath ladspa_search_path()
LIBARDOUR_API const char *const midi_patch_dir_name
LIBARDOUR_API const char *const backend_dir_name
LIBARDOUR_API PBD::Searchpath midi_patch_search_path()
LIBARDOUR_API const char *const panner_dir_name
LIBARDOUR_API PBD::Searchpath panner_search_path()
LIBPBD_API char * get_win_special_folder(int csidl)
LIBARDOUR_API const char *const route_templates_dir_name
LIBARDOUR_API const char *const surfaces_dir_name
LIBPBD_TEMPLATE_MEMBER_API Searchpath & add_subdirectory_to_paths(const std::string &subdir)
LIBARDOUR_API const char * vst_search_path()
LIBARDOUR_API PBD::Searchpath template_search_path()
LIBARDOUR_API std::string user_config_directory(int version=-1)
LIBARDOUR_API PBD::Searchpath control_protocol_search_path()
LIBARDOUR_API const char *const ladspa_dir_name
LIBARDOUR_API PBD::Searchpath backend_search_path()
LIBARDOUR_API std::string ardour_dll_directory()
LIBARDOUR_API PBD::Searchpath export_formats_search_path()
LIBARDOUR_API const char *const templates_dir_name
LIBARDOUR_API PBD::Searchpath ardour_data_search_path()
LIBARDOUR_API PBD::Searchpath route_template_search_path()
LIBARDOUR_API PBD::Searchpath lv2_bundled_search_path()