Move delta-to-edit-point options to the main clock context menus (#4472).
[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_scrub.cc',
97         'editor_selection.cc',
98         'editor_snapshots.cc',
99         'editor_summary.cc',
100         'editor_tempodisplay.cc',
101         'editor_timefx.cc',
102         'engine_dialog.cc',
103         'enums.cc',
104         'export_channel_selector.cc',
105         'export_dialog.cc',
106         'export_file_notebook.cc',
107         'export_filename_selector.cc',
108         'export_format_dialog.cc',
109         'export_format_selector.cc',
110         'export_preset_selector.cc',
111         'export_timespan_selector.cc',
112         'fft.cc',
113         'fft_graph.cc',
114         'fft_result.cc',
115         'gain_meter.cc',
116         'generic_pluginui.cc',
117         'ghostregion.cc',
118         'global_port_matrix.cc',
119         'group_tabs.cc',
120         'gtk-custom-hruler.c',
121         'gtk-custom-ruler.c',
122         'gtk_pianokeyboard.c',
123         'gui_object.cc',
124         'insert_time_dialog.cc',
125         'interthread_progress_window.cc',
126         'io_selector.cc',
127         'keyboard.cc',
128         'keyeditor.cc',
129         'latency_gui.cc',
130         'led.cc',
131         'level_meter.cc',
132         'lineset.cc',
133         'location_ui.cc',
134         'main.cc',
135         'main_clock.cc',
136         'marker.cc',
137         'midi_automation_line.cc',
138         'midi_channel_dialog.cc',
139         'midi_channel_selector.cc',
140         'midi_cut_buffer.cc',
141         'midi_export_dialog.cc',
142         'midi_list_editor.cc',
143         'midi_port_dialog.cc',
144         'midi_region_view.cc',
145         'midi_scroomer.cc',
146         'midi_selection.cc',
147         'midi_streamview.cc',
148         'midi_time_axis.cc',
149         'midi_tracer.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         'mouse_cursors.cc',
159         'nag.cc',
160         'new_plugin_preset_dialog.cc',
161         'normalize_dialog.cc',
162         'note_player.cc',
163         'option_editor.cc',
164         'opts.cc',
165         'panner2d.cc',
166         'panner_interface.cc',
167         'panner_ui.cc',
168         'piano_roll_header.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         'search_path_option.cc',
203         'selection.cc',
204         'send_ui.cc',
205         'session_import_dialog.cc',
206         'session_metadata_dialog.cc',
207         'session_option_editor.cc',
208         'sfdb_ui.cc',
209         'shuttle_control.cc',
210         'simpleline.cc',
211         'simplerect.cc',
212         'splash.cc',
213         'speaker_dialog.cc',
214         'startup.cc',
215         'step_editor.cc',
216         'step_entry.cc',
217         'stereo_panner.cc',
218         'streamview.cc',
219         'strip_silence_dialog.cc',
220         'tape_region_view.cc',
221         'tempo_dialog.cc',
222         'tempo_lines.cc',
223         'theme_manager.cc',
224         'time_axis_view.cc',
225         'time_axis_view_item.cc',
226         'time_fx_dialog.cc',
227         'time_info_box.cc',
228         'time_selection.cc',
229         'track_selection.cc',
230         'track_view_list.cc',
231         'transpose_dialog.cc',
232         'ui_config.cc',
233         'utils.cc',
234         'verbose_cursor.cc',
235         'version.cc',
236         'visibility_group.cc',
237         'volume_controller.cc',
238         'waveview.cc',
239         'window_proxy.cc'
240 ]
241
242 def options(opt):
243     autowaf.set_options(opt)
244
245 def configure(conf):
246     conf.load('misc')
247     conf.load('compiler_cxx')
248     autowaf.build_version_files(
249         path_prefix + 'version.h',
250         path_prefix + 'version.cc',
251         'gtk2_ardour', MAJOR, MINOR, MICRO)
252     autowaf.configure(conf)
253
254     if re.search ("linux", sys.platform) != None:
255         autowaf.check_pkg(conf, 'alsa', uselib_store='ALSA')
256
257     # TODO: Insert a sanity check for on OS X to ensure CoreAudio is present
258
259     autowaf.check_pkg(conf, 'flac', uselib_store='FLAC',
260                       atleast_version='1.2.1')
261     autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD',
262                       atleast_version='2.10.1')
263     autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK',
264                       atleast_version='2.18')
265     autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM',
266                       atleast_version='2.18')
267     autowaf.check_pkg(conf, 'libgnomecanvas-2.0',
268                       uselib_store='GNOMECANVAS', atleast_version='2.30')
269     autowaf.check_pkg(conf, 'libgnomecanvasmm-2.6',
270                       uselib_store='GNOMECANVASMM', atleast_version='2.16')
271     autowaf.check_pkg(conf, 'ogg', uselib_store='OGG', atleast_version='1.1.2')
272     autowaf.check_pkg(conf, 'x11', uselib_store='X11', atleast_version='1.3', mandatory=False)
273
274     conf.write_config_header('gtk2ardour-config.h', remove=False)
275
276     # Boost headers
277     autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp')
278     autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp')
279
280 # Add a waf `feature' to allow compilation of things using winegcc
281 from waflib.TaskGen import feature
282 @feature("wine")
283 def set_winegcc(self):
284     self.env.LINK_CXX = self.env.LINK_CC = 'wineg++'
285     self.env.CC = 'winegcc'
286
287 def _doPyp(infileName, deps = False):
288     outStr = ''
289     out = []
290     re_spaces = re.compile("\s+")
291
292     if infileName == '-':
293         fd = sys.stdin
294     else:
295         fd = open(infileName)
296     inLines = fd.readlines()
297     if fd != sys.stdin:
298         fd.close()
299         
300
301     for line in inLines:
302         bits = re_spaces.split(line)
303         if bits[0] == '##include':
304             incName = bits[1]
305             if (deps):
306                 out += [ incName ]
307             else:
308                 # assume included file comes from same place as source file
309                 incName = os.path.join (os.path.dirname (infileName), incName);
310                 outStr += _doPyp(incName)
311         else:
312             if not deps:
313                 outStr += line
314
315     # done
316     if deps:
317         return out
318     else:
319         return outStr
320
321 def include_processor(task):
322     infileName = task.inputs[0].srcpath()
323     outfileName = os.path.join(out, task.outputs[0].bldpath())
324     fdOut = open (outfileName, "w")
325     fdOut.write (_doPyp(infileName))
326     fdOut.close ()
327
328
329 def build_color_scheme(path, prefix):
330     f = open (path, 'r')
331     color_scheme = ''
332     for line in f:
333         if re.search ('^#@color', line):
334             line.strip() # remove newline
335             words = line.split()
336             if len(color_scheme):
337                 color_scheme += ';'
338             color_scheme += prefix
339             color_scheme += '_'
340             color_scheme += words[1]
341             color_scheme += ':'
342             color_scheme += words[2]
343     f.close()
344     return color_scheme
345
346 def build(bld):
347
348     if bld.is_defined('WINDOWS_VST_SUPPORT'):
349         # If we require VST support we build a stub main() and the FST library
350         # here using winegcc, and link it to the GTK front-end library
351         obj = bld(features = 'cxx c cxxprogram wine')
352         obj.source = '''
353                 ../libs/fst/fst.c
354                 ../libs/fst/fstinfofile.c
355                 ../libs/fst/vsti.c
356                 ../libs/fst/vstwin.c
357                 ../vst/winmain.c
358         '''
359         obj.uselib = 'ALSA'
360         obj.use          = [ 'libpbd',
361                              'libmidipp',
362                              'libtaglib',
363                              'libardour',
364                              'libardour_cp',
365                              'libgtk2_ardour',
366                              'libgtkmm2ext',
367                              'libtaglib' ]
368         obj.target = 'ardour-3.0-vst.exe.so'
369         obj.includes  = [ '../libs/fst', '.' ]
370         obj.linkflags = ['-mwindows', '-Wl,--export-dynamic', '-lpthread']
371         obj.defines = ['_POSIX_SOURCE', 'USE_WS_PREFIX']
372         obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
373         # end of the wine executable
374
375         # now the shared library containing the GTK GUI for ardour
376         obj = bld (features = 'cxx c cxxshlib')
377         obj.source    = gtk2_ardour_sources
378         obj.includes  = [ '../libs/fst', '.' ]
379         obj.name      = 'libgtk2_ardour'
380         obj.target    = 'gtk2_ardour'
381     else:
382         # just the normal executable version of the GTK GUI
383         obj = bld(features = 'cxx c cxxprogram')
384         obj.source    = gtk2_ardour_sources
385         obj.target = 'ardour-3.0'
386         obj.includes = ['.']
387
388     # continue with setup of obj, which could be a shared library
389     # or an executable.
390
391     obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
392
393     obj.uselib       = 'UUID FLAC GLIBMM GTHREAD GTK OGG ALSA CURL DL'
394     obj.uselib       += ' GTKMM GNOMECANVASMM GNOMECANVAS '
395     obj.uselib       += ' AUDIOUNITS OSX GTKOSX '
396     obj.use          = [ 'libpbd',
397                          'libmidipp',
398                          'libtaglib',
399                          'libardour',
400                          'libardour_cp',
401                          'libgtkmm2ext',
402                          'libtaglib' ]
403     if sys.platform == 'darwin':
404         obj.use += ' libappleutility'
405     obj.defines     = [
406         'PACKAGE="' + I18N_PACKAGE + '"',
407         'VERSIONSTRING="' + bld.env['VERSION'] + '"',
408         'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
409         'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
410         'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
411         'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"'
412         ]
413     obj.includes += ['../libs']
414
415     if bld.is_defined('HAVE_SUIL'):
416         obj.source += [ 'lv2_plugin_ui.cc' ]
417         obj.uselib += ' SUIL '
418
419     if bld.is_defined('FREESOUND'):
420         obj.source +=  [ 'sfdb_freesound_mootcher.cc' ]
421         obj.defines += [ 'FREESOUND' ]
422
423     if bld.is_defined('WINDOWS_VST_SUPPORT'):
424         obj.source += [ 'windows_vst_plugin_ui.cc' ]
425         obj.defines += [ 'WINDOWS_VST_SUPPORT' ]
426         obj.uselib += ' X11 '
427
428     if bld.is_defined('LXVST_SUPPORT'):
429         obj.source += [ 'linux_vst_gui_support.cc', 'lxvst_plugin_ui.cc' ]
430         obj.defines += [ 'LXVST_SUPPORT' ]
431         obj.uselib += ' X11 '
432
433     if bld.is_defined('WINDOWS_VST_SUPPORT') or bld.is_defined('LXVST_SUPPORT'):
434         obj.source += [ 'vst_plugin_ui.cc' ]
435         
436     if bld.is_defined('PHONE_HOME'):
437         obj.defines += [ 'PHONE_HOME' ]
438
439     if bld.is_defined('HAVE_COREAUDIO'):
440         TaskGen.task_gen.mappings['.mm'] = TaskGen.task_gen.mappings['.cc']
441         obj.source += [ 'cocoacarbon.mm' ]
442         obj.use += ' libappleutility '
443
444     if bld.is_defined('AUDIOUNIT_SUPPORT'):
445         obj.source += [ 'au_pluginui.mm' ]
446
447     # Wrappers
448
449     wrapper_subst_dict = {
450             'INSTALL_PREFIX' : bld.env['PREFIX'],
451             'LIBDIR'         : os.path.normpath(bld.env['LIBDIR']),
452             'DATADIR'        : os.path.normpath(bld.env['DATADIR']),
453             'SYSCONFDIR'     : os.path.normpath(bld.env['SYSCONFDIR']),
454             'LIBS'           : 'build/libs',
455             'VERSION'        : '3.0',
456             'EXECUTABLE'     : 'build/gtk2_ardour/ardour-3.0'
457     }
458
459     def set_subst_dict(obj, dict):
460         for i in dict:
461             setattr(obj, i, dict[i])
462
463     obj              = bld(features = 'subst', rule= 'chmod 0755 ${TGT}')
464     obj.source       = 'ardev_common.sh.in'
465     obj.target       = 'ardev_common_waf.sh'
466     obj.chmod        = Utils.O755
467     obj.dict         = wrapper_subst_dict
468     set_subst_dict(obj, wrapper_subst_dict)
469
470     obj              = bld(features = 'subst')
471     obj.source       = 'ardour.sh.in'
472     obj.target       = 'ardour3'
473     obj.chmod        = Utils.O755
474     obj.dict         = wrapper_subst_dict
475     obj.install_path = bld.env['BINDIR']
476     set_subst_dict(obj, wrapper_subst_dict)
477
478     if bld.is_defined('WINDOWS_VST_SUPPORT'):
479         obj              = bld(features = 'subst')
480         obj.source       = '../vst/ardourvst.in'
481         obj.target       = 'ardourvst3'
482         obj.chmod        = Utils.O755
483         obj.dict         = wrapper_subst_dict
484         obj.install_path = bld.env['BINDIR']
485         set_subst_dict(obj, wrapper_subst_dict)
486
487     # Font configuration
488
489     dark_rc_subst_dict = {}
490     light_rc_subst_dict = {}
491     font_sizes      = {}
492     base_font       = ""
493
494     # Set up font sizes
495     if bld.is_defined('GTKOSX'): # OS X fonts
496         basefont = ""
497         font_sizes = {
498                 'TINY' : '7',
499                 'SMALLER' : '9',
500                 'SMALL' : '10',
501                 'NORMAL' : '11',
502                 'BIG' : '12',
503                 'BIGGER' : '14',
504                 'LARGE' : '18',
505                 'LARGER' : '28',
506                 'HUGER' : '36',
507                 'MASSIVE' : '60'
508         }
509     else: # Linux/X11 fonts
510         basefont = '' # unspecified - use system defaults
511         font_sizes = {
512                 'TINY' : '6',
513                 'SMALLER' : '8',
514                 'SMALL' : '9',
515                 'NORMAL' : '10',
516                 'BIG' : '14',
517                 'BIGGER' : '16',
518                 'LARGE' : '18',
519                 'LARGER' : '24',
520                 'HUGER' : '34',
521                 'MASSIVE' : '60'
522         }
523
524     # Set up font substitution dictionary
525     # @FONT_XXXX@
526     for style in ['', 'BOLD', 'ITALIC']:
527         for sizename,points in iter(font_sizes.items()):
528             if (len (style)):
529                 key = "_".join (['FONT',style,sizename])
530                 fontstyle = " ".join ([basefont,style.lower(),points])
531             else:
532                 key = "_".join (['FONT',sizename])
533                 fontstyle = " ".join ([basefont,points])
534
535             dark_rc_subst_dict[key] = fontstyle
536             light_rc_subst_dict[key] = fontstyle
537
538     # @FONT_SIZE_XXXX@
539     for sizename,points in iter(font_sizes.items()):
540             key = "_".join (['FONT_SIZE',sizename])
541             dark_rc_subst_dict[key] = points
542             light_rc_subst_dict[key] = points
543
544     # RC files
545     dark_rc_subst_dict['COLOR_SCHEME'] = build_color_scheme(
546         'gtk2_ardour/ardour3_ui_dark.rc.in', 'ARDOUR_DARK')
547     dark_rc_subst_dict['COLPREFIX'] = 'ARDOUR_DARK'
548     light_rc_subst_dict['COLOR_SCHEME'] = build_color_scheme(
549         'gtk2_ardour/ardour3_ui_light.rc.in', 'ARDOUR_LIGHT')
550     light_rc_subst_dict['COLPREFIX'] = 'ARDOUR_LIGHT'
551
552     obj              = bld(features = 'subst')
553     obj.source       = [ 'ardour3_ui_dark.rc.in' ]
554     obj.target       = 'ardour3_ui_dark.rc.pre'
555     obj.install_path = None
556     set_subst_dict(obj, dark_rc_subst_dict)
557
558     obj              = bld(features = 'subst')
559     obj.source       = [ 'ardour3_ui_light.rc.in' ]
560     obj.target       = 'ardour3_ui_light.rc.pre'
561     obj.install_path = None
562     set_subst_dict(obj, light_rc_subst_dict)
563
564     obj              = bld(features = 'subst')
565     obj.source       = [ 'ardour3_styles.rc.in' ]
566     obj.target       = 'ardour3_dark_styles.rc'
567     obj.install_path = None
568     set_subst_dict(obj, dark_rc_subst_dict)
569
570     obj              = bld(features = 'subst')
571     obj.source       = [ 'ardour3_styles.rc.in' ]
572     obj.target       = 'ardour3_light_styles.rc'
573     obj.install_path = None
574     set_subst_dict(obj, light_rc_subst_dict)
575
576     obj              = bld(features = 'subst')
577     obj.source       = [ 'ardour3_fonts.rc.in' ]
578     obj.target       = 'ardour3_dark_fonts.rc'
579     obj.install_path = None
580     set_subst_dict(obj, dark_rc_subst_dict)
581
582     obj              = bld(features = 'subst')
583     obj.source       = [ 'ardour3_fonts.rc.in' ]
584     obj.target       = 'ardour3_light_fonts.rc'
585     obj.install_path = None
586     set_subst_dict(obj, light_rc_subst_dict)
587
588     obj              = bld(rule = 'cp ${SRC} ${TGT}')
589     obj.source       = [ 'ardour3_widget_list.rc' ]
590     obj.target       = 'ardour3_widgets.rc'
591     obj.install_path = None
592
593     obj = bld (rule = include_processor)
594     obj.source = [ 'ardour3_ui_dark.rc.pre' ]
595     # find and add all ##include dependencies as sources
596     obj.source += _doPyp (bld.path.find_resource ('ardour3_ui_dark.rc.in').srcpath(), True)
597     obj.target = 'ardour3_ui_dark.rc'
598     obj.install_path = '${SYSCONFDIR}/ardour3'
599
600     obj = bld (rule = include_processor)
601     obj.source = [ 'ardour3_ui_light.rc.pre' ]
602     # find and add all ##include dependencies as sources
603     obj.source += _doPyp (bld.path.find_resource ('ardour3_ui_light.rc.in').srcpath(), True)
604     obj.target = 'ardour3_ui_light.rc'
605     obj.install_path = '${SYSCONFDIR}/ardour3'
606
607     # Menus
608     menus_argv = []
609     if bld.is_defined('GTKOSX'):
610         menus_argv = [ '-E', '-P', '-DGTKOSX' ]
611     else:
612         menus_argv = [ '-E', '-P' ]
613     obj = bld(features = 'command-output')
614     obj.command = 'cpp'
615     obj.command_is_external = True
616     obj.no_inputs = True
617     obj.argv = menus_argv
618     obj.stdin = 'ardour.menus.in'
619     obj.stdout = 'ardour.menus'
620     bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'),
621                       'ardour.menus')
622
623     # Keybindings
624
625     # 'SAE-de-keypad', 'SAE-de-nokeypad', 'SAE-us-keypad',
626     # 'SAE-us-nokeypad', 'ergonomic-us'
627
628     for b in [ 'mnemonic-us' ] :
629         obj = bld(
630             target = b + '.bindings',
631             source = b + '.bindings.in',
632             rule = '../tools/fmt-bindings --platform="%s" --winkey="%s" --accelmap <${SRC} >${TGT}' % (sys.platform, bld.env['WINDOWS_KEY'] )
633             )
634         obj.install_path = os.path.join(bld.env['SYSCONFDIR'], 'ardour3')
635
636     # not modified at present
637     bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'),
638                       'step_editing.bindings')
639     bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'),
640                       'mixer.bindings')
641
642     # Icons/Images
643     bld.install_files('${DATADIR}/ardour3/icons', bld.path.ant_glob('icons/*.png'))
644     bld.install_files('${DATADIR}/ardour3/pixmaps', bld.path.ant_glob('pixmaps/*.xpm'))
645     bld.install_files('${DATADIR}/ardour3', 'splash.png')
646
647     # Default UI configuration
648     bld.install_files('${SYSCONFDIR}/ardour3', 'ardour3_ui_default.conf')
649
650     # Default export stuff
651     bld.install_files('${SYSCONFDIR}/ardour3/export', bld.path.ant_glob('export/*.format'))
652
653     # i18n
654     if bld.is_defined('ENABLE_NLS'):
655         mo_files = bld.path.ant_glob('po/*.mo')
656         for mo in mo_files:
657             lang = os.path.basename(mo.srcpath()).replace('.mo', '')
658             bld.install_as(os.path.join(bld.env['PREFIX'], 'share', 'locale',
659                                         lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
660                            mo)
661
662 def i18n(bld):
663     autowaf.build_i18n(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
664                        'Paul Davis')
665
666 def i18n_pot(bld):
667     autowaf.build_i18n_pot(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
668                        'Paul Davis')
669
670 def i18n_po(bld):
671     autowaf.build_i18n_po(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
672                        'Paul Davis')
673
674 def i18n_mo(bld):
675     autowaf.build_i18n_mo(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
676                        'Paul Davis')