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