From ce5744ae518f20cf61270ec44e7c0f1e2957a035 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Fri, 2 May 2014 16:45:26 +1000 Subject: [PATCH 01/12] Fix collision between keyword interface used in glibmm and windows headers --- gtk2_ardour/add_video_dialog.h | 4 ++++ gtk2_ardour/ardour_ui_dialogs.cc | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/add_video_dialog.h b/gtk2_ardour/add_video_dialog.h index 203df3ad3d..3d5ff54030 100644 --- a/gtk2_ardour/add_video_dialog.h +++ b/gtk2_ardour/add_video_dialog.h @@ -22,6 +22,10 @@ #include +#ifdef interface +#undef interface +#endif + #include #include "ardour/types.h" diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index 35dbe3cfc9..6fef5b94e4 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -28,10 +28,6 @@ #include "ardour/profile.h" #include "ardour/session.h" -#ifdef interface -#undef interface -#endif - #include "actions.h" #include "add_route_dialog.h" #include "add_video_dialog.h" From b768d6c39d1a7b335da86f7f35edc3c18ab1ba7f Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Fri, 2 May 2014 20:07:06 +1000 Subject: [PATCH 02/12] Include windows.h for Registry access related API --- gtk2_ardour/video_server_dialog.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk2_ardour/video_server_dialog.cc b/gtk2_ardour/video_server_dialog.cc index e4c9a7f51a..6d9bb22978 100644 --- a/gtk2_ardour/video_server_dialog.cc +++ b/gtk2_ardour/video_server_dialog.cc @@ -43,6 +43,10 @@ #include "utils_videotl.h" #include "i18n.h" +#ifdef PLATFORM_WINDOWS +#include +#endif + using namespace Gtk; using namespace std; using namespace PBD; From 8a796bd5e1e1d43356474c4fa6b6c8d1a6be3cae Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Fri, 2 May 2014 20:21:17 +1000 Subject: [PATCH 03/12] Use Glib::usleep in Editor::timefx_thread on Windows --- gtk2_ardour/editor_timefx.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk2_ardour/editor_timefx.cc b/gtk2_ardour/editor_timefx.cc index 2528c823b7..765030507b 100644 --- a/gtk2_ardour/editor_timefx.cc +++ b/gtk2_ardour/editor_timefx.cc @@ -403,7 +403,7 @@ Editor::timefx_thread (void *arg) */ #ifdef PLATFORM_WINDOWS - Sleep(2000); + Glib::usleep(2 * G_USEC_PER_SEC); #else struct timespec t = { 2, 0 }; nanosleep (&t, 0); From 9c07675cbe186a15cfefe857a99a3a15636a25a4 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Fri, 2 May 2014 20:25:09 +1000 Subject: [PATCH 04/12] Include windows.h for Sleep function --- headless/load_session.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/headless/load_session.cc b/headless/load_session.cc index dc2644c428..a9037214cc 100644 --- a/headless/load_session.cc +++ b/headless/load_session.cc @@ -17,6 +17,7 @@ using namespace ARDOUR; using namespace PBD; #ifdef PLATFORM_WINDOWS +#include #define sleep(X) Sleep((X) * 1000) #endif From 9cde7b605140785a6a0bc3d900d06a3096448624 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Fri, 2 May 2014 20:26:23 +1000 Subject: [PATCH 05/12] Fix pattern to match possible audio backends on windows --- libs/ardour/audioengine.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index 8d4b17ebd4..77d7731edf 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -480,7 +480,7 @@ AudioEngine::discover_backends () Glib::PatternSpec dll_extension_pattern("*backendRDC.dll"); #endif #else - Glib::PatternSpec dll_extension_pattern("*backend.dll"); + Glib::PatternSpec dll_extension_pattern("*backend*.dll"); #endif find_matching_files_in_search_path (backend_search_path (), From b895a8f631dc5d076cfb97349d63959b043f360c Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Fri, 2 May 2014 20:48:04 +1000 Subject: [PATCH 06/12] Always link to ole32 when building with mingw for get_win_special_folder needed for CoTaskMemFree in get_win_special_folder --- libs/pbd/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/pbd/wscript b/libs/pbd/wscript index 3e7b423fc7..2ba79d0c34 100644 --- a/libs/pbd/wscript +++ b/libs/pbd/wscript @@ -106,7 +106,7 @@ def configure(conf): # Boost headers autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp') autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp') - if conf.env['WINDOWS_VST_SUPPORT'] == True and Options.options.dist_target == 'mingw': + if Options.options.dist_target == 'mingw': conf.check(compiler='cxx', lib='ole32', mandatory=True, From da596182e18a4a21e1095c056ccb53066e6e2015 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Sun, 4 May 2014 09:22:10 +1000 Subject: [PATCH 07/12] Remove duplicate test for presence of boost header --- wscript | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/wscript b/wscript index 52d1ec6e28..fbb1a31dd4 100644 --- a/wscript +++ b/wscript @@ -665,6 +665,7 @@ def configure(conf): # executing a test program is n/a when cross-compiling if Options.options.dist_target != 'mingw': + conf.check_cc(function_name='dlopen', header_name='dlfcn.h', lib='dl', uselib_store='DL') conf.check_cxx(fragment = "#include \nint main(void) { return (BOOST_VERSION >= 103900 ? 0 : 1); }\n", execute = "1", mandatory = True, @@ -701,16 +702,6 @@ def configure(conf): # TODO put this only where it is needed conf.env.append_value('LIB', 'regex') - if Options.options.dist_target != 'mingw': - conf.check_cc(function_name='dlopen', header_name='dlfcn.h', lib='dl', uselib_store='DL') - - conf.check_cxx(fragment = "#include \nint main(void) { return (BOOST_VERSION >= 103900 ? 0 : 1); }\n", - execute = "1", - mandatory = True, - msg = 'Checking for boost library >= 1.39', - okmsg = 'ok', - errmsg = 'too old\nPlease install boost version 1.39 or higher.') - # Tell everyone that this is a waf build conf.env.append_value('CFLAGS', '-DWAF_BUILD') From 86a0f10ac72620b84aeabca6a26962d5f2198c6e Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Thu, 8 May 2014 14:06:18 +1000 Subject: [PATCH 08/12] Reinstate code removed that allows building with mingw and the pthreads-win32 library Newer versions of mingw-w64 can be built with an included pthread implementation called winpthreads which uses an integer type for pthread_t but pthreads-win32 does not. --- libs/pbd/pbd/abstract_ui.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libs/pbd/pbd/abstract_ui.h b/libs/pbd/pbd/abstract_ui.h index 8e386aa4eb..a8602c7d78 100644 --- a/libs/pbd/pbd/abstract_ui.h +++ b/libs/pbd/pbd/abstract_ui.h @@ -75,8 +75,20 @@ class ABSTRACT_UI_API AbstractUI : public BaseUI }; typedef typename RequestBuffer::rw_vector RequestBufferVector; +#if defined(COMPILER_MINGW) && defined(PTW32_VERSION) + struct pthread_cmp + { + bool operator() (const ptw32_handle_t& thread1, const ptw32_handle_t& thread2) + { + return thread1.p < thread2.p; + } + }; + typedef typename std::map::iterator RequestBufferMapIterator; + typedef std::map RequestBufferMap; +#else typedef typename std::map::iterator RequestBufferMapIterator; typedef std::map RequestBufferMap; +#endif RequestBufferMap request_buffers; static Glib::Threads::Private per_thread_request_buffer; From e4442b45cfd71c0bdcc20ad65985aaf44cb42caa Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Thu, 8 May 2014 14:54:16 +1000 Subject: [PATCH 09/12] Use COMPILER_MINGW define rather than __MINGW64__ This is necessary to build with win32 target using mingw-w64 version on Fedora 19 --- libs/pbd/pbd/localtime_r.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/pbd/pbd/localtime_r.h b/libs/pbd/pbd/localtime_r.h index 532bb3ed12..2a4502481d 100644 --- a/libs/pbd/pbd/localtime_r.h +++ b/libs/pbd/pbd/localtime_r.h @@ -7,7 +7,7 @@ #define localtime_r( _clock, _result ) \ ( *(_result) = *localtime( (_clock) ), (_result) ) -#elif defined __MINGW64__ +#elif defined COMPILER_MINGW # ifdef localtime_r # undef localtime_r From 2379321355365e1f6442eee368f71385b56ed9fd Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Tue, 13 May 2014 14:37:27 +1000 Subject: [PATCH 10/12] Change windows packaging to have separate scripts for Fedora 19 and 20 A large part of the packaging is shared in package.sh, this approach should work on windows with another dll list in package-waves.sh and redefined copydll function(which I've added untested as copydll-waves.sh) Also add support for 64bit mingw builds via ARCH env variable. If unset defaults to 32bit build --- tools/windows_packaging/copydll-fedora.sh | 12 +++ tools/windows_packaging/copydll-waves.sh | 35 ++++++++ tools/windows_packaging/mingw-env.sh | 31 +++++-- tools/windows_packaging/package-f19.sh | 73 ++++++++++++++++ tools/windows_packaging/package-f20.sh | 73 ++++++++++++++++ tools/windows_packaging/package.sh | 101 +++++----------------- 6 files changed, 241 insertions(+), 84 deletions(-) create mode 100755 tools/windows_packaging/copydll-fedora.sh create mode 100755 tools/windows_packaging/copydll-waves.sh create mode 100755 tools/windows_packaging/package-f19.sh create mode 100755 tools/windows_packaging/package-f20.sh diff --git a/tools/windows_packaging/copydll-fedora.sh b/tools/windows_packaging/copydll-fedora.sh new file mode 100755 index 0000000000..dcfbc41ac6 --- /dev/null +++ b/tools/windows_packaging/copydll-fedora.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +function copydll () { + if [ -f $MINGW_ROOT/bin/$1 ] ; then + echo "cp $MINGW_ROOT/bin/$1 $2" + cp $MINGW_ROOT/bin/$1 $2 || return 1 + return 0 + fi + + echo "ERROR: File $1 does not exist" + return 1 +} diff --git a/tools/windows_packaging/copydll-waves.sh b/tools/windows_packaging/copydll-waves.sh new file mode 100755 index 0000000000..fe2b5edf3c --- /dev/null +++ b/tools/windows_packaging/copydll-waves.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +function copydll () { + if [ -f $GTK/bin/$1 ] ; then + echo "cp $GTK/bin/$1 $2" + cp $GTK/bin/$1 $2 || return 1 + return 0 + fi + + if [ -f $GTK/lib/$1 ] ; then + echo "cp $GTK/lib/$1 $2" + cp $GTK/lib/$1 $2 || return 1 + return 0 + fi + + if [ -f $A3/bin/$1 ] ; then + echo "cp $A3/bin/$1 $2" + cp $A3/bin/$1 $2 || return 1 + return 0 + fi + + if [ -f $A3/lib/$1 ] ; then + echo "$A3/lib/$1 $2" + cp $A3/lib/$1 $2 || return 1 + return 0 + fi + if which $1 ; then + echo "cp `which $1` $2" + cp `which $1` $2 || return 1 + return 0 + fi + + echo "there is no $1" + return 1 +} diff --git a/tools/windows_packaging/mingw-env.sh b/tools/windows_packaging/mingw-env.sh index 983e6d0b9b..00145de2ad 100755 --- a/tools/windows_packaging/mingw-env.sh +++ b/tools/windows_packaging/mingw-env.sh @@ -1,11 +1,23 @@ #!/bin/bash -BASE=$(readlink -f $0) -BASE=$(dirname $BASE) # up one -BASE=$(dirname $BASE) # up one more -BASE=$(dirname $BASE) # up one more +if [ -z "$ARCH" ]; then + echo "ARCH not set defaulting to win32" + ARCH=win32 +elif [ "$ARCH" == "win32" ]; then + echo "ARCH set to win32" +elif [ "$ARCH" == "win64" ]; then + echo "ARCH set to win64" +else + echo "ARCH set invalid value aborting..." + exit 1 +fi + +if [ "$ARCH" == "win32" ]; then + HOST=i686-w64-mingw32 +else + HOST=x86_64-w64-mingw32 +fi -HOST=i686-w64-mingw32 MINGW_ROOT=/usr/$HOST/sys-root/mingw export PKG_CONFIG_PREFIX=$MINGW_ROOT @@ -22,6 +34,11 @@ export LINK_CXX=$HOST-g++ export WINRC=$HOST-windres export STRIP=$HOST-strip +BASE=$(readlink -f $0) +BASE=$(dirname $BASE) # up one +BASE=$(dirname $BASE) # up one more +BASE=$(dirname $BASE) # up one more + BUILD_DIR=$BASE/build BUILD_CACHE_FILE=$BUILD_DIR/c4che/_cache.py TOOLS_DIR=$BASE/tools/windows_packaging @@ -35,9 +52,9 @@ then # Figure out the Build Type if [ x$DEBUG = xT ]; then - PACKAGE_DIR="$APPNAME-${release_version}-win32-dbg" + PACKAGE_DIR="$APPNAME-${release_version}-$ARCH-dbg" else - PACKAGE_DIR="$APPNAME-${release_version}-win32" + PACKAGE_DIR="$APPNAME-${release_version}-$ARCH" fi if grep -q "BUILD_TESTS = True" $BUILD_CACHE_FILE; then diff --git a/tools/windows_packaging/package-f19.sh b/tools/windows_packaging/package-f19.sh new file mode 100755 index 0000000000..3900571fd6 --- /dev/null +++ b/tools/windows_packaging/package-f19.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +DLLS=' +jack-0.dll +jackserver-0.dll +libatk-1.0-0.dll +libatkmm-1.6-1.dll +libbz2-1.dll +libcairo-2.dll +libcairo-gobject-2.dll +libcairomm-1.0-1.dll +libcairo-script-interpreter-2.dll +libcppunit-1-12-1.dll +libcrypto-10.dll +libcurl-4.dll +libexpat-1.dll +libfftw3-3.dll +libfftw3f-3.dll +libfontconfig-1.dll +libfreetype-6.dll +libgailutil-18.dll +libgcc_s_sjlj-1.dll +libgdkmm-2.4-1.dll +libgdk_pixbuf-2.0-0.dll +libgdk-win32-2.0-0.dll +libgio-2.0-0.dll +libgiomm-2.4-1.dll +libglib-2.0-0.dll +libglibmm-2.4-1.dll +libglibmm_generate_extra_defs-2.4-1.dll +libgmodule-2.0-0.dll +libgnurx-0.dll +libgobject-2.0-0.dll +libgthread-2.0-0.dll +libgtkmm-2.4-1.dll +libgtk-win32-2.0-0.dll +libharfbuzz-0.dll +iconv.dll +libFLAC-8.dll +libogg-0.dll +libvorbis-0.dll +libvorbisenc-2.dll +libffi-6.dll +libidn-11.dll +libintl-8.dll +liblo-7.dll +libpango-1.0-0.dll +libpangocairo-1.0-0.dll +libpangoft2-1.0-0.dll +libpangomm-1.4-1.dll +libpangowin32-1.0-0.dll +libpixman-1-0.dll +libpng15-15.dll +rubberband-2.dll +libsamplerate-0.dll +libsigc-2.0-0.dll +libsndfile-1.dll +libssh2-1.dll +libssl-10.dll +libstdc++-6.dll +libtag.dll +libxml2-2.dll +pthreadGC2.dll +portaudio-2.dll +vamp-hostsdk-3.dll +vamp-sdk-2.dll +zlib1.dll +' + +WITH_JACK='TRUE' + +. ./copydll-fedora.sh +. ./package.sh diff --git a/tools/windows_packaging/package-f20.sh b/tools/windows_packaging/package-f20.sh new file mode 100755 index 0000000000..50cbcd9734 --- /dev/null +++ b/tools/windows_packaging/package-f20.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +DLLS=' +jack-0.dll +jackserver-0.dll +libatk-1.0-0.dll +libatkmm-1.6-1.dll +libbz2-1.dll +libcairo-2.dll +libcairo-gobject-2.dll +libcairomm-1.0-1.dll +libcairo-script-interpreter-2.dll +libcppunit-1-12-1.dll +libcrypto-10.dll +libcurl-4.dll +libexpat-1.dll +libfftw3-3.dll +libfftw3f-3.dll +libfontconfig-1.dll +libfreetype-6.dll +libgailutil-18.dll +libgcc_s_sjlj-1.dll +libgdkmm-2.4-1.dll +libgdk_pixbuf-2.0-0.dll +libgdk-win32-2.0-0.dll +libgio-2.0-0.dll +libgiomm-2.4-1.dll +libglib-2.0-0.dll +libglibmm-2.4-1.dll +libglibmm_generate_extra_defs-2.4-1.dll +libgmodule-2.0-0.dll +libgnurx-0.dll +libgobject-2.0-0.dll +libgthread-2.0-0.dll +libgtkmm-2.4-1.dll +libgtk-win32-2.0-0.dll +libharfbuzz-0.dll +iconv.dll +libFLAC-8.dll +libogg-0.dll +libvorbis-0.dll +libvorbisenc-2.dll +libffi-6.dll +libidn-11.dll +libintl-8.dll +liblo-7.dll +libpango-1.0-0.dll +libpangocairo-1.0-0.dll +libpangoft2-1.0-0.dll +libpangomm-1.4-1.dll +libpangowin32-1.0-0.dll +libpixman-1-0.dll +libpng16-16.dll +rubberband-2.dll +libsamplerate-0.dll +libsigc-2.0-0.dll +libsndfile-1.dll +libssh2-1.dll +libssl-10.dll +libstdc++-6.dll +libtag.dll +libxml2-2.dll +libwinpthread-1.dll +portaudio-2.dll +vamp-hostsdk-3.dll +vamp-sdk-2.dll +zlib1.dll +' + +WITH_JACK='TRUE' + +. ./copydll-fedora.sh +. ./package.sh diff --git a/tools/windows_packaging/package.sh b/tools/windows_packaging/package.sh index dd1ec88119..33eaa350e3 100755 --- a/tools/windows_packaging/package.sh +++ b/tools/windows_packaging/package.sh @@ -4,6 +4,11 @@ . ./print-env.sh +if [ -z "$DLLS" ]; then + echo "ERROR: DLLS variable is not defined..." + exit 1 +fi + cd $BASE || exit 1 if ! test -f $BUILD_CACHE_FILE; then @@ -50,90 +55,30 @@ cp -r $MINGW_ROOT/lib/gtk-2.0 $PACKAGE_DIR/lib cp -r $MINGW_ROOT/lib/gdk-pixbuf-2.0 $PACKAGE_DIR/lib cp $TOOLS_DIR/loaders.cache $PACKAGE_DIR/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache -mkdir -p $PACKAGE_DIR/lib/pango/1.6.0/modules -cp -r $MINGW_ROOT/lib/pango/1.6.0/modules/*.dll $PACKAGE_DIR/lib/pango/1.6.0/modules +if test x$WITH_PANGO_1_6 != x; then + mkdir -p $PACKAGE_DIR/lib/pango/1.6.0/modules + cp -r $MINGW_ROOT/lib/pango/1.6.0/modules/*.dll $PACKAGE_DIR/lib/pango/1.6.0/modules +else + mkdir -p $PACKAGE_DIR/lib/pango/1.8.0/modules + cp -r $MINGW_ROOT/lib/pango/1.8.0/modules/*.dll $PACKAGE_DIR/lib/pango/1.8.0/modules +fi + cp $TOOLS_DIR/pango.modules $PACKAGE_DIR/etc/pango cp $TOOLS_DIR/README $PACKAGE_DIR -DLLS=' -jack-0.dll -jackserver-0.dll -libart_lgpl_2-2.dll -libatk-1.0-0.dll -libatkmm-1.6-1.dll -libbz2-1.dll -libcairo-2.dll -libcairo-gobject-2.dll -libcairomm-1.0-1.dll -libcairo-script-interpreter-2.dll -libcppunit-1-12-1.dll -libcrypto-10.dll -libcurl-4.dll -libexpat-1.dll -libfftw3-3.dll -libfftw3f-3.dll -libfontconfig-1.dll -libfreetype-6.dll -libgailutil-18.dll -libgcc_s_sjlj-1.dll -libgdkmm-2.4-1.dll -libgdk_pixbuf-2.0-0.dll -libgdk-win32-2.0-0.dll -libgio-2.0-0.dll -libgiomm-2.4-1.dll -libglib-2.0-0.dll -libglibmm-2.4-1.dll -libglibmm_generate_extra_defs-2.4-1.dll -libgmodule-2.0-0.dll -libgnomecanvas-2-0.dll -libgnomecanvasmm-2.6-1.dll -libgnurx-0.dll -libgobject-2.0-0.dll -libgthread-2.0-0.dll -libgtkmm-2.4-1.dll -libgtk-win32-2.0-0.dll -libharfbuzz-0.dll -libiconv-2.dll -iconv.dll -libFLAC-8.dll -libogg-0.dll -libvorbis-0.dll -libvorbisenc-2.dll -libffi-6.dll -libidn-11.dll -libintl-8.dll -liblo-7.dll -libpango-1.0-0.dll -libpangocairo-1.0-0.dll -libpangoft2-1.0-0.dll -libpangomm-1.4-1.dll -libpangowin32-1.0-0.dll -libpixman-1-0.dll -libpng15-15.dll -libsamplerate-0.dll -libsigc-2.0-0.dll -libsndfile-1.dll -libssh2-1.dll -libssl-10.dll -libstdc++-6.dll -libxml2-2.dll -pthreadGC2.dll -zlib1.dll -' - echo "Copying mingw shared libraries to $PACKAGE_DIR ..." for i in $DLLS; do -cp $MINGW_ROOT/bin/$i $PACKAGE_DIR + copydll "$i" "$PACKAGE_DIR" || exit 1 done -echo "Copying JACK server and drivers to $PACKAGE_DIR ..." - -cp $MINGW_ROOT/bin/jackd.exe $PACKAGE_DIR -cp -r $MINGW_ROOT/bin/jack $PACKAGE_DIR -cp $MINGW_ROOT/bin/libportaudio-2.dll $PACKAGE_DIR +if test x$WITH_JACK != x; then + echo "Copying JACK server and drivers to $PACKAGE_DIR ..." + cp $MINGW_ROOT/bin/jackd.exe $PACKAGE_DIR + cp -r $MINGW_ROOT/bin/jack $PACKAGE_DIR +fi SRC_DIRS=' libs/ardour @@ -156,9 +101,11 @@ if [ x$DEBUG = xT ]; then do cp -r -p $BASE/$i $PACKAGE_SRC_DIR/libs done - - echo "Copying JACK utility programs to $PACKAGE_DIR ..." - cp $MINGW_ROOT/bin/jack_*.exe $PACKAGE_DIR + + if test x$WITH_JACK != x; then + echo "Copying JACK utility programs to $PACKAGE_DIR ..." + cp $MINGW_ROOT/bin/jack_*.exe $PACKAGE_DIR + fi #echo "Copying any debug files to $PACKAGE_DIR ..." #cp $MINGW_ROOT/bin/*.debug $PACKAGE_DIR From b565357bf462de2e64671f5cc167bbc08eb84509 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Tue, 13 May 2014 14:56:26 +1000 Subject: [PATCH 11/12] Remove incorrect code for mingw in DummyAudioBackend::in_process_thread I'm assuming this section was copied from the JackAudioBackend where the thread type is not pthread_t for mingw, but in the DummyAudioBackend it is. --- libs/backends/dummy/dummy_audiobackend.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libs/backends/dummy/dummy_audiobackend.cc b/libs/backends/dummy/dummy_audiobackend.cc index 7a3aa78513..6bc6e6da6e 100644 --- a/libs/backends/dummy/dummy_audiobackend.cc +++ b/libs/backends/dummy/dummy_audiobackend.cc @@ -430,15 +430,9 @@ DummyAudioBackend::in_process_thread () { for (std::vector::const_iterator i = _threads.begin (); i != _threads.end (); ++i) { -#ifdef COMPILER_MINGW - if (*i == GetCurrentThread ()) { - return true; - } -#else // pthreads if (pthread_equal (*i, pthread_self ()) != 0) { return true; } -#endif } return false; } From 6bf8249b4b14c54f53bdfc96b0dc3025a6eaebb6 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Tue, 13 May 2014 15:10:32 +1000 Subject: [PATCH 12/12] Use Glib::usleep in DummyAudioBackend rather than ::usleep --- libs/backends/dummy/dummy_audiobackend.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libs/backends/dummy/dummy_audiobackend.cc b/libs/backends/dummy/dummy_audiobackend.cc index 6bc6e6da6e..136e5b8655 100644 --- a/libs/backends/dummy/dummy_audiobackend.cc +++ b/libs/backends/dummy/dummy_audiobackend.cc @@ -20,6 +20,8 @@ #include #include +#include + #include "dummy_audiobackend.h" #include "pbd/error.h" #include "i18n.h" @@ -302,7 +304,7 @@ DummyAudioBackend::_start (bool /*for_latency_measurement*/) } int timeout = 5000; - while (!_running && --timeout > 0) { usleep (1000); } + while (!_running && --timeout > 0) { Glib::usleep (1000); } if (timeout == 0 || !_running) { PBD::error << _("DummyAudioBackend: failed to start process thread.") << endmsg; @@ -992,13 +994,13 @@ DummyAudioBackend::main_process_thread () const int nomial_time = 1000000 * _samples_per_period / _samplerate; _dsp_load = elapsed_time / (float) nomial_time; if (elapsed_time < nomial_time) { - ::usleep (nomial_time - elapsed_time); + Glib::usleep (nomial_time - elapsed_time); } else { - ::usleep (100); // don't hog cpu + Glib::usleep (100); // don't hog cpu } } else { _dsp_load = 1.0; - ::usleep (100); // don't hog cpu + Glib::usleep (100); // don't hog cpu } ::gettimeofday (&clock1, NULL); }