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