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