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