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