remove empty editor_scrub.cc source file
[ardour.git] / gtk2_ardour / wscript
1 #!/usr/bin/env python
2 from waflib.extras import autowaf as autowaf
3 from waflib import Options, TaskGen
4 import waflib.Logs as Logs, waflib.Utils as Utils
5 import os
6 import sys
7 import re
8 import time
9 from waflib.Task import Task
10
11 # Version of this package (even if built as a child)
12 MAJOR = '3'
13 MINOR = '0'
14 MICRO = '0'
15 GTK2_ARDOUR_VERSION = "%s.%s.%s" % (MAJOR, MINOR, MICRO)
16
17 # Variables for 'waf dist'
18 APPNAME = 'gtk2_ardour3'
19 VERSION = GTK2_ARDOUR_VERSION
20 I18N_PACKAGE = 'gtk2_ardour3'
21
22 # Mandatory variables
23 top = '.'
24 out = 'build'
25
26 path_prefix = 'gtk2_ardour/'
27
28 gtk2_ardour_sources = [
29         'about.cc',
30         'actions.cc',
31         'add_route_dialog.cc',
32         'ambiguous_file_dialog.cc',
33         'analysis_window.cc',
34         'ardour_button.cc',
35         'ardour_dialog.cc',
36         'ardour_ui.cc',
37         'ardour_ui2.cc',
38         'ardour_ui_dependents.cc',
39         'ardour_ui_dialogs.cc',
40         'ardour_ui_ed.cc',
41         'ardour_ui_mixer.cc',
42         'ardour_ui_options.cc',
43         'ardour_window.cc',
44         'audio_clock.cc',
45         'audio_region_editor.cc',
46         'audio_region_view.cc',
47         'audio_streamview.cc',
48         'audio_time_axis.cc',
49         'automation_controller.cc',
50         'automation_line.cc',
51         'automation_region_view.cc',
52         'automation_streamview.cc',
53         'automation_time_axis.cc',
54         'axis_view.cc',
55         'bundle_manager.cc',
56         'button_joiner.cc',
57         'canvas-flag.cc',
58         'canvas-hit.cc',
59         'canvas-note-event.cc',
60         'canvas-note.cc',
61         'canvas_patch_change.cc',
62         'canvas-simpleline.c',
63         'canvas-simplerect.c',
64         'canvas-sysex.cc',
65         'canvas-waveview.c',
66         'clock_group.cc',
67         'configinfo.cc',
68         'control_point.cc',
69         'control_point_dialog.cc',
70         'curvetest.cc',
71         'debug.cc',
72         'diamond.cc',
73         'edit_note_dialog.cc',
74         'editing.cc',
75         'editor.cc',
76         'editor_actions.cc',
77         'editor_audio_import.cc',
78         'editor_audiotrack.cc',
79         'editor_canvas.cc',
80         'editor_canvas_events.cc',
81         'editor_component.cc',
82         'editor_cursors.cc',
83         'editor_drag.cc',
84         'editor_route_groups.cc',
85         'editor_export_audio.cc',
86         'editor_group_tabs.cc',
87         'editor_keys.cc',
88         'editor_locations.cc',
89         'editor_markers.cc',
90         'editor_mixer.cc',
91         'editor_mouse.cc',
92         'editor_ops.cc',
93         'editor_regions.cc',
94         'editor_routes.cc',
95         'editor_rulers.cc',
96         'editor_selection.cc',
97         'editor_snapshots.cc',
98         'editor_summary.cc',
99         'editor_tempodisplay.cc',
100         'editor_timefx.cc',
101         'engine_dialog.cc',
102         'enums.cc',
103         'export_channel_selector.cc',
104         'export_dialog.cc',
105         'export_file_notebook.cc',
106         'export_filename_selector.cc',
107         'export_format_dialog.cc',
108         'export_format_selector.cc',
109         'export_preset_selector.cc',
110         'export_timespan_selector.cc',
111         'fft.cc',
112         'fft_graph.cc',
113         'fft_result.cc',
114         'gain_meter.cc',
115         'generic_pluginui.cc',
116         'ghostregion.cc',
117         'global_port_matrix.cc',
118         'group_tabs.cc',
119         'gtk-custom-hruler.c',
120         'gtk-custom-ruler.c',
121         'gtk_pianokeyboard.c',
122         'gui_object.cc',
123         'insert_time_dialog.cc',
124         'interthread_progress_window.cc',
125         'io_selector.cc',
126         'keyboard.cc',
127         'keyeditor.cc',
128         'latency_gui.cc',
129         'led.cc',
130         'level_meter.cc',
131         'lineset.cc',
132         'location_ui.cc',
133         'main.cc',
134         'main_clock.cc',
135         'marker.cc',
136         'midi_automation_line.cc',
137         'midi_channel_dialog.cc',
138         'midi_channel_selector.cc',
139         'midi_cut_buffer.cc',
140         'midi_export_dialog.cc',
141         'midi_list_editor.cc',
142         'midi_port_dialog.cc',
143         'midi_region_view.cc',
144         'midi_scroomer.cc',
145         'midi_selection.cc',
146         'midi_streamview.cc',
147         'midi_time_axis.cc',
148         'midi_tracer.cc',
149         'midi_velocity_dialog.cc',
150         'missing_file_dialog.cc',
151         'missing_plugin_dialog.cc',
152         'mixer_actor.cc',
153         'mixer_group_tabs.cc',
154         'mixer_strip.cc',
155         'mixer_ui.cc',
156         'monitor_section.cc',
157         'mono_panner.cc',
158         'mono_panner_editor.cc',
159         'mouse_cursors.cc',
160         'nag.cc',
161         'new_plugin_preset_dialog.cc',
162         'normalize_dialog.cc',
163         'note_player.cc',
164         'option_editor.cc',
165         'opts.cc',
166         'panner2d.cc',
167         'panner_editor.cc',
168         'panner_interface.cc',
169         'panner_ui.cc',
170         'piano_roll_header.cc',
171         'playlist_selector.cc',
172         'plugin_eq_gui.cc',
173         'plugin_selector.cc',
174         'plugin_ui.cc',
175         'port_group.cc',
176         'port_insert_ui.cc',
177         'port_matrix.cc',
178         'port_matrix_body.cc',
179         'port_matrix_column_labels.cc',
180         'port_matrix_component.cc',
181         'port_matrix_grid.cc',
182         'port_matrix_labels.cc',
183         'port_matrix_row_labels.cc',
184         'processor_box.cc',
185         'patch_change_dialog.cc',
186         'progress_reporter.cc',
187         'prompter.cc',
188         'public_editor.cc',
189         'quantize_dialog.cc',
190         'rc_option_editor.cc',
191         'region_editor.cc',
192         'region_gain_line.cc',
193         'region_layering_order_editor.cc',
194         'region_selection.cc',
195         'region_view.cc',
196         'return_ui.cc',
197         'rhythm_ferret.cc',
198         'route_group_dialog.cc',
199         'route_group_menu.cc',
200         'route_params_ui.cc',
201         'route_processor_selection.cc',
202         'route_time_axis.cc',
203         'route_ui.cc',
204         'search_path_option.cc',
205         'selection.cc',
206         'send_ui.cc',
207         'session_import_dialog.cc',
208         'session_metadata_dialog.cc',
209         'session_option_editor.cc',
210         'sfdb_ui.cc',
211         'shuttle_control.cc',
212         'simpleline.cc',
213         'simplerect.cc',
214         'splash.cc',
215         'speaker_dialog.cc',
216         'startup.cc',
217         'step_editor.cc',
218         'step_entry.cc',
219         'stereo_panner.cc',
220         'stereo_panner_editor.cc',
221         'streamview.cc',
222         'strip_silence_dialog.cc',
223         'tape_region_view.cc',
224         'tempo_dialog.cc',
225         'tempo_lines.cc',
226         'theme_manager.cc',
227         'time_axis_view.cc',
228         'time_axis_view_item.cc',
229         'time_fx_dialog.cc',
230         'time_info_box.cc',
231         'time_selection.cc',
232         'track_selection.cc',
233         'track_view_list.cc',
234         'transpose_dialog.cc',
235         'ui_config.cc',
236         'utils.cc',
237         'verbose_cursor.cc',
238         'version.cc',
239         'visibility_group.cc',
240         'volume_controller.cc',
241         'waveview.cc',
242         'window_proxy.cc'
243 ]
244
245 def options(opt):
246     autowaf.set_options(opt)
247
248 def configure(conf):
249     conf.load('misc')
250     conf.load('compiler_cxx')
251     autowaf.build_version_files(
252         path_prefix + 'version.h',
253         path_prefix + 'version.cc',
254         'gtk2_ardour', MAJOR, MINOR, MICRO)
255     autowaf.configure(conf)
256
257     if re.search ("linux", sys.platform) != None:
258         autowaf.check_pkg(conf, 'alsa', uselib_store='ALSA')
259
260     # TODO: Insert a sanity check for on OS X to ensure CoreAudio is present
261
262     autowaf.check_pkg(conf, 'flac', uselib_store='FLAC',
263                       atleast_version='1.2.1')
264     autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD',
265                       atleast_version='2.10.1')
266     autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK',
267                       atleast_version='2.18')
268     autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM',
269                       atleast_version='2.18')
270     autowaf.check_pkg(conf, 'libgnomecanvas-2.0',
271                       uselib_store='GNOMECANVAS', atleast_version='2.30')
272     autowaf.check_pkg(conf, 'libgnomecanvasmm-2.6',
273                       uselib_store='GNOMECANVASMM', atleast_version='2.16')
274     autowaf.check_pkg(conf, 'ogg', uselib_store='OGG', atleast_version='1.1.2')
275     autowaf.check_pkg(conf, 'x11', uselib_store='X11', atleast_version='1.1', mandatory=False)
276
277     conf.write_config_header('gtk2ardour-config.h', remove=False)
278
279     # Boost headers
280     autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp')
281     autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp')
282
283 # Add a waf `feature' to allow compilation of things using winegcc
284 from waflib.TaskGen import feature
285 @feature("wine")
286 def set_winegcc(self):
287     self.env.LINK_CXX = self.env.LINK_CC = 'wineg++'
288     self.env.CC = 'winegcc'
289
290 def _doPyp(infileName, deps = False):
291     outStr = ''
292     out = []
293     re_spaces = re.compile("\s+")
294
295     if infileName == '-':
296         fd = sys.stdin
297     else:
298         fd = open(infileName)
299     inLines = fd.readlines()
300     if fd != sys.stdin:
301         fd.close()
302         
303
304     for line in inLines:
305         bits = re_spaces.split(line)
306         if bits[0] == '##include':
307             incName = bits[1]
308             if (deps):
309                 out += [ incName ]
310             else:
311                 # assume included file comes from same place as source file
312                 incName = os.path.join (os.path.dirname (infileName), incName);
313                 outStr += _doPyp(incName)
314         else:
315             if not deps:
316                 outStr += line
317
318     # done
319     if deps:
320         return out
321     else:
322         return outStr
323
324 def include_processor(task):
325     infileName = task.inputs[0].srcpath()
326     outfileName = os.path.join(out, task.outputs[0].bldpath())
327     fdOut = open (outfileName, "w")
328     fdOut.write (_doPyp(infileName))
329     fdOut.close ()
330
331
332 def build_color_scheme(path, prefix):
333     f = open (path, 'r')
334     color_scheme = ''
335     for line in f:
336         if re.search ('^#@color', line):
337             line.strip() # remove newline
338             words = line.split()
339             if len(color_scheme):
340                 color_scheme += ';'
341             color_scheme += prefix
342             color_scheme += '_'
343             color_scheme += words[1]
344             color_scheme += ':'
345             color_scheme += words[2]
346     f.close()
347     return color_scheme
348
349 def build(bld):
350
351     if bld.is_defined('WINDOWS_VST_SUPPORT'):
352         # If we require VST support we build a stub main() and the FST library
353         # here using winegcc, and link it to the GTK front-end library
354         obj = bld(features = 'cxx c cxxprogram wine')
355         obj.source = '''
356                 ../libs/fst/fst.c
357                 ../libs/fst/fstinfofile.c
358                 ../libs/fst/vsti.c
359                 ../libs/fst/vstwin.c
360                 ../vst/winmain.c
361         '''
362         obj.uselib = 'ALSA'
363         obj.use          = [ 'libpbd',
364                              'libmidipp',
365                              'libtaglib',
366                              'libardour',
367                              'libardour_cp',
368                              'libgtk2_ardour',
369                              'libgtkmm2ext',
370                              'libtaglib' ]
371         obj.target = 'ardour-3.0-vst.exe.so'
372         obj.includes  = [ '../libs/fst', '.' ]
373         obj.linkflags = ['-mwindows', '-Wl,--export-dynamic', '-lpthread']
374         obj.defines = ['_POSIX_SOURCE', 'USE_WS_PREFIX']
375         obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
376         # end of the wine executable
377
378         # now the shared library containing the GTK GUI for ardour
379         obj = bld (features = 'cxx c cxxshlib')
380         obj.source    = gtk2_ardour_sources
381         obj.includes  = [ '../libs/fst', '.' ]
382         obj.name      = 'libgtk2_ardour'
383         obj.target    = 'gtk2_ardour'
384     else:
385         # just the normal executable version of the GTK GUI
386         obj = bld(features = 'cxx c cxxprogram')
387         obj.source    = gtk2_ardour_sources
388         obj.target = 'ardour-3.0'
389         obj.includes = ['.']
390
391     # continue with setup of obj, which could be a shared library
392     # or an executable.
393
394     obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
395
396     obj.uselib       = 'UUID FLAC GLIBMM GTHREAD GTK OGG ALSA CURL DL'
397     obj.uselib       += ' GTKMM GNOMECANVASMM GNOMECANVAS '
398     obj.uselib       += ' AUDIOUNITS OSX GTKOSX '
399     obj.use          = [ 'libpbd',
400                          'libmidipp',
401                          'libtaglib',
402                          'libardour',
403                          'libardour_cp',
404                          'libgtkmm2ext',
405                          'libtaglib' ]
406     if sys.platform == 'darwin':
407         obj.use += ' libappleutility'
408     obj.defines     = [
409         'PACKAGE="' + I18N_PACKAGE + '"',
410         'VERSIONSTRING="' + bld.env['VERSION'] + '"',
411         'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
412         'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
413         'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
414         'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"'
415         ]
416     obj.includes += ['../libs']
417
418     if bld.is_defined('HAVE_SUIL'):
419         obj.source += [ 'lv2_plugin_ui.cc' ]
420         obj.use += [ 'SUIL' ]
421
422     if bld.is_defined('FREESOUND'):
423         obj.source +=  [ 'sfdb_freesound_mootcher.cc' ]
424         obj.defines += [ 'FREESOUND' ]
425
426     if bld.is_defined('NEED_INTL'):
427         obj.linkflags = ' -lintl'
428
429     if bld.is_defined('WINDOWS_VST_SUPPORT'):
430         obj.source += [ 'windows_vst_plugin_ui.cc' ]
431         obj.defines += [ 'WINDOWS_VST_SUPPORT' ]
432         obj.use += [ 'X11' ]
433         
434     if bld.is_defined('LXVST_SUPPORT'):
435         obj.source += [ 'linux_vst_gui_support.cc', 'lxvst_plugin_ui.cc' ]
436         obj.defines += [ 'LXVST_SUPPORT' ]
437         obj.use += [ 'X11' ]
438
439     if bld.is_defined('WINDOWS_VST_SUPPORT') or bld.is_defined('LXVST_SUPPORT'):
440         obj.source += [ 'vst_plugin_ui.cc' ]
441         
442     if bld.is_defined('PHONE_HOME'):
443         obj.defines += [ 'PHONE_HOME' ]
444
445     if bld.is_defined('HAVE_COREAUDIO'):
446         TaskGen.task_gen.mappings['.mm'] = TaskGen.task_gen.mappings['.cc']
447         obj.source += [ 'cocoacarbon.mm' ]
448         obj.use += ' libappleutility '
449
450     if bld.is_defined('AUDIOUNIT_SUPPORT'):
451         obj.source += [ 'au_pluginui.mm' ]
452
453     # Wrappers
454
455     wrapper_subst_dict = {
456             'INSTALL_PREFIX' : bld.env['PREFIX'],
457             'LIBDIR'         : os.path.normpath(bld.env['LIBDIR']),
458             'DATADIR'        : os.path.normpath(bld.env['DATADIR']),
459             'SYSCONFDIR'     : os.path.normpath(bld.env['SYSCONFDIR']),
460             'LIBS'           : 'build/libs',
461             'VERSION'        : '3.0',
462             'EXECUTABLE'     : 'build/gtk2_ardour/ardour-3.0'
463     }
464
465     def set_subst_dict(obj, dict):
466         for i in dict:
467             setattr(obj, i, dict[i])
468
469     obj              = bld(features = 'subst', rule= 'chmod 0755 ${TGT}')
470     obj.source       = 'ardev_common.sh.in'
471     obj.target       = 'ardev_common_waf.sh'
472     obj.chmod        = Utils.O755
473     obj.dict         = wrapper_subst_dict
474     set_subst_dict(obj, wrapper_subst_dict)
475
476     obj              = bld(features = 'subst')
477     obj.source       = 'ardour.sh.in'
478     obj.target       = 'ardour3'
479     obj.chmod        = Utils.O755
480     obj.dict         = wrapper_subst_dict
481     obj.install_path = bld.env['BINDIR']
482     set_subst_dict(obj, wrapper_subst_dict)
483
484     if bld.is_defined('WINDOWS_VST_SUPPORT'):
485         obj              = bld(features = 'subst')
486         obj.source       = '../vst/ardourvst.in'
487         obj.target       = 'ardourvst3'
488         obj.chmod        = Utils.O755
489         obj.dict         = wrapper_subst_dict
490         obj.install_path = bld.env['BINDIR']
491         set_subst_dict(obj, wrapper_subst_dict)
492
493     # Font configuration
494
495     dark_rc_subst_dict = {}
496     light_rc_subst_dict = {}
497     font_sizes      = {}
498     base_font       = ""
499
500     # Set up font sizes
501     if bld.is_defined('GTKOSX'): # OS X fonts
502         basefont = ""
503         font_sizes = {
504                 'SMALLER' : '9',
505                 'SMALL' : '10',
506                 'NORMAL' : '11',
507                 'BIG' : '12',
508                 'BIGGER' : '14',
509                 'LARGE' : '18',
510                 'LARGER' : '28',
511                 'HUGER' : '36',
512                 'MASSIVE' : '60',
513         }
514         font_names = {
515                 'BOLD_MONOSPACE' : 'monospace'
516         }
517     else: # Linux/X11 fonts
518         basefont = '' # unspecified - use system defaults
519         font_sizes = {
520                 'SMALLER' : '8',
521                 'SMALL' : '9',
522                 'NORMAL' : '10',
523                 'BIG' : '14',
524                 'BIGGER' : '16',
525                 'LARGE' : '18',
526                 'LARGER' : '24',
527                 'HUGER' : '34',
528                 'MASSIVE' : '60',
529         }
530         font_names = {
531                 'BOLD_MONOSPACE' : 'bold monospace'
532         }
533
534     # Set up font substitution dictionary
535     # @FONT_XXXX@
536     for style in ['', 'BOLD', 'ITALIC']:
537         for sizename,points in iter(font_sizes.items()):
538             if (len (style)):
539                 key = "_".join (['FONT',style,sizename])
540                 fontstyle = " ".join ([basefont,style.lower(),points])
541             else:
542                 key = "_".join (['FONT',sizename])
543                 fontstyle = " ".join ([basefont,points])
544
545             dark_rc_subst_dict[key] = fontstyle
546             light_rc_subst_dict[key] = fontstyle
547
548     # @FONT_SIZE_XXXX@
549     for sizename,points in iter(font_sizes.items()):
550             key = "_".join (['FONT_SIZE',sizename])
551             dark_rc_subst_dict[key] = points
552             light_rc_subst_dict[key] = points
553
554     # various font names, eg @BOLD_MONOSPACE@
555     for font_sym,text in iter(font_names.items()):
556         key = font_sym
557         dark_rc_subst_dict[key] = text
558         light_rc_subst_dict[key] = text
559
560     # RC files
561     dark_rc_subst_dict['COLOR_SCHEME'] = build_color_scheme(
562         'gtk2_ardour/ardour3_ui_dark.rc.in', 'ARDOUR_DARK')
563     dark_rc_subst_dict['COLPREFIX'] = 'ARDOUR_DARK'
564     light_rc_subst_dict['COLOR_SCHEME'] = build_color_scheme(
565         'gtk2_ardour/ardour3_ui_light.rc.in', 'ARDOUR_LIGHT')
566     light_rc_subst_dict['COLPREFIX'] = 'ARDOUR_LIGHT'
567
568     obj              = bld(features = 'subst')
569     obj.source       = [ 'ardour3_ui_dark.rc.in' ]
570     obj.target       = 'ardour3_ui_dark.rc.pre'
571     obj.install_path = None
572     set_subst_dict(obj, dark_rc_subst_dict)
573
574     obj              = bld(features = 'subst')
575     obj.source       = [ 'ardour3_ui_light.rc.in' ]
576     obj.target       = 'ardour3_ui_light.rc.pre'
577     obj.install_path = None
578     set_subst_dict(obj, light_rc_subst_dict)
579
580     obj              = bld(features = 'subst')
581     obj.source       = [ 'ardour3_styles.rc.in' ]
582     obj.target       = 'ardour3_dark_styles.rc'
583     obj.install_path = None
584     set_subst_dict(obj, dark_rc_subst_dict)
585
586     obj              = bld(features = 'subst')
587     obj.source       = [ 'ardour3_styles.rc.in' ]
588     obj.target       = 'ardour3_light_styles.rc'
589     obj.install_path = None
590     set_subst_dict(obj, light_rc_subst_dict)
591
592     obj              = bld(features = 'subst')
593     obj.source       = [ 'ardour3_fonts.rc.in' ]
594     obj.target       = 'ardour3_dark_fonts.rc'
595     obj.install_path = None
596     set_subst_dict(obj, dark_rc_subst_dict)
597
598     obj              = bld(features = 'subst')
599     obj.source       = [ 'ardour3_fonts.rc.in' ]
600     obj.target       = 'ardour3_light_fonts.rc'
601     obj.install_path = None
602     set_subst_dict(obj, light_rc_subst_dict)
603
604     obj              = bld(rule = 'cp ${SRC} ${TGT}')
605     obj.source       = [ 'ardour3_widget_list.rc' ]
606     obj.target       = 'ardour3_widgets.rc'
607     obj.install_path = None
608
609     obj = bld (rule = include_processor)
610     obj.source = [ 'ardour3_ui_dark.rc.pre' ]
611     # find and add all ##include dependencies as sources
612     obj.source += _doPyp (bld.path.find_resource ('ardour3_ui_dark.rc.in').srcpath(), True)
613     obj.target = 'ardour3_ui_dark.rc'
614     obj.install_path = '${SYSCONFDIR}/ardour3'
615
616     obj = bld (rule = include_processor)
617     obj.source = [ 'ardour3_ui_light.rc.pre' ]
618     # find and add all ##include dependencies as sources
619     obj.source += _doPyp (bld.path.find_resource ('ardour3_ui_light.rc.in').srcpath(), True)
620     obj.target = 'ardour3_ui_light.rc'
621     obj.install_path = '${SYSCONFDIR}/ardour3'
622
623     # Menus
624     menus_argv = []
625     if bld.is_defined('GTKOSX'):
626         menus_argv = [ '-E', '-P', '-DGTKOSX' ]
627     else:
628         menus_argv = [ '-E', '-P' ]
629     obj = bld(features = 'command-output')
630     obj.command = 'cpp'
631     obj.command_is_external = True
632     obj.no_inputs = True
633     obj.argv = menus_argv
634     obj.stdin = 'ardour.menus.in'
635     obj.stdout = 'ardour.menus'
636     bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'),
637                       'ardour.menus')
638
639     # Keybindings
640
641     # 'SAE-de-keypad', 'SAE-de-nokeypad', 'SAE-us-keypad',
642     # 'SAE-us-nokeypad', 'ergonomic-us'
643
644     for b in [ 'mnemonic-us' ] :
645         obj = bld(
646             target = b + '.bindings',
647             source = b + '.bindings.in',
648             rule = '../tools/fmt-bindings --platform="%s" --winkey="%s" --accelmap <${SRC} >${TGT}' % (sys.platform, bld.env['WINDOWS_KEY'] )
649             )
650         obj.install_path = os.path.join(bld.env['SYSCONFDIR'], 'ardour3')
651
652     # not modified at present
653     bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'),
654                       'step_editing.bindings')
655     bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'),
656                       'mixer.bindings')
657
658     # Icons/Images
659     bld.install_files('${DATADIR}/ardour3/icons', bld.path.ant_glob('icons/*.png'))
660     bld.install_files('${DATADIR}/ardour3/pixmaps', bld.path.ant_glob('pixmaps/*.xpm'))
661     bld.install_files('${DATADIR}/ardour3', 'splash.png')
662
663     # Default UI configuration
664     bld.install_files('${SYSCONFDIR}/ardour3', 'ardour3_ui_default.conf')
665
666     # Default export stuff
667     bld.install_files('${SYSCONFDIR}/ardour3/export', bld.path.ant_glob('export/*.format'))
668
669     # i18n
670     if bld.is_defined('ENABLE_NLS'):
671         mo_files = bld.path.ant_glob('po/*.mo')
672         for mo in mo_files:
673             lang = os.path.basename(mo.srcpath()).replace('.mo', '')
674             bld.install_as(os.path.join(bld.env['PREFIX'], 'share', 'locale',
675                                         lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
676                            mo)
677
678 def i18n(bld):
679     autowaf.build_i18n(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
680                        'Paul Davis')
681
682 def i18n_pot(bld):
683     autowaf.build_i18n_pot(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
684                        'Paul Davis')
685
686 def i18n_po(bld):
687     autowaf.build_i18n_po(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
688                        'Paul Davis')
689
690 def i18n_mo(bld):
691     autowaf.build_i18n_mo(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
692                        'Paul Davis')