Split ADDON_DIR into JACK_DRIVER_DIR & JACK_INTERNAL_DIR and deprecate it.
It is better to have internal clients and drivers in different directories. While prefixing the shared library names with "jack_" could be used for distinguising between drivers and internal clients during load, this was is not the case with current code. Also, as neither drivers nor internal clients are supposed to be implicitly loadable via ld.so as regular shared libraries, they now reside in <PREFIX>/libexec/jack-driver/ and <PREFIX>/libexec/jack-internal/ The jack_ prefix for drivers is removed. Windows specific code paths are not updated.
This commit is contained in:
parent
93a613f066
commit
d2e428e185
|
@ -570,7 +570,7 @@ JSList* jack_drivers_load (JSList * drivers)
|
|||
|
||||
const char* driver_dir;
|
||||
if ((driver_dir = getenv("JACK_DRIVER_DIR")) == 0) {
|
||||
driver_dir = ADDON_DIR;
|
||||
driver_dir = JACK_DRIVER_DIR;
|
||||
}
|
||||
|
||||
/* search through the driver_dir and add get descriptors
|
||||
|
@ -584,11 +584,6 @@ JSList* jack_drivers_load (JSList * drivers)
|
|||
|
||||
while ((dir_entry = readdir(dir_stream))) {
|
||||
|
||||
/* check the filename is of the right format */
|
||||
if (strncmp ("jack_", dir_entry->d_name, 5) != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ptr = strrchr (dir_entry->d_name, '.');
|
||||
if (!ptr) {
|
||||
continue;
|
||||
|
@ -695,7 +690,7 @@ JSList* jack_internals_load(JSList * internals)
|
|||
|
||||
const char* driver_dir;
|
||||
if ((driver_dir = getenv("JACK_INTERNAL_DIR")) == 0) {
|
||||
driver_dir = ADDON_DIR;
|
||||
driver_dir = JACK_INTERNAL_DIR;
|
||||
}
|
||||
|
||||
/* search through the driver_dir and add get descriptors
|
||||
|
|
|
@ -284,7 +284,7 @@ void BuildClientPath(char* path_to_so, int path_len, const char* so_name)
|
|||
const char* internal_dir;
|
||||
if ((internal_dir = getenv("JACK_INTERNAL_DIR")) == 0) {
|
||||
if ((internal_dir = getenv("JACK_DRIVER_DIR")) == 0) {
|
||||
internal_dir = ADDON_DIR;
|
||||
internal_dir = JACK_INTERNAL_DIR;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ def create_jack_process_obj(bld, target, sources, uselib=None, framework=None):
|
|||
process.source = sources
|
||||
if bld.env['IS_LINUX'] or bld.env['IS_MACOSX'] or bld.env['IS_FREEBSD']:
|
||||
process.env.append_value('CPPFLAGS', '-fvisibility=hidden')
|
||||
process.install_path = '${ADDON_DIR}/'
|
||||
process.install_path = '${JACK_INTERNAL_DIR}/'
|
||||
process.use = [uselib.name]
|
||||
return process
|
||||
|
||||
|
|
19
wscript
19
wscript
|
@ -478,8 +478,16 @@ def configure(conf):
|
|||
# defined in windows/JackPlatformPlug_os.h
|
||||
pass
|
||||
else:
|
||||
conf.env['ADDON_DIR'] = os.path.normpath(os.path.join(conf.env['LIBDIR'], 'jack'))
|
||||
conf.define('ADDON_DIR', conf.env['ADDON_DIR'])
|
||||
conf.env['JACK_DRIVER_DIR'] = os.path.normpath(
|
||||
os.path.join(conf.env['PREFIX'],
|
||||
'libexec',
|
||||
'jack-driver'))
|
||||
conf.env['JACK_INTERNAL_DIR'] = os.path.normpath(
|
||||
os.path.join(conf.env['PREFIX'],
|
||||
'libexec',
|
||||
'jack-internal'))
|
||||
conf.define('JACK_DRIVER_DIR', conf.env['JACK_DRIVER_DIR'])
|
||||
conf.define('JACK_INTERNAL_DIR', conf.env['JACK_INTERNAL_DIR'])
|
||||
conf.define('JACK_LOCATION', os.path.normpath(os.path.join(conf.env['PREFIX'], 'bin')))
|
||||
|
||||
if not conf.env['IS_WINDOWS']:
|
||||
|
@ -537,7 +545,8 @@ def configure(conf):
|
|||
conf.msg('Library directory', conf.all_envs['']['LIBDIR'], color='CYAN')
|
||||
if conf.env['BUILD_WITH_32_64']:
|
||||
conf.msg('32-bit library directory', conf.all_envs[lib32]['LIBDIR'], color='CYAN')
|
||||
conf.msg('Drivers directory', conf.env['ADDON_DIR'], color='CYAN')
|
||||
conf.msg('Drivers directory', conf.env['JACK_DRIVER_DIR'], color='CYAN')
|
||||
conf.msg('Internal clients directory', conf.env['JACK_INTERNAL_DIR'], color='CYAN')
|
||||
display_feature(conf, 'Build debuggable binaries', conf.env['BUILD_DEBUG'])
|
||||
|
||||
tool_flags = [
|
||||
|
@ -602,13 +611,13 @@ def create_driver_obj(bld, **kw):
|
|||
features=['c', 'cxx', 'cshlib', 'cxxshlib'],
|
||||
defines=['HAVE_CONFIG_H', 'SERVER_SIDE'],
|
||||
includes=['.', 'common', 'common/jack'],
|
||||
install_path='${ADDON_DIR}/',
|
||||
install_path='${JACK_DRIVER_DIR}/',
|
||||
**kw)
|
||||
|
||||
if bld.env['IS_WINDOWS']:
|
||||
driver.env['cxxshlib_PATTERN'] = 'jack_%s.dll'
|
||||
else:
|
||||
driver.env['cxxshlib_PATTERN'] = 'jack_%s.so'
|
||||
driver.env['cxxshlib_PATTERN'] = '%s.so'
|
||||
|
||||
obj_add_includes(bld, driver)
|
||||
|
||||
|
|
Loading…
Reference in New Issue