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