typo
[ardour.git] / gtk2_ardour / wscript
1 #!/usr/bin/env python
2 from waflib.extras import autowaf as autowaf
3 from waflib import Options, TaskGen
4 import waflib.Logs as Logs, waflib.Utils as Utils
5 import os
6 import sys
7 import re
8 import time
9 from waflib.Task import Task
10
11 # Version of this package (even if built as a child)
12 MAJOR = '3'
13 MINOR = '0'
14 MICRO = '0'
15 GTK2_ARDOUR_VERSION = "%s.%s.%s" % (MAJOR, MINOR, MICRO)
16
17 # Variables for 'waf dist'
18 APPNAME = 'gtk2_ardour3'
19 VERSION = GTK2_ARDOUR_VERSION
20 I18N_PACKAGE = 'gtk2_ardour3'
21
22 # Mandatory variables
23 top = '.'
24 out = 'build'
25
26 path_prefix = 'gtk2_ardour/'
27
28 gtk2_ardour_sources = [
29         'about.cc',
30         'actions.cc',
31         'add_route_dialog.cc',
32         'ambiguous_file_dialog.cc',
33         'analysis_window.cc',
34         'ardour_button.cc',
35         'ardour_dialog.cc',
36         'ardour_ui.cc',
37         'ardour_ui2.cc',
38         'ardour_ui_dependents.cc',
39         'ardour_ui_dialogs.cc',
40         'ardour_ui_ed.cc',
41         'ardour_ui_mixer.cc',
42         'ardour_ui_options.cc',
43         'ardour_window.cc',
44         'audio_clock.cc',
45         'audio_region_editor.cc',
46         'audio_region_view.cc',
47         'audio_streamview.cc',
48         'audio_time_axis.cc',
49         'automation_controller.cc',
50         'automation_line.cc',
51         'automation_region_view.cc',
52         'automation_streamview.cc',
53         'automation_time_axis.cc',
54         'axis_view.cc',
55         'bundle_manager.cc',
56         'button_joiner.cc',
57         'canvas-flag.cc',
58         'canvas-hit.cc',
59         'canvas-note-event.cc',
60         'canvas-note.cc',
61         'canvas_patch_change.cc',
62         'canvas-simpleline.c',
63         'canvas-simplerect.c',
64         'canvas-sysex.cc',
65         'canvas-waveview.c',
66         'clock_group.cc',
67         'configinfo.cc',
68         'control_point.cc',
69         'control_point_dialog.cc',
70         'curvetest.cc',
71         'debug.cc',
72         'diamond.cc',
73         'edit_note_dialog.cc',
74         'editing.cc',
75         'editor.cc',
76         'editor_actions.cc',
77         'editor_audio_import.cc',
78         'editor_audiotrack.cc',
79         'editor_canvas.cc',
80         'editor_canvas_events.cc',
81         'editor_component.cc',
82         'editor_cursors.cc',
83         'editor_drag.cc',
84         'editor_route_groups.cc',
85         'editor_export_audio.cc',
86         'editor_group_tabs.cc',
87         'editor_keys.cc',
88         'editor_locations.cc',
89         'editor_markers.cc',
90         'editor_mixer.cc',
91         'editor_mouse.cc',
92         'editor_ops.cc',
93         'editor_regions.cc',
94         'editor_routes.cc',
95         'editor_rulers.cc',
96         'editor_selection.cc',
97         'editor_snapshots.cc',
98         'editor_summary.cc',
99         'editor_tempodisplay.cc',
100         'editor_timefx.cc',
101         'engine_dialog.cc',
102         'enums.cc',
103         'export_channel_selector.cc',
104         'export_dialog.cc',
105         'export_file_notebook.cc',
106         'export_filename_selector.cc',
107         'export_format_dialog.cc',
108         'export_format_selector.cc',
109         'export_preset_selector.cc',
110         'export_timespan_selector.cc',
111         'fft.cc',
112         'fft_graph.cc',
113         'fft_result.cc',
114         'gain_meter.cc',
115         'generic_pluginui.cc',
116         'ghostregion.cc',
117         'global_port_matrix.cc',
118         'group_tabs.cc',
119         'gtk-custom-hruler.c',
120         'gtk-custom-ruler.c',
121         'gtk_pianokeyboard.c',
122         'gui_object.cc',
123         'insert_time_dialog.cc',
124         'interthread_progress_window.cc',
125         'io_selector.cc',
126         'keyboard.cc',
127         'keyeditor.cc',
128         'latency_gui.cc',
129         'led.cc',
130         'level_meter.cc',
131         'lineset.cc',
132         'location_ui.cc',
133         'main.cc',
134         'main_clock.cc',
135         'marker.cc',
136         'midi_automation_line.cc',
137         'midi_channel_dialog.cc',
138         'midi_channel_selector.cc',
139         'midi_cut_buffer.cc',
140         'midi_export_dialog.cc',
141         'midi_list_editor.cc',
142         'midi_port_dialog.cc',
143         'midi_region_view.cc',
144         'midi_scroomer.cc',
145         'midi_selection.cc',
146         'midi_streamview.cc',
147         'midi_time_axis.cc',
148         'midi_tracer.cc',
149         'midi_velocity_dialog.cc',
150         'missing_file_dialog.cc',
151         'missing_plugin_dialog.cc',
152         'mixer_actor.cc',
153         'mixer_group_tabs.cc',
154         'mixer_strip.cc',
155         'mixer_ui.cc',
156         'monitor_section.cc',
157         'mono_panner.cc',
158         'mono_panner_editor.cc',
159         'mouse_cursors.cc',
160         'nag.cc',
161         'new_plugin_preset_dialog.cc',
162         'normalize_dialog.cc',
163         'note_player.cc',
164         'option_editor.cc',
165         'opts.cc',
166         'panner2d.cc',
167         'panner_editor.cc',
168         'panner_interface.cc',
169         'panner_ui.cc',
170         'piano_roll_header.cc',
171         'playlist_selector.cc',
172         'plugin_eq_gui.cc',
173         'plugin_selector.cc',
174         'plugin_ui.cc',
175         'port_group.cc',
176         'port_insert_ui.cc',
177         'port_matrix.cc',
178         'port_matrix_body.cc',
179         'port_matrix_column_labels.cc',
180         'port_matrix_component.cc',
181         'port_matrix_grid.cc',
182         'port_matrix_labels.cc',
183         'port_matrix_row_labels.cc',
184         'processor_box.cc',
185         'patch_change_dialog.cc',
186         'progress_reporter.cc',
187         'prompter.cc',
188         'public_editor.cc',
189         'quantize_dialog.cc',
190         'rc_option_editor.cc',
191         'region_editor.cc',
192         'region_gain_line.cc',
193         'region_layering_order_editor.cc',
194         'region_selection.cc',
195         'region_view.cc',
196         'return_ui.cc',
197         'rhythm_ferret.cc',
198         'route_group_dialog.cc',
199         'route_group_menu.cc',
200         'route_params_ui.cc',
201         'route_processor_selection.cc',
202         'route_time_axis.cc',
203         'route_ui.cc',
204         'search_path_option.cc',
205         'selection.cc',
206         'send_ui.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         'simpleline.cc',
213         'simplerect.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         '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         'waveview.cc',
242         'window_proxy.cc'
243 ]
244
245 def options(opt):
246     autowaf.set_options(opt)
247
248 def configure(conf):
249     conf.load('misc')
250     conf.load('compiler_cxx')
251     autowaf.build_version_files(
252         path_prefix + 'version.h',
253         path_prefix + 'version.cc',
254         'gtk2_ardour', MAJOR, MINOR, MICRO)
255     autowaf.configure(conf)
256
257     if re.search ("linux", sys.platform) != None:
258         autowaf.check_pkg(conf, 'alsa', uselib_store='ALSA')
259
260     # TODO: Insert a sanity check for on OS X to ensure CoreAudio is present
261
262     autowaf.check_pkg(conf, 'flac', uselib_store='FLAC',
263                       atleast_version='1.2.1')
264     autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD',
265                       atleast_version='2.10.1')
266     autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK',
267                       atleast_version='2.18')
268     autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM',
269                       atleast_version='2.18')
270     autowaf.check_pkg(conf, 'libgnomecanvas-2.0',
271                       uselib_store='GNOMECANVAS', atleast_version='2.30')
272     autowaf.check_pkg(conf, 'libgnomecanvasmm-2.6',
273                       uselib_store='GNOMECANVASMM', atleast_version='2.16')
274     autowaf.check_pkg(conf, 'ogg', uselib_store='OGG', atleast_version='1.1.2')
275     autowaf.check_pkg(conf, 'x11', uselib_store='X11', atleast_version='1.1', mandatory=False)
276     autowaf.check_pkg(conf, 'fontconfig', uselib_store='FONTCONFIG')
277
278     conf.write_config_header('gtk2ardour-config.h', remove=False)
279
280     # Boost headers
281     autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp')
282     autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp')
283
284 # Add a waf `feature' to allow compilation of things using winegcc
285 from waflib.TaskGen import feature
286 @feature("wine")
287 def set_winegcc(self):
288     self.env.LINK_CXX = self.env.LINK_CC = 'wineg++'
289     self.env.CC = 'winegcc'
290
291 def _doPyp(infileName, deps = False):
292     outStr = ''
293     out = []
294     re_spaces = re.compile("\s+")
295
296     if infileName == '-':
297         fd = sys.stdin
298     else:
299         fd = open(infileName)
300     inLines = fd.readlines()
301     if fd != sys.stdin:
302         fd.close()
303         
304
305     for line in inLines:
306         bits = re_spaces.split(line)
307         if bits[0] == '##include':
308             incName = bits[1]
309             if (deps):
310                 out += [ incName ]
311             else:
312                 # assume included file comes from same place as source file
313                 incName = os.path.join (os.path.dirname (infileName), incName);
314                 outStr += _doPyp(incName)
315         else:
316             if not deps:
317                 outStr += line
318
319     # done
320     if deps:
321         return out
322     else:
323         return outStr
324
325 def include_processor(task):
326     infileName = task.inputs[0].srcpath()
327     outfileName = os.path.join(out, task.outputs[0].bldpath())
328     fdOut = open (outfileName, "w")
329     fdOut.write (_doPyp(infileName))
330     fdOut.close ()
331
332
333 def build_color_scheme(path, prefix):
334     f = open (path, 'r')
335     color_scheme = ''
336     for line in f:
337         if re.search ('^#@color', line):
338             line.strip() # remove newline
339             words = line.split()
340             if len(color_scheme):
341                 color_scheme += ';'
342             color_scheme += prefix
343             color_scheme += '_'
344             color_scheme += words[1]
345             color_scheme += ':'
346             color_scheme += words[2]
347     f.close()
348     return color_scheme
349
350 def build(bld):
351
352     if bld.is_defined('WINDOWS_VST_SUPPORT'):
353         # If we require VST support we build a stub main() and the FST library
354         # here using winegcc, and link it to the GTK front-end library
355         obj = bld(features = 'cxx c cxxprogram wine')
356         obj.source = '''
357                 ../libs/fst/fst.c
358                 ../libs/fst/fstinfofile.c
359                 ../libs/fst/vsti.c
360                 ../libs/fst/vstwin.c
361                 ../vst/winmain.c
362         '''
363         obj.uselib = 'ALSA'
364         obj.use          = [ 'libpbd',
365                              'libmidipp',
366                              'libtaglib',
367                              'libardour',
368                              'libardour_cp',
369                              'libgtk2_ardour',
370                              'libgtkmm2ext',
371                              'libtaglib']
372         obj.target = 'ardour-3.0-vst.exe.so'
373         obj.includes  = [ '../libs/fst', '.' ]
374         obj.linkflags = ['-mwindows', '-Wl,--export-dynamic']
375         obj.defines = ['_POSIX_SOURCE', 'USE_WS_PREFIX']
376         obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
377         # end of the wine executable
378
379         # now the shared library containing the GTK GUI for ardour
380         obj = bld (features = 'cxx c cxxshlib')
381         obj.source    = gtk2_ardour_sources
382         obj.includes  = [ '../libs/fst', '.' ]
383         obj.name      = 'libgtk2_ardour'
384         obj.target    = 'gtk2_ardour'
385     else:
386         # just the normal executable version of the GTK GUI
387         obj = bld(features = 'cxx c cxxprogram')
388         obj.source    = gtk2_ardour_sources
389         obj.target = 'ardour-3.0'
390         obj.includes = ['.']
391
392     # continue with setup of obj, which could be a shared library
393     # or an executable.
394
395     obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
396
397     obj.uselib       = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD GTK OGG ALSA CURL DL'
398     obj.uselib       += ' GTKMM GNOMECANVASMM GNOMECANVAS '
399     obj.uselib       += ' AUDIOUNITS OSX GTKOSX '
400     obj.use          = [ 'libpbd',
401                          'libmidipp',
402                          'libtaglib',
403                          'libardour',
404                          'libardour_cp',
405                          'libgtkmm2ext',
406                          'libtaglib' ]
407     if sys.platform == 'darwin':
408         obj.use += ' libappleutility'
409     obj.defines     = [
410         'PACKAGE="' + I18N_PACKAGE + '"',
411         'VERSIONSTRING="' + bld.env['VERSION'] + '"',
412         'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
413         'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
414         'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
415         'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"'
416         ]
417     obj.includes += ['../libs']
418
419     if bld.is_defined('HAVE_SUIL'):
420         obj.source += [ 'lv2_plugin_ui.cc' ]
421         obj.use += [ 'SUIL' ]
422
423     if bld.is_defined('FREESOUND'):
424         obj.source +=  [ 'sfdb_freesound_mootcher.cc' ]
425         obj.defines += [ 'FREESOUND' ]
426
427     if bld.is_defined('NEED_INTL'):
428         obj.linkflags = ' -lintl'
429
430     if bld.is_defined('WINDOWS_VST_SUPPORT'):
431         obj.source += [ 'windows_vst_plugin_ui.cc' ]
432         obj.defines += [ 'WINDOWS_VST_SUPPORT' ]
433         obj.use += [ 'X11' ]
434         
435     if bld.is_defined('LXVST_SUPPORT'):
436         obj.source += [ 'linux_vst_gui_support.cc', 'lxvst_plugin_ui.cc' ]
437         obj.defines += [ 'LXVST_SUPPORT' ]
438         obj.use += [ 'X11' ]
439
440     if bld.is_defined('WINDOWS_VST_SUPPORT') or bld.is_defined('LXVST_SUPPORT'):
441         obj.source += [ 'vst_plugin_ui.cc' ]
442         
443     if bld.is_defined('PHONE_HOME'):
444         obj.defines += [ 'PHONE_HOME' ]
445
446     if bld.is_defined('HAVE_COREAUDIO'):
447         TaskGen.task_gen.mappings['.mm'] = TaskGen.task_gen.mappings['.cc']
448         obj.source += [ 'cocoacarbon.mm' ]
449         obj.use += ' libappleutility '
450
451     if bld.is_defined('AUDIOUNIT_SUPPORT'):
452         obj.source += [ 'au_pluginui.mm' ]
453
454     # Wrappers
455
456     wrapper_subst_dict = {
457             'INSTALL_PREFIX' : bld.env['PREFIX'],
458             'LIBDIR'         : os.path.normpath(bld.env['LIBDIR']),
459             'DATADIR'        : os.path.normpath(bld.env['DATADIR']),
460             'SYSCONFDIR'     : os.path.normpath(bld.env['SYSCONFDIR']),
461             'LIBS'           : 'build/libs',
462             'VERSION'        : '3.0',
463             'EXECUTABLE'     : 'build/gtk2_ardour/ardour-3.0'
464     }
465
466     def set_subst_dict(obj, dict):
467         for i in dict:
468             setattr(obj, i, dict[i])
469
470     obj              = bld(features = 'subst', rule= 'chmod 0755 ${TGT}')
471     obj.source       = 'ardev_common.sh.in'
472     obj.target       = 'ardev_common_waf.sh'
473     obj.chmod        = Utils.O755
474     obj.dict         = wrapper_subst_dict
475     set_subst_dict(obj, wrapper_subst_dict)
476
477     obj              = bld(features = 'subst')
478     obj.source       = 'ardour.sh.in'
479     obj.target       = 'ardour3'
480     obj.chmod        = Utils.O755
481     obj.dict         = wrapper_subst_dict
482     obj.install_path = bld.env['BINDIR']
483     set_subst_dict(obj, wrapper_subst_dict)
484
485     if bld.is_defined('WINDOWS_VST_SUPPORT'):
486         obj              = bld(features = 'subst')
487         obj.source       = '../vst/ardourvst.in'
488         obj.target       = 'ardourvst3'
489         obj.chmod        = Utils.O755
490         obj.dict         = wrapper_subst_dict
491         obj.install_path = bld.env['BINDIR']
492         set_subst_dict(obj, wrapper_subst_dict)
493
494     # Font configuration
495
496     dark_rc_subst_dict = {}
497     light_rc_subst_dict = {}
498     font_sizes      = {}
499     base_font       = ""
500
501     # Set up font sizes
502     if bld.is_defined('GTKOSX'): # OS X fonts
503         basefont = ""
504         font_sizes = {
505                 'SMALLER' : '9',
506                 'SMALL' : '10',
507                 'NORMAL' : '11',
508                 'BIGGER' : '17',
509                 'LARGE' : '18',
510                 'LARGER' : '28',
511                 'HUGER' : '36',
512                 'MASSIVE' : '60',
513         }
514         if bld['build_target'] == 'tiger' or bld['build_target'] == 'leopard' :
515             font_names = {
516                 'MONOSPACE' : 'Lucida Sans Typewriter',
517             }
518         else:
519             font_names = {
520                 'MONOSPACE' : 'ArdourMono',
521             }
522     else: # Linux/X11 fonts
523         basefont = '' # unspecified - use system defaults
524         font_sizes = {
525                 'SMALLER' : '8',
526                 'SMALL' : '9',
527                 'NORMAL' : '10',
528                 'BIGGER' : '17',
529                 'LARGE' : '18',
530                 'LARGER' : '24',
531                 'HUGER' : '34',
532                 'MASSIVE' : '60',
533         }
534         font_names = {
535                 'MONOSPACE' : 'ArdourMono',
536         }
537
538     # Set up font substitution dictionary
539     # @FONT_XXXX@
540     for style in ['', 'BOLD', 'ITALIC']:
541         for sizename,points in iter(font_sizes.items()):
542             if (len (style)):
543                 key = "_".join (['FONT',style,sizename])
544                 fontstyle = " ".join ([basefont,style.lower(),points])
545             else:
546                 key = "_".join (['FONT',sizename])
547                 fontstyle = " ".join ([basefont,points])
548
549             dark_rc_subst_dict[key] = fontstyle
550             light_rc_subst_dict[key] = fontstyle
551
552     # @FONT_SIZE_XXXX@
553     for sizename,points in iter(font_sizes.items()):
554             key = "_".join (['FONT_SIZE',sizename])
555             dark_rc_subst_dict[key] = points
556             light_rc_subst_dict[key] = points
557
558     # various font names, eg @BOLD_MONOSPACE@
559     for font_sym,text in iter(font_names.items()):
560         key = font_sym
561         dark_rc_subst_dict[key] = text
562         light_rc_subst_dict[key] = text
563
564     # RC files
565     dark_rc_subst_dict['COLOR_SCHEME'] = build_color_scheme(
566         'gtk2_ardour/ardour3_ui_dark.rc.in', 'ARDOUR_DARK')
567     dark_rc_subst_dict['COLPREFIX'] = 'ARDOUR_DARK'
568     light_rc_subst_dict['COLOR_SCHEME'] = build_color_scheme(
569         'gtk2_ardour/ardour3_ui_light.rc.in', 'ARDOUR_LIGHT')
570     light_rc_subst_dict['COLPREFIX'] = 'ARDOUR_LIGHT'
571
572     obj              = bld(features = 'subst')
573     obj.source       = [ 'ardour3_ui_dark.rc.in' ]
574     obj.target       = 'ardour3_ui_dark.rc.pre'
575     obj.install_path = None
576     set_subst_dict(obj, dark_rc_subst_dict)
577
578     obj              = bld(features = 'subst')
579     obj.source       = [ 'ardour3_ui_light.rc.in' ]
580     obj.target       = 'ardour3_ui_light.rc.pre'
581     obj.install_path = None
582     set_subst_dict(obj, light_rc_subst_dict)
583
584     obj              = bld(features = 'subst')
585     obj.source       = [ 'ardour3_styles.rc.in' ]
586     obj.target       = 'ardour3_dark_styles.rc'
587     obj.install_path = None
588     set_subst_dict(obj, dark_rc_subst_dict)
589
590     obj              = bld(features = 'subst')
591     obj.source       = [ 'ardour3_styles.rc.in' ]
592     obj.target       = 'ardour3_light_styles.rc'
593     obj.install_path = None
594     set_subst_dict(obj, light_rc_subst_dict)
595
596     obj              = bld(features = 'subst')
597     obj.source       = [ 'ardour3_fonts.rc.in' ]
598     obj.target       = 'ardour3_dark_fonts.rc'
599     obj.install_path = None
600     set_subst_dict(obj, dark_rc_subst_dict)
601
602     obj              = bld(features = 'subst')
603     obj.source       = [ 'ardour3_fonts.rc.in' ]
604     obj.target       = 'ardour3_light_fonts.rc'
605     obj.install_path = None
606     set_subst_dict(obj, light_rc_subst_dict)
607
608     obj              = bld(rule = 'cp ${SRC} ${TGT}')
609     obj.source       = [ 'ardour3_widget_list.rc' ]
610     obj.target       = 'ardour3_widgets.rc'
611     obj.install_path = None
612
613     obj = bld (rule = include_processor)
614     obj.source = [ 'ardour3_ui_dark.rc.pre' ]
615     # find and add all ##include dependencies as sources
616     obj.source += _doPyp (bld.path.find_resource ('ardour3_ui_dark.rc.in').srcpath(), True)
617     obj.target = 'ardour3_ui_dark.rc'
618     obj.install_path = '${SYSCONFDIR}/ardour3'
619
620     obj = bld (rule = include_processor)
621     obj.source = [ 'ardour3_ui_light.rc.pre' ]
622     # find and add all ##include dependencies as sources
623     obj.source += _doPyp (bld.path.find_resource ('ardour3_ui_light.rc.in').srcpath(), True)
624     obj.target = 'ardour3_ui_light.rc'
625     obj.install_path = '${SYSCONFDIR}/ardour3'
626
627     # Menus
628     menus_argv = []
629     if bld.is_defined('GTKOSX'):
630         menus_argv = [ '-E', '-P', '-DGTKOSX' ]
631     else:
632         menus_argv = [ '-E', '-P' ]
633     obj = bld(features = 'command-output')
634     obj.command = 'cpp'
635     obj.command_is_external = True
636     obj.no_inputs = True
637     obj.argv = menus_argv
638     obj.stdin = 'ardour.menus.in'
639     obj.stdout = 'ardour.menus'
640     bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'),
641                       'ardour.menus')
642
643     # Keybindings
644
645     # 'SAE-de-keypad', 'SAE-de-nokeypad', 'SAE-us-keypad',
646     # 'SAE-us-nokeypad', 'ergonomic-us'
647
648     for b in [ 'mnemonic-us' ] :
649         obj = bld(
650             target = b + '.bindings',
651             source = b + '.bindings.in',
652             rule = '../tools/fmt-bindings --platform="%s" --winkey="%s" --accelmap <${SRC} >${TGT}' % (sys.platform, bld.env['WINDOWS_KEY'] )
653             )
654         obj.install_path = os.path.join(bld.env['SYSCONFDIR'], 'ardour3')
655
656     # not modified at present
657     bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'),
658                       'step_editing.bindings')
659     bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'),
660                       'mixer.bindings')
661
662     # Icons/Images
663     bld.install_files('${DATADIR}/ardour3/icons', bld.path.ant_glob('icons/*.png'))
664     bld.install_files('${DATADIR}/ardour3/pixmaps', bld.path.ant_glob('pixmaps/*.xpm'))
665     bld.install_files('${DATADIR}/ardour3', 'splash.png')
666     bld.install_files('${DATADIR}/ardour3', 'ArdourMono.ttf')
667
668     # Default UI configuration
669     bld.install_files('${SYSCONFDIR}/ardour3', 'ardour3_ui_default.conf')
670
671     # Default export stuff
672     bld.install_files('${SYSCONFDIR}/ardour3/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(bld.env['PREFIX'], 'share', 'locale',
680                                         lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
681                            mo)
682
683 def i18n(bld):
684     autowaf.build_i18n(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
685                        'Paul Davis')
686
687 def i18n_pot(bld):
688     autowaf.build_i18n_pot(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
689                        'Paul Davis')
690
691 def i18n_po(bld):
692     autowaf.build_i18n_po(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
693                        'Paul Davis')
694
695 def i18n_mo(bld):
696     autowaf.build_i18n_mo(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
697                        'Paul Davis')