@@ -70,14 +70,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||||
#define __inline__ inline | #define __inline__ inline | ||||
#if (!defined(int8_t) && !defined(_STDINT_H)) | #if (!defined(int8_t) && !defined(_STDINT_H)) | ||||
#define __int8_t_defined | #define __int8_t_defined | ||||
typedef char int8_t; | |||||
typedef unsigned char uint8_t; | |||||
typedef short int16_t; | |||||
typedef unsigned short uint16_t; | |||||
typedef long int32_t; | |||||
typedef unsigned long uint32_t; | |||||
typedef LONGLONG int64_t; | |||||
typedef ULONGLONG uint64_t; | |||||
typedef INT8 int8_t; | |||||
typedef UINT8 uint8_t; | |||||
typedef INT16 int16_t; | |||||
typedef UINT16 uint16_t; | |||||
typedef INT32 int32_t; | |||||
typedef UINT32 uint32_t; | |||||
typedef INT64 int64_t; | |||||
typedef UINT64 uint64_t; | |||||
#endif | #endif | ||||
#elif __MINGW32__ /* MINGW */ | #elif __MINGW32__ /* MINGW */ | ||||
#include <stdint.h> | #include <stdint.h> | ||||
@@ -131,11 +131,16 @@ def build(bld): | |||||
'../windows/JackWinTime.c', | '../windows/JackWinTime.c', | ||||
] | ] | ||||
includes = ['../windows' ] + includes | includes = ['../windows' ] + includes | ||||
libsuffix = "64" if (bld.env['DEST_CPU'] == "x86_64" and not bld.variant) else "" | |||||
skipshared = bool('HAVE_TRE_REGEX_H' in bld.env) | |||||
uselib.append('REGEX') | uselib.append('REGEX') | ||||
uselib.append('WS2_32') | uselib.append('WS2_32') | ||||
uselib.append('PSAPI') | uselib.append('PSAPI') | ||||
uselib.append('WINMM') | uselib.append('WINMM') | ||||
else: | |||||
libsuffix = "" | |||||
clientlib = bld(features = ['c', 'cxx', 'cxxshlib', 'cshlib']) | clientlib = bld(features = ['c', 'cxx', 'cxxshlib', 'cshlib']) | ||||
if bld.env['IS_MACOSX']: | if bld.env['IS_MACOSX']: | ||||
clientlib.framework = ['CoreAudio', 'Accelerate'] | clientlib.framework = ['CoreAudio', 'Accelerate'] | ||||
@@ -143,14 +148,14 @@ def build(bld): | |||||
clientlib.use = uselib | clientlib.use = uselib | ||||
if bld.env['IS_WINDOWS']: | if bld.env['IS_WINDOWS']: | ||||
clientlib.env['cxxshlib_PATTERN'] = 'lib%s.dll' | clientlib.env['cxxshlib_PATTERN'] = 'lib%s.dll' | ||||
clientlib.install_path = '${BINDIR}' | |||||
else: | |||||
clientlib.install_path = '${LIBDIR}' | |||||
clientlib.env['cxxstlib_PATTERN'] = 'lib%s.a' | |||||
clientlib.env['implib_PATTERN'] = 'lib%s.dll.a' | |||||
clientlib.install_path = '${LIBDIR}' | |||||
if bld.env['AUTOSTART_METHOD'] == 'dbus': | if bld.env['AUTOSTART_METHOD'] == 'dbus': | ||||
clientlib.use.append('DBUS-1') | clientlib.use.append('DBUS-1') | ||||
clientlib.includes = includes | clientlib.includes = includes | ||||
clientlib.name = 'clientlib' | clientlib.name = 'clientlib' | ||||
clientlib.target = 'jack' | |||||
clientlib.target = 'jack'+libsuffix | |||||
clientlib.source = [] + common_libsources | clientlib.source = [] + common_libsources | ||||
clientlib.source += [ | clientlib.source += [ | ||||
'JackLibClient.cpp', | 'JackLibClient.cpp', | ||||
@@ -184,7 +189,8 @@ def build(bld): | |||||
'../windows/JackMMCSS.cpp', | '../windows/JackMMCSS.cpp', | ||||
] | ] | ||||
clientlib.vnum = bld.env['JACK_API_VERSION'] | |||||
if not bld.env['IS_WINDOWS']: | |||||
clientlib.vnum = bld.env['JACK_API_VERSION'] | |||||
if bld.env['IS_LINUX']: | if bld.env['IS_LINUX']: | ||||
clientlib.env.append_value('CPPFLAGS', '-fvisibility=hidden') | clientlib.env.append_value('CPPFLAGS', '-fvisibility=hidden') | ||||
@@ -197,6 +203,9 @@ def build(bld): | |||||
clientlib.env.append_value('LINKFLAGS', '-lnsl -lsocket') | clientlib.env.append_value('LINKFLAGS', '-lnsl -lsocket') | ||||
if bld.env['IS_WINDOWS']: | if bld.env['IS_WINDOWS']: | ||||
# remove switch to shared binaries if possible, as we most likely want static builds on Windows | |||||
if skipshared: | |||||
clientlib.env['SHLIB_MARKER'] = '' | |||||
# statically link libjack to libstdc++, some client apps like ardour come | # statically link libjack to libstdc++, some client apps like ardour come | ||||
# with a different version of libstdc++.dll that takes precedence and results | # with a different version of libstdc++.dll that takes precedence and results | ||||
# in missing symbols during runtime | # in missing symbols during runtime | ||||
@@ -212,14 +221,17 @@ def build(bld): | |||||
serverlib.framework = ['CoreAudio', 'CoreFoundation', 'Accelerate'] | serverlib.framework = ['CoreAudio', 'CoreFoundation', 'Accelerate'] | ||||
serverlib.defines = ['HAVE_CONFIG_H','SERVER_SIDE'] | serverlib.defines = ['HAVE_CONFIG_H','SERVER_SIDE'] | ||||
serverlib.includes = includes | serverlib.includes = includes | ||||
serverlib.name = 'serverlib' | |||||
serverlib.target = 'jackserver' | |||||
serverlib.name = 'serverlib' | |||||
serverlib.target = 'jackserver'+libsuffix | |||||
serverlib.use = uselib | serverlib.use = uselib | ||||
if bld.env['IS_WINDOWS']: | if bld.env['IS_WINDOWS']: | ||||
serverlib.env['cxxshlib_PATTERN'] = 'lib%s.dll' | |||||
serverlib.install_path = '${BINDIR}' | |||||
else: | |||||
serverlib.install_path = '${LIBDIR}' | |||||
serverlib.env['cxxshlib_PATTERN'] = 'lib%s.dll' | |||||
serverlib.env['cxxstlib_PATTERN'] = 'lib%s.a' | |||||
serverlib.env['implib_PATTERN'] = 'lib%s.dll.a' | |||||
if skipshared: | |||||
serverlib.env['SHLIB_MARKER'] = '' | |||||
serverlib.env.append_value('LINKFLAGS', ['-static-libstdc++', '--disable-auto-import']) | |||||
serverlib.install_path = '${LIBDIR}' | |||||
serverlib.source = [] + common_libsources | serverlib.source = [] + common_libsources | ||||
serverlib.source += [ | serverlib.source += [ | ||||
'JackAudioDriver.cpp', | 'JackAudioDriver.cpp', | ||||
@@ -292,7 +304,8 @@ def build(bld): | |||||
'../windows/JackNetWinSocket.cpp', | '../windows/JackNetWinSocket.cpp', | ||||
] | ] | ||||
serverlib.vnum = bld.env['JACK_API_VERSION'] | |||||
if not bld.env['IS_WINDOWS']: | |||||
serverlib.vnum = bld.env['JACK_API_VERSION'] | |||||
if bld.env['IS_LINUX']: | if bld.env['IS_LINUX']: | ||||
serverlib.env.append_value('CPPFLAGS', '-fvisibility=hidden') | serverlib.env.append_value('CPPFLAGS', '-fvisibility=hidden') | ||||
@@ -310,18 +323,19 @@ def build(bld): | |||||
netlib.framework = ['CoreAudio'] | netlib.framework = ['CoreAudio'] | ||||
netlib.defines = ['HAVE_CONFIG_H','SERVER_SIDE'] | netlib.defines = ['HAVE_CONFIG_H','SERVER_SIDE'] | ||||
netlib.includes = includes | netlib.includes = includes | ||||
netlib.name = 'netlib' | |||||
netlib.target = 'jacknet' | |||||
netlib.name = 'netlib' | |||||
netlib.target = 'jacknet'+libsuffix | |||||
netlib.use = ['SAMPLERATE', 'CELT', 'OPUS', 'PTHREAD'] | netlib.use = ['SAMPLERATE', 'CELT', 'OPUS', 'PTHREAD'] | ||||
if bld.env['IS_WINDOWS']: | if bld.env['IS_WINDOWS']: | ||||
netlib.env['cxxshlib_PATTERN'] = 'lib%s.dll' | netlib.env['cxxshlib_PATTERN'] = 'lib%s.dll' | ||||
netlib.install_path = '${BINDIR}' | |||||
netlib.env['cxxstlib_PATTERN'] = 'lib%s.a' | |||||
netlib.env['implib_PATTERN'] = 'lib%s.dll.a' | |||||
if skipshared: | |||||
netlib.env['SHLIB_MARKER'] = '' | |||||
netlib.use += ['WS2_32', 'WINMM'] | netlib.use += ['WS2_32', 'WINMM'] | ||||
elif bld.env['IS_MACOSX']: | |||||
netlib.install_path = '${LIBDIR}' | |||||
else: | |||||
elif not bld.env['IS_MACOSX']: | |||||
netlib.use += ['RT'] | netlib.use += ['RT'] | ||||
netlib.install_path = '${LIBDIR}' | |||||
netlib.install_path = '${LIBDIR}' | |||||
netlib.source = [ | netlib.source = [ | ||||
'JackNetAPI.cpp', | 'JackNetAPI.cpp', | ||||
'JackNetInterface.cpp', | 'JackNetInterface.cpp', | ||||
@@ -349,7 +363,8 @@ def build(bld): | |||||
if bld.env['IS_WINDOWS']: | if bld.env['IS_WINDOWS']: | ||||
netlib.source += ['../windows/JackNetWinSocket.cpp','../windows/JackWinThread.cpp', '../windows/JackMMCSS.cpp', '../windows/JackWinTime.c'] | netlib.source += ['../windows/JackNetWinSocket.cpp','../windows/JackWinThread.cpp', '../windows/JackMMCSS.cpp', '../windows/JackWinTime.c'] | ||||
netlib.vnum = bld.env['JACK_API_VERSION'] | |||||
if not bld.env['IS_WINDOWS']: | |||||
netlib.vnum = bld.env['JACK_API_VERSION'] | |||||
create_jack_process_obj(bld, 'netmanager', 'JackNetManager.cpp', serverlib) | create_jack_process_obj(bld, 'netmanager', 'JackNetManager.cpp', serverlib) | ||||
@@ -415,5 +430,6 @@ def build(bld): | |||||
target = 'jack.pc', | target = 'jack.pc', | ||||
install_path = '${PKGCONFDIR}', | install_path = '${PKGCONFDIR}', | ||||
INCLUDEDIR = os.path.normpath(bld.env['PREFIX'] + '/include'), | INCLUDEDIR = os.path.normpath(bld.env['PREFIX'] + '/include'), | ||||
CLIENTLIB = clientlib.target, | |||||
SERVERLIB = serverlib.target, | SERVERLIB = serverlib.target, | ||||
) | ) |
@@ -17,20 +17,20 @@ static char* subject = NULL; | |||||
static void | static void | ||||
show_usage (void) | show_usage (void) | ||||
{ | { | ||||
fprintf (stderr, "\nUsage: jack_property [options] UUID [ key [ value [ type ] ] ]\n"); | |||||
fprintf (stderr, "Set/Display JACK properties (metadata).\n\n"); | |||||
fprintf (stderr, "Set options:\n"); | |||||
fprintf (stderr, " -s, --set Set property \"key\" to \"value\" for \"UUID\" with optional MIME type \"type\"\n"); | |||||
fprintf (stderr, " -d, --delete Remove/delete property \"key\" for \"UUID\"\n"); | |||||
fprintf (stderr, " -d, --delete UUID Remove/delete all properties for \"UUID\"\n"); | |||||
fprintf (stderr, " -D, --delete-all Remove/delete all properties\n"); | |||||
fprintf (stderr, "\nUsage: jack_property [options] UUID [ key [ value [ type ] ] ]\n"); | |||||
fprintf (stderr, "Set/Display JACK properties (metadata).\n\n"); | |||||
fprintf (stderr, "Set options:\n"); | |||||
fprintf (stderr, " -s, --set Set property \"key\" to \"value\" for \"UUID\" with optional MIME type \"type\"\n"); | |||||
fprintf (stderr, " -d, --delete Remove/delete property \"key\" for \"UUID\"\n"); | |||||
fprintf (stderr, " -d, --delete UUID Remove/delete all properties for \"UUID\"\n"); | |||||
fprintf (stderr, " -D, --delete-all Remove/delete all properties\n"); | |||||
fprintf (stderr, " --client Interpret UUID as a client name, not a UUID\n"); | fprintf (stderr, " --client Interpret UUID as a client name, not a UUID\n"); | ||||
fprintf (stderr, " --port \tInterpret UUID as a port name, not a UUID\n"); | fprintf (stderr, " --port \tInterpret UUID as a port name, not a UUID\n"); | ||||
fprintf (stderr, "\nDisplay options:\n"); | |||||
fprintf (stderr, " -l Show all properties\n"); | |||||
fprintf (stderr, " -l, --list UUID \tShow value for all properties of UUID\n"); | |||||
fprintf (stderr, " -l, --list UUID key Show value for key of UUID\n"); | |||||
fprintf (stderr, "\nFor more information see https://jackaudio.org/\n"); | |||||
fprintf (stderr, "\nDisplay options:\n"); | |||||
fprintf (stderr, " -l Show all properties\n"); | |||||
fprintf (stderr, " -l, --list UUID \tShow value for all properties of UUID\n"); | |||||
fprintf (stderr, " -l, --list UUID key Show value for key of UUID\n"); | |||||
fprintf (stderr, "\nFor more information see https://jackaudio.org/\n"); | |||||
} | } | ||||
static int | static int | ||||
@@ -82,7 +82,7 @@ get_subject (jack_client_t* client, char* argv[], int* optind) | |||||
int main (int argc, char* argv[]) | int main (int argc, char* argv[]) | ||||
{ | { | ||||
jack_client_t* client = NULL; | jack_client_t* client = NULL; | ||||
jack_options_t options = JackNoStartServer; | |||||
jack_options_t options = JackNoStartServer; | |||||
char* key = NULL; | char* key = NULL; | ||||
char* value = NULL; | char* value = NULL; | ||||
char* type = NULL; | char* type = NULL; | ||||
@@ -90,32 +90,32 @@ int main (int argc, char* argv[]) | |||||
int delete = 0; | int delete = 0; | ||||
int delete_all = 0; | int delete_all = 0; | ||||
int c; | int c; | ||||
int option_index; | |||||
extern int optind; | |||||
struct option long_options[] = { | |||||
{ "set", 0, 0, 's' }, | |||||
{ "delete", 0, 0, 'd' }, | |||||
{ "delete-all", 0, 0, 'D' }, | |||||
{ "list", 0, 0, 'l' }, | |||||
{ "client", 0, 0, 'c' }, | |||||
{ "port", 0, 0, 'p' }, | |||||
{ 0, 0, 0, 0 } | |||||
}; | |||||
int option_index; | |||||
extern int optind; | |||||
struct option long_options[] = { | |||||
{ "set", 0, 0, 's' }, | |||||
{ "delete", 0, 0, 'd' }, | |||||
{ "delete-all", 0, 0, 'D' }, | |||||
{ "list", 0, 0, 'l' }, | |||||
{ "client", 0, 0, 'c' }, | |||||
{ "port", 0, 0, 'p' }, | |||||
{ 0, 0, 0, 0 } | |||||
}; | |||||
if (argc < 2) { | if (argc < 2) { | ||||
show_usage (); | show_usage (); | ||||
exit (1); | exit (1); | ||||
} | } | ||||
while ((c = getopt_long (argc, argv, "sdDlaApc", long_options, &option_index)) >= 0) { | |||||
switch (c) { | |||||
case 's': | |||||
while ((c = getopt_long (argc, argv, "sdDlaApc", long_options, &option_index)) >= 0) { | |||||
switch (c) { | |||||
case 's': | |||||
if (argc < 5) { | if (argc < 5) { | ||||
show_usage (); | show_usage (); | ||||
exit (1); | exit (1); | ||||
} | } | ||||
set = 1; | |||||
break; | |||||
set = 1; | |||||
break; | |||||
case 'd': | case 'd': | ||||
if (argc < 3) { | if (argc < 3) { | ||||
show_usage (); | show_usage (); | ||||
@@ -258,7 +258,7 @@ int main (int argc, char* argv[]) | |||||
/* list all properties for a given UUID */ | /* list all properties for a given UUID */ | ||||
jack_description_t description; | jack_description_t description; | ||||
size_t cnt, n; | |||||
int cnt, n; | |||||
if (get_subject (client, argv, &optind)) { | if (get_subject (client, argv, &optind)) { | ||||
return -1; | return -1; | ||||
@@ -289,9 +289,8 @@ int main (int argc, char* argv[]) | |||||
/* list all properties */ | /* list all properties */ | ||||
jack_description_t* description; | jack_description_t* description; | ||||
int cnt; | |||||
int cnt, n; | |||||
size_t p; | size_t p; | ||||
int n; | |||||
char buf[JACK_UUID_STRING_SIZE]; | char buf[JACK_UUID_STRING_SIZE]; | ||||
if ((cnt = jack_get_all_properties (&description)) < 0) { | if ((cnt = jack_get_all_properties (&description)) < 0) { | ||||
@@ -7,5 +7,5 @@ server_libs=-L@LIBDIR@ -l@SERVERLIB@ | |||||
Name: jack | Name: jack | ||||
Description: the Jack Audio Connection Kit: a low-latency synchronous callback-based media server | Description: the Jack Audio Connection Kit: a low-latency synchronous callback-based media server | ||||
Version: @JACK_VERSION@ | Version: @JACK_VERSION@ | ||||
Libs: -L@LIBDIR@ -ljack | |||||
Libs: -L@LIBDIR@ -l@CLIENTLIB@ | |||||
Cflags: -I@INCLUDEDIR@ | Cflags: -I@INCLUDEDIR@ |
@@ -379,7 +379,7 @@ def configure(conf): | |||||
# we define this in the environment to maintain compatibility with | # we define this in the environment to maintain compatibility with | ||||
# existing install paths that use ADDON_DIR rather than have to | # existing install paths that use ADDON_DIR rather than have to | ||||
# have special cases for windows each time. | # have special cases for windows each time. | ||||
conf.env['ADDON_DIR'] = conf.env['BINDIR'] + '/jack' | |||||
conf.env['ADDON_DIR'] = conf.env['LIBDIR'] + '/jack' | |||||
if Options.options.platform == 'msys': | if Options.options.platform == 'msys': | ||||
conf.define('ADDON_DIR', 'jack') | conf.define('ADDON_DIR', 'jack') | ||||
conf.define('__STDC_FORMAT_MACROS', 1) # for PRIu64 | conf.define('__STDC_FORMAT_MACROS', 1) # for PRIu64 | ||||