mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Consolidate search/file-system paths (fixes vst builds)
Keep file-system paths and PBD::Searchpath mostly separate. This amends58c2b0a848libs/fst directly includes relevant ardour C++ code, so lib/fst must not link against libardour. The problem was that58c2b0a848introduced additional dependencies on other libardour functions.
This commit is contained in:
parent
d521c2ede6
commit
a6f8f2dd9e
6 changed files with 32 additions and 30 deletions
|
|
@ -89,9 +89,6 @@ namespace ARDOUR {
|
||||||
LIBARDOUR_API std::string windows_package_directory_path ();
|
LIBARDOUR_API std::string windows_package_directory_path ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LIBARDOUR_API PBD::Searchpath system_midi_map_search_path ();
|
|
||||||
LIBARDOUR_API std::string user_midi_map_directory ();
|
|
||||||
|
|
||||||
namespace ArdourVideoToolPaths {
|
namespace ArdourVideoToolPaths {
|
||||||
|
|
||||||
LIBARDOUR_API bool harvid_exe (std::string &harvid_exe);
|
LIBARDOUR_API bool harvid_exe (std::string &harvid_exe);
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,11 @@ namespace ARDOUR {
|
||||||
*/
|
*/
|
||||||
LIBARDOUR_API PBD::Searchpath lua_search_path ();
|
LIBARDOUR_API PBD::Searchpath lua_search_path ();
|
||||||
|
|
||||||
|
/** retun a Searchpath for midi *.map files used by the
|
||||||
|
* generic ctrl surface
|
||||||
|
*/
|
||||||
|
LIBARDOUR_API PBD::Searchpath system_midi_map_search_path ();
|
||||||
|
LIBARDOUR_API std::string user_midi_map_directory ();
|
||||||
|
|
||||||
} // namespace ARDOUR
|
} // namespace ARDOUR
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -313,27 +313,4 @@ been_here_before_path (int version)
|
||||||
return Glib::build_filename (user_config_directory (version), string (".a") + to_string (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
|
} // namespace ARDOUR
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,29 @@ lua_search_path ()
|
||||||
return spath;
|
return spath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ def build(bld):
|
||||||
'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"',
|
'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"',
|
||||||
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
|
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
|
||||||
]
|
]
|
||||||
obj.use = [ 'libpbd', 'libardour' ]
|
obj.use = [ 'libpbd' ]
|
||||||
obj.uselib = 'GIOMM DL UUID ARCHIVE CURL XML'
|
obj.uselib = 'GIOMM DL UUID ARCHIVE CURL XML'
|
||||||
|
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
|
|
@ -63,10 +63,10 @@ def build(bld):
|
||||||
bld (features = 'c', name='vstwin', source='vstwin.c', uselib = 'GIOMM', includes = [ '../pbd/', '../ardour/', '.' ])
|
bld (features = 'c', name='vstwin', source='vstwin.c', uselib = 'GIOMM', includes = [ '../pbd/', '../ardour/', '.' ])
|
||||||
obj.uselib = ['GIOMM', 'DL', 'GDI32', 'ARCHIVE', 'CURL', 'XML']
|
obj.uselib = ['GIOMM', 'DL', 'GDI32', 'ARCHIVE', 'CURL', 'XML']
|
||||||
obj.linkflags = ['-mwindows']
|
obj.linkflags = ['-mwindows']
|
||||||
obj.use = [ 'libpbd', 'libtemporal', 'libevoral', 'libardour', 'vstwin' ]
|
obj.use = [ 'libpbd', 'libtemporal', 'libevoral', 'vstwin' ]
|
||||||
else:
|
else:
|
||||||
obj.uselib = ['GIOMM', 'DL', 'OSX', 'ARCHIVE', 'CURL', 'XML' ]
|
obj.uselib = ['GIOMM', 'DL', 'OSX', 'ARCHIVE', 'CURL', 'XML' ]
|
||||||
obj.use = [ 'libpbd', 'libtemporal', 'libevoral', 'libardour' ]
|
obj.use = [ 'libpbd', 'libtemporal', 'libevoral' ]
|
||||||
|
|
||||||
obj.includes = [ '../pbd/', '../ardour/', '.' ]
|
obj.includes = [ '../pbd/', '../ardour/', '.' ]
|
||||||
obj.defines = [
|
obj.defines = [
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
#include "ardour/auditioner.h"
|
#include "ardour/auditioner.h"
|
||||||
#include "ardour/directory_names.h"
|
#include "ardour/directory_names.h"
|
||||||
#include "ardour/filename_extensions.h"
|
#include "ardour/filename_extensions.h"
|
||||||
#include "ardour/filesystem_paths.h"
|
#include "ardour/search_paths.h"
|
||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
#include "ardour/midi_ui.h"
|
#include "ardour/midi_ui.h"
|
||||||
#include "ardour/plugin_insert.h"
|
#include "ardour/plugin_insert.h"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue