add save_as dialog to build system
[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 # Mandatory variables
14 top = '.'
15 out = 'build'
16
17 path_prefix = 'gtk2_ardour/'
18
19 gtk2_ardour_sources = [
20         'about.cc',
21         'actions.cc',
22         'add_route_dialog.cc',
23         'ambiguous_file_dialog.cc',
24         'analysis_window.cc',
25         'ardour_button.cc',
26         'ardour_dialog.cc',
27         'ardour_display.cc',
28         'ardour_dropdown.cc',
29         'ardour_knob.cc',
30         'ardour_ui.cc',
31         'ardour_ui2.cc',
32         'ardour_ui_dependents.cc',
33         'ardour_ui_dialogs.cc',
34         'ardour_ui_ed.cc',
35         'ardour_ui_mixer.cc',
36         'ardour_ui_options.cc',
37         'ardour_window.cc',
38         'audio_clock.cc',
39         'audio_region_editor.cc',
40         'audio_region_view.cc',
41         'audio_streamview.cc',
42         'audio_time_axis.cc',
43         'automation_controller.cc',
44         'automation_line.cc',
45         'automation_region_view.cc',
46         'automation_streamview.cc',
47         'automation_time_axis.cc',
48         'axis_view.cc',
49         'big_clock_window.cc',
50         'bundle_manager.cc',
51         'button_joiner.cc',
52         'clock_group.cc',
53         'configinfo.cc',
54         'control_point.cc',
55         'control_point_dialog.cc',
56         'cursor_context.cc',
57         'curvetest.cc',
58         'debug.cc',
59         'edit_note_dialog.cc',
60         'editing.cc',
61         'editor.cc',
62         'editor_actions.cc',
63         'editor_audio_import.cc',
64         'editor_audiotrack.cc',
65         'editor_canvas.cc',
66         'editor_canvas_events.cc',
67         'editor_component.cc',
68         'editor_cursors.cc',
69         'editor_drag.cc',
70         'editor_route_groups.cc',
71         'editor_export_audio.cc',
72         'editor_group_tabs.cc',
73         'editor_keys.cc',
74         'editor_locations.cc',
75         'editor_markers.cc',
76         'editor_mixer.cc',
77         'editor_mouse.cc',
78         'editor_ops.cc',
79         'editor_regions.cc',
80         'editor_routes.cc',
81         'editor_rulers.cc',
82         'editor_selection.cc',
83         'editor_snapshots.cc',
84         'editor_summary.cc',
85         'editor_tempodisplay.cc',
86         'editor_timefx.cc',
87         'engine_dialog.cc',
88         'enums.cc',
89         'export_channel_selector.cc',
90         'export_dialog.cc',
91         'export_file_notebook.cc',
92         'export_filename_selector.cc',
93         'export_format_dialog.cc',
94         'export_format_selector.cc',
95         'export_preset_selector.cc',
96         'export_timespan_selector.cc',
97         'fft.cc',
98         'fft_graph.cc',
99         'fft_result.cc',
100         'floating_text_entry.cc',
101         'sfdb_freesound_mootcher.cc',
102         'gain_meter.cc',
103         'generic_pluginui.cc',
104         'ghostregion.cc',
105         'global_port_matrix.cc',
106         'group_tabs.cc',
107         'gtk_pianokeyboard.c',
108         'gui_object.cc',
109         'insert_time_dialog.cc',
110         'instrument_selector.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         'save_as_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         'timers.cc',
234         'track_selection.cc',
235         'track_view_list.cc',
236         'transform_dialog.cc',
237         'transpose_dialog.cc',
238         'ui_config.cc',
239         'utils.cc',
240         'verbose_cursor.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 enoify (major, minor):
260     if major == 3:
261         return "\\n\\\"E-No\\\""
262     elif major == 4:
263         if minor == 0:
264             return "\\n\\\"No Pussyfooting\\\""
265         elif minor == 1:
266             return "\\n\\\"Here Come the Warm Jets\\\""
267         elif minor == 2:
268             return "\\n\\\"Taking Tiger Mountain\\\""
269         elif minor == 3:
270             return "\\n\\\"Lady June's Linguistic Leprosy\\\""
271     return "\\\"\\\""
272
273 def options(opt):
274     autowaf.set_options(opt)
275
276 def configure(conf):
277     conf.load('misc')
278     conf.load('compiler_cxx')
279     autowaf.configure(conf)
280
281     # TODO: Insert a sanity check for on OS X to ensure CoreAudio is present
282
283     autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW3F',
284                       mandatory=True)
285     autowaf.check_pkg(conf, 'flac', uselib_store='FLAC',
286                       atleast_version='1.2.1')
287     autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD',
288                       atleast_version='2.10.1')
289     autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK',
290                       atleast_version='2.18')
291     autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM',
292                       atleast_version='2.18')
293     autowaf.check_pkg(conf, 'ogg', uselib_store='OGG', atleast_version='1.1.2')
294     autowaf.check_pkg(conf, 'x11', uselib_store='X11', atleast_version='1.1', mandatory=False)
295     autowaf.check_pkg(conf, 'fontconfig', uselib_store='FONTCONFIG')
296
297     conf.write_config_header('gtk2ardour-config.h', remove=False)
298
299     bak = conf.env['define_key']
300     conf.define('VERSIONSTRING', str (conf.env['VERSION']))
301     conf.define('CODENAME', enoify(int(conf.env['MAJOR']), int(conf.env['MINOR'])))
302     conf.env['define_key'] = ['VERSIONSTRING', 'CODENAME' ]
303     conf.write_config_header('gtk2ardour-version.h')
304     conf.env['define_key'] = bak;
305
306     # Boost headers
307     autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp')
308     autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp')
309
310 # Add a waf `feature' to allow compilation of things using winegcc
311 from waflib.TaskGen import feature
312 @feature("wine")
313 def set_winegcc(self):
314     self.env.LINK_CXX = self.env.LINK_CC = 'wineg++'
315     self.env.CC = 'winegcc'
316
317 def _doPyp(infileName, deps = False):
318     outStr = ''
319     out = []
320     re_spaces = re.compile("\s+")
321
322     if infileName == '-':
323         fd = sys.stdin
324     else:
325         fd = open(infileName)
326     inLines = fd.readlines()
327     if fd != sys.stdin:
328         fd.close()
329         
330
331     for line in inLines:
332         bits = re_spaces.split(line)
333         if bits[0] == '##include':
334             incName = bits[1]
335             if (deps):
336                 out += [ incName ]
337             else:
338                 # assume included file comes from same place as source file
339                 incName = os.path.join (os.path.dirname (infileName), incName);
340                 outStr += _doPyp(incName)
341         else:
342             if not deps:
343                 outStr += line
344
345     # done
346     if deps:
347         return out
348     else:
349         return outStr
350
351 def include_processor(task):
352     infileName = task.inputs[0].srcpath()
353     outfileName = os.path.join(out, task.outputs[0].bldpath())
354     fdOut = open (outfileName, "w")
355     fdOut.write (_doPyp(infileName))
356     fdOut.close ()
357
358
359 def build_color_scheme(path, prefix):
360     f = open (path, 'r')
361     color_scheme = ''
362     for line in f:
363         if re.search ('^#@color', line):
364             line.strip() # remove newline
365             words = line.split()
366             if len(color_scheme):
367                 color_scheme += ';'
368             color_scheme += prefix
369             color_scheme += '_'
370             color_scheme += words[1]
371             color_scheme += ':'
372             color_scheme += words[2]
373     f.close()
374     return color_scheme
375
376 def build(bld):
377
378     VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR'])
379     I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
380
381     if bld.is_defined('WINDOWS_VST_SUPPORT') and bld.env['build_target'] != 'mingw':
382         # Windows VST support w/wine
383         # If we require VST support we build a stub main() and the FST library
384         # here using winegcc, and link it to the GTK front-end library
385         obj = bld (features = 'cxx c cxxprogram wine')
386         obj.source = ( '../libs/fst/vstwin.c', '../vst/winmain.c' )
387         #
388         # XXX do we really need to explicitly link to all of these for the wine executable?
389         #
390         obj.use          = [ 'libpbd',
391                              'libmidipp',
392                              'libardour',
393                              'libardour_cp',
394                              'libtimecode',
395                              'libmidipp',
396                              'libgtk2_ardour',
397                              'libgtkmm2ext',
398                              'libcanvas',
399                              ]
400         obj.target = 'ardour-' + str (bld.env['VERSION']) + '-vst.exe.so'
401         obj.includes  = [ '../libs/fst', '.' ]
402         obj.linkflags = ['-mwindows', '-Wl,--export-dynamic']
403         obj.linkflags += bld.env['LDFLAGS']
404         obj.defines = ['_POSIX_SOURCE', 'USE_WS_PREFIX']
405         obj.install_path = bld.env['DLLDIR']
406         # end of the wine executable
407
408         # now the shared library containing the GTK GUI for ardour
409         obj = bld (features = 'cxx c cxxshlib')
410         obj.source    = gtk2_ardour_sources
411         obj.includes  = [ '../libs/fst', '.' ]
412         obj.name      = 'libgtk2_ardour'
413         obj.target    = 'gtk2_ardour'
414     else:
415         # just the normal executable version of the GTK GUI
416         if bld.env['build_target'] == 'mingw':
417             obj = bld (features = 'cxx c cxxprogram winres')
418         else:
419             obj = bld (features = 'cxx c cxxprogram')
420         obj.source    = gtk2_ardour_sources
421         obj.target = 'ardour-' + str (bld.env['VERSION'])
422         obj.includes = ['.']
423         obj.ldflags = ['-no-undefined']
424
425         if bld.is_defined('WINDOWS_VST_SUPPORT'):
426         # Windows VST support mingw
427             obj.includes += [ '../libs/fst' ]
428
429     # at this point, "obj" refers to either the normal native executable
430     # OR the shared library built for use with wine on linux.
431
432     obj.use      = [ 'libpbd',
433                      'libardour',
434                      'libardour_cp',
435                      'libtimecode',
436                      'libmidipp',
437                      'libgtkmm2ext',
438                      'libcanvas',
439                      ]
440
441     obj.defines = [
442         'PACKAGE="' + I18N_PACKAGE + '"',
443         'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
444         'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
445         'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
446         ]
447     obj.install_path = bld.env['DLLDIR']
448     obj.uselib       = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD GTK OGG CURL DL'
449     obj.uselib       += ' GTKMM CANVAS FFTW3F'
450     obj.uselib       += ' AUDIOUNITS OSX GTKOSX LO '
451     obj.uselib       += ' TAGLIB '
452
453     if sys.platform == 'darwin':
454         obj.uselib += ' AUDIOUNITS OSX GTKOSX'
455         obj.use    += ' libappleutility'
456         obj.source += [ 'cocoacarbon.mm', 'bundle_env_cocoa.cc' ]
457     elif bld.env['build_target'] == 'mingw':
458         obj.source += [ 'bundle_env_mingw.cc' ]
459         obj.source += [ 'windows_icon.rc' ]
460     else:
461         obj.source += [ 'bundle_env_linux.cc' ]
462
463     obj.includes += ['../libs']
464
465     if bld.env['build_target'] == 'mingw':
466         obj.linkflags = ['-mwindows']
467
468     if bld.is_defined('HAVE_SUIL'):
469         obj.source += [ 'lv2_plugin_ui.cc' ]
470         obj.use += [ 'SUIL' ]
471
472     if bld.is_defined('NEED_INTL'):
473         obj.linkflags = ' -lintl'
474
475     if bld.is_defined('WINDOWS_VST_SUPPORT'):
476         obj.source += [ 'windows_vst_plugin_ui.cc' ]
477         obj.defines += [ 'WINDOWS_VST_SUPPORT' ]
478         if bld.env['build_target'] != 'mingw':
479             obj.use += [ 'X11' ]
480         
481     if bld.is_defined('LXVST_SUPPORT'):
482         obj.source += [ 'linux_vst_gui_support.cc', 'lxvst_plugin_ui.cc' ]
483         obj.defines += [ 'LXVST_SUPPORT' ]
484         obj.use += [ 'X11' ]
485
486     if bld.is_defined('WINDOWS_VST_SUPPORT') or bld.is_defined('LXVST_SUPPORT'):
487         obj.source += [ 'vst_plugin_ui.cc' ]
488         
489     if bld.is_defined('PHONE_HOME'):
490         obj.defines += [ 'PHONE_HOME' ]
491
492     if bld.is_defined('HAVE_COREAUDIO'):
493         TaskGen.task_gen.mappings['.mm'] = TaskGen.task_gen.mappings['.cc']
494         obj.use += ' libappleutility '
495
496     if bld.is_defined('AUDIOUNIT_SUPPORT'):
497         obj.source += [ 'au_pluginui.mm' ]
498
499     # Wrappers
500
501     wrapper_subst_dict = {
502             'INSTALL_PREFIX' : bld.env['PREFIX'],
503             'LIBDIR'         : os.path.normpath(bld.env['DLLDIR']),
504             'DATADIR'        : os.path.normpath(bld.env['DATADIR']),
505             'CONFDIR'        : os.path.normpath(bld.env['CONFDIR']),
506             'LIBS'           : 'build/libs',
507             'VERSION'        : bld.env['VERSION'],
508             'EXECUTABLE'     : 'build/gtk2_ardour/ardour-' + str (bld.env['VERSION'])
509     }
510
511     def set_subst_dict(obj, dict):
512         for i in dict:
513             setattr(obj, i, dict[i])
514
515     obj              = bld(features = 'subst')
516     obj.source       = 'ardev_common.sh.in'
517     obj.target       = 'ardev_common_waf.sh'
518     obj.chmod        = Utils.O755
519     obj.dict         = wrapper_subst_dict
520     set_subst_dict(obj, wrapper_subst_dict)
521
522     obj              = bld(features = 'subst')
523     obj.source       = 'ardour.sh.in'
524     obj.target       = 'ardour' + str (bld.env['MAJOR'])
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     if bld.is_defined('WINDOWS_VST_SUPPORT'):
531         obj              = bld(features = 'subst')
532         obj.source       = '../vst/ardourvst.in'
533         obj.target       = 'ardourvst' + str (bld.env['MAJOR'])
534         obj.chmod        = Utils.O755
535         obj.dict         = wrapper_subst_dict
536         obj.install_path = bld.env['BINDIR']
537         set_subst_dict(obj, wrapper_subst_dict)
538
539     # Font configuration
540
541     font_subst_dict = {}
542     font_sizes      = {}
543     base_font       = ""
544
545     # Set up font sizes
546     if bld.is_defined('GTKOSX'): # OS X fonts
547         basefont = ""
548         font_sizes = {
549                 'SMALLER' : '9',
550                 'SMALL' : '10',
551                 'NORMAL' : '11',
552                 'BIG' : '13',
553                 'BIGGER' : '17',
554                 'LARGE' : '18',
555                 'LARGER' : '28',
556                 'HUGER' : '36',
557                 'MASSIVE' : '60',
558         }
559         
560         # There is no acceptable monospace font available on older versions of OS X
561         # and no API on those versions to load TTF files that will work with 
562         # GTK/fontconfig/pango.
563         #
564         # In addition, the ArdourMono font gets clipped for some reason on OS X
565         #
566         # Moreover, Lucida Grande just seems to work even though it is not monospace
567         # so just use it.
568         #
569         font_names = {
570             'MONOSPACE' : 'Monaco',
571             'CLOCKFONT' : 'Lucida Grande',
572         }
573     else: # Linux/X11 fonts
574         basefont = '' # unspecified - use system defaults
575         font_sizes = {
576                 'SMALLER' : '6',
577                 'SMALL' : '7',
578                 'NORMAL' : '8',
579                 'BIG' : '11',
580                 'BIGGER' : '13.5',
581                 'LARGE' : '14.5',
582                 'LARGER' : '19',
583                 'HUGER' : '27',
584                 'MASSIVE' : '48',
585         }
586         font_names = {
587                 'MONOSPACE' : 'ArdourMono',
588                 'CLOCKFONT' : 'ArdourMono',
589         }
590
591     # Set up font substitution dictionary
592     # @FONT_XXXX@
593     for style in ['', 'BOLD', 'ITALIC']:
594         for sizename,points in iter(font_sizes.items()):
595             if (len (style)):
596                 key = "_".join (['FONT',style,sizename])
597                 fontstyle = " ".join ([basefont,style.lower(),points])
598             else:
599                 key = "_".join (['FONT',sizename])
600                 fontstyle = " ".join ([basefont,points])
601                 
602             font_subst_dict[key] = fontstyle
603             
604     # @FONT_SIZE_XXXX@
605     for sizename,points in iter(font_sizes.items()):
606             key = "_".join (['FONT_SIZE',sizename])
607             font_subst_dict[key] = points
608
609     # various font names, eg @BOLD_MONOSPACE@
610     for font_sym,text in iter(font_names.items()):
611         key = font_sym
612         font_subst_dict[key] = text
613
614     # RC file
615
616     obj              = bld(features = 'subst')
617     obj.source       = [ 'clearlooks.rc.in' ]
618     obj.target       = 'clearlooks.rc'
619     obj.install_path = bld.env['CONFDIR']
620     set_subst_dict(obj, font_subst_dict)
621
622     obj              = bld(features = 'subst')
623     obj.source       = [ 'default_ui_config.in' ]
624     obj.target       = 'default_ui_config'
625     obj.install_path = bld.env['CONFDIR']
626     set_subst_dict(obj, font_subst_dict)
627
628     # Menus
629     menus_argv = []
630     if bld.is_defined('GTKOSX'):
631         menus_argv = [ '-E', '-P', '-DGTKOSX' ]
632     else:
633         menus_argv = [ '-E', '-P' ]
634
635     # always build all versions of the menu definitions
636     # so that we can try them out with different program builds.
637     for program in [ 'ardour', 'trx' ]:
638         obj = bld(features = 'command-output')
639         obj.command = 'cpp'
640         obj.command_is_external = True
641         obj.no_inputs = True
642         obj.argv = menus_argv
643         obj.dep_vars = ['GTKOSX', 'WINDOWS']
644         obj.stdin = program + '.menus.in'
645         obj.stdout = program + '.menus'
646         bld.install_files (bld.env['CONFDIR'], program + '.menus')
647
648     # Keybindings
649
650     # 'SAE-de-keypad', 'SAE-de-nokeypad', 'SAE-us-keypad',
651     # 'SAE-us-nokeypad', 'ergonomic-us'
652
653     #
654     # explicitly state the use of perl here so that it works on windows too
655     # 
656     a_rule = 'perl ../tools/fmt-bindings --platform="%s" --winkey="%s" --accelmap <${SRC} >${TGT}' % (sys.platform, bld.env['WINDOWS_KEY'] )
657     for b in [ 'mnemonic-us' ] :
658         obj = bld(
659             target = b + '.bindings',
660             source = b + '.bindings.in',
661             rule = a_rule
662             )
663         obj.install_path = bld.env['CONFDIR']
664
665     # not modified at present
666     bld.install_files(bld.env['CONFDIR'], 'dark.colors')
667     bld.install_files(bld.env['CONFDIR'], 'step_editing.bindings')
668     bld.install_files(bld.env['CONFDIR'], 'mixer.bindings')
669
670     # Icons/Images
671     bld.install_files(os.path.join (bld.env['DATADIR'], 'icons'), bld.path.ant_glob('icons/*.png'))
672     bld.install_files(os.path.join (bld.env['DATADIR'], 'pixmaps'), bld.path.ant_glob('pixmaps/*.xpm'))
673     bld.install_files(bld.env['DATADIR'], 'splash.png')
674     bld.install_files(bld.env['DATADIR'], 'small-splash.png')
675     bld.install_files(bld.env['DATADIR'], 'ArdourMono.ttf')
676
677     # Default UI configuration
678     bld.install_files(bld.env['CONFDIR'], 'default_ui_config')
679     # Color Themes
680     bld.install_files(bld.env['CONFDIR'], 'dark.colors')
681
682     # Default export stuff
683     bld.install_files(os.path.join(bld.env['CONFDIR'], 'export'), bld.path.ant_glob('export/*.format'))
684
685     # i18n
686     if bld.is_defined('ENABLE_NLS'):
687         mo_files = bld.path.ant_glob('po/*.mo')
688         for mo in mo_files:
689             lang = os.path.basename(mo.srcpath()).replace('.mo', '')
690             bld.install_as (os.path.join(os.path.normpath(bld.env['LOCALEDIR']), lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
691                             mo)
692
693 def i18n(bld):
694         I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
695         autowaf.build_i18n(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
696                            'Paul Davis')
697         
698 def i18n_pot(bld):
699         I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
700         autowaf.build_i18n_pot(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
701                                'Paul Davis')
702
703 def i18n_po(bld):
704         I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
705         autowaf.build_i18n_po(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
706                               'Paul Davis')
707         
708 def i18n_mo(bld):
709         I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
710         autowaf.build_i18n_mo(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
711                               'Paul Davis')