add OSC Lua bindings
[ardour.git] / gtk2_ardour / wscript
index e58c50c1a80d3dafd8cb683ccaf3c2a69b0f0e72..36223bd2cbdd0e9f0a41fc17803a178fb74da710 100644 (file)
@@ -97,6 +97,7 @@ gtk2_ardour_sources = [
         'export_format_dialog.cc',
         'export_format_selector.cc',
         'export_preset_selector.cc',
+        'export_report.cc',
         'export_timespan_selector.cc',
         'fft.cc',
         'fft_graph.cc',
@@ -121,6 +122,9 @@ gtk2_ardour_sources = [
         'led.cc',
         'level_meter.cc',
         'location_ui.cc',
+        'lua_script_manager.cc',
+        'luainstance.cc',
+        'luawindow.cc',
         'main.cc',
         'main_clock.cc',
         'marker.cc',
@@ -206,6 +210,7 @@ gtk2_ardour_sources = [
         'ruler_dialog.cc',
         'save_as_dialog.cc',
         'search_path_option.cc',
+        'script_selector.cc',
         'selection.cc',
         'selection_memento.cc',
         'send_ui.cc',
@@ -245,7 +250,6 @@ gtk2_ardour_sources = [
         'utils.cc',
         'verbose_cursor.cc',
         'visibility_group.cc',
-        'volume_controller.cc',
         'window_manager.cc',
 # video-timeline related sources:
         'video_image_frame.cc',
@@ -263,6 +267,11 @@ gtk2_ardour_sources = [
 ]
 
 def enoify (major, minor):
+    # Code names based on
+    # https://en.wikipedia.org/wiki/Brian_Eno_discography
+    #
+    # sort Studio albums + Collaborative albums + Compilation albums by Month/Year.
+    # (no Singles, no EPs, no Video Albums, no Production)
     if major == 3:
         return "\\n\\\"E-No\\\""
     elif major == 4:
@@ -280,6 +289,10 @@ def enoify (major, minor):
             return "\\n\\\"Another Green World\\\""
         elif minor == 6:
             return "\\n\\\"Evening Star\\\""
+        elif minor == 7:
+            return "\\n\\\"Cluster and Eno\\\""
+        elif minor == 8:
+            return "\\n\\\"Before and After Science\\\""
     return "\\\"\\\""
 
 def options(opt):
@@ -340,7 +353,7 @@ def _doPyp(infileName, deps = False):
     inLines = fd.readlines()
     if fd != sys.stdin:
         fd.close()
-        
+
 
     for line in inLines:
         bits = re_spaces.split(line)
@@ -427,6 +440,7 @@ def build(bld):
         obj.includes  = [ '../libs/fst', '.' ]
         obj.name      = 'libgtk2_ardour'
         obj.target    = 'gtk2_ardour'
+        obj.cflags  = [ '-fPIC' ]
 
     else:
         # just the normal executable version of the GTK GUI
@@ -465,13 +479,10 @@ def build(bld):
         ]
     obj.install_path = bld.env['DLLDIR']
     obj.linkflags    = ''
-    obj.uselib       = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD GTK OGG CURL DL'
-    obj.uselib       += ' GTKMM CANVAS FFTW3F'
-    obj.uselib       += ' AUDIOUNITS OSX GTKOSX LO '
-    obj.uselib       += ' TAGLIB '
+    obj.uselib       = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD GTK OGG CURL DL GTKMM CANVAS FFTW3F LO TAGLIB XML '
 
     if sys.platform == 'darwin':
-        obj.uselib += ' AUDIOUNITS OSX GTKOSX'
+        obj.uselib += ' AUDIOUNITS OSX '
         obj.use    += ' libappleutility'
         obj.source += [ 'cocoacarbon.mm', 'bundle_env_cocoa.cc' ]
     elif bld.env['build_target'] == 'mingw':
@@ -492,7 +503,7 @@ def build(bld):
         obj.use += [ 'SUIL' ]
 
     if bld.is_defined('HAVE_FFTW35F') and bld.env['build_target'] != 'mingw':
-        obj.linkflags += ' -lfftw3f_threads'
+        bld.env['LIB_FFTW3F'] += ['fftw3f_threads']
 
     if bld.is_defined('NEED_INTL'):
         obj.linkflags += ' -lintl'
@@ -502,7 +513,7 @@ def build(bld):
         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' ]
         obj.defines += [ 'LXVST_SUPPORT' ]
@@ -510,7 +521,7 @@ def build(bld):
 
     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' ]
 
@@ -568,7 +579,7 @@ def build(bld):
     base_font       = ""
 
     # Set up font sizes
-    if bld.is_defined('GTKOSX'): # OS X fonts
+    if sys.platform == 'darwin':
         basefont = ""
         font_sizes = {
                 'SMALLER' : '9',
@@ -581,9 +592,9 @@ def build(bld):
                 'HUGER' : '36',
                 'MASSIVE' : '60',
         }
-        
+
         # There is no acceptable monospace font available on older versions of OS X
-        # and no API on those versions to load TTF files that will work with 
+        # and no API on those versions to load TTF files that will work with
         # GTK/fontconfig/pango.
         #
         # In addition, the ArdourMono font gets clipped for some reason on OS X
@@ -623,9 +634,9 @@ def build(bld):
             else:
                 key = "_".join (['FONT',sizename])
                 fontstyle = " ".join ([basefont,points])
-                
+
             font_subst_dict[key] = fontstyle
-            
+
     # @FONT_SIZE_XXXX@
     for sizename,points in iter(font_sizes.items()):
             key = "_".join (['FONT_SIZE',sizename])
@@ -652,8 +663,8 @@ def build(bld):
 
     # Menus
     menus_argv = []
-    if bld.is_defined('GTKOSX'):
-        menus_argv = [ '-E', '-P', '-DGTKOSX' ]
+    if sys.platform == 'darwin':
+        menus_argv = [ '-E', '-P', '-D__APPLE__', '-' ]
     else:
         menus_argv = [ '-E', '-P' ]
 
@@ -705,25 +716,20 @@ def build(bld):
 
     # Keybindings
 
-    # 'SAE-de-keypad', 'SAE-de-nokeypad', 'SAE-us-keypad',
-    # 'SAE-us-nokeypad', 'ergonomic-us'
-
-    #
+    # NATIVE ARDOUR BINDING FILES
     # explicitly state the use of perl here so that it works on windows too
     # 
-    a_rule = 'perl ../tools/fmt-bindings --platform="%s" --winkey="%s" --accelmap <${SRC} >${TGT}' % (sys.platform, bld.env['WINDOWS_KEY'] )
-    for b in [ 'mnemonic-us' ] :
+    a_rule = 'perl ../tools/fmt-bindings --platform="%s" --winkey="%s" --accelmap ${SRC[0].abspath()} >${TGT}' % (sys.platform, bld.env['WINDOWS_KEY'] )
+    for b in [ 'ardour' ] :
         obj = bld(
-            target = b + '.bindings',
-            source = b + '.bindings.in',
+            target = b + '.keys',
+            source = [ b + '.keys.in', 'mixer.bindings', 'processor_box.bindings', 'step_editing.bindings', 'monitor.bindings' ],
             rule = a_rule
             )
         obj.install_path = bld.env['CONFDIR']
-
+        
     # not modified at present
     bld.install_files(bld.env['CONFDIR'], 'dark.colors')
-    bld.install_files(bld.env['CONFDIR'], 'step_editing.bindings')
-    bld.install_files(bld.env['CONFDIR'], 'mixer.bindings')
 
     # Icons/Images
     bld.install_files(os.path.join (bld.env['DATADIR'], 'icons'), bld.path.ant_glob('icons/*.png'))
@@ -760,7 +766,7 @@ def i18n(bld):
                            'Paul Davis')
         appdata_i18n_pot(bld)
         appdata_i18n_po(bld)
-        
+
 def i18n_pot(bld):
         I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
         autowaf.build_i18n_pot(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
@@ -772,7 +778,7 @@ def i18n_po(bld):
         autowaf.build_i18n_po(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
                               'Paul Davis')
         appdata_i18n_po(bld)
-        
+
 def i18n_mo(bld):
         I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
         autowaf.build_i18n_mo(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,