stupid hack to fix issues with OS X Carbon headers
[ardour.git] / gtk2_ardour / wscript
index 3ca85c0e4d9f27f38ef9f3153c3ab67dd57d106d..e12e0bf388dc1db48ffe61498977a6629dcef019 100644 (file)
@@ -15,8 +15,9 @@ MICRO = '0'
 GTK2_ARDOUR_VERSION = "%s.%s.%s" % (MAJOR, MINOR, MICRO)
 
 # Variables for 'waf dist'
-APPNAME = 'gtk2_ardour'
+APPNAME = 'gtk2_ardour3'
 VERSION = GTK2_ARDOUR_VERSION
+I18N_PACKAGE = 'gtk2_ardour3'
 
 # Mandatory variables
 top = '.'
@@ -40,6 +41,7 @@ gtk2_ardour_sources = [
         'ardour_ui_ed.cc',
         'ardour_ui_mixer.cc',
         'ardour_ui_options.cc',
+        'ardour_window.cc',
         'audio_clock.cc',
         'audio_region_editor.cc',
         'audio_region_view.cc',
@@ -52,7 +54,6 @@ gtk2_ardour_sources = [
         'automation_time_axis.cc',
         'axis_view.cc',
         'bundle_manager.cc',
-        'cairo_widget.cc',
         'canvas-flag.cc',
         'canvas-hit.cc',
         'canvas-note-event.cc',
@@ -143,6 +144,7 @@ gtk2_ardour_sources = [
         'midi_port_dialog.cc',
         'midi_region_view.cc',
         'midi_scroomer.cc',
+        'midi_selection.cc',
         'midi_streamview.cc',
         'midi_time_axis.cc',
         'midi_tracer.cc',
@@ -162,6 +164,7 @@ gtk2_ardour_sources = [
         'option_editor.cc',
         'opts.cc',
         'panner2d.cc',
+        'panner_interface.cc',
         'panner_ui.cc',
         'piano_roll_header.cc',
         'playlist_selector.cc',
@@ -267,7 +270,7 @@ def configure(conf):
     autowaf.check_pkg(conf, 'libgnomecanvasmm-2.6',
                       uselib_store='GNOMECANVASMM', atleast_version='2.16')
     autowaf.check_pkg(conf, 'ogg', uselib_store='OGG', atleast_version='1.1.2')
-    autowaf.check_pkg(conf, 'x11', uselib_store='X11', atleast_version='1.4', mandatory=False)
+    autowaf.check_pkg(conf, 'x11', uselib_store='X11', atleast_version='1.3', mandatory=False)
 
     conf.write_config_header('gtk2ardour-config.h', remove=False)
 
@@ -344,7 +347,7 @@ def build_color_scheme(path, prefix):
 def build(bld):
     # GTK front-end; if we're using VST we build this as a shared library,
     # otherwise it's a normal executabale
-    if bld.is_defined('VST_SUPPORT'):
+    if bld.is_defined('WINDOWS_VST_SUPPORT'):
         obj = bld(features = 'cxx c cxxshlib')
     else:
         obj = bld(features = 'cxx c cxxprogram')
@@ -353,7 +356,7 @@ def build(bld):
     obj.source       = gtk2_ardour_sources
     obj.name         = 'gtk2_ardour'
     obj.linkflags    = []
-    if bld.is_defined('VST_SUPPORT'):
+    if bld.is_defined('WINDOWS_VST_SUPPORT'):
         obj.target = 'gtk2_ardour'
         obj.includes += ['../libs/fst']
     else:
@@ -372,7 +375,7 @@ def build(bld):
     if sys.platform == 'darwin':
         obj.use += ' libappleutility'
     obj.defines     = [
-        'PACKAGE="gtk2_ardour"',
+        'PACKAGE="' + I18N_PACKAGE + '"',
         'VERSIONSTRING="' + bld.env['VERSION'] + '"',
         'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
         'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
@@ -389,26 +392,33 @@ def build(bld):
 
     if bld.is_defined('FREESOUND'):
         obj.source +=  [ 'sfdb_freesound_mootcher.cc' ]
+        obj.defines += [ 'FREESOUND' ]
 
-    if bld.is_defined('VST_SUPPORT'):
-        obj.source += [ 'vst_pluginui.cc' ]
-        obj.defines += [ 'VST_SUPPORT' ]
+    if bld.is_defined('WINDOWS_VST_SUPPORT'):
+        obj.source += [ 'windows_vst_plugin_ui.cc' ]
+        obj.defines += [ 'WINDOWS_VST_SUPPORT' ]
         obj.uselib += ' X11 '
 
     if bld.is_defined('LXVST_SUPPORT'):
-        obj.source += [ 'lxvst_pluginui.cc' ]
+        obj.source += [ 'linux_vst_gui_support.cc', 'lxvst_plugin_ui.cc' ]
         obj.defines += [ 'LXVST_SUPPORT' ]
         obj.uselib += ' X11 '
 
+    if bld.is_defined('WINDOWS_VST_SUPPORT') or bld.is_defined('LXVST_SUPPORT'):
+        obj.source += [ 'vst_plugin_ui.cc' ]
+        
     if bld.is_defined('PHONE_HOME'):
         obj.defines += [ 'PHONE_HOME' ]
 
     if bld.is_defined('HAVE_COREAUDIO'):
         TaskGen.task_gen.mappings['.mm'] = TaskGen.task_gen.mappings['.cc']
-        obj.source += [ 'cocoacarbon.mm', 'au_pluginui.mm' ]
+        obj.source += [ 'cocoacarbon.mm' ]
         obj.use += ' libappleutility '
 
-    if bld.is_defined('VST_SUPPORT'):
+    if bld.is_defined('AUDIOUNIT_SUPPORT'):
+        obj.source += [ 'au_pluginui.mm' ]
+
+    if bld.is_defined('WINDOWS_VST_SUPPORT'):
         # 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')
@@ -421,7 +431,7 @@ def build(bld):
         '''
         obj.includes = '../libs/fst'
         obj.target = 'ardour-3.0-vst'
-        obj.linkflags += ['-mwindows', '-Wl,--export-dynamic', '-lpthread']
+        obj.linkflags = ['-mwindows', '-Wl,--export-dynamic', '-lpthread']
         obj.defines = ['_POSIX_SOURCE', 'USE_WS_PREFIX']
         obj.uselib = 'ALSA'
         obj.use = ['libpbd','libmidipp','libtaglib','libardour',
@@ -631,9 +641,21 @@ def build(bld):
         for mo in mo_files:
             lang = os.path.basename(mo.srcpath()).replace('.mo', '')
             bld.install_as(os.path.join(bld.env['PREFIX'], 'share', 'locale',
-                                        lang, 'LC_MESSAGES', APPNAME + '.mo'),
+                                        lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
                            mo)
 
 def i18n(bld):
-    autowaf.build_i18n(bld, top, 'gtk2_ardour', APPNAME, gtk2_ardour_sources,
+    autowaf.build_i18n(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
+                       'Paul Davis')
+
+def i18n_pot(bld):
+    autowaf.build_i18n_pot(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
+                       'Paul Davis')
+
+def i18n_po(bld):
+    autowaf.build_i18n_po(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
+                       'Paul Davis')
+
+def i18n_mo(bld):
+    autowaf.build_i18n_mo(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
                        'Paul Davis')