2009-02-25 18:59:55 -05:00
|
|
|
#!/usr/bin/env python
|
2011-09-29 15:17:54 -04:00
|
|
|
from waflib.extras import autowaf as autowaf
|
2011-09-29 15:58:05 -04:00
|
|
|
from waflib import Options, TaskGen
|
2011-09-29 15:17:54 -04:00
|
|
|
import waflib.Logs as Logs, waflib.Utils as Utils
|
2009-02-25 18:59:55 -05:00
|
|
|
import os
|
2013-12-05 14:44:37 -05:00
|
|
|
import shutil
|
2009-08-08 18:36:32 -04:00
|
|
|
import sys
|
|
|
|
import re
|
2011-10-26 17:47:08 -04:00
|
|
|
import time
|
|
|
|
from waflib.Task import Task
|
2014-10-04 20:12:25 -04:00
|
|
|
from waflib.Tools import winres
|
2009-02-25 18:59:55 -05:00
|
|
|
|
|
|
|
# Mandatory variables
|
2011-09-29 15:17:54 -04:00
|
|
|
top = '.'
|
|
|
|
out = 'build'
|
2009-02-25 18:59:55 -05:00
|
|
|
|
2009-02-25 21:24:16 -05:00
|
|
|
path_prefix = 'gtk2_ardour/'
|
|
|
|
|
2009-07-22 09:51:16 -04:00
|
|
|
gtk2_ardour_sources = [
|
2011-03-16 12:32:56 -04:00
|
|
|
'about.cc',
|
|
|
|
'actions.cc',
|
|
|
|
'add_route_dialog.cc',
|
|
|
|
'ambiguous_file_dialog.cc',
|
|
|
|
'analysis_window.cc',
|
2011-10-26 17:01:14 -04:00
|
|
|
'ardour_button.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'ardour_dialog.cc',
|
2014-07-18 09:47:45 -04:00
|
|
|
'ardour_display.cc',
|
2014-03-26 12:37:09 -04:00
|
|
|
'ardour_dropdown.cc',
|
2014-07-18 09:47:45 -04:00
|
|
|
'ardour_knob.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'ardour_ui.cc',
|
|
|
|
'ardour_ui2.cc',
|
|
|
|
'ardour_ui_dependents.cc',
|
|
|
|
'ardour_ui_dialogs.cc',
|
|
|
|
'ardour_ui_ed.cc',
|
|
|
|
'ardour_ui_mixer.cc',
|
|
|
|
'ardour_ui_options.cc',
|
2011-11-18 16:56:01 -05:00
|
|
|
'ardour_window.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'audio_clock.cc',
|
|
|
|
'audio_region_editor.cc',
|
|
|
|
'audio_region_view.cc',
|
|
|
|
'audio_streamview.cc',
|
|
|
|
'audio_time_axis.cc',
|
|
|
|
'automation_controller.cc',
|
|
|
|
'automation_line.cc',
|
|
|
|
'automation_region_view.cc',
|
|
|
|
'automation_streamview.cc',
|
|
|
|
'automation_time_axis.cc',
|
|
|
|
'axis_view.cc',
|
2013-05-04 22:02:05 -04:00
|
|
|
'big_clock_window.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'bundle_manager.cc',
|
2012-02-02 23:18:30 -05:00
|
|
|
'button_joiner.cc',
|
2011-03-02 17:43:19 -05:00
|
|
|
'clock_group.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'configinfo.cc',
|
|
|
|
'control_point.cc',
|
|
|
|
'control_point_dialog.cc',
|
2014-12-20 01:11:28 -05:00
|
|
|
'cursor_context.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'curvetest.cc',
|
|
|
|
'debug.cc',
|
|
|
|
'edit_note_dialog.cc',
|
|
|
|
'editing.cc',
|
|
|
|
'editor.cc',
|
|
|
|
'editor_actions.cc',
|
|
|
|
'editor_audio_import.cc',
|
2015-07-31 23:41:26 -04:00
|
|
|
'editor_pt_import.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'editor_audiotrack.cc',
|
|
|
|
'editor_canvas.cc',
|
|
|
|
'editor_canvas_events.cc',
|
|
|
|
'editor_component.cc',
|
|
|
|
'editor_cursors.cc',
|
|
|
|
'editor_drag.cc',
|
|
|
|
'editor_route_groups.cc',
|
|
|
|
'editor_export_audio.cc',
|
|
|
|
'editor_group_tabs.cc',
|
|
|
|
'editor_keys.cc',
|
|
|
|
'editor_locations.cc',
|
|
|
|
'editor_markers.cc',
|
|
|
|
'editor_mixer.cc',
|
|
|
|
'editor_mouse.cc',
|
|
|
|
'editor_ops.cc',
|
|
|
|
'editor_regions.cc',
|
|
|
|
'editor_routes.cc',
|
|
|
|
'editor_rulers.cc',
|
|
|
|
'editor_selection.cc',
|
|
|
|
'editor_snapshots.cc',
|
|
|
|
'editor_summary.cc',
|
|
|
|
'editor_tempodisplay.cc',
|
|
|
|
'editor_timefx.cc',
|
|
|
|
'engine_dialog.cc',
|
|
|
|
'enums.cc',
|
|
|
|
'export_channel_selector.cc',
|
|
|
|
'export_dialog.cc',
|
|
|
|
'export_file_notebook.cc',
|
|
|
|
'export_filename_selector.cc',
|
|
|
|
'export_format_dialog.cc',
|
|
|
|
'export_format_selector.cc',
|
|
|
|
'export_preset_selector.cc',
|
|
|
|
'export_timespan_selector.cc',
|
|
|
|
'fft.cc',
|
|
|
|
'fft_graph.cc',
|
|
|
|
'fft_result.cc',
|
2014-10-31 12:26:57 -04:00
|
|
|
'floating_text_entry.cc',
|
2013-08-08 14:08:20 -04:00
|
|
|
'sfdb_freesound_mootcher.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'gain_meter.cc',
|
|
|
|
'generic_pluginui.cc',
|
|
|
|
'ghostregion.cc',
|
|
|
|
'global_port_matrix.cc',
|
|
|
|
'group_tabs.cc',
|
2010-08-02 17:52:21 -04:00
|
|
|
'gtk_pianokeyboard.c',
|
2011-07-06 20:37:13 -04:00
|
|
|
'gui_object.cc',
|
2015-06-16 06:23:50 -04:00
|
|
|
'insert_remove_time_dialog.cc',
|
2014-12-24 18:39:15 -05:00
|
|
|
'instrument_selector.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'interthread_progress_window.cc',
|
|
|
|
'io_selector.cc',
|
2013-04-04 00:32:52 -04:00
|
|
|
'hit.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'keyboard.cc',
|
|
|
|
'keyeditor.cc',
|
|
|
|
'latency_gui.cc',
|
2010-05-05 16:29:46 -04:00
|
|
|
'led.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'level_meter.cc',
|
|
|
|
'location_ui.cc',
|
|
|
|
'main.cc',
|
2012-05-31 19:14:03 -04:00
|
|
|
'main_clock.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'marker.cc',
|
|
|
|
'midi_automation_line.cc',
|
2011-06-13 10:48:48 -04:00
|
|
|
'midi_channel_dialog.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'midi_channel_selector.cc',
|
|
|
|
'midi_cut_buffer.cc',
|
2012-05-23 16:32:55 -04:00
|
|
|
'midi_export_dialog.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'midi_list_editor.cc',
|
|
|
|
'midi_port_dialog.cc',
|
|
|
|
'midi_region_view.cc',
|
|
|
|
'midi_scroomer.cc',
|
2011-12-12 14:03:46 -05:00
|
|
|
'midi_selection.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'midi_streamview.cc',
|
|
|
|
'midi_time_axis.cc',
|
|
|
|
'midi_tracer.cc',
|
2012-06-06 09:17:53 -04:00
|
|
|
'midi_velocity_dialog.cc',
|
2010-11-09 01:03:51 -05:00
|
|
|
'missing_file_dialog.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'missing_plugin_dialog.cc',
|
2011-11-04 13:53:21 -04:00
|
|
|
'mixer_actor.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'mixer_group_tabs.cc',
|
|
|
|
'mixer_strip.cc',
|
|
|
|
'mixer_ui.cc',
|
2013-06-19 04:25:18 -04:00
|
|
|
'meterbridge.cc',
|
2013-06-23 10:05:52 -04:00
|
|
|
'meter_strip.cc',
|
2013-07-05 07:58:14 -04:00
|
|
|
'meter_patterns.cc',
|
2010-03-10 12:31:16 -05:00
|
|
|
'monitor_section.cc',
|
2015-04-21 09:18:10 -04:00
|
|
|
'monitor_selector.cc',
|
2011-01-07 12:36:01 -05:00
|
|
|
'mono_panner.cc',
|
2012-06-06 07:47:09 -04:00
|
|
|
'mono_panner_editor.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'mouse_cursors.cc',
|
|
|
|
'nag.cc',
|
|
|
|
'new_plugin_preset_dialog.cc',
|
|
|
|
'normalize_dialog.cc',
|
2013-04-04 00:32:52 -04:00
|
|
|
'note.cc',
|
2013-04-04 18:45:27 -04:00
|
|
|
'note_base.cc',
|
2010-09-15 14:54:04 -04:00
|
|
|
'note_player.cc',
|
2014-11-03 16:37:19 -05:00
|
|
|
'note_select_dialog.cc',
|
2013-03-21 16:16:48 -04:00
|
|
|
'nsm.cc',
|
|
|
|
'nsmclient.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'option_editor.cc',
|
|
|
|
'opts.cc',
|
|
|
|
'panner2d.cc',
|
2012-06-06 07:47:09 -04:00
|
|
|
'panner_editor.cc',
|
2011-12-26 09:05:19 -05:00
|
|
|
'panner_interface.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'panner_ui.cc',
|
2013-04-04 00:32:52 -04:00
|
|
|
'patch_change.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'piano_roll_header.cc',
|
2013-03-08 11:41:45 -05:00
|
|
|
'pingback.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'playlist_selector.cc',
|
|
|
|
'plugin_eq_gui.cc',
|
|
|
|
'plugin_selector.cc',
|
|
|
|
'plugin_ui.cc',
|
|
|
|
'port_group.cc',
|
2010-08-31 10:16:29 -04:00
|
|
|
'port_insert_ui.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'port_matrix.cc',
|
|
|
|
'port_matrix_body.cc',
|
|
|
|
'port_matrix_column_labels.cc',
|
|
|
|
'port_matrix_component.cc',
|
|
|
|
'port_matrix_grid.cc',
|
|
|
|
'port_matrix_labels.cc',
|
|
|
|
'port_matrix_row_labels.cc',
|
|
|
|
'processor_box.cc',
|
|
|
|
'patch_change_dialog.cc',
|
|
|
|
'progress_reporter.cc',
|
|
|
|
'prompter.cc',
|
|
|
|
'public_editor.cc',
|
|
|
|
'quantize_dialog.cc',
|
|
|
|
'rc_option_editor.cc',
|
|
|
|
'region_editor.cc',
|
|
|
|
'region_gain_line.cc',
|
|
|
|
'region_layering_order_editor.cc',
|
|
|
|
'region_selection.cc',
|
|
|
|
'region_view.cc',
|
|
|
|
'return_ui.cc',
|
|
|
|
'rhythm_ferret.cc',
|
|
|
|
'route_group_dialog.cc',
|
|
|
|
'route_group_menu.cc',
|
|
|
|
'route_params_ui.cc',
|
|
|
|
'route_processor_selection.cc',
|
|
|
|
'route_time_axis.cc',
|
|
|
|
'route_ui.cc',
|
2014-06-25 15:23:25 -04:00
|
|
|
'ruler_dialog.cc',
|
2015-07-05 08:50:02 -04:00
|
|
|
'save_as_dialog.cc',
|
2010-11-09 01:03:51 -05:00
|
|
|
'search_path_option.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'selection.cc',
|
2014-12-14 08:13:38 -05:00
|
|
|
'selection_memento.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'send_ui.cc',
|
2013-09-23 14:41:52 -04:00
|
|
|
'session_dialog.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'session_import_dialog.cc',
|
|
|
|
'session_metadata_dialog.cc',
|
|
|
|
'session_option_editor.cc',
|
|
|
|
'sfdb_ui.cc',
|
2011-04-19 22:48:34 -04:00
|
|
|
'shuttle_control.cc',
|
2014-05-19 15:50:37 -04:00
|
|
|
'soundcloud_export_selector.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'splash.cc',
|
2011-02-16 23:45:49 -05:00
|
|
|
'speaker_dialog.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'startup.cc',
|
2010-08-15 12:39:51 -04:00
|
|
|
'step_editor.cc',
|
2010-08-02 17:52:21 -04:00
|
|
|
'step_entry.cc',
|
2010-11-30 15:22:43 -05:00
|
|
|
'stereo_panner.cc',
|
2012-06-06 07:47:09 -04:00
|
|
|
'stereo_panner_editor.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'streamview.cc',
|
|
|
|
'strip_silence_dialog.cc',
|
2013-04-04 00:32:52 -04:00
|
|
|
'sys_ex.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'tape_region_view.cc',
|
|
|
|
'tempo_dialog.cc',
|
|
|
|
'tempo_lines.cc',
|
|
|
|
'theme_manager.cc',
|
|
|
|
'time_axis_view.cc',
|
|
|
|
'time_axis_view_item.cc',
|
|
|
|
'time_fx_dialog.cc',
|
2011-06-03 18:18:47 -04:00
|
|
|
'time_info_box.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'time_selection.cc',
|
2014-12-25 10:02:00 -05:00
|
|
|
'timers.cc',
|
2015-01-05 00:28:59 -05:00
|
|
|
'tooltips.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'track_selection.cc',
|
|
|
|
'track_view_list.cc',
|
2014-12-28 15:50:57 -05:00
|
|
|
'transform_dialog.cc',
|
2011-04-05 22:04:37 -04:00
|
|
|
'transpose_dialog.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'ui_config.cc',
|
|
|
|
'utils.cc',
|
2011-05-02 09:38:16 -04:00
|
|
|
'verbose_cursor.cc',
|
2011-10-29 16:07:00 -04:00
|
|
|
'visibility_group.cc',
|
2011-02-11 13:04:09 -05:00
|
|
|
'volume_controller.cc',
|
2013-05-04 22:02:05 -04:00
|
|
|
'window_manager.cc',
|
2013-04-11 13:49:29 -04:00
|
|
|
# video-timeline related sources:
|
|
|
|
'video_image_frame.cc',
|
|
|
|
'add_video_dialog.cc',
|
|
|
|
'editor_videotimeline.cc',
|
|
|
|
'video_timeline.cc',
|
|
|
|
'video_monitor.cc',
|
|
|
|
'transcode_ffmpeg.cc',
|
|
|
|
'transcode_video_dialog.cc',
|
|
|
|
'video_server_dialog.cc',
|
|
|
|
'utils_videotl.cc',
|
|
|
|
'export_video_dialog.cc',
|
2014-12-23 12:28:45 -05:00
|
|
|
'export_video_infobox.cc',
|
|
|
|
'video_tool_paths.cc'
|
2009-07-22 09:51:16 -04:00
|
|
|
]
|
|
|
|
|
2015-01-28 17:50:07 -05:00
|
|
|
def enoify (major, minor):
|
|
|
|
if major == 3:
|
|
|
|
return "\\n\\\"E-No\\\""
|
|
|
|
elif major == 4:
|
|
|
|
if minor == 0:
|
|
|
|
return "\\n\\\"No Pussyfooting\\\""
|
|
|
|
elif minor == 1:
|
|
|
|
return "\\n\\\"Here Come the Warm Jets\\\""
|
|
|
|
elif minor == 2:
|
|
|
|
return "\\n\\\"Taking Tiger Mountain\\\""
|
|
|
|
elif minor == 3:
|
|
|
|
return "\\n\\\"Lady June's Linguistic Leprosy\\\""
|
2015-08-05 18:50:54 -04:00
|
|
|
elif minor == 4:
|
|
|
|
return "\\n\\\"Discreet Music\\\""
|
|
|
|
elif minor == 5:
|
|
|
|
return "\\n\\\"Another Green World\\\""
|
|
|
|
elif minor == 6:
|
|
|
|
return "\\n\\\"Evening Star\\\""
|
2015-01-28 17:50:07 -05:00
|
|
|
return "\\\"\\\""
|
|
|
|
|
2011-09-29 15:17:54 -04:00
|
|
|
def options(opt):
|
2011-04-22 18:15:21 -04:00
|
|
|
autowaf.set_options(opt)
|
2009-02-25 18:59:55 -05:00
|
|
|
|
|
|
|
def configure(conf):
|
2011-09-29 15:17:54 -04:00
|
|
|
conf.load('misc')
|
2011-09-29 15:58:05 -04:00
|
|
|
conf.load('compiler_cxx')
|
2011-04-22 18:15:21 -04:00
|
|
|
autowaf.configure(conf)
|
|
|
|
|
2011-05-16 14:02:38 -04:00
|
|
|
# TODO: Insert a sanity check for on OS X to ensure CoreAudio is present
|
|
|
|
|
2013-10-26 10:22:05 -04:00
|
|
|
autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW3F',
|
|
|
|
mandatory=True)
|
2015-10-17 13:23:39 -04:00
|
|
|
autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW35F',
|
|
|
|
atleast_version='3.3.5', mandatory=False)
|
2011-05-16 14:02:38 -04:00
|
|
|
autowaf.check_pkg(conf, 'flac', uselib_store='FLAC',
|
|
|
|
atleast_version='1.2.1')
|
2011-09-29 15:58:05 -04:00
|
|
|
autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD',
|
2011-05-16 14:02:38 -04:00
|
|
|
atleast_version='2.10.1')
|
|
|
|
autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK',
|
|
|
|
atleast_version='2.18')
|
|
|
|
autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM',
|
|
|
|
atleast_version='2.18')
|
2011-04-22 18:15:21 -04:00
|
|
|
autowaf.check_pkg(conf, 'ogg', uselib_store='OGG', atleast_version='1.1.2')
|
2012-12-18 11:42:26 -05:00
|
|
|
autowaf.check_pkg(conf, 'x11', uselib_store='X11', atleast_version='1.1', mandatory=False)
|
2013-01-29 10:25:30 -05:00
|
|
|
autowaf.check_pkg(conf, 'fontconfig', uselib_store='FONTCONFIG')
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2011-09-29 15:17:54 -04:00
|
|
|
conf.write_config_header('gtk2ardour-config.h', remove=False)
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2014-09-06 11:59:53 -04:00
|
|
|
bak = conf.env['define_key']
|
|
|
|
conf.define('VERSIONSTRING', str (conf.env['VERSION']))
|
2015-01-28 17:50:07 -05:00
|
|
|
conf.define('CODENAME', enoify(int(conf.env['MAJOR']), int(conf.env['MINOR'])))
|
|
|
|
conf.env['define_key'] = ['VERSIONSTRING', 'CODENAME' ]
|
2014-09-06 11:59:53 -04:00
|
|
|
conf.write_config_header('gtk2ardour-version.h')
|
|
|
|
conf.env['define_key'] = bak;
|
|
|
|
|
2011-04-22 18:15:21 -04:00
|
|
|
# Boost headers
|
2011-09-29 15:17:54 -04:00
|
|
|
autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp')
|
|
|
|
autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp')
|
2009-02-25 18:59:55 -05:00
|
|
|
|
2010-07-11 17:55:11 -04:00
|
|
|
# Add a waf `feature' to allow compilation of things using winegcc
|
2011-09-29 15:58:05 -04:00
|
|
|
from waflib.TaskGen import feature
|
2010-07-11 17:55:11 -04:00
|
|
|
@feature("wine")
|
|
|
|
def set_winegcc(self):
|
2011-04-22 18:15:21 -04:00
|
|
|
self.env.LINK_CXX = self.env.LINK_CC = 'wineg++'
|
|
|
|
self.env.CC = 'winegcc'
|
2010-07-11 17:55:11 -04:00
|
|
|
|
2011-10-26 17:47:08 -04:00
|
|
|
def _doPyp(infileName, deps = False):
|
2011-09-29 11:22:11 -04:00
|
|
|
outStr = ''
|
2011-10-26 17:47:08 -04:00
|
|
|
out = []
|
|
|
|
re_spaces = re.compile("\s+")
|
|
|
|
|
2011-09-29 11:22:11 -04:00
|
|
|
if infileName == '-':
|
|
|
|
fd = sys.stdin
|
|
|
|
else:
|
2011-09-29 18:50:08 -04:00
|
|
|
fd = open(infileName)
|
2011-09-29 11:22:11 -04:00
|
|
|
inLines = fd.readlines()
|
|
|
|
if fd != sys.stdin:
|
|
|
|
fd.close()
|
2011-10-26 17:47:08 -04:00
|
|
|
|
2011-09-29 17:36:31 -04:00
|
|
|
|
2011-09-29 11:22:11 -04:00
|
|
|
for line in inLines:
|
|
|
|
bits = re_spaces.split(line)
|
|
|
|
if bits[0] == '##include':
|
|
|
|
incName = bits[1]
|
2011-10-26 17:47:08 -04:00
|
|
|
if (deps):
|
|
|
|
out += [ incName ]
|
|
|
|
else:
|
|
|
|
# assume included file comes from same place as source file
|
|
|
|
incName = os.path.join (os.path.dirname (infileName), incName);
|
|
|
|
outStr += _doPyp(incName)
|
2011-09-29 11:22:11 -04:00
|
|
|
else:
|
2011-10-26 17:47:08 -04:00
|
|
|
if not deps:
|
|
|
|
outStr += line
|
2011-09-29 15:17:54 -04:00
|
|
|
|
2011-09-29 11:22:11 -04:00
|
|
|
# done
|
2011-10-26 17:47:08 -04:00
|
|
|
if deps:
|
|
|
|
return out
|
|
|
|
else:
|
|
|
|
return outStr
|
2011-09-29 17:36:31 -04:00
|
|
|
|
2011-09-29 11:22:11 -04:00
|
|
|
def include_processor(task):
|
2011-09-29 15:17:54 -04:00
|
|
|
infileName = task.inputs[0].srcpath()
|
|
|
|
outfileName = os.path.join(out, task.outputs[0].bldpath())
|
2011-09-29 18:50:08 -04:00
|
|
|
fdOut = open (outfileName, "w")
|
2011-09-29 11:22:11 -04:00
|
|
|
fdOut.write (_doPyp(infileName))
|
|
|
|
fdOut.close ()
|
|
|
|
|
|
|
|
|
2011-02-15 13:02:50 -05:00
|
|
|
def build_color_scheme(path, prefix):
|
2011-04-22 18:15:21 -04:00
|
|
|
f = open (path, 'r')
|
|
|
|
color_scheme = ''
|
|
|
|
for line in f:
|
|
|
|
if re.search ('^#@color', line):
|
|
|
|
line.strip() # remove newline
|
|
|
|
words = line.split()
|
|
|
|
if len(color_scheme):
|
|
|
|
color_scheme += ';'
|
|
|
|
color_scheme += prefix
|
|
|
|
color_scheme += '_'
|
|
|
|
color_scheme += words[1]
|
|
|
|
color_scheme += ':'
|
|
|
|
color_scheme += words[2]
|
|
|
|
f.close()
|
|
|
|
return color_scheme
|
|
|
|
|
2009-02-25 18:59:55 -05:00
|
|
|
def build(bld):
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2013-06-11 11:37:52 -04:00
|
|
|
VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR'])
|
2015-04-11 10:35:28 -04:00
|
|
|
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
|
2013-06-11 11:37:52 -04:00
|
|
|
|
2014-02-21 21:06:33 -05:00
|
|
|
if bld.is_defined('WINDOWS_VST_SUPPORT') and bld.env['build_target'] != 'mingw':
|
|
|
|
# Windows VST support w/wine
|
2012-02-29 15:16:06 -05:00
|
|
|
# If we require VST support we build a stub main() and the FST library
|
|
|
|
# here using winegcc, and link it to the GTK front-end library
|
2013-12-22 13:39:57 -05:00
|
|
|
obj = bld (features = 'cxx c cxxprogram wine')
|
2015-01-17 15:09:37 -05:00
|
|
|
obj.source = ( '../libs/fst/vstwin.c', '../vst/winmain.c' )
|
2013-12-22 13:39:57 -05:00
|
|
|
#
|
|
|
|
# XXX do we really need to explicitly link to all of these for the wine executable?
|
|
|
|
#
|
2012-02-29 15:16:06 -05:00
|
|
|
obj.use = [ 'libpbd',
|
|
|
|
'libmidipp',
|
|
|
|
'libardour',
|
|
|
|
'libardour_cp',
|
2013-11-29 22:24:37 -05:00
|
|
|
'libtimecode',
|
|
|
|
'libmidipp',
|
2012-03-02 15:51:01 -05:00
|
|
|
'libgtk2_ardour',
|
2012-02-29 15:16:06 -05:00
|
|
|
'libgtkmm2ext',
|
2015-01-17 12:19:25 -05:00
|
|
|
'libcanvas',
|
2015-07-31 23:41:26 -04:00
|
|
|
'libptformat',
|
2013-04-04 00:32:52 -04:00
|
|
|
]
|
2014-07-13 08:36:11 -04:00
|
|
|
obj.target = 'ardour-' + str (bld.env['VERSION']) + '-vst.exe.so'
|
2012-03-01 19:51:13 -05:00
|
|
|
obj.includes = [ '../libs/fst', '.' ]
|
2014-02-21 21:23:36 -05:00
|
|
|
obj.linkflags = ['-mwindows', '-Wl,--export-dynamic']
|
2014-12-28 09:18:39 -05:00
|
|
|
obj.linkflags += bld.env['LDFLAGS']
|
2012-02-29 15:16:06 -05:00
|
|
|
obj.defines = ['_POSIX_SOURCE', 'USE_WS_PREFIX']
|
2014-04-10 10:23:16 -04:00
|
|
|
obj.install_path = bld.env['DLLDIR']
|
2012-02-29 15:16:06 -05:00
|
|
|
# end of the wine executable
|
|
|
|
|
|
|
|
# now the shared library containing the GTK GUI for ardour
|
|
|
|
obj = bld (features = 'cxx c cxxshlib')
|
|
|
|
obj.source = gtk2_ardour_sources
|
2012-03-01 18:17:46 -05:00
|
|
|
obj.includes = [ '../libs/fst', '.' ]
|
2012-03-02 17:41:29 -05:00
|
|
|
obj.name = 'libgtk2_ardour'
|
2012-02-29 15:16:06 -05:00
|
|
|
obj.target = 'gtk2_ardour'
|
2015-07-31 23:41:26 -04:00
|
|
|
|
2011-04-22 18:15:21 -04:00
|
|
|
else:
|
2012-02-29 15:16:06 -05:00
|
|
|
# just the normal executable version of the GTK GUI
|
2014-10-04 20:12:25 -04:00
|
|
|
if bld.env['build_target'] == 'mingw':
|
|
|
|
obj = bld (features = 'cxx c cxxprogram winres')
|
|
|
|
else:
|
|
|
|
obj = bld (features = 'cxx c cxxprogram')
|
2012-02-29 15:16:06 -05:00
|
|
|
obj.source = gtk2_ardour_sources
|
2014-07-13 08:36:11 -04:00
|
|
|
obj.target = 'ardour-' + str (bld.env['VERSION'])
|
2012-02-29 15:16:06 -05:00
|
|
|
obj.includes = ['.']
|
2014-03-04 09:25:58 -05:00
|
|
|
obj.ldflags = ['-no-undefined']
|
2013-12-22 13:39:57 -05:00
|
|
|
|
2014-02-21 21:06:33 -05:00
|
|
|
if bld.is_defined('WINDOWS_VST_SUPPORT'):
|
|
|
|
# Windows VST support mingw
|
|
|
|
obj.includes += [ '../libs/fst' ]
|
|
|
|
|
2013-12-22 13:39:57 -05:00
|
|
|
# at this point, "obj" refers to either the normal native executable
|
|
|
|
# OR the shared library built for use with wine on linux.
|
|
|
|
|
|
|
|
obj.use = [ 'libpbd',
|
|
|
|
'libardour',
|
|
|
|
'libardour_cp',
|
|
|
|
'libtimecode',
|
|
|
|
'libmidipp',
|
|
|
|
'libgtkmm2ext',
|
2013-12-23 15:35:49 -05:00
|
|
|
'libcanvas',
|
2015-07-31 23:41:26 -04:00
|
|
|
'libptformat',
|
2013-12-22 13:39:57 -05:00
|
|
|
]
|
2012-02-29 15:16:06 -05:00
|
|
|
|
2013-12-27 14:29:06 -05:00
|
|
|
obj.defines = [
|
2011-11-21 17:24:56 -05:00
|
|
|
'PACKAGE="' + I18N_PACKAGE + '"',
|
2011-05-16 14:02:38 -04:00
|
|
|
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
|
2011-09-29 15:17:54 -04:00
|
|
|
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
|
2014-12-09 08:19:11 -05:00
|
|
|
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
|
2011-05-16 14:02:38 -04:00
|
|
|
]
|
2014-04-29 16:06:32 -04:00
|
|
|
obj.install_path = bld.env['DLLDIR']
|
2015-10-18 08:22:55 -04:00
|
|
|
obj.linkflags = ''
|
2013-11-29 22:24:37 -05:00
|
|
|
obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD GTK OGG CURL DL'
|
2013-12-27 14:29:06 -05:00
|
|
|
obj.uselib += ' GTKMM CANVAS FFTW3F'
|
2013-03-21 16:16:48 -04:00
|
|
|
obj.uselib += ' AUDIOUNITS OSX GTKOSX LO '
|
2014-01-12 12:47:02 -05:00
|
|
|
obj.uselib += ' TAGLIB '
|
2013-11-29 22:31:29 -05:00
|
|
|
|
2011-04-22 18:15:21 -04:00
|
|
|
if sys.platform == 'darwin':
|
2013-04-04 00:32:52 -04:00
|
|
|
obj.uselib += ' AUDIOUNITS OSX GTKOSX'
|
|
|
|
obj.use += ' libappleutility'
|
2014-03-02 11:30:51 -05:00
|
|
|
obj.source += [ 'cocoacarbon.mm', 'bundle_env_cocoa.cc' ]
|
2014-05-06 13:14:18 -04:00
|
|
|
elif bld.env['build_target'] == 'mingw':
|
2014-03-02 11:30:51 -05:00
|
|
|
obj.source += [ 'bundle_env_mingw.cc' ]
|
2014-10-04 20:12:25 -04:00
|
|
|
obj.source += [ 'windows_icon.rc' ]
|
2014-03-02 11:30:51 -05:00
|
|
|
else:
|
|
|
|
obj.source += [ 'bundle_env_linux.cc' ]
|
|
|
|
|
2011-05-16 14:02:38 -04:00
|
|
|
obj.includes += ['../libs']
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2015-07-31 23:41:26 -04:00
|
|
|
obj.use += 'libptformat'
|
|
|
|
|
2014-01-10 16:07:57 -05:00
|
|
|
if bld.env['build_target'] == 'mingw':
|
2015-10-18 08:31:04 -04:00
|
|
|
obj.linkflags += ' -mwindows'
|
2014-01-10 16:07:57 -05:00
|
|
|
|
2011-09-29 16:29:06 -04:00
|
|
|
if bld.is_defined('HAVE_SUIL'):
|
2011-05-15 19:10:13 -04:00
|
|
|
obj.source += [ 'lv2_plugin_ui.cc' ]
|
2012-10-04 18:21:59 -04:00
|
|
|
obj.use += [ 'SUIL' ]
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2015-10-17 20:44:26 -04:00
|
|
|
if bld.is_defined('HAVE_FFTW35F') and bld.env['build_target'] != 'mingw':
|
2015-10-18 08:22:55 -04:00
|
|
|
obj.linkflags += ' -lfftw3f_threads'
|
2015-10-17 13:23:39 -04:00
|
|
|
|
2012-10-04 18:21:59 -04:00
|
|
|
if bld.is_defined('NEED_INTL'):
|
2015-10-18 08:22:55 -04:00
|
|
|
obj.linkflags += ' -lintl'
|
2012-10-04 18:21:59 -04:00
|
|
|
|
2011-11-21 12:42:29 -05:00
|
|
|
if bld.is_defined('WINDOWS_VST_SUPPORT'):
|
|
|
|
obj.source += [ 'windows_vst_plugin_ui.cc' ]
|
|
|
|
obj.defines += [ 'WINDOWS_VST_SUPPORT' ]
|
2014-03-04 09:25:58 -05:00
|
|
|
if bld.env['build_target'] != 'mingw':
|
|
|
|
obj.use += [ 'X11' ]
|
2012-10-04 18:21:59 -04:00
|
|
|
|
2011-09-30 12:22:04 -04:00
|
|
|
if bld.is_defined('LXVST_SUPPORT'):
|
2011-11-23 14:31:04 -05:00
|
|
|
obj.source += [ 'linux_vst_gui_support.cc', 'lxvst_plugin_ui.cc' ]
|
2011-09-20 16:29:47 -04:00
|
|
|
obj.defines += [ 'LXVST_SUPPORT' ]
|
2012-10-04 18:21:59 -04:00
|
|
|
obj.use += [ 'X11' ]
|
2011-11-22 19:55:25 -05:00
|
|
|
|
|
|
|
if bld.is_defined('WINDOWS_VST_SUPPORT') or bld.is_defined('LXVST_SUPPORT'):
|
|
|
|
obj.source += [ 'vst_plugin_ui.cc' ]
|
2011-11-13 09:53:49 -05:00
|
|
|
|
2011-09-30 12:22:04 -04:00
|
|
|
if bld.is_defined('PHONE_HOME'):
|
2011-05-16 14:02:38 -04:00
|
|
|
obj.defines += [ 'PHONE_HOME' ]
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2011-10-18 11:08:42 -04:00
|
|
|
if bld.is_defined('HAVE_COREAUDIO'):
|
2011-04-22 18:15:21 -04:00
|
|
|
TaskGen.task_gen.mappings['.mm'] = TaskGen.task_gen.mappings['.cc']
|
2011-09-29 15:17:54 -04:00
|
|
|
obj.use += ' libappleutility '
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2011-12-02 15:03:03 -05:00
|
|
|
if bld.is_defined('AUDIOUNIT_SUPPORT'):
|
|
|
|
obj.source += [ 'au_pluginui.mm' ]
|
|
|
|
|
2011-04-22 18:15:21 -04:00
|
|
|
# Wrappers
|
|
|
|
|
|
|
|
wrapper_subst_dict = {
|
|
|
|
'INSTALL_PREFIX' : bld.env['PREFIX'],
|
2014-04-10 10:23:16 -04:00
|
|
|
'LIBDIR' : os.path.normpath(bld.env['DLLDIR']),
|
2012-05-18 13:24:06 -04:00
|
|
|
'DATADIR' : os.path.normpath(bld.env['DATADIR']),
|
2014-06-03 08:27:36 -04:00
|
|
|
'CONFDIR' : os.path.normpath(bld.env['CONFDIR']),
|
2011-09-29 15:17:54 -04:00
|
|
|
'LIBS' : 'build/libs',
|
2015-07-05 08:43:26 -04:00
|
|
|
'VERSION' : str (bld.env['VERSION']),
|
2014-07-13 08:36:11 -04:00
|
|
|
'EXECUTABLE' : 'build/gtk2_ardour/ardour-' + str (bld.env['VERSION'])
|
2011-04-22 18:15:21 -04:00
|
|
|
}
|
|
|
|
|
2011-09-29 15:17:54 -04:00
|
|
|
def set_subst_dict(obj, dict):
|
|
|
|
for i in dict:
|
|
|
|
setattr(obj, i, dict[i])
|
|
|
|
|
2014-12-28 04:20:25 -05:00
|
|
|
obj = bld(features = 'subst')
|
2011-04-22 18:15:21 -04:00
|
|
|
obj.source = 'ardev_common.sh.in'
|
|
|
|
obj.target = 'ardev_common_waf.sh'
|
2011-09-29 15:17:54 -04:00
|
|
|
obj.chmod = Utils.O755
|
2011-04-22 18:15:21 -04:00
|
|
|
obj.dict = wrapper_subst_dict
|
2011-09-29 15:17:54 -04:00
|
|
|
set_subst_dict(obj, wrapper_subst_dict)
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2011-09-29 15:17:54 -04:00
|
|
|
obj = bld(features = 'subst')
|
2011-04-22 18:15:21 -04:00
|
|
|
obj.source = 'ardour.sh.in'
|
2015-04-04 13:10:39 -04:00
|
|
|
obj.target = 'ardour' + str (bld.env['MAJOR'])
|
2011-09-29 15:17:54 -04:00
|
|
|
obj.chmod = Utils.O755
|
2011-04-22 18:15:21 -04:00
|
|
|
obj.dict = wrapper_subst_dict
|
|
|
|
obj.install_path = bld.env['BINDIR']
|
2011-09-29 15:17:54 -04:00
|
|
|
set_subst_dict(obj, wrapper_subst_dict)
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2012-02-29 14:11:42 -05:00
|
|
|
if bld.is_defined('WINDOWS_VST_SUPPORT'):
|
|
|
|
obj = bld(features = 'subst')
|
|
|
|
obj.source = '../vst/ardourvst.in'
|
2015-04-04 13:10:39 -04:00
|
|
|
obj.target = 'ardourvst' + str (bld.env['MAJOR'])
|
2012-02-29 14:11:42 -05:00
|
|
|
obj.chmod = Utils.O755
|
|
|
|
obj.dict = wrapper_subst_dict
|
|
|
|
obj.install_path = bld.env['BINDIR']
|
|
|
|
set_subst_dict(obj, wrapper_subst_dict)
|
|
|
|
|
2011-04-22 18:15:21 -04:00
|
|
|
# Font configuration
|
|
|
|
|
2014-12-08 11:00:00 -05:00
|
|
|
font_subst_dict = {}
|
2011-04-22 18:15:21 -04:00
|
|
|
font_sizes = {}
|
|
|
|
base_font = ""
|
|
|
|
|
|
|
|
# Set up font sizes
|
2011-09-30 12:22:04 -04:00
|
|
|
if bld.is_defined('GTKOSX'): # OS X fonts
|
2012-01-09 11:13:16 -05:00
|
|
|
basefont = ""
|
2011-04-22 18:15:21 -04:00
|
|
|
font_sizes = {
|
|
|
|
'SMALLER' : '9',
|
|
|
|
'SMALL' : '10',
|
|
|
|
'NORMAL' : '11',
|
2013-08-09 00:50:41 -04:00
|
|
|
'BIG' : '13',
|
2013-03-05 08:51:14 -05:00
|
|
|
'BIGGER' : '17',
|
2011-04-22 18:15:21 -04:00
|
|
|
'LARGE' : '18',
|
|
|
|
'LARGER' : '28',
|
|
|
|
'HUGER' : '36',
|
2012-12-10 20:43:25 -05:00
|
|
|
'MASSIVE' : '60',
|
2012-12-12 09:50:10 -05:00
|
|
|
}
|
2013-03-09 10:12:27 -05:00
|
|
|
|
|
|
|
# There is no acceptable monospace font available on older versions of OS X
|
|
|
|
# and no API on those versions to load TTF files that will work with
|
|
|
|
# GTK/fontconfig/pango.
|
|
|
|
#
|
|
|
|
# In addition, the ArdourMono font gets clipped for some reason on OS X
|
|
|
|
#
|
|
|
|
# Moreover, Lucida Grande just seems to work even though it is not monospace
|
|
|
|
# so just use it.
|
|
|
|
#
|
|
|
|
font_names = {
|
2015-04-06 15:01:59 -04:00
|
|
|
'MONOSPACE' : 'Monaco',
|
|
|
|
'CLOCKFONT' : 'Lucida Grande',
|
2013-03-09 10:12:27 -05:00
|
|
|
}
|
2011-04-22 18:15:21 -04:00
|
|
|
else: # Linux/X11 fonts
|
|
|
|
basefont = '' # unspecified - use system defaults
|
|
|
|
font_sizes = {
|
2014-12-21 11:55:03 -05:00
|
|
|
'SMALLER' : '6',
|
|
|
|
'SMALL' : '7',
|
|
|
|
'NORMAL' : '8',
|
|
|
|
'BIG' : '11',
|
|
|
|
'BIGGER' : '13.5',
|
|
|
|
'LARGE' : '14.5',
|
|
|
|
'LARGER' : '19',
|
|
|
|
'HUGER' : '27',
|
|
|
|
'MASSIVE' : '48',
|
2012-12-12 09:50:10 -05:00
|
|
|
}
|
|
|
|
font_names = {
|
2013-01-30 08:13:57 -05:00
|
|
|
'MONOSPACE' : 'ArdourMono',
|
2015-04-06 15:01:59 -04:00
|
|
|
'CLOCKFONT' : 'ArdourMono',
|
2012-12-12 09:50:10 -05:00
|
|
|
}
|
2011-03-16 12:32:56 -04:00
|
|
|
|
2011-06-07 12:42:48 -04:00
|
|
|
# Set up font substitution dictionary
|
|
|
|
# @FONT_XXXX@
|
2011-04-22 18:15:21 -04:00
|
|
|
for style in ['', 'BOLD', 'ITALIC']:
|
|
|
|
for sizename,points in iter(font_sizes.items()):
|
|
|
|
if (len (style)):
|
|
|
|
key = "_".join (['FONT',style,sizename])
|
|
|
|
fontstyle = " ".join ([basefont,style.lower(),points])
|
|
|
|
else:
|
|
|
|
key = "_".join (['FONT',sizename])
|
|
|
|
fontstyle = " ".join ([basefont,points])
|
2014-12-08 11:00:00 -05:00
|
|
|
|
|
|
|
font_subst_dict[key] = fontstyle
|
2014-06-13 12:20:33 -04:00
|
|
|
|
2011-06-07 12:42:48 -04:00
|
|
|
# @FONT_SIZE_XXXX@
|
|
|
|
for sizename,points in iter(font_sizes.items()):
|
|
|
|
key = "_".join (['FONT_SIZE',sizename])
|
2014-12-08 11:00:00 -05:00
|
|
|
font_subst_dict[key] = points
|
2011-06-07 12:42:48 -04:00
|
|
|
|
2012-12-12 09:50:10 -05:00
|
|
|
# various font names, eg @BOLD_MONOSPACE@
|
|
|
|
for font_sym,text in iter(font_names.items()):
|
|
|
|
key = font_sym
|
2014-12-08 11:00:00 -05:00
|
|
|
font_subst_dict[key] = text
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2014-12-08 11:00:00 -05:00
|
|
|
# RC file
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2011-09-29 15:17:54 -04:00
|
|
|
obj = bld(features = 'subst')
|
2014-12-08 11:00:00 -05:00
|
|
|
obj.source = [ 'clearlooks.rc.in' ]
|
|
|
|
obj.target = 'clearlooks.rc'
|
2014-04-10 10:23:16 -04:00
|
|
|
obj.install_path = bld.env['CONFDIR']
|
2014-12-08 11:00:00 -05:00
|
|
|
set_subst_dict(obj, font_subst_dict)
|
2011-06-09 11:44:09 -04:00
|
|
|
|
2014-06-13 12:20:33 -04:00
|
|
|
obj = bld(features = 'subst')
|
2014-09-07 10:48:09 -04:00
|
|
|
obj.source = [ 'default_ui_config.in' ]
|
|
|
|
obj.target = 'default_ui_config'
|
2014-12-08 11:00:00 -05:00
|
|
|
obj.install_path = bld.env['CONFDIR']
|
|
|
|
set_subst_dict(obj, font_subst_dict)
|
2014-06-13 12:20:33 -04:00
|
|
|
|
2011-04-22 18:15:21 -04:00
|
|
|
# Menus
|
|
|
|
menus_argv = []
|
2011-09-30 12:22:04 -04:00
|
|
|
if bld.is_defined('GTKOSX'):
|
2013-10-12 17:04:37 -04:00
|
|
|
menus_argv = [ '-E', '-P', '-DGTKOSX' ]
|
2011-04-22 18:15:21 -04:00
|
|
|
else:
|
|
|
|
menus_argv = [ '-E', '-P' ]
|
2013-03-12 17:00:09 -04:00
|
|
|
|
2015-07-31 23:41:26 -04:00
|
|
|
if bld.is_defined('PTFORMAT'):
|
|
|
|
menus_argv += [ '-DPTFORMAT' ]
|
|
|
|
|
2014-04-10 07:31:26 -04:00
|
|
|
# always build all versions of the menu definitions
|
|
|
|
# so that we can try them out with different program builds.
|
|
|
|
for program in [ 'ardour', 'trx' ]:
|
|
|
|
obj = bld(features = 'command-output')
|
|
|
|
obj.command = 'cpp'
|
|
|
|
obj.command_is_external = True
|
|
|
|
obj.no_inputs = True
|
|
|
|
obj.argv = menus_argv
|
2015-07-31 23:41:26 -04:00
|
|
|
obj.dep_vars = ['PTFORMAT', 'GTKOSX', 'WINDOWS']
|
2014-04-10 07:31:26 -04:00
|
|
|
obj.stdin = program + '.menus.in'
|
|
|
|
obj.stdout = program + '.menus'
|
2014-04-10 10:23:16 -04:00
|
|
|
bld.install_files (bld.env['CONFDIR'], program + '.menus')
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2015-10-22 11:21:01 -04:00
|
|
|
# Freedesktop
|
|
|
|
if bld.env['FREEDESKTOP']:
|
|
|
|
obj = bld(features = 'subst')
|
|
|
|
obj.source = 'ardour.desktop.in'
|
|
|
|
obj.target = bld.env['PROGRAM_NAME'].lower() + str (bld.env['MAJOR']) + '.desktop'
|
|
|
|
obj.chmod = Utils.O644
|
|
|
|
|
|
|
|
obj = bld(features = 'subst')
|
|
|
|
obj.source = 'ardour-mime-info.xml'
|
|
|
|
obj.target = bld.env['PROGRAM_NAME'].lower() + str (bld.env['MAJOR']) + '.xml'
|
|
|
|
obj.chmod = Utils.O644
|
|
|
|
|
2011-04-22 18:15:21 -04:00
|
|
|
# Keybindings
|
|
|
|
|
2011-05-16 14:02:38 -04:00
|
|
|
# 'SAE-de-keypad', 'SAE-de-nokeypad', 'SAE-us-keypad',
|
|
|
|
# 'SAE-us-nokeypad', 'ergonomic-us'
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2013-12-05 14:44:37 -05:00
|
|
|
#
|
|
|
|
# explicitly state the use of perl here so that it works on windows too
|
|
|
|
#
|
|
|
|
a_rule = 'perl ../tools/fmt-bindings --platform="%s" --winkey="%s" --accelmap <${SRC} >${TGT}' % (sys.platform, bld.env['WINDOWS_KEY'] )
|
2011-04-22 18:15:21 -04:00
|
|
|
for b in [ 'mnemonic-us' ] :
|
2011-09-29 15:17:54 -04:00
|
|
|
obj = bld(
|
2011-05-16 14:02:38 -04:00
|
|
|
target = b + '.bindings',
|
|
|
|
source = b + '.bindings.in',
|
2013-12-05 14:44:37 -05:00
|
|
|
rule = a_rule
|
2011-05-16 14:02:38 -04:00
|
|
|
)
|
2014-04-29 16:06:32 -04:00
|
|
|
obj.install_path = bld.env['CONFDIR']
|
2011-03-16 12:32:56 -04:00
|
|
|
|
2011-04-22 18:15:21 -04:00
|
|
|
# not modified at present
|
2014-12-08 18:19:11 -05:00
|
|
|
bld.install_files(bld.env['CONFDIR'], 'dark.colors')
|
2014-04-10 10:23:16 -04:00
|
|
|
bld.install_files(bld.env['CONFDIR'], 'step_editing.bindings')
|
|
|
|
bld.install_files(bld.env['CONFDIR'], 'mixer.bindings')
|
2011-03-16 12:32:56 -04:00
|
|
|
|
2011-04-22 18:15:21 -04:00
|
|
|
# Icons/Images
|
2014-04-10 10:23:16 -04:00
|
|
|
bld.install_files(os.path.join (bld.env['DATADIR'], 'icons'), bld.path.ant_glob('icons/*.png'))
|
|
|
|
bld.install_files(os.path.join (bld.env['DATADIR'], 'pixmaps'), bld.path.ant_glob('pixmaps/*.xpm'))
|
|
|
|
bld.install_files(bld.env['DATADIR'], 'splash.png')
|
|
|
|
bld.install_files(bld.env['DATADIR'], 'small-splash.png')
|
|
|
|
bld.install_files(bld.env['DATADIR'], 'ArdourMono.ttf')
|
2009-02-25 18:59:55 -05:00
|
|
|
|
2015-08-17 07:37:06 -04:00
|
|
|
if bld.env['build_target'] == 'mingw':
|
|
|
|
# These icons need to overwrite the files already installed in the icons
|
|
|
|
# directory above. Do this in the external packaging scripts for now.
|
|
|
|
#bld.install_files(os.path.join (bld.env['DATADIR'], 'icons'), bld.path.ant_glob('icons/cursor_square/*.png'))
|
|
|
|
bld.install_files(os.path.join (bld.env['DATADIR'], 'icons'), 'icons/cursor_square/hotspots')
|
|
|
|
|
2011-04-22 18:15:21 -04:00
|
|
|
# Default UI configuration
|
2014-09-30 18:12:29 -04:00
|
|
|
bld.install_files(bld.env['CONFDIR'], 'default_ui_config')
|
2014-12-08 22:18:50 -05:00
|
|
|
# Color Themes
|
|
|
|
bld.install_files(bld.env['CONFDIR'], 'dark.colors')
|
2011-09-29 17:36:31 -04:00
|
|
|
|
2011-04-22 18:15:21 -04:00
|
|
|
# Default export stuff
|
2015-03-11 21:36:33 -04:00
|
|
|
bld.install_files(os.path.join(bld.env['CONFDIR'], 'export'), bld.path.ant_glob('export/*.format'))
|
2011-04-22 18:15:21 -04:00
|
|
|
|
|
|
|
# i18n
|
2011-09-30 12:22:04 -04:00
|
|
|
if bld.is_defined('ENABLE_NLS'):
|
2011-11-05 12:35:24 -04:00
|
|
|
mo_files = bld.path.ant_glob('po/*.mo')
|
2011-04-22 18:15:21 -04:00
|
|
|
for mo in mo_files:
|
2011-11-05 12:35:24 -04:00
|
|
|
lang = os.path.basename(mo.srcpath()).replace('.mo', '')
|
2014-12-09 08:19:11 -05:00
|
|
|
bld.install_as (os.path.join(os.path.normpath(bld.env['LOCALEDIR']), lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
|
|
|
|
mo)
|
2011-04-22 18:15:21 -04:00
|
|
|
|
|
|
|
def i18n(bld):
|
2015-07-05 08:50:02 -04:00
|
|
|
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
|
|
|
|
autowaf.build_i18n(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
|
|
|
|
'Paul Davis')
|
|
|
|
|
2011-11-21 16:27:30 -05:00
|
|
|
def i18n_pot(bld):
|
2015-07-05 08:50:02 -04:00
|
|
|
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
|
|
|
|
autowaf.build_i18n_pot(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
|
|
|
|
'Paul Davis')
|
2011-11-21 16:27:30 -05:00
|
|
|
|
|
|
|
def i18n_po(bld):
|
2015-07-05 08:50:02 -04:00
|
|
|
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
|
|
|
|
autowaf.build_i18n_po(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
|
|
|
|
'Paul Davis')
|
|
|
|
|
2011-11-21 16:27:30 -05:00
|
|
|
def i18n_mo(bld):
|
2015-07-05 08:50:02 -04:00
|
|
|
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
|
|
|
|
autowaf.build_i18n_mo(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
|
|
|
|
'Paul Davis')
|