move midi maps folders and file extension out of control surfaces library
This commit is contained in:
@@ -53,6 +53,7 @@ namespace ARDOUR {
|
||||
LIBARDOUR_API extern const char* const externals_dir_name;
|
||||
LIBARDOUR_API extern const char* const lua_dir_name;
|
||||
LIBARDOUR_API extern const char* const media_dir_name;
|
||||
LIBARDOUR_API extern const char* const midi_map_dir_name;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace ARDOUR {
|
||||
LIBARDOUR_API extern const char* const export_format_suffix;
|
||||
LIBARDOUR_API extern const char* const session_archive_suffix;
|
||||
LIBARDOUR_API extern const char* const template_archive_suffix;
|
||||
|
||||
LIBARDOUR_API extern const char* const midi_map_suffix;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -89,6 +89,9 @@ namespace ARDOUR {
|
||||
LIBARDOUR_API std::string windows_package_directory_path ();
|
||||
#endif
|
||||
|
||||
LIBARDOUR_API PBD::Searchpath system_midi_map_search_path ();
|
||||
LIBARDOUR_API std::string user_midi_map_directory ();
|
||||
|
||||
namespace ArdourVideoToolPaths {
|
||||
|
||||
LIBARDOUR_API bool harvid_exe (std::string &harvid_exe);
|
||||
|
||||
@@ -50,5 +50,6 @@ const char* const plugins_dir_name = X_("plugins");
|
||||
const char* const externals_dir_name = X_("externals");
|
||||
const char* const lua_dir_name = X_("scripts");
|
||||
const char* const media_dir_name = X_("media");
|
||||
const char* const midi_map_dir_name = X_("midi_maps");
|
||||
|
||||
}
|
||||
|
||||
@@ -36,5 +36,6 @@ const char* const export_preset_suffix = X_(".preset");
|
||||
const char* const export_format_suffix = X_(".format");
|
||||
const char* const session_archive_suffix = X_(".ardour-session-archive");
|
||||
const char* const template_archive_suffix = X_(".ardour-template-archive");
|
||||
const char* const midi_map_suffix = X_(".map");
|
||||
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <glibmm/fileutils.h>
|
||||
|
||||
#include "ardour/directory_names.h"
|
||||
#include "ardour/filename_extensions.h"
|
||||
#include "ardour/filesystem_paths.h"
|
||||
|
||||
#include "pbd/i18n.h"
|
||||
@@ -312,5 +313,27 @@ been_here_before_path (int version)
|
||||
return Glib::build_filename (user_config_directory (version), string (".a") + to_string (version));
|
||||
}
|
||||
|
||||
static const char * const midimap_env_variable_name = "ARDOUR_MIDIMAPS_PATH";
|
||||
|
||||
Searchpath
|
||||
system_midi_map_search_path ()
|
||||
{
|
||||
bool midimap_path_defined = false;
|
||||
std::string spath_env (Glib::getenv (midimap_env_variable_name, midimap_path_defined));
|
||||
|
||||
if (midimap_path_defined) {
|
||||
return spath_env;
|
||||
}
|
||||
|
||||
Searchpath spath (ardour_data_search_path());
|
||||
spath.add_subdirectory_to_paths (midi_map_dir_name);
|
||||
return spath;
|
||||
}
|
||||
|
||||
std::string
|
||||
user_midi_map_directory ()
|
||||
{
|
||||
return Glib::build_filename (user_config_directory(), midi_map_dir_name);
|
||||
}
|
||||
|
||||
} // namespace ARDOUR
|
||||
|
||||
@@ -40,7 +40,7 @@ def build(bld):
|
||||
'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"',
|
||||
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
|
||||
]
|
||||
obj.use = [ 'libpbd' ]
|
||||
obj.use = [ 'libpbd', 'libardour' ]
|
||||
obj.uselib = 'GIOMM DL UUID ARCHIVE CURL XML'
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
@@ -63,10 +63,10 @@ def build(bld):
|
||||
bld (features = 'c', name='vstwin', source='vstwin.c', uselib = 'GIOMM', includes = [ '../pbd/', '../ardour/', '.' ])
|
||||
obj.uselib = ['GIOMM', 'DL', 'GDI32', 'ARCHIVE', 'CURL', 'XML']
|
||||
obj.linkflags = ['-mwindows']
|
||||
obj.use = [ 'libpbd', 'libtemporal', 'libevoral', 'vstwin' ]
|
||||
obj.use = [ 'libpbd', 'libtemporal', 'libevoral', 'libardour', 'vstwin' ]
|
||||
else:
|
||||
obj.uselib = ['GIOMM', 'DL', 'OSX', 'ARCHIVE', 'CURL', 'XML' ]
|
||||
obj.use = [ 'libpbd', 'libtemporal', 'libevoral' ]
|
||||
obj.use = [ 'libpbd', 'libtemporal', 'libevoral', 'libardour' ]
|
||||
|
||||
obj.includes = [ '../pbd/', '../ardour/', '.' ]
|
||||
obj.defines = [
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
#include "ardour/async_midi_port.h"
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/auditioner.h"
|
||||
#include "ardour/directory_names.h"
|
||||
#include "ardour/filename_extensions.h"
|
||||
#include "ardour/filesystem_paths.h"
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/midi_ui.h"
|
||||
@@ -180,32 +182,6 @@ GenericMidiControlProtocol::bundles ()
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
static const char * const midimap_env_variable_name = "ARDOUR_MIDIMAPS_PATH";
|
||||
static const char* const midi_map_dir_name = "midi_maps";
|
||||
static const char* const midi_map_suffix = ".map";
|
||||
|
||||
Searchpath
|
||||
system_midi_map_search_path ()
|
||||
{
|
||||
bool midimap_path_defined = false;
|
||||
std::string spath_env (Glib::getenv (midimap_env_variable_name, midimap_path_defined));
|
||||
|
||||
if (midimap_path_defined) {
|
||||
return spath_env;
|
||||
}
|
||||
|
||||
Searchpath spath (ardour_data_search_path());
|
||||
spath.add_subdirectory_to_paths(midi_map_dir_name);
|
||||
return spath;
|
||||
}
|
||||
|
||||
static std::string
|
||||
user_midi_map_directory ()
|
||||
{
|
||||
return Glib::build_filename (user_config_directory(), midi_map_dir_name);
|
||||
}
|
||||
|
||||
static bool
|
||||
midi_map_filter (const string &str, void* /*arg*/)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user