10 # Version of this package (even if built as a child)
14 GTK2_ARDOUR_VERSION
= "%s.%s.%s" % (MAJOR
, MINOR
, MICRO
)
16 # Variables for 'waf dist'
17 APPNAME
= 'gtk2_ardour'
18 VERSION
= GTK2_ARDOUR_VERSION
24 path_prefix
= 'gtk2_ardour/'
26 gtk2_ardour_sources
= [
29 'add_midi_cc_track_dialog.cc',
30 'add_route_dialog.cc',
35 'ardour_ui_dependents.cc',
36 'ardour_ui_dialogs.cc',
39 'ardour_ui_options.cc',
41 'audio_region_editor.cc',
42 'audio_region_view.cc',
43 'audio_streamview.cc',
45 'automation_controller.cc',
47 'automation_region_view.cc',
48 'automation_streamview.cc',
49 'automation_time_axis.cc',
55 'canvas-note-event.cc',
57 'canvas-program-change.cc',
58 'canvas-simpleline.c',
59 'canvas-simplerect.c',
64 'control_point_dialog.cc',
72 'editor_audio_import.cc',
73 'editor_audiotrack.cc',
75 'editor_canvas_events.cc',
76 'editor_component.cc',
79 'editor_route_groups.cc',
80 'editor_export_audio.cc',
81 'editor_group_tabs.cc',
84 'editor_locations.cc',
94 'editor_selection.cc',
95 'editor_snapshots.cc',
97 'editor_tempodisplay.cc',
101 'export_channel_selector.cc',
103 'export_file_notebook.cc',
104 'export_filename_selector.cc',
105 'export_format_dialog.cc',
106 'export_format_selector.cc',
107 'export_preset_selector.cc',
108 'export_timespan_selector.cc',
113 'generic_pluginui.cc',
115 'global_port_matrix.cc',
117 'gtk-custom-hruler.c',
118 'gtk-custom-ruler.c',
119 'interthread_progress_window.cc',
130 'midi_channel_selector.cc',
131 'midi_cut_buffer.cc',
132 'midi_list_editor.cc',
133 'midi_port_dialog.cc',
134 'midi_region_view.cc',
136 'midi_streamview.cc',
139 'mixer_group_tabs.cc',
142 'monitor_section.cc',
149 'piano_roll_header.cc',
150 'playlist_selector.cc',
152 'plugin_selector.cc',
156 'port_matrix_body.cc',
157 'port_matrix_column_labels.cc',
158 'port_matrix_component.cc',
159 'port_matrix_grid.cc',
160 'port_matrix_labels.cc',
161 'port_matrix_row_labels.cc',
165 'quantize_dialog.cc',
166 'rc_option_editor.cc',
168 'region_gain_line.cc',
169 'region_selection.cc',
173 'route_group_dialog.cc',
174 'route_group_menu.cc',
175 'route_params_ui.cc',
176 'route_processor_selection.cc',
177 'route_time_axis.cc',
181 'session_import_dialog.cc',
182 'session_metadata_dialog.cc',
183 'session_option_editor.cc',
190 'strip_silence_dialog.cc',
191 'tape_region_view.cc',
196 'time_axis_view_item.cc',
199 'track_selection.cc',
200 'track_view_list.cc',
204 'volume_controller.cc',
208 def set_options(opt
):
209 autowaf
.set_options(opt
)
212 autowaf
.build_version_files(path_prefix
+'version.h', path_prefix
+'version.cc',
213 'gtk2_ardour', MAJOR
, MINOR
, MICRO
)
214 autowaf
.configure(conf
)
215 conf
.check_tool('compiler_cxx')
217 if re
.search ("linux", sys
.platform
) != None:
218 autowaf
.check_pkg(conf
, 'alsa', uselib_store
='ALSA')
220 # TODO: Insert a sanity check for on OS X
221 # to ensure that CoreAudio is present....
222 # Really shouldn't these checks be in AutoWaf?
224 autowaf
.check_pkg(conf
, 'flac', uselib_store
='FLAC', atleast_version
='1.2.1')
225 autowaf
.check_pkg(conf
, 'gthread', uselib_store
='GTHREAD', atleast_version
='2.10.1')
226 autowaf
.check_pkg(conf
, 'gtk+-2.0', uselib_store
='GTK', atleast_version
='2.12.1')
227 autowaf
.check_pkg(conf
, 'gtkmm-2.4', uselib_store
='GTKMM', atleast_version
='2.8')
228 autowaf
.check_pkg(conf
, 'libgnomecanvas-2.0', uselib_store
='GNOMECANVAS', atleast_version
='2.0')
229 autowaf
.check_pkg(conf
, 'libgnomecanvasmm-2.6', uselib_store
='GNOMECANVASMM', atleast_version
='2.12.0')
230 autowaf
.check_pkg(conf
, 'ogg', uselib_store
='OGG', atleast_version
='1.1.2')
232 conf
.check_tool('misc') # subst tool
234 conf
.write_config_header('gtk2ardour-config.h')
237 autowaf
.check_header(conf
, 'boost/shared_ptr.hpp')
238 autowaf
.check_header(conf
, 'boost/weak_ptr.hpp')
242 obj
= bld
.new_task_gen(features
= 'cxx cc cprogram')
244 obj
.source
= gtk2_ardour_sources
245 obj
.name
= 'gtk2_ardour'
246 obj
.target
= 'ardour-3.0'
247 obj
.install_path
= os
.path
.join(bld
.env
['LIBDIR'], 'ardour3')
248 obj
.uselib
= 'UUID FLAC GLIBMM GTHREAD GTK GNOMECANVAS OGG ALSA'
249 obj
.uselib
+= ' GTKMM GNOMECANVASMM OSX GTKOSX COREAUDIO'
250 obj
.uselib_local
= '''libpbd libmidipp libtaglib libardour libardour_cp
251 libgtkmm2ext libtaglib'''
252 obj
.cflags
= ['-DPACKAGE="gtk2_ardour"']
253 obj
.cxxflags
= ['-DPACKAGE="gtk2_ardour"']
254 obj
.cxxflags
+= ['-DVERSIONSTRING="' + bld
.env
['VERSION'] + '"']
255 obj
.cxxflags
+= ['-DDATA_DIR="' + os
.path
.normpath(bld
.env
['DATADIR']) + '"']
256 obj
.cxxflags
+= ['-DCONFIG_DIR="' + os
.path
.normpath(bld
.env
['CONFIGDIR']) + '"']
257 obj
.cxxflags
+= ['-DMODULE_DIR="' + os
.path
.normpath(bld
.env
['LIBDIR']) + '"']
258 obj
.cxxflags
+= ['-DLOCALEDIR="' + os
.path
.join(
259 os
.path
.normpath(bld
.env
['DATADIR']), 'locale') + '"']
260 obj
.cxxflags
+= ['-DPROGRAM_NAME="' + bld
.env
['PROGRAM_NAME'] + '"']
262 if bld
.env
['HAVE_SLV2']:
263 obj
.source
+= [ 'lv2_plugin_ui.cc' ]
264 obj
.uselib
+= ' SLV2 '
266 if bld
.env
['FREESOUND']:
267 obj
.source
+= [ 'sfdb_freesound_mootcher.cc' ]
270 obj
.source
+= [ 'vst_pluginui.cc' ]
271 obj
.cxxflags
+= [ '-DVST_SUPPORT' ]
273 if bld
.env
['GTKOSX']:
274 TaskGen
.task_gen
.mappings
['.mm'] = TaskGen
.task_gen
.mappings
['.cc']
275 obj
.source
+= [ 'cocoacarbon.mm' ]
277 if bld
.env
['AUDIOUNITS']:
278 obj
.source
+= [ 'au_pluginui.mm' ]
279 obj
.uselib_local
+= ' libappleutility '
282 obj
.source
+= [ 'x11.cc' ]
286 wrapper_subst_dict
= {
287 'INSTALL_PREFIX' : bld
.env
['PREFIX'],
288 'LIBDIR' : os
.path
.normpath(bld
.env
['LIBDIRNAME']),
289 'LIBS' : 'build/default/libs',
291 'EXECUTABLE' : 'build/default/gtk2_ardour/ardour-3.0'
294 obj
= bld
.new_task_gen('subst')
295 obj
.source
= 'ardev_common.sh.in'
296 obj
.target
= 'ardev_common_waf.sh'
298 obj
.dict = wrapper_subst_dict
300 obj
= bld
.new_task_gen('subst')
301 obj
.source
= 'ardour.sh.in'
302 obj
.target
= 'ardour3'
304 obj
.dict = wrapper_subst_dict
305 obj
.install_path
= bld
.env
['BINDIR']
314 if bld
.env
['IS_OSX']: # OS X fonts
315 basefont
= "Lucida Grande"
328 else: # Linux/X11 fonts
343 # Set up font substitution dictionary
344 for style
in ['', 'BOLD', 'ITALIC']:
345 for sizename
,points
in font_sizes
.iteritems():
347 key
= "_".join (['FONT',style
,sizename
])
348 fontstyle
= " ".join ([basefont
,style
.lower(),points
])
350 key
= "_".join (['FONT',sizename
])
351 fontstyle
= " ".join ([basefont
,points
])
353 font_subst_dict
[key
] = fontstyle
355 # add normal monospace to font dict
356 font_subst_dict
['FONT_MONOSPACE_NORMAL'] = 'monospace 10'
359 obj
= bld
.new_task_gen('subst')
360 obj
.source
= 'ardour3_ui_dark.rc.in'
361 obj
.target
= 'ardour3_ui_dark.rc'
362 obj
.dict = font_subst_dict
363 obj
.install_path
= os
.path
.join(bld
.env
['CONFIGDIR'], 'ardour3')
365 obj
= bld
.new_task_gen('subst')
366 obj
.source
= 'ardour3_ui_light.rc.in'
367 obj
.target
= 'ardour3_ui_light.rc'
368 obj
.dict = font_subst_dict
369 obj
.install_path
= os
.path
.join(bld
.env
['CONFIGDIR'], 'ardour3')
371 obj
= bld
.new_task_gen('subst')
372 obj
.source
= 'ardour3_ui_dark_sae.rc.in'
373 obj
.target
= 'ardour3_ui_dark_sae.rc'
374 obj
.dict = font_subst_dict
375 obj
.install_path
= os
.path
.join(bld
.env
['CONFIGDIR'], 'ardour3')
377 obj
= bld
.new_task_gen('subst')
378 obj
.source
= 'ardour3_ui_light_sae.rc.in'
379 obj
.target
= 'ardour3_ui_light_sae.rc'
380 obj
.dict = font_subst_dict
381 obj
.install_path
= os
.path
.join(bld
.env
['CONFIGDIR'], 'ardour3')
385 if bld
.env
['GTKOSX']:
386 menus_argv
= [ '-E', '-P', '-DGTKOSX' ]
388 menus_argv
= [ '-E', '-P' ]
389 obj
= bld
.new_task_gen('command-output')
391 obj
.command_is_external
= True
393 obj
.argv
= menus_argv
394 obj
.stdin
= 'ardour.menus.in'
395 obj
.stdout
= 'ardour.menus'
396 bld
.install_files(os
.path
.join(bld
.env
['CONFIGDIR'], 'ardour3'), 'ardour.menus')
400 # 'SAE-de-keypad', 'SAE-de-nokeypad', 'SAE-us-keypad', 'SAE-us-nokeypad', 'ergonomic-us'
402 for b
in [ 'mnemonic-us' ] :
403 obj
= bld
.new_task_gen (
404 target
= b
+ '.bindings',
405 source
= b
+ '.bindings.in',
406 rule
= '../tools/fmt-bindings --winkey=%s --accelmap <${SRC} >${TGT}' % bld
.env
['windows_key']
408 obj
.install_path
= os
.path
.join(bld
.env
['CONFIGDIR'], 'ardour3')
411 bld
.install_files('${DATADIR}/ardour3/icons', 'icons/*.png')
412 bld
.install_files('${DATADIR}/ardour3/pixmaps', 'pixmaps/*.xpm')
413 bld
.install_files('${DATADIR}/ardour3', 'splash.png')
415 # Default UI configuration
416 bld
.install_files('${CONFIGDIR}/ardour3', 'ardour3_ui_default.conf')
419 if bld
.env
['ENABLE_NLS']:
420 mo_files
= glob
.glob (os
.path
.join (bld
.get_curdir(), 'po/*.mo'))
422 lang
= os
.path
.basename (mo
).replace ('.mo', '')
423 bld
.install_as (os
.path
.join (bld
.env
['PREFIX'], 'share', 'locale', lang
, 'LC_MESSAGES', APPNAME
+ '.mo'), mo
)
426 autowaf
.build_i18n (bld
, 'gtk2_ardour', APPNAME
, gtk2_ardour_sources
)