add lua search path

This commit is contained in:
Robin Gareus
2016-01-21 14:16:43 +01:00
parent f2afb95c5d
commit 4303fbfc05
4 changed files with 19 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ namespace ARDOUR {
LIBARDOUR_API extern const char* const analysis_dir_name;
LIBARDOUR_API extern const char* const plugins_dir_name;
LIBARDOUR_API extern const char* const externals_dir_name;
LIBARDOUR_API extern const char* const lua_dir_name;
};

View File

@@ -107,6 +107,14 @@ namespace ARDOUR {
*/
LIBARDOUR_API PBD::Searchpath template_search_path ();
/**
* return a Searchpath containing directories in which to look for
* lua scripts
*/
LIBARDOUR_API PBD::Searchpath lua_search_path ();
} // namespace ARDOUR
#endif /* __libardour_search_paths_h__ */

View File

@@ -43,5 +43,6 @@ const char* const automation_dir_name = X_("automation");
const char* const analysis_dir_name = X_("analysis");
const char* const plugins_dir_name = X_("plugins");
const char* const externals_dir_name = X_("externals");
const char* const lua_dir_name = X_("scripts");
}

View File

@@ -163,6 +163,15 @@ route_template_search_path ()
return spath;
}
Searchpath
lua_search_path ()
{
Searchpath spath (ardour_data_search_path());
spath.add_subdirectory_to_paths(lua_dir_name);
return spath;
}
#ifdef PLATFORM_WINDOWS
const char*