diff --git a/gtk2_ardour/ardour_ui_session.cc b/gtk2_ardour/ardour_ui_session.cc index 8ac7c9a313..1b6c4baff7 100644 --- a/gtk2_ardour/ardour_ui_session.cc +++ b/gtk2_ardour/ardour_ui_session.cc @@ -514,18 +514,11 @@ ARDOUR_UI::load_session_stage_two (const std::string& path, const std::string& s _session->set_clean (); } -#ifdef WINDOWS_VST_SUPPORT - fst_stop_threading(); -#endif - { Timers::TimerSuspender t; flush_pending (10); } -#ifdef WINDOWS_VST_SUPPORT - fst_start_threading(); -#endif retval = 0; if (!mix_template.empty ()) { diff --git a/gtk2_ardour/windows_vst_plugin_ui.cc b/gtk2_ardour/windows_vst_plugin_ui.cc index 8642f98d26..98d79c5b6f 100644 --- a/gtk2_ardour/windows_vst_plugin_ui.cc +++ b/gtk2_ardour/windows_vst_plugin_ui.cc @@ -169,34 +169,9 @@ WindowsVSTPluginUI::get_XID () return _vst->state()->xid; } -#ifdef GDK_WINDOWING_X11 -typedef int (*error_handler_t)( Display *, XErrorEvent *); -static Display *the_gtk_display; -static error_handler_t wine_error_handler; -static error_handler_t gtk_error_handler; - -static int -fst_xerror_handler (Display* disp, XErrorEvent* ev) -{ - if (disp == the_gtk_display) { - printf ("relaying error to gtk\n"); - return gtk_error_handler (disp, ev); - } else { - printf( "relaying error to wine\n" ); - return wine_error_handler (disp, ev); - } -} -#endif - void windows_vst_gui_init (int *argc, char **argv[]) { gtk_init (argc, argv); - -#ifdef GDK_WINDOWING_X11 - wine_error_handler = XSetErrorHandler (NULL); - the_gtk_display = gdk_x11_display_get_xdisplay (gdk_display_get_default()); - gtk_error_handler = XSetErrorHandler (fst_xerror_handler); -#endif } diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 5c6e794b9a..8d64209cbc 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -455,13 +455,6 @@ def configure(conf): autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp') autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp') -# Add a waf `feature' to allow compilation of things using winegcc -from waflib.TaskGen import feature -@feature("wine") -def set_winegcc(self): - self.env.LINK_CXX = self.env.LINK_CC = 'wineg++' - self.env.CC = 'winegcc' - def _doPyp(infileName, deps = False): outStr = '' out = [] @@ -604,60 +597,19 @@ def build(bld): # obj.source += [ 'toolbar_test.cc', 'enums.cc'] - if bld.is_defined('WINDOWS_VST_SUPPORT') and bld.env['build_target'] != 'mingw': - # Windows VST support w/wine - # If we require VST support we build a stub main() and the FST library - # here using winegcc, and link it to the GTK front-end library - obj = bld (features = 'cxx c cxxprogram wine') - obj.source = ( '../libs/fst/vstwin.c', '../vst/winmain.c' ) - # - # XXX do we really need to explicitly link to all of these for the wine executable? - # - obj.use = [ 'libpbd', - 'libmidipp', - 'libardour', - 'libardour_cp', - 'libtemporal', - 'libmidipp', - 'libgtk2_ardour', - 'libgtkmm2ext', - 'libcanvas', - 'libwaveview', - 'libwidgets', - 'libptformat', - ] - obj.target = 'ardour-' + str (bld.env['VERSION']) + '-vst.exe.so' - obj.includes = [ '../libs/fst', '.' ] - obj.linkflags = ['-mwindows', '-Wl,--export-dynamic'] - obj.linkflags += bld.env['LDFLAGS'] - obj.defines = ['_POSIX_SOURCE', 'USE_WS_PREFIX'] - obj.uselib = 'GLIB' - obj.install_path = bld.env['DLLDIR'] - # end of the wine executable - - # now the shared library containing the GTK GUI for ardour - obj = bld (features = 'cxx c cxxshlib') - # operate on copy to avoid adding sources twice - obj.source = list(gtk2_ardour_sources) - obj.includes = [ '../libs/fst', '.' ] - obj.name = 'libgtk2_ardour' - obj.target = 'gtk2_ardour' - obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ] - + # executable version of the GTK GUI + if bld.env['build_target'] == 'mingw': + obj = bld (features = 'cxx c cxxprogram winres') else: - # just the normal executable version of the GTK GUI - if bld.env['build_target'] == 'mingw': - obj = bld (features = 'cxx c cxxprogram winres') - else: - obj = bld (features = 'cxx c cxxprogram') - # operate on copy to avoid adding sources twice - obj.source = list(gtk2_ardour_sources) - obj.target = 'ardour-' + str (bld.env['VERSION']) - obj.includes = ['.'] + obj = bld (features = 'cxx c cxxprogram') - if bld.is_defined('WINDOWS_VST_SUPPORT'): - # Windows VST support mingw - obj.includes += [ '../libs/fst' ] + # operate on copy to avoid adding sources twice + obj.source = list(gtk2_ardour_sources) + obj.target = 'ardour-' + str (bld.env['VERSION']) + obj.includes = ['.'] + + if bld.is_defined('WINDOWS_VST_SUPPORT'): + obj.includes += [ '../libs/fst' ] # at this point, "obj" refers to either the normal native executable # OR the shared library built for use with wine on linux. @@ -716,8 +668,6 @@ def build(bld): if bld.is_defined('WINDOWS_VST_SUPPORT'): obj.source += [ 'windows_vst_plugin_ui.cc' ] obj.defines += [ 'WINDOWS_VST_SUPPORT' ] - if bld.env['build_target'] != 'mingw': - obj.use += [ 'X11' ] if bld.is_defined('LXVST_SUPPORT'): obj.source += [ 'linux_vst_gui_support.cc', 'lxvst_plugin_ui.cc' ] @@ -781,15 +731,6 @@ def build(bld): obj.install_path = bld.env['BINDIR'] set_subst_dict(obj, wrapper_subst_dict) - if bld.is_defined('WINDOWS_VST_SUPPORT'): - obj = bld(features = 'subst') - obj.source = '../vst/ardourvst.in' - obj.target = 'ardourvst' + str (bld.env['MAJOR']) - obj.chmod = Utils.O755 - obj.dict = wrapper_subst_dict - obj.install_path = bld.env['BINDIR'] - set_subst_dict(obj, wrapper_subst_dict) - # Font configuration font_subst_dict = {} diff --git a/headless/wscript b/headless/wscript index 30e118ac81..2ad37d97ea 100644 --- a/headless/wscript +++ b/headless/wscript @@ -30,8 +30,6 @@ def configure(conf): def build(bld): VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR']) - if bld.is_defined('WINDOWS_VST_SUPPORT') and bld.env['build_target'] != 'mingw': - return # just the normal executable version of the GTK GUI obj = bld (features = 'cxx c cxxprogram') @@ -40,10 +38,6 @@ def build(bld): obj.source = hardour_sources obj.target = 'hardour-' + str (bld.env['VERSION']) obj.includes = ['.'] - - # at this point, "obj" refers to either the normal native executable - # OR the shared library built for use with wine on linux. - obj.use = [ 'libpbd', 'libardour', 'libardour_cp', diff --git a/libs/ardour/wscript b/libs/ardour/wscript index 6f92d1c5ac..9f3f7e88f5 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -371,11 +371,9 @@ def configure(conf): autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp') autowaf.check_header(conf, 'cxx', 'boost/scoped_ptr.hpp') autowaf.check_header(conf, 'cxx', 'boost/ptr_container/ptr_list.hpp') - if conf.env['WINDOWS_VST_SUPPORT'] == True and Options.options.dist_target == 'mingw': - conf.check(compiler='cxx', - lib='gdi32', - mandatory=True, - uselib_store='GDI32') + + if conf.env['WINDOWS_VST_SUPPORT'] == True: + conf.check(compiler='cxx', lib='gdi32', mandatory=True, uselib_store='GDI32') def build(bld): @@ -450,11 +448,10 @@ def build(bld): if bld.is_defined('WINDOWS_VST_SUPPORT'): obj.source += [ 'windows_vst_plugin.cc'] - obj.includes += [ '../fst' ] obj.defines += [ 'WINDOWS_VST_SUPPORT' ] - if bld.env['build_target'] == 'mingw': - obj.use += [ 'vstwin' ] - obj.uselib += ['GDI32'] + obj.includes += [ '../fst' ] + obj.use += [ 'vstwin' ] + obj.uselib += ['GDI32'] if bld.is_defined('LXVST_SUPPORT'): obj.source += [ 'lxvst_plugin.cc', 'linux_vst_support.cc' ] diff --git a/libs/fluidsynth/wscript b/libs/fluidsynth/wscript index 724e3aaf6c..f64c1f943e 100644 --- a/libs/fluidsynth/wscript +++ b/libs/fluidsynth/wscript @@ -73,13 +73,5 @@ def build(bld): defines = [ 'HAVE_CONFIG_H', 'DEFAULT_SOUNDFONT=""' ] ) - # wine-gcc hacks: - # defining __MINGW32__ for wine-gcc is a workaround for fluidsynth's include - # strategy (which is made for mingw or windows) without it - # winsock2.h will complain about undeclared "u_short" - # we also need to explicitly define _WIN32 - if bld.is_defined('WINDOWS_VST_SUPPORT') and not bld.env['build_target'] == 'mingw': - obj.defines += [ '_WIN32', '__MINGW32__' ] - def shutdown(): autowaf.shutdown() diff --git a/libs/fst/fst.h b/libs/fst/fst.h index 3c6076c370..3ca20b46e3 100644 --- a/libs/fst/fst.h +++ b/libs/fst/fst.h @@ -47,8 +47,6 @@ LIBARDOUR_API void fst_destroy_editor (VSTState *); LIBARDOUR_API void fst_move_window_into_view (VSTState *); LIBARDOUR_API void fst_event_loop_remove_plugin (VSTState* fst); -LIBARDOUR_API void fst_start_threading(void); -LIBARDOUR_API void fst_stop_threading(void); LIBARDOUR_API void fst_audio_master_idle(void); #ifdef __cplusplus diff --git a/libs/fst/scanner.wine b/libs/fst/scanner.wine deleted file mode 100644 index ac39b5b339..0000000000 --- a/libs/fst/scanner.wine +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec wine "`dirname "$0"`/ardour-vst-scanner.exe.so" "$@" diff --git a/libs/fst/vstwin.c b/libs/fst/vstwin.c index 9583701fba..f8783fcc9d 100644 --- a/libs/fst/vstwin.c +++ b/libs/fst/vstwin.c @@ -25,22 +25,13 @@ #define fst_error(...) fprintf(stderr, __VA_ARGS__) -#ifdef PLATFORM_WINDOWS +#ifndef PLATFORM_WINDOWS +#error VSTWIN ONLY WORKS ON WINDOWS +#endif #include static UINT_PTR idle_timer_id = 0; -#else /* linux + wine */ - -#include // PATH_MAX -#include -#include -#include -static int gui_quit = 0; -static unsigned int idle_id = 0; - -#endif - #ifndef COMPILER_MSVC extern char * strdup (const char *); #endif @@ -70,7 +61,6 @@ vstedit_wndproc (HWND w, UINT msg, WPARAM wp, LPARAM lp) break; case WM_SIZE: -#ifdef PLATFORM_WINDOWS { LRESULT rv = DefWindowProcA (w, msg, wp, lp); RECT rect; @@ -88,7 +78,6 @@ vstedit_wndproc (HWND w, UINT msg, WPARAM wp, LPARAM lp) } return rv; } -#endif break; case WM_CLOSE: /* we don't care about windows closing ... @@ -137,31 +126,6 @@ idle_hands( } pthread_mutex_lock (&fst->lock); -#ifndef PLATFORM_WINDOWS /* linux + wine */ - /* Dispatch messages to send keypresses to the plugin */ - int i; - - for (i = 0; i < fst->n_pending_keys; ++i) { - MSG msg; - /* I'm not quite sure what is going on here; it seems - * `special' keys must be delivered with WM_KEYDOWN, - * but that alphanumerics etc. must use WM_CHAR or - * they will be ignored. Ours is not to reason why ... - */ - if (fst->pending_keys[i].special != 0) { - msg.message = WM_KEYDOWN; - msg.wParam = fst->pending_keys[i].special; - } else { - msg.message = WM_CHAR; - msg.wParam = fst->pending_keys[i].character; - } - msg.hwnd = GetFocus (); - msg.lParam = 0; - DispatchMessageA (&msg); - } - - fst->n_pending_keys = 0; -#endif /* See comment for call below */ vststate_maybe_set_program (fst); @@ -237,13 +201,8 @@ fst_new (void) VSTState* fst = (VSTState*) calloc (1, sizeof (VSTState)); vststate_init (fst); -#ifdef PLATFORM_WINDOWS fst->voffset = 45; fst->hoffset = 0; -#else /* linux + wine */ - fst->voffset = 24; - fst->hoffset = 6; -#endif return fst; } @@ -263,22 +222,6 @@ fst_handle_new (void) return fst; } -#ifndef PLATFORM_WINDOWS /* linux + wine */ -static gboolean -g_idle_call (gpointer ignored) { - if (gui_quit) return FALSE; - MSG msg; - if (PeekMessageA (&msg, NULL, 0, 0, 1)) { - TranslateMessage (&msg); - DispatchMessageA (&msg); - } - idle_hands(NULL, 0, 0, 0); - g_main_context_iteration(NULL, FALSE); - return gui_quit ? FALSE : TRUE; -} -#endif - - int fst_init (void* possible_hmodule) { @@ -286,12 +229,8 @@ fst_init (void* possible_hmodule) HMODULE hInst; if (possible_hmodule) { -#ifdef PLATFORM_WINDOWS fst_error ("Error in fst_init(): (module handle is unnecessary for Win32 build)"); return -1; -#else /* linux + wine */ - hInst = (HMODULE) possible_hmodule; -#endif } else if ((hInst = GetModuleHandleA (NULL)) == NULL) { fst_error ("can't get module handle"); return -1; @@ -305,15 +244,9 @@ fst_init (void* possible_hmodule) WNDCLASSEX wclass; wclass.cbSize = sizeof(WNDCLASSEX); -#ifdef PLATFORM_WINDOWS wclass.style = (CS_HREDRAW | CS_VREDRAW); wclass.hIcon = NULL; wclass.hCursor = LoadCursor(0, IDC_ARROW); -#else /* linux + wine */ - wclass.style = 0; - wclass.hIcon = LoadIcon(hInst, "FST"); - wclass.hCursor = LoadCursor(0, IDI_APPLICATION); -#endif wclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); wclass.lpfnWndProc = vstedit_wndproc; wclass.cbClsExtra = 0; @@ -333,30 +266,6 @@ fst_init (void* possible_hmodule) return 0; } -void -fst_start_threading(void) -{ -#ifndef PLATFORM_WINDOWS /* linux + wine */ - if (idle_id == 0) { - gui_quit = 0; - idle_id = g_idle_add (g_idle_call, NULL); - } -#endif -} - -void -fst_stop_threading(void) { -#ifndef PLATFORM_WINDOWS /* linux + wine */ - if (idle_id != 0) { - gui_quit = 1; - PostQuitMessage (0); - g_main_context_iteration(NULL, FALSE); - //g_source_remove(idle_id); - idle_id = 0; - } -#endif -} - void fst_exit (void) { @@ -366,16 +275,9 @@ fst_exit (void) while ((fst = fst_first)) fst_close (fst); -#ifdef PLATFORM_WINDOWS if (idle_timer_id != 0) { KillTimer(NULL, idle_timer_id); } -#else /* linux + wine */ - if (idle_id) { - gui_quit = 1; - PostQuitMessage (0); - } -#endif host_initialized = FALSE; pthread_mutex_destroy (&plugin_mutex); @@ -425,12 +327,6 @@ fst_run_editor (VSTState* fst, void* window_parent) // of our plugin window. SetParent((HWND)fst->windows_window, (HWND)window_parent); fst->xid = 0; -#ifndef PLATFORM_WINDOWS /* linux + wine */ - } else { - SetWindowPos (fst->windows_window, 0, 9999, 9999, 2, 2, 0); - ShowWindow (fst->windows_window, SW_SHOWNA); - fst->xid = (int) GetPropA (fst->windows_window, "__wine_x11_whole_window"); -#endif } // This is the suggested order of calls. @@ -448,12 +344,10 @@ fst_run_editor (VSTState* fst, void* window_parent) } if (fst->windows_window) { -#ifdef PLATFORM_WINDOWS if (idle_timer_id == 0) { // Init the idle timer if needed, so that the main window calls us. idle_timer_id = SetTimer(NULL, idle_timer_id, 50, (TIMERPROC) idle_hands); } -#endif fst_idle_timer_add_plugin (fst); } @@ -482,15 +376,11 @@ void fst_move_window_into_view (VSTState* fst) { if (fst->windows_window) { -#ifdef PLATFORM_WINDOWS SetWindowPos ((HWND)(fst->windows_window), HWND_TOP /*0*/, fst->hoffset, fst->voffset, fst->width, fst->height, SWP_NOACTIVATE|SWP_NOOWNERZORDER); -#else /* linux + wine */ - SetWindowPos ((HWND)(fst->windows_window), 0, 0, 0, fst->width + fst->hoffset, fst->height + fst->voffset, 0); -#endif ShowWindow ((HWND)(fst->windows_window), SW_SHOWNA); UpdateWindow ((HWND)(fst->windows_window)); } diff --git a/libs/fst/wscript b/libs/fst/wscript index 693fc1d8cd..33cb39e3fe 100644 --- a/libs/fst/wscript +++ b/libs/fst/wscript @@ -23,18 +23,9 @@ def configure(conf): conf.load('misc') conf.load('compiler_cxx') autowaf.configure(conf) - if conf.env['WINDOWS_VST_SUPPORT'] == True and Options.options.dist_target == 'mingw': - conf.check(compiler='cxx', - lib='gdi32', - mandatory=True, - uselib_store='GDI32') -# Add a waf `feature' to allow compilation of things using winegcc -from waflib.TaskGen import feature -@feature("wine") -def set_winegcc(self): - self.env.LINK_CXX = self.env.LINK_CC = 'wineg++' - self.env.CC = 'winegcc' + if conf.env['WINDOWS_VST_SUPPORT'] == True: + conf.check(compiler='cxx', lib='gdi32', mandatory=True, uselib_store='GDI32') def build(bld): VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR']) @@ -66,30 +57,7 @@ def build(bld): obj.install_path = os.path.join(bld.env['LIBDIR']) - if not (bld.is_defined('WINDOWS_VST_SUPPORT') or bld.is_defined('LXVST_SUPPORT') or bld.is_defined ('MACVST_SUPPORT')): - return - - if bld.is_defined('WINDOWS_VST_SUPPORT') and bld.env['build_target'] != 'mingw': - # wine exec wrapper script - obj = bld(features = 'subst') - obj.source = 'scanner.wine' - obj.target = 'ardour-vst-scanner' - obj.chmod = Utils.O755 - obj.install_path = os.path.join(bld.env['LIBDIR']) - obj.VERSION = bld.env['VERSION'] - - obj = bld (features = 'c cxx cxxprogram wine') - obj.source = ( - 'scanner.cc', - 'vstwin.c', - ) - obj.linkflags = ['-mwindows', '-Wl,--export-dynamic'] - obj.linkflags += bld.env['LDFLAGS'] - obj.target = 'ardour-vst-scanner.exe.so' - obj.uselib = ['GIOMM', 'DL'] - obj.use = [ 'libpbd' ] - obj.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ] - else: + if bld.is_defined('WINDOWS_VST_SUPPORT') or bld.is_defined('LXVST_SUPPORT') or bld.is_defined ('MACVST_SUPPORT'): obj = bld (features = 'cxx c cxxprogram') obj.source = ( 'scanner.cc' ) obj.target = 'ardour-vst-scanner' @@ -99,19 +67,19 @@ def build(bld): obj.linkflags = ['-mwindows'] obj.use = [ 'libpbd', 'vstwin' ] else: - obj.uselib = ['GIOMM', 'DL', 'OSX', 'XML', 'ARCHIVE', 'CURL'] + obj.uselib = ['GIOMM', 'DL', 'OSX', 'XML' ] obj.use = [ 'libpbd' ] - obj.includes = [ '../pbd/', '../ardour/', '.' ] - obj.defines = [ - '_POSIX_SOURCE', - 'USE_WS_PREFIX', - 'VST_SCANNER_APP', - 'PACKAGE="' + I18N_PACKAGE + str(bld.env['MAJOR']) + '"', - 'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"', - ] - if re.search ("bsd", sys.platform) != None: - obj.defines.append('_POSIX_C_SOURCE=200809') - obj.defines.append('_XOPEN_SOURCE=700') + obj.includes = [ '../pbd/', '../ardour/', '.' ] + obj.defines = [ + '_POSIX_SOURCE', + 'USE_WS_PREFIX', + 'VST_SCANNER_APP', + 'PACKAGE="' + I18N_PACKAGE + str(bld.env['MAJOR']) + '"', + 'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"', + ] + if re.search ("bsd", sys.platform) != None: + obj.defines.append('_POSIX_C_SOURCE=200809') + obj.defines.append('_XOPEN_SOURCE=700') - obj.install_path = os.path.join(bld.env['LIBDIR']) + obj.install_path = os.path.join(bld.env['LIBDIR']) diff --git a/libs/pbd/pthread_utils.cc b/libs/pbd/pthread_utils.cc index 7226552160..f4662c7fd8 100644 --- a/libs/pbd/pthread_utils.cc +++ b/libs/pbd/pthread_utils.cc @@ -29,9 +29,6 @@ #endif #include "pbd/pthread_utils.h" -#ifdef WINE_THREAD_SUPPORT -#include -#endif #ifdef COMPILER_MSVC DECLARE_DEFAULT_COMPARISONS (pthread_t) // Needed for 'DECLARE_DEFAULT_COMPARISONS'. Objects in an STL container can be @@ -61,16 +58,6 @@ namespace PBD using namespace PBD; -static int -thread_creator (pthread_t* thread_id, const pthread_attr_t* attr, void* (*function) (void*), void* arg) -{ -#ifdef WINE_THREAD_SUPPORT - return wine_pthread_create (thread_id, attr, function, arg); -#else - return pthread_create (thread_id, attr, function, arg); -#endif -} - void PBD::notify_event_loops_about_thread_creation (pthread_t thread, const std::string& emitting_thread_name, int request_count) { @@ -140,7 +127,7 @@ pthread_create_and_store (string name, pthread_t* thread, void* (*start_routine) ThreadStartWithName* ts = new ThreadStartWithName (start_routine, arg, name); - if ((ret = thread_creator (thread, &default_attr, fake_thread_start, ts)) == 0) { + if ((ret = pthread_create (thread, &default_attr, fake_thread_start, ts)) == 0) { pthread_mutex_lock (&thread_map_lock); all_threads.push_back (*thread); pthread_mutex_unlock (&thread_map_lock); diff --git a/luasession/wscript b/luasession/wscript index d7d599bcf3..076e8d81ec 100755 --- a/luasession/wscript +++ b/luasession/wscript @@ -30,9 +30,6 @@ def build(bld): VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR']) if not bld.is_defined('HAVE_READLINE'): return; - # no wine - if bld.is_defined('WINDOWS_VST_SUPPORT') and bld.env['build_target'] != 'mingw': - return # commandline luasession wrapper script if bld.env['build_target'] != 'mingw': diff --git a/session_utils/wscript b/session_utils/wscript index 7e20cb1d8b..2c2d158661 100644 --- a/session_utils/wscript +++ b/session_utils/wscript @@ -21,10 +21,7 @@ def configure(conf): print ('session-utils depend on the dummy backend.') autowaf.display_msg(conf, 'build session-utils', 'no') return - # no wine - if Options.options.windows_vst and Options.options.dist_target != 'mingw': - autowaf.display_msg(conf, 'build session-utils', 'no') - return + autowaf.display_msg(conf, 'build session-utils', 'yes') conf.load('misc') conf.load('compiler_cxx') @@ -79,9 +76,6 @@ def build(bld): # session-utils depend on the dummy backend if not "dummy" in bld.env['BACKENDS']: return - # no wine - if bld.is_defined('WINDOWS_VST_SUPPORT') and bld.env['build_target'] != 'mingw': - return pgmprefix = bld.env['PROGRAM_NAME'].lower() + str(bld.env['MAJOR']) diff --git a/tools/linux_packaging/build b/tools/linux_packaging/build index 73ecdbec3c..a21d856a2c 100755 --- a/tools/linux_packaging/build +++ b/tools/linux_packaging/build @@ -32,6 +32,7 @@ VENDOR=Ardour ; EXENAME=ardour GCC5ABI=false USEWINE=false +WINEEXE= BUILDTYPE="" NOSTRIP="libsuil|libserd|libsord|liblilv|libsratom|liblrdf|libardour|libpbd|libevoral" @@ -258,15 +259,6 @@ fi echo export 'PATH="/usr/local/bin:/opt/bin:$PATH"' >> $ENVIRONMENT -# create startup helper script -if test -d $BUILD_ROOT/vst; then - WINEEXE=wine - USEWINE=true - echo export INSTALL_DIR >> $ENVIRONMENT -else - WINEEXE= -fi - sed -e "/^%ENV%/r $ENVIRONMENT" -e '/^%ENV%/d' -e 's/%VER%/'"${release_version}"'/;s/%EXENAME%/'"${EXENAME}"'/;s/%WINE%/'"$WINEEXE"'/' < ardour.sh.in > $APPBIN/${EXENAME}${major_version} rm $ENVIRONMENT && chmod 775 $APPBIN/${EXENAME}${major_version} diff --git a/vst/ardevst b/vst/ardevst deleted file mode 100755 index 827c38c180..0000000000 --- a/vst/ardevst +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -TOP=`dirname "$0"`/.. -. $TOP/build/gtk2_ardour/ardev_common_waf.sh -export LD_LIBRARY_PATH=$libs/../gtk2_ardour:$LD_LIBRARY_PATH -exec wine $libs/../gtk2_ardour/ardour-$ARDOURVERSION-vst.exe.so "$@" diff --git a/vst/ardourvst.in b/vst/ardourvst.in deleted file mode 100644 index 639acb4b3f..0000000000 --- a/vst/ardourvst.in +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# -# Running Ardour requires these variables to be set -# - -export ARDOUR_DATA_PATH=@DATADIR@ -export ARDOUR_CONFIG_PATH=@CONFDIR@ -export ARDOUR_DLL_PATH=@LIBDIR@ - -export VAMP_PATH=@LIBDIR@/vamp${VAMP_PATH:+:$VAMP_PATH} -export GTK_PATH=@LIBDIR@${GTK_PATH:+:$GTK_PATH} -export LD_LIBRARY_PATH=@LIBDIR@${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} - -# NSM needs a path to this script -export ARDOUR_SELF="$0" - -exec wine @LIBDIR@/ardour-@VERSION@-vst.exe.so "$@" diff --git a/vst/winmain.c b/vst/winmain.c deleted file mode 100644 index 18c508ed52..0000000000 --- a/vst/winmain.c +++ /dev/null @@ -1,7 +0,0 @@ -extern int ardour_main(int argc, char* argv[]); - -int -main (int argc, char* argv[]) -{ - return ardour_main(argc, argv); -} diff --git a/wscript b/wscript index c4ee09b052..f4edec444e 100644 --- a/wscript +++ b/wscript @@ -894,8 +894,10 @@ def options(opt): help='Compile with -arch arm64 (macOS ONLY)') opt.add_option('--versioned', action='store_true', default=False, dest='versioned', help='Add revision information to executable name inside the build directory') - opt.add_option('--windows-vst', action='store_true', default=False, dest='windows_vst', + opt.add_option('--windows-vst', action='store_true', default=True, dest='windows_vst', help='Compile with support for Windows VST') + opt.add_option('--no-windows-vst', action='store_false', dest='windows_vst', + help='Compile without support for Windows VST') opt.add_option('--windows-key', type='string', action='store', dest='windows_key', default='Mod4><\'') @@ -905,8 +907,6 @@ def options(opt): help='additional include directory where header files can be found (split multiples with commas)') opt.add_option('--also-libdir', type='string', action='store', dest='also_libdir', default='', help='additional include directory where shared libraries can be found (split multiples with commas)') - opt.add_option('--wine-include', type='string', action='store', dest='wine_include', default='/usr/include/wine/windows', - help='directory where Wine\'s Windows header files can be found') opt.add_option('--noconfirm', action='store_true', default=False, dest='noconfirm', help='Do not ask questions that require confirmation during the build') opt.add_option('--cxx11', action='store_true', default=False, dest='cxx11', @@ -1289,12 +1289,11 @@ int main () { return 0; } #if opts.tranzport: # conf.env['TRANZPORT'] = 1 if opts.windows_vst: - conf.define('WINDOWS_VST_SUPPORT', 1) - conf.env['WINDOWS_VST_SUPPORT'] = True - if not Options.options.dist_target == 'mingw': - conf.env.append_value('CFLAGS', '-I' + Options.options.wine_include) - conf.env.append_value('CXXFLAGS', '-I' + Options.options.wine_include) - autowaf.check_header(conf, 'cxx', 'windows.h', mandatory = True) + if Options.options.dist_target == 'mingw': + conf.define('WINDOWS_VST_SUPPORT', 1) + conf.env['WINDOWS_VST_SUPPORT'] = True + else: + conf.env['WINDOWS_VST_SUPPORT'] = False if opts.lxvst: if sys.platform == 'darwin': conf.env['LXVST_SUPPORT'] = False @@ -1468,7 +1467,7 @@ const char* const ardour_config_info = "\\n\\ write_config_text('Libjack linking', conf.env['libjack_link']) write_config_text('Libjack metadata', conf.is_defined ('HAVE_JACK_METADATA')) write_config_text('Lua Binding Doc', conf.is_defined('LUABINDINGDOC')) - write_config_text('Lua Commandline Tool', conf.is_defined('HAVE_READLINE') and not (conf.is_defined('WINDOWS_VST_SUPPORT') and conf.env['build_target'] != 'mingw')) + write_config_text('Lua Commandline Tool', conf.is_defined('HAVE_READLINE')) write_config_text('LV2 UI embedding', conf.is_defined('HAVE_SUIL')) write_config_text('LV2 support', conf.is_defined('LV2_SUPPORT')) write_config_text('LV2 extensions', conf.is_defined('LV2_EXTENDED')) @@ -1489,7 +1488,7 @@ const char* const ardour_config_info = "\\n\\ write_config_text('Unit tests', conf.env['BUILD_TESTS']) write_config_text('Use LLD linker', opts.use_lld) write_config_text('VST3 support', conf.is_defined('VST3_SUPPORT')) - write_config_text('Windows VST support', opts.windows_vst) + write_config_text('Windows VST support', conf.is_defined('WINDOWS_VST_SUPPORT')) write_config_text('Wiimote support', conf.is_defined('BUILD_WIIMOTE')) write_config_text('Windows key', opts.windows_key) config_text.write("\\n\\\n")