merge 3.0 12308:12389

git-svn-id: svn://localhost/ardour2/branches/3.0-SG@12391 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-05-23 15:41:07 +00:00
parent 08c87b22b4
commit 89df06eb2d
88 changed files with 877 additions and 717 deletions

View file

@ -559,7 +559,7 @@ About::About ()
sys::path splash_file;
SearchPath spath(ardour_search_path() + system_data_search_path());
SearchPath spath(ardour_data_search_path());
if (find_file_in_search_path (spath, "splash.png", splash_file)) {
set_logo (Gdk::Pixbuf::create_from_file (splash_file.to_string()));

View file

@ -72,9 +72,7 @@ ActionManager::init ()
ui_manager = UIManager::create ();
SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path();
find_file_in_search_path (spath, "ardour.menus", ui_file);
find_file_in_search_path (ardour_config_search_path(), "ardour.menus", ui_file);
bool loaded = false;
@ -159,11 +157,7 @@ ActionManager::map_some_state (const char* group, const char* action, bool (RCCo
if (tact->get_active() != x) {
tact->set_active (x);
}
} else {
cerr << group << ':' << action << " is not a toggle\n";
}
} else {
cerr << group << ':' << action << " not an action\n";
}
}

View file

@ -4,6 +4,13 @@ TOP=`dirname "$0"`/..
libs=$TOP/@LIBS@
#
# when running ardev, the various parts of Ardour have not been consolidated into the locations that they
# would normally end up after an install. We therefore need to set up environment variables so that we
# can find all the components.
#
export ARDOUR_PATH=$TOP/gtk2_ardour/icons:$TOP/gtk2_ardour/pixmaps:$TOP/build/gtk2_ardour:$TOP/gtk2_ardour:.
export ARDOUR_SURFACES_PATH=$libs/surfaces/osc:$libs/surfaces/generic_midi:$libs/surfaces/tranzport:$libs/surfaces/powermate:$libs/surfaces/mackie
export ARDOUR_PANNER_PATH=$libs/panners/2in2out:$libs/panners/1in2out:$libs/panners/vbap
@ -11,6 +18,14 @@ export ARDOUR_DATA_PATH=$TOP/gtk2_ardour:build/gtk2_ardour:.
export ARDOUR_MIDIMAPS_PATH=$TOP/midi_maps:.
export ARDOUR_MCP_PATH=$TOP/mcp:.
#
# even though we set the above variables, ardour requires that these
# two also be set. the above settings will override them.
#
export ARDOUR_CONFIG_PATH=$TOP:$TOP/gtk2_ardour:$TOP/build:$TOP/build/gtk2_ardour
export ARDOUR_DLL_PATH=$libs
if test -d $HOME/gtk/inst ; then
export GTK_PATH=~/.ardour3:$libs/clearlooks-newer
else

View file

@ -1,10 +1,13 @@
#!/bin/sh
export GTK_PATH=@LIBDIR@/ardour3${GTK_PATH:+:$GTK_PATH}
#
# This script runs an installed version of Ardour. It sets a few environment variables
# and does a few checks before exec'ing the real executable.
#
export GTK_PATH=@SYSCONFDIR@/ardour3${GTK_PATH:+:$GTK_PATH}
export LD_LIBRARY_PATH=@LIBDIR@/ardour3${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
# DYLD_LIBRARY_PATH is for Darwin
export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
## Memlock check
@ -36,6 +39,14 @@ elif [ $(nm -D --radix=dec --defined-only -S $GLIB | grep -w g_atomic_int_add |
echo ""
fi
#
# Running Ardour requires these 3 variables to be set
#
export ARDOUR_DATA_PATH=@DATADIR@/ardour3
export ARDOUR_CONFIG_PATH=@SYSCONFDIR@/ardour3
export ARDOUR_DLL_PATH=@LIBDIR@/ardour3
exec @LIBDIR@/ardour3/ardour-@VERSION@ "$@"

View file

@ -49,6 +49,7 @@ using namespace std;
ArdourButton::Element ArdourButton::default_elements = ArdourButton::Element (ArdourButton::Edge|ArdourButton::Body|ArdourButton::Text);
ArdourButton::Element ArdourButton::led_default_elements = ArdourButton::Element (ArdourButton::default_elements|ArdourButton::Indicator);
ArdourButton::Element ArdourButton::just_led_default_elements = ArdourButton::Element (ArdourButton::Edge|ArdourButton::Body|ArdourButton::Indicator);
bool ArdourButton::_flat_buttons = false;
ArdourButton::ArdourButton (Element e)
: _elements (e)
@ -382,11 +383,19 @@ ArdourButton::set_colors ()
edge_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, get_height());
if (visual_state() & Gtkmm2ext::Selected) {
start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: border start selected", get_name()));
if (_flat_buttons) {
end_color = start_color;
} else {
end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: border end selected", get_name()));
}
} else {
start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: border start", get_name()));
if (_flat_buttons) {
end_color = start_color;
} else {
end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: border end", get_name()));
}
}
UINT_TO_RGBA (start_color, &r, &g, &b, &a);
cairo_pattern_add_color_stop_rgba (edge_pattern, 0, r/255.0,g/255.0,b/255.0, 0.7);
UINT_TO_RGBA (end_color, &r, &g, &b, &a);
@ -407,7 +416,12 @@ ArdourButton::set_colors ()
active_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, get_height());
start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill start active", get_name()));
if (_flat_buttons) {
end_color = start_color;
} else {
end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill end active", get_name()));
}
UINT_TO_RGBA (start_color, &r, &g, &b, &a);
active_r = r/255.0;
@ -421,7 +435,11 @@ ArdourButton::set_colors ()
inactive_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, get_height());
start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill start", get_name()));
if (_flat_buttons) {
end_color = start_color;
} else {
end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill end", get_name()));
}
UINT_TO_RGBA (start_color, &r, &g, &b, &a);
cairo_pattern_add_color_stop_rgba (inactive_pattern, 0, r/255.0,g/255.0,b/255.0, a/255.0);
UINT_TO_RGBA (end_color, &r, &g, &b, &a);
@ -764,3 +782,9 @@ ArdourButton::set_elements (Element e)
_elements = e;
set_colors ();
}
void
ArdourButton::set_flat_buttons (bool yn)
{
_flat_buttons = yn;
}

View file

@ -44,6 +44,9 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
static Element led_default_elements;
static Element just_led_default_elements;
static void set_flat_buttons (bool yn);
static bool flat_buttons() { return _flat_buttons; }
ArdourButton (Element e = default_elements);
ArdourButton (const std::string&, Element e = default_elements);
virtual ~ArdourButton ();
@ -142,6 +145,8 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable
bool _distinct_led_click;
bool _hovering;
static bool _flat_buttons;
void setup_led_rect ();
void set_colors ();
void color_handler ();

View file

@ -1162,7 +1162,6 @@ ARDOUR_UI::redisplay_recent_sessions ()
/* check whether session still exists */
if (!Glib::file_test(fullpath.c_str(), Glib::FILE_TEST_EXISTS)) {
/* session doesn't exist */
cerr << "skipping non-existent session " << fullpath << endl;
continue;
}
@ -2839,7 +2838,6 @@ ARDOUR_UI::show_splash ()
try {
splash = new Splash;
} catch (...) {
cerr << "Splash could not be created\n";
return;
}
}

View file

@ -1568,7 +1568,8 @@ AudioRegionView::redraw_start_xfade_to (boost::shared_ptr<AudioRegion> ar, frame
if (!start_xfade_out) {
start_xfade_out = new ArdourCanvas::Line (*group);
start_xfade_out->property_width_pixels() = 1;
start_xfade_out->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_GainLine.get();
uint32_t col = UINT_RGBA_CHANGE_A (ARDOUR_UI::config()->canvasvar_GainLine.get(), 125);
start_xfade_out->property_fill_color_rgba() = col;
}
if (!start_xfade_rect) {
@ -1673,7 +1674,8 @@ AudioRegionView::redraw_end_xfade_to (boost::shared_ptr<AudioRegion> ar, framecn
if (!end_xfade_out) {
end_xfade_out = new ArdourCanvas::Line (*group);
end_xfade_out->property_width_pixels() = 1;
end_xfade_out->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_GainLine.get();
uint32_t col UINT_RGBA_CHANGE_A (ARDOUR_UI::config()->canvasvar_GainLine.get(), 125);
end_xfade_out->property_fill_color_rgba() = col;
}
if (!end_xfade_rect) {

View file

@ -179,7 +179,6 @@ void
AudioTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool show)
{
if (param.type() == NullAutomation) {
cerr << "WARNING: Attempt to create NullAutomation child, ignoring" << endl;
return;
}

View file

@ -442,8 +442,6 @@ AutomationTimeAxisView::set_height (uint32_t h)
auto_button.hide();
hide_button.hide();
}
} else if (h >= preset_height (HeightNormal)) {
cerr << "track grown, but neither changed_between_small_and_normal nor first_call_to_set_height set!" << endl;
}
if (changed) {

View file

@ -60,7 +60,7 @@ BundleEditorMatrix::setup_ports (int dim)
otherwise in some cases the basic system IO ports may be hidden, making
the bundle editor useless */
_ports[OTHER].gather (_session, DataType::NIL, _bundle->ports_are_inputs(), true);
_ports[OTHER].gather (_session, DataType::NIL, _bundle->ports_are_inputs(), true, show_only_bundles ());
_ports[OTHER].remove_bundle (_bundle);
_ports[OTHER].resume_signals ();
}
@ -101,13 +101,13 @@ BundleEditorMatrix::get_state (BundleChannel c[2]) const
}
bool
BundleEditorMatrix::can_add_channel (boost::shared_ptr<Bundle> b) const
BundleEditorMatrix::can_add_channels (boost::shared_ptr<Bundle> b) const
{
if (b == _bundle) {
return true;
}
return PortMatrix::can_add_channel (b);
return PortMatrix::can_add_channels (b);
}
void

View file

@ -42,7 +42,7 @@ class BundleEditorMatrix : public PortMatrix
void set_state (ARDOUR::BundleChannel c[2], bool s);
PortMatrixNode::State get_state (ARDOUR::BundleChannel c[2]) const;
bool can_add_channel (boost::shared_ptr<ARDOUR::Bundle>) const;
bool can_add_channels (boost::shared_ptr<ARDOUR::Bundle>) const;
void add_channel (boost::shared_ptr<ARDOUR::Bundle>, ARDOUR::DataType);
bool can_remove_channels (boost::shared_ptr<ARDOUR::Bundle>) const;

View file

@ -786,7 +786,6 @@ Editor::button_settings () const
XMLNode* node = find_named_node (*settings, X_("Buttons"));
if (!node) {
cerr << "new empty Button node\n";
node = new XMLNode (X_("Buttons"));
}
@ -1449,8 +1448,8 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i
}
MenuList& items (fade_context_menu.items());
items.clear ();
if (items.empty()) {
switch (item_type) {
case FadeInItem:
case FadeInHandleItem:
@ -1584,7 +1583,6 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i
<< endmsg;
/*NOTREACHED*/
}
}
fade_context_menu.popup (button, time);
}
@ -1997,10 +1995,10 @@ Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items)
nudge_menu->set_name ("ArdourContextMenu");
edit_items.push_back (SeparatorElem());
nudge_items.push_back (MenuElem (_("Nudge Entire Track Forward"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), false, true))));
nudge_items.push_back (MenuElem (_("Nudge Track After Edit Point Forward"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), true, true))));
nudge_items.push_back (MenuElem (_("Nudge Entire Track Backward"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), false, false))));
nudge_items.push_back (MenuElem (_("Nudge Track After Edit Point Backward"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), true, false))));
nudge_items.push_back (MenuElem (_("Nudge Entire Track Later"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), false, true))));
nudge_items.push_back (MenuElem (_("Nudge Track After Edit Point Later"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), true, true))));
nudge_items.push_back (MenuElem (_("Nudge Entire Track Earlier"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), false, false))));
nudge_items.push_back (MenuElem (_("Nudge Track After Edit Point Earlier"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), true, false))));
edit_items.push_back (MenuElem (_("Nudge"), *nudge_menu));
}
@ -2053,10 +2051,10 @@ Editor::add_bus_context_items (Menu_Helpers::MenuList& edit_items)
nudge_menu->set_name ("ArdourContextMenu");
edit_items.push_back (SeparatorElem());
nudge_items.push_back (MenuElem (_("Nudge Entire Track Forward"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), false, true))));
nudge_items.push_back (MenuElem (_("Nudge Track After Edit Point Forward"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), true, true))));
nudge_items.push_back (MenuElem (_("Nudge Entire Track Backward"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), false, false))));
nudge_items.push_back (MenuElem (_("Nudge Track After Edit Point Backward"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), true, false))));
nudge_items.push_back (MenuElem (_("Nudge Entire Track Later"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), false, true))));
nudge_items.push_back (MenuElem (_("Nudge Track After Edit Point Later"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), true, true))));
nudge_items.push_back (MenuElem (_("Nudge Entire Track Earlier"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), false, false))));
nudge_items.push_back (MenuElem (_("Nudge Track After Edit Point Earlier"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), true, false))));
edit_items.push_back (MenuElem (_("Nudge"), *nudge_menu));
}
@ -3061,8 +3059,8 @@ Editor::setup_tooltips ()
ARDOUR_UI::instance()->set_tip (smart_mode_joiner, _("Smart Mode (Select/Move Objects + Ranges)"));
ARDOUR_UI::instance()->set_tip (internal_edit_button, _("Edit Region Contents (e.g. notes)"));
ARDOUR_UI::instance()->set_tip (*_group_tabs, _("Groups: click to (de)activate\nContext-click for other operations"));
ARDOUR_UI::instance()->set_tip (nudge_forward_button, _("Nudge Region/Selection Forwards"));
ARDOUR_UI::instance()->set_tip (nudge_backward_button, _("Nudge Region/Selection Backwards"));
ARDOUR_UI::instance()->set_tip (nudge_forward_button, _("Nudge Region/Selection Later"));
ARDOUR_UI::instance()->set_tip (nudge_backward_button, _("Nudge Region/Selection Earlier"));
ARDOUR_UI::instance()->set_tip (zoom_in_button, _("Zoom In"));
ARDOUR_UI::instance()->set_tip (zoom_out_button, _("Zoom Out"));
ARDOUR_UI::instance()->set_tip (zoom_out_full_button, _("Zoom to Session"));

View file

@ -228,17 +228,17 @@ Editor::register_actions ()
reg_sens (editor_actions, a.c_str(), n.c_str(), sigc::bind (sigc::mem_fun (*this, &Editor::goto_nth_marker), i - 1));
}
reg_sens (editor_actions, "jump-forward-to-mark", _("Jump Forward to Mark"), sigc::mem_fun(*this, &Editor::jump_forward_to_mark));
reg_sens (editor_actions, "jump-backward-to-mark", _("Jump Backward to Mark"), sigc::mem_fun(*this, &Editor::jump_backward_to_mark));
reg_sens (editor_actions, "jump-forward-to-mark", _("Jump to Next Mark"), sigc::mem_fun(*this, &Editor::jump_forward_to_mark));
reg_sens (editor_actions, "jump-backward-to-mark", _("Jump to Previous Mark"), sigc::mem_fun(*this, &Editor::jump_backward_to_mark));
reg_sens (editor_actions, "add-location-from-playhead", _("Add Mark from Playhead"), sigc::mem_fun(*this, &Editor::add_location_from_playhead_cursor));
reg_sens (editor_actions, "nudge-next-forward", _("Nudge Next Forward"), sigc::bind (sigc::mem_fun(*this, &Editor::nudge_forward), true, false));
reg_sens (editor_actions, "nudge-next-backward", _("Nudge Next Backward"), sigc::bind (sigc::mem_fun(*this, &Editor::nudge_backward), true, false));
reg_sens (editor_actions, "nudge-next-forward", _("Nudge Next Later"), sigc::bind (sigc::mem_fun(*this, &Editor::nudge_forward), true, false));
reg_sens (editor_actions, "nudge-next-backward", _("Nudge Next Earlier"), sigc::bind (sigc::mem_fun(*this, &Editor::nudge_backward), true, false));
reg_sens (editor_actions, "nudge-playhead-forward", _("Nudge Playhead Forward"), sigc::bind (sigc::mem_fun(*this, &Editor::nudge_forward), false, true));
reg_sens (editor_actions, "nudge-playhead-backward", _("Nudge Playhead Backward"), sigc::bind (sigc::mem_fun(*this, &Editor::nudge_backward), false, true));
reg_sens (editor_actions, "playhead-forward-to-grid", _("Forward to Grid"), sigc::mem_fun(*this, &Editor::playhead_forward_to_grid));
reg_sens (editor_actions, "playhead-backward-to-grid", _("Backward to Grid"), sigc::mem_fun(*this, &Editor::playhead_backward_to_grid));
reg_sens (editor_actions, "playhead-forward-to-grid", _("Playhead To Next Grid"), sigc::mem_fun(*this, &Editor::playhead_forward_to_grid));
reg_sens (editor_actions, "playhead-backward-to-grid", _("Playhead To Previous Grid"), sigc::mem_fun(*this, &Editor::playhead_backward_to_grid));
reg_sens (editor_actions, "temporal-zoom-out", _("Zoom Out"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_step), true));
reg_sens (editor_actions, "temporal-zoom-in", _("Zoom In"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_step), false));
@ -319,8 +319,8 @@ Editor::register_actions ()
toggle_reg_sens (editor_actions, "toggle-log-window", _("Log"),
sigc::mem_fun (ARDOUR_UI::instance(), &ARDOUR_UI::toggle_errors));
reg_sens (editor_actions, "tab-to-transient-forwards", _("Move Forward to Transient"), sigc::bind (sigc::mem_fun(*this, &Editor::tab_to_transient), true));
reg_sens (editor_actions, "tab-to-transient-backwards", _("Move Backwards to Transient"), sigc::bind (sigc::mem_fun(*this, &Editor::tab_to_transient), false));
reg_sens (editor_actions, "tab-to-transient-forwards", _("Move Later to Transient"), sigc::bind (sigc::mem_fun(*this, &Editor::tab_to_transient), true));
reg_sens (editor_actions, "tab-to-transient-backwards", _("Move Earlier to Transient"), sigc::bind (sigc::mem_fun(*this, &Editor::tab_to_transient), false));
reg_sens (editor_actions, "crop", _("Crop"), sigc::mem_fun(*this, &Editor::crop_region_to_selection));
@ -643,13 +643,12 @@ Editor::load_bindings ()
key_bindings.set_action_map (editor_action_map);
sys::path binding_file;
SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path();
if (find_file_in_search_path (spath, "editor.bindings", binding_file)) {
if (find_file_in_search_path (ardour_config_search_path(), "editor.bindings", binding_file)) {
key_bindings.load (binding_file.to_string());
info << string_compose (_("Loaded editor bindings from %1"), binding_file.to_string()) << endmsg;
} else {
error << string_compose (_("Could not find editor.bindings in search path %1"), spath.to_string()) << endmsg;
error << string_compose (_("Could not find editor.bindings in search path %1"), ardour_config_search_path().to_string()) << endmsg;
}
}
@ -1700,20 +1699,20 @@ Editor::register_region_actions ()
reg_sens (_region_actions, "strip-region-silence", _("Strip Silence..."), sigc::mem_fun (*this, &Editor::strip_region_silence));
reg_sens (_region_actions, "set-selection-from-region", _("Set Range Selection"), sigc::mem_fun (*this, &Editor::set_selection_from_region));
reg_sens (_region_actions, "nudge-forward", _("Nudge Forward"), sigc::bind (sigc::mem_fun (*this, &Editor::nudge_forward), false, false));
reg_sens (_region_actions, "nudge-backward", _("Nudge Backward"), sigc::bind (sigc::mem_fun (*this, &Editor::nudge_backward), false, false));
reg_sens (_region_actions, "nudge-forward", _("Nudge Later"), sigc::bind (sigc::mem_fun (*this, &Editor::nudge_forward), false, false));
reg_sens (_region_actions, "nudge-backward", _("Nudge Earlier"), sigc::bind (sigc::mem_fun (*this, &Editor::nudge_backward), false, false));
reg_sens (
_region_actions,
"nudge-forward-by-capture-offset",
_("Nudge Forward by Capture Offset"),
_("Nudge Later by Capture Offset"),
sigc::mem_fun (*this, &Editor::nudge_forward_capture_offset)
);
reg_sens (
_region_actions,
"nudge-backward-by-capture-offset",
_("Nudge Backward by Capture Offset"),
_("Nudge Earlier by Capture Offset"),
sigc::mem_fun (*this, &Editor::nudge_backward_capture_offset)
);

View file

@ -732,7 +732,7 @@ Editor::left_track_canvas (GdkEventCrossing */*ev*/)
{
DropDownKeys ();
within_track_canvas = false;
cerr << "left track canvas\n";
//cerr << "left track canvas\n";
set_entered_track (0);
set_entered_regionview (0);
reset_canvas_action_sensitivity (false);
@ -742,7 +742,7 @@ Editor::left_track_canvas (GdkEventCrossing */*ev*/)
bool
Editor::entered_track_canvas (GdkEventCrossing */*ev*/)
{
cerr << "entered track canvas\n";
//cerr << "entered track canvas\n";
within_track_canvas = true;
reset_canvas_action_sensitivity (true);
return FALSE;

View file

@ -2430,10 +2430,6 @@ Editor::point_trim (GdkEvent* event, framepos_t new_bound)
for (list<RegionView*>::const_iterator i = selection->regions.by_layer().begin();
i != selection->regions.by_layer().end(); ++i)
{
if ( (*i) == NULL){
cerr << "region view contains null region" << endl;
}
if (!(*i)->region()->locked()) {
(*i)->region()->clear_changes ();
(*i)->region()->trim_front (new_bound);

View file

@ -3202,15 +3202,10 @@ Editor::trim_region (bool front)
framepos_t where = get_preferred_edit_position();
RegionSelection rs = get_regions_from_selection_and_edit_point ();
cerr << "trim regions\n";
if (rs.empty()) {
cerr << " no regions\n";
return;
}
cerr << "where = " << where << endl;
begin_reversible_command (front ? _("trim front") : _("trim back"));
for (list<RegionView*>::const_iterator i = rs.by_layer().begin(); i != rs.by_layer().end(); ++i) {

View file

@ -367,7 +367,6 @@ EditorRouteGroups::button_press_event (GdkEventButton* ev)
case 12:
val = (*iter)[_columns.active_shared];
cerr << "set group active to " << !val << endl;
group->set_route_active (!val);
ret = true;
break;

View file

@ -264,7 +264,6 @@ Editor::set_selected_track_as_side_effect (Selection::Operation op)
case Selection::Extend:
selection->clear();
cerr << ("Editor::set_selected_track_as_side_effect case Selection::Add not yet implemented\n");
break;
}
}

View file

@ -43,7 +43,7 @@ void
GlobalPortMatrix::setup_ports (int dim)
{
_ports[dim].suspend_signals ();
_ports[dim].gather (_session, type(), dim == IN, false);
_ports[dim].gather (_session, type(), dim == IN, false, show_only_bundles ());
_ports[dim].resume_signals ();
}

View file

@ -118,7 +118,7 @@ IOSelector::setup_ports (int dim)
if (dim == _other) {
_ports[_other].gather (_session, type(), _find_inputs_for_io_outputs, false);
_ports[_other].gather (_session, type(), _find_inputs_for_io_outputs, false, show_only_bundles ());
} else {

View file

@ -126,9 +126,7 @@ ArdourKeyboard::setup_keybindings ()
/* not absolute - look in the usual places */
sys::path keybindings_file;
SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path();
if ( ! find_file_in_search_path (spath, keybindings_path, keybindings_file)) {
if ( ! find_file_in_search_path (ardour_config_search_path(), keybindings_path, keybindings_file)) {
if (keybindings_path == default_bindings) {
error << string_compose (_("Default keybindings not found - %1 will be hard to use!"), PROGRAM_NAME) << endmsg;

View file

@ -109,8 +109,6 @@ KeyEditor::unbind ()
unbind_button.set_sensitive (false);
cerr << "trying to unbind\n";
if (i != model->children().end()) {
string path = (*i)[columns.path];

View file

@ -166,44 +166,26 @@ fixup_bundle_environment (int, char* [])
}
setenv ("PATH", path.c_str(), 1);
path = dir_path;
path += "/../Resources";
path += dir_path;
path += "/../Surfaces";
path += dir_path;
path += "/../Panners";
export_search_path (dir_path, "ARDOUR_DLL_PATH", "/../lib");
setenv ("ARDOUR_MODULE_PATH", path.c_str(), 1);
path = user_config_directory().to_string();
path += ':';
path += dir_path;
path += "/../Resources/icons:";
path += dir_path;
path += "/../Resources/pixmaps:";
path += dir_path;
path += "/../Resources/share:";
path += dir_path;
path += "/../Resources";
setenv ("ARDOUR_PATH", path.c_str(), 1);
setenv ("ARDOUR_CONFIG_PATH", path.c_str(), 1);
/* inside an OS X .app bundle, there is no difference
between DATA and CONFIG locations, since OS X doesn't
attempt to do anything to expose the notion of
machine-independent shared data.
*/
path = dir_path;
path += "/../Resources";
setenv ("ARDOUR_INSTANT_XML_PATH", path.c_str(), 1);
export_search_path (dir_path, "ARDOUR_DATA_PATH", "/../Resources");
export_search_path (dir_path, "ARDOUR_CONFIG_PATH", "/../Resources");
export_search_path (dir_path, "ARDOUR_INSTANT_XML_PATH", "/../Resources");
export_search_path (dir_path, "LADSPA_PATH", "/../Plugins");
export_search_path (dir_path, "VAMP_PATH", "/../Frameworks");
export_search_path (dir_path, "ARDOUR_PANNER_PATH", "/../Panners");
export_search_path (dir_path, "ARDOUR_SURFACES_PATH", "/../Surfaces");
export_search_path (dir_path, "ARDOUR_MIDIMAPS_PATH", "/../MidiMaps");
export_search_path (dir_path, "ARDOUR_MCP_PATH", "../MCP");
export_search_path (dir_path, "ARDOUR_EXPORT_FORMATS_PATH", "/../ExportFormats");
path = dir_path;
path += "/../Frameworks/clearlooks";
path += "/../lib/clearlooks";
setenv ("GTK_PATH", path.c_str(), 1);
/* unset GTK_RC_FILES so that we only load the RC files that we define
@ -305,49 +287,17 @@ fixup_bundle_environment (int /*argc*/, char* argv[])
Glib::ustring path;
Glib::ustring userconfigdir = user_config_directory().to_string();
/* ensure that we find any bundled executables (e.g. JACK),
and find them before any instances of the same name
elsewhere in PATH
*/
/* note that this function is POSIX/Linux specific, so using / as
a dir separator in this context is just fine.
*/
path = dir_path;
path += "/etc:";
path += dir_path;
path += "/lib/surfaces:";
path += dir_path;
path += "/lib/panners:";
setenv ("ARDOUR_MODULE_PATH", path.c_str(), 1);
path = userconfigdir;
path += ':';
path += dir_path;
path += "/etc/icons:";
path += dir_path;
path += "/etc/pixmaps:";
path += dir_path;
path += "/share:";
path += dir_path;
path += "/etc";
setenv ("ARDOUR_PATH", path.c_str(), 1);
setenv ("ARDOUR_CONFIG_PATH", path.c_str(), 1);
path = dir_path;
path += "/etc";
setenv ("ARDOUR_INSTANT_XML_PATH", path.c_str(), 1);
export_search_path (dir_path, "ARDOUR_DLL_PATH", "/lib");
export_search_path (dir_path, "ARDOUR_CONFIG_PATH", "/etc");
export_search_path (dir_path, "ARDOUR_INSTANT_XML_PATH", "/share");
export_search_path (dir_path, "ARDOUR_DATA_PATH", "/share");
export_search_path (dir_path, "LADSPA_PATH", "/../plugins");
export_search_path (dir_path, "VAMP_PATH", "/lib");
export_search_path (dir_path, "ARDOUR_PANNER_PATH", "/lib/panners");
export_search_path (dir_path, "ARDOUR_SURFACES_PATH", "/lib/surfaces");
export_search_path (dir_path, "ARDOUR_MIDIMAPS_PATH", "/share/midi_maps");
export_search_path (dir_path, "ARDOUR_MCP_PATH", "/share/mcp");
export_search_path (dir_path, "ARDOUR_EXPORT_FORMATS_PATH", "/share/export");
path = dir_path;
path += "/lib/clearlooks";
@ -367,7 +317,7 @@ fixup_bundle_environment (int /*argc*/, char* argv[])
}
/* Tell fontconfig where to find fonts.conf. Use the system version
if it exists, otherwise use the stuff we included in t
if it exists, otherwise use the stuff we included in the bundle
*/
if (Glib::file_test ("/etc/fonts/fonts.conf", Glib::FILE_TEST_EXISTS)) {

View file

@ -2909,7 +2909,7 @@ MidiRegionView::change_note_lengths (bool fine, bool shorter, Evoral::MusicalTim
delta = trackview.editor().get_grid_type_as_beats (success, _region->position());
if (!success) {
/* XXX cannot get grid type as beats ... should always be possible ... FIX ME */
cerr << "Grid type not available as beats - TO BE FIXED\n";
error << string_compose (_("programming error: %1"), "Grid type not available as beats - TO BE FIXED") << endmsg;
return;
}
}

View file

@ -861,7 +861,6 @@ void
MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool show)
{
if (param.type() == NullAutomation) {
cerr << "WARNING: Attempt to create NullAutomation child, ignoring" << endl;
return;
}
@ -874,8 +873,6 @@ MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
* since it will have been set visible by default.
*/
cerr << "show existing auto track: " << show << " noredraw " << no_redraw << endl;
if (existing->second->set_marked_for_display (show) && !no_redraw) {
request_redraw ();
}

View file

@ -59,7 +59,6 @@ MissingFileDialog::MissingFileDialog (Session* s, const std::string& path, DataT
string dirstr;
dirstr = s->source_search_path (type);
cerr << "Search path = " << dirstr << endl;
replace_all (dirstr, ":", "\n");
msg.set_justify (JUSTIFY_CENTER);

View file

@ -83,13 +83,12 @@ MixerActor::load_bindings ()
bindings.set_action_map (myactions);
sys::path binding_file;
SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path();
if (find_file_in_search_path (spath, "mixer.bindings", binding_file)) {
if (find_file_in_search_path (ardour_config_search_path(), "mixer.bindings", binding_file)) {
bindings.load (binding_file.to_string());
info << string_compose (_("Loaded mixer bindings from %1"), binding_file.to_string()) << endmsg;
} else {
error << string_compose (_("Could not find mixer.bindings in search path %1"), spath.to_string()) << endmsg;
error << string_compose (_("Could not find mixer.bindings in search path %1"), ardour_config_search_path().to_string()) << endmsg;
}
}

View file

@ -321,9 +321,12 @@ public:
/** Gather ports from around the system and put them in this PortGroupList.
* @param type Type of ports to collect, or NIL for all types.
* @param use_session_bundles true to use the session's non-user bundles. Doing this will mean that
* hardware ports will be gathered into stereo pairs, as the session sets up bundles for these pairs.
* Not using the session bundles will mean that all hardware IO will be presented separately.
*/
void
PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inputs, bool allow_dups)
PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inputs, bool allow_dups, bool use_session_bundles)
{
clear ();
@ -408,11 +411,14 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
}
}
/* Only look for non-user bundles if instructed to do so */
if (use_session_bundles) {
for (BundleList::iterator i = b->begin(); i != b->end(); ++i) {
if (boost::dynamic_pointer_cast<UserBundle> (*i) == 0 && (*i)->ports_are_inputs() == inputs) {
system->add_bundle (*i, allow_dups);
}
}
}
/* Ardour stuff */

View file

@ -107,7 +107,7 @@ class PortGroupList : public sigc::trackable
void add_group (boost::shared_ptr<PortGroup>);
void add_group_if_not_empty (boost::shared_ptr<PortGroup>);
void gather (ARDOUR::Session *, ARDOUR::DataType, bool, bool);
void gather (ARDOUR::Session *, ARDOUR::DataType, bool, bool, bool);
PortGroup::BundleList const & bundles () const;
void clear ();
void remove_bundle (boost::shared_ptr<ARDOUR::Bundle>);

View file

@ -213,6 +213,7 @@ PortMatrix::setup ()
_body->setup ();
setup_scrollbars ();
update_tab_highlighting ();
queue_draw ();
}
@ -411,6 +412,7 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
boost::weak_ptr<Bundle> w (bc[dim].bundle);
if (can_add_channels (bc[dim].bundle)) {
/* Start off with options for the `natural' port type */
for (DataType::iterator i = DataType::begin(); i != DataType::end(); ++i) {
if (should_show (*i)) {
@ -426,8 +428,9 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
sub.push_back (MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::add_channel_proxy), w, *i)));
}
}
}
if (can_rename_channels (bc[dim].bundle)) {
if (can_rename_channels (bc[dim].bundle) && bc[dim].channel != -1) {
snprintf (
buf, sizeof (buf), _("Rename '%s'..."),
escape_underscores (bc[dim].bundle->channel_name (bc[dim].channel)).c_str()
@ -623,6 +626,11 @@ PortMatrix::toggle_show_only_bundles ()
_show_only_bundles = !_show_only_bundles;
setup ();
/* The way in which hardware ports are grouped changes depending on the _show_only_bundles
setting, so we need to set things up again now.
*/
setup_all_ports ();
}
pair<uint32_t, uint32_t>
@ -672,7 +680,7 @@ PortMatrix::io_from_bundle (boost::shared_ptr<Bundle> b) const
}
bool
PortMatrix::can_add_channel (boost::shared_ptr<Bundle> b) const
PortMatrix::can_add_channels (boost::shared_ptr<Bundle> b) const
{
return io_from_bundle (b);
}
@ -770,6 +778,7 @@ PortMatrix::setup_notebooks ()
dummy->show ();
Label* label = manage (new Label ((*i)->name));
label->set_angle (_arrangement == LEFT_TO_BOTTOM ? 90 : -90);
label->set_use_markup ();
label->show ();
if (_arrangement == LEFT_TO_BOTTOM) {
_vnotebook.prepend_page (*dummy, *label);
@ -785,7 +794,10 @@ PortMatrix::setup_notebooks ()
for (PortGroupList::List::const_iterator i = _ports[_column_index].begin(); i != _ports[_column_index].end(); ++i) {
HBox* dummy = manage (new HBox);
dummy->show ();
_hnotebook.append_page (*dummy, (*i)->name);
Label* label = manage (new Label ((*i)->name));
label->set_use_markup ();
label->show ();
_hnotebook.append_page (*dummy, *label);
}
_ignore_notebook_page_selected = false;
@ -947,6 +959,55 @@ void
PortMatrix::port_connected_or_disconnected ()
{
_body->rebuild_and_draw_grid ();
update_tab_highlighting ();
}
/** Update the highlighting of tab names to reflect which ones
* have connections. This is pretty inefficient, unfortunately,
* but maybe that doesn't matter too much.
*/
void
PortMatrix::update_tab_highlighting ()
{
for (int i = 0; i < 2; ++i) {
Gtk::Notebook* notebook = row_index() == i ? &_vnotebook : &_hnotebook;
PortGroupList const * gl = ports (i);
int p = 0;
for (PortGroupList::List::const_iterator j = gl->begin(); j != gl->end(); ++j) {
bool has_connection = false;
PortGroup::BundleList const & bl = (*j)->bundles ();
PortGroup::BundleList::const_iterator k = bl.begin ();
while (k != bl.end()) {
if ((*k)->bundle->connected_to_anything (_session->engine())) {
has_connection = true;
break;
}
++k;
}
/* Find the page index that we should update; this is backwards
for the vertical tabs in the LEFT_TO_BOTTOM arrangement.
*/
int page = p;
if (i == row_index() && _arrangement == LEFT_TO_BOTTOM) {
page = notebook->get_n_pages() - p - 1;
}
Gtk::Label* label = dynamic_cast<Gtk::Label*> (notebook->get_tab_label(*notebook->get_nth_page (page)));
string c = label->get_label ();
if (c.length() && c[0] == '<' && !has_connection) {
/* this label is marked up with <b> but shouldn't be */
label->set_markup ((*j)->name);
} else if (c.length() && c[0] != '<' && has_connection) {
/* this label is not marked up with <b> but should be */
label->set_markup (string_compose ("<b>%1</b>", (*j)->name));
}
++p;
}
}
}
string

View file

@ -141,7 +141,7 @@ public:
virtual PortMatrixNode::State get_state (ARDOUR::BundleChannel c[2]) const = 0;
virtual bool list_is_global (int) const = 0;
virtual bool can_add_channel (boost::shared_ptr<ARDOUR::Bundle>) const;
virtual bool can_add_channels (boost::shared_ptr<ARDOUR::Bundle>) const;
virtual void add_channel (boost::shared_ptr<ARDOUR::Bundle>, ARDOUR::DataType);
virtual bool can_remove_channels (boost::shared_ptr<ARDOUR::Bundle>) const;
virtual void remove_channel (ARDOUR::BundleChannel);
@ -198,6 +198,7 @@ private:
void add_remove_option (Gtk::Menu_Helpers::MenuList &, boost::weak_ptr<ARDOUR::Bundle>, int);
void add_disassociate_option (Gtk::Menu_Helpers::MenuList &, boost::weak_ptr<ARDOUR::Bundle>, int, int);
void port_connected_or_disconnected ();
void update_tab_highlighting ();
Gtk::Window* _parent;

View file

@ -1287,11 +1287,14 @@ RouteUI::solo_isolate_button_release (GdkEventButton* ev)
}
bool
RouteUI::solo_safe_button_release (GdkEventButton*)
RouteUI::solo_safe_button_release (GdkEventButton* ev)
{
if (ev->button == 1) {
_route->set_solo_safe (!solo_safe_led->active_state(), this);
return true;
}
return false;
}
void
RouteUI::toggle_solo_isolated (Gtk::CheckMenuItem* check)

View file

@ -1025,6 +1025,7 @@ Selection::set (ControlPoint* cp)
cp->line().nth (i)->set_selected (false);
}
clear_points ();
add (cp);
}

View file

@ -447,6 +447,9 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
{
chooser.set_border_width (12);
audio_and_midi_filter.add_custom (FILE_FILTER_FILENAME, sigc::mem_fun (*this, &SoundFileBrowser::on_audio_and_midi_filter));
audio_and_midi_filter.set_name (_("Audio and MIDI files"));
audio_filter.add_custom (FILE_FILTER_FILENAME, sigc::mem_fun(*this, &SoundFileBrowser::on_audio_filter));
audio_filter.set_name (_("Audio files"));
@ -456,6 +459,7 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
matchall_filter.add_pattern ("*.*");
matchall_filter.set_name (_("All files"));
chooser.add_filter (audio_and_midi_filter);
chooser.add_filter (audio_filter);
chooser.add_filter (midi_filter);
chooser.add_filter (matchall_filter);
@ -700,6 +704,12 @@ SoundFileBrowser::on_midi_filter (const FileFilter::Info& filter_info)
return SMFSource::safe_midi_file_extension (filter_info.filename);
}
bool
SoundFileBrowser::on_audio_and_midi_filter (const FileFilter::Info& filter_info)
{
return on_audio_filter (filter_info) || on_midi_filter (filter_info);
}
void
SoundFileBrowser::update_preview ()
{
@ -1043,6 +1053,8 @@ SoundFileOmega::reset_options ()
string existing_choice;
vector<string> action_strings;
resetting_ourselves = true;
if (chooser.get_filter() == &audio_filter) {
/* AUDIO */
@ -1074,7 +1086,7 @@ SoundFileOmega::reset_options ()
} else {
/* MIDI */
/* MIDI ONLY */
if (selected_midi_track_cnt > 0) {
action_strings.push_back (importmode2string (ImportToTrack));
@ -1085,8 +1097,6 @@ SoundFileOmega::reset_options ()
action_strings.push_back (importmode2string (ImportAsRegion));
action_strings.push_back (importmode2string (ImportAsTapeTrack));
resetting_ourselves = true;
existing_choice = action_combo.get_active_text();
set_popdown_strings (action_combo, action_strings);
@ -1573,6 +1583,15 @@ SoundFileOmega::reset (uint32_t selected_audio_tracks, uint32_t selected_midi_tr
{
selected_audio_track_cnt = selected_audio_tracks;
selected_midi_track_cnt = selected_midi_tracks;
if (selected_audio_track_cnt == 0 && selected_midi_track_cnt > 0) {
chooser.set_filter (midi_filter);
} else if (selected_midi_track_cnt == 0 && selected_audio_track_cnt > 0) {
chooser.set_filter (audio_filter);
} else {
chooser.set_filter (audio_and_midi_filter);
}
reset_options ();
}

View file

@ -182,6 +182,7 @@ class SoundFileBrowser : public ArdourDialog
protected:
bool resetting_ourselves;
Gtk::FileFilter audio_and_midi_filter;
Gtk::FileFilter audio_filter;
Gtk::FileFilter midi_filter;
Gtk::FileFilter custom_filter;
@ -216,6 +217,7 @@ class SoundFileBrowser : public ArdourDialog
bool on_audio_filter (const Gtk::FileFilter::Info& filter_info);
bool on_midi_filter (const Gtk::FileFilter::Info& filter_info);
bool on_audio_and_midi_filter (const Gtk::FileFilter::Info& filter_info);
virtual bool reset_options() { return true; }

View file

@ -22,7 +22,7 @@ Splash::Splash ()
{
sys::path splash_file;
if (!find_file_in_search_path (ardour_search_path() + system_data_search_path(), "splash.png", splash_file)) {
if (!find_file_in_search_path (ardour_data_search_path(), "splash.png", splash_file)) {
throw failed_constructor();
}

View file

@ -549,10 +549,10 @@ ArdourStartup::setup_initial_choice_page ()
centering_vbox->pack_start (ic_new_session_button, false, true);
centering_vbox->pack_start (ic_existing_session_button, false, true);
ic_new_session_button.signal_button_press_event().connect(sigc::mem_fun(*this, &ArdourStartup::initial_button_press), false);
ic_new_session_button.signal_clicked().connect(sigc::mem_fun(*this, &ArdourStartup::initial_button_clicked));
ic_new_session_button.signal_activate().connect(sigc::mem_fun(*this, &ArdourStartup::initial_button_activated), false);
ic_existing_session_button.signal_button_press_event().connect(sigc::mem_fun(*this, &ArdourStartup::initial_button_press), false);
ic_existing_session_button.signal_clicked().connect(sigc::mem_fun(*this, &ArdourStartup::initial_button_clicked));
ic_existing_session_button.signal_activate().connect(sigc::mem_fun(*this, &ArdourStartup::initial_button_activated), false);
centering_hbox->pack_start (*centering_vbox, true, true);
@ -572,22 +572,21 @@ ArdourStartup::setup_initial_choice_page ()
set_page_complete (ic_vbox, true);
}
bool
ArdourStartup::initial_button_press (GdkEventButton *event)
void
ArdourStartup::initial_button_clicked ()
{
if (event && event->type == GDK_2BUTTON_PRESS && session_page_index != -1) {
if (session_page_index != -1) {
set_current_page(session_page_index);
return true;
} else {
return false;
}
}
void
ArdourStartup::initial_button_activated ()
{
if (session_page_index != -1) {
set_current_page(session_page_index);
}
}
void
ArdourStartup::setup_session_page ()
@ -716,7 +715,7 @@ ArdourStartup::populate_session_templates ()
static bool
lost_name_entry_focus (GdkEventFocus*)
{
cerr << "lost focus\n";
// cerr << "lost focus\n";
return false;
}
@ -892,7 +891,7 @@ ArdourStartup::setup_new_session_page ()
void
ArdourStartup::new_name_mapped ()
{
cerr << "Grab new name focus\n";
// cerr << "Grab new name focus\n";
new_name_entry.grab_focus ();
}

View file

@ -117,7 +117,7 @@ class ArdourStartup : public Gtk::Assistant {
Gtk::VBox ic_vbox;
Gtk::RadioButton ic_new_session_button;
Gtk::RadioButton ic_existing_session_button;
bool initial_button_press(GdkEventButton *);
void initial_button_clicked();
void initial_button_activated();
/* monitoring choices */

View file

@ -709,9 +709,8 @@ StepEntry::load_bindings ()
bindings.set_action_map (myactions);
sys::path binding_file;
SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path();
if (find_file_in_search_path (spath, "step_editing.bindings", binding_file)) {
if (find_file_in_search_path (ardour_config_search_path(), "step_editing.bindings", binding_file)) {
bindings.load (binding_file.to_string());
}
}

View file

@ -36,6 +36,7 @@
#include "ardour/filesystem_paths.h"
#include "ardour/profile.h"
#include "ardour_button.h"
#include "theme_manager.h"
#include "rgb_macros.h"
#include "ardour_ui.h"
@ -52,10 +53,11 @@ sigc::signal<void> ColorsChanged;
sigc::signal<void,uint32_t> ColorChanged;
ThemeManager::ThemeManager()
: ArdourWindow (_("Theme Manager")),
dark_button (_("Dark Theme")),
light_button (_("Light Theme")),
reset_button (_("Restore Defaults"))
: ArdourWindow (_("Theme Manager"))
, dark_button (_("Dark Theme"))
, light_button (_("Light Theme"))
, reset_button (_("Restore Defaults"))
, flat_buttons (_("Draw \"flat\" buttons"))
{
set_title (_("Theme Manager"));
@ -90,6 +92,7 @@ ThemeManager::ThemeManager()
vbox->set_homogeneous (false);
vbox->pack_start (theme_selection_hbox, PACK_SHRINK);
vbox->pack_start (reset_button, PACK_SHRINK);
vbox->pack_start (flat_buttons, PACK_SHRINK);
vbox->pack_start (scroller);
add (*vbox);
@ -103,6 +106,7 @@ ThemeManager::ThemeManager()
dark_button.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_dark_theme_button_toggled));
light_button.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_light_theme_button_toggled));
reset_button.signal_clicked().connect (sigc::mem_fun (*this, &ThemeManager::reset_canvas_colors));
flat_buttons.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_flat_buttons_toggled));
set_size_request (-1, 400);
setup_theme ();
@ -202,13 +206,9 @@ load_rc_file (const string& filename, bool themechange)
{
sys::path rc_file_path;
SearchPath spath (ardour_search_path());
spath += user_config_directory();
spath += system_config_search_path();
if (!find_file_in_search_path (spath, filename, rc_file_path)) {
if (!find_file_in_search_path (ardour_config_search_path(), filename, rc_file_path)) {
warning << string_compose (_("Unable to find UI style file %1 in search path %2. %3 will look strange"),
filename, spath.to_string(), PROGRAM_NAME)
filename, ardour_config_search_path().to_string(), PROGRAM_NAME)
<< endmsg;
return;
}
@ -230,6 +230,16 @@ load_rc_file (const string& filename, bool themechange)
#define HACK_PROFILE_IS_SAE() (getenv("ARDOUR_SAE")!=0)
void
ThemeManager::on_flat_buttons_toggled ()
{
ARDOUR_UI::config()->flat_buttons.set (flat_buttons.get_active());
ARDOUR_UI::config()->set_dirty ();
ArdourButton::set_flat_buttons (flat_buttons.get_active());
/* force a redraw */
gtk_rc_reset_styles (gtk_settings_get_default());
}
void
ThemeManager::on_dark_theme_button_toggled()
{
@ -338,6 +348,8 @@ ThemeManager::setup_theme ()
light_button.set_active();
}
flat_buttons.set_active (ARDOUR_UI::config()->flat_buttons.get());
load_rc_file(rcfile, false);
}

View file

@ -42,6 +42,7 @@ class ThemeManager : public ArdourWindow
void on_dark_theme_button_toggled ();
void on_light_theme_button_toggled ();
void on_flat_buttons_toggled ();
private:
struct ColorDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
@ -67,6 +68,7 @@ class ThemeManager : public ArdourWindow
Gtk::RadioButton dark_button;
Gtk::RadioButton light_button;
Gtk::Button reset_button;
Gtk::CheckButton flat_buttons;
bool button_press_event (GdkEventButton*);
};

View file

@ -75,8 +75,7 @@ UIConfiguration::load_defaults ()
rcfile = "ardour3_ui_default.conf";
}
if (find_file_in_search_path (ardour_search_path() + system_config_search_path(),
rcfile, default_ui_rc_file) ) {
if (find_file_in_search_path (ardour_config_search_path(), rcfile, default_ui_rc_file) ) {
XMLTree tree;
found = 1;
@ -107,8 +106,7 @@ UIConfiguration::load_state ()
sys::path default_ui_rc_file;
if ( find_file_in_search_path (ardour_search_path() + system_config_search_path(),
"ardour3_ui_default.conf", default_ui_rc_file) ) {
if ( find_file_in_search_path (ardour_config_search_path(), "ardour3_ui_default.conf", default_ui_rc_file)) {
XMLTree tree;
found = true;
@ -129,8 +127,7 @@ UIConfiguration::load_state ()
sys::path user_ui_rc_file;
if (find_file_in_search_path (ardour_search_path() + user_config_directory(),
"ardour3_ui.conf", user_ui_rc_file)) {
if (find_file_in_search_path (ardour_config_search_path(), "ardour3_ui.conf", user_ui_rc_file)) {
XMLTree tree;
found = true;

View file

@ -1,2 +1,3 @@
UI_CONFIG_VARIABLE(std::string, ui_rc_file, "ui-rc-file", "ardour3_ui_dark.rc")
UI_CONFIG_VARIABLE(bool, flat_buttons, "flat-buttons", false)

View file

@ -494,8 +494,7 @@ get_xpm (std::string name)
{
if (!xpm_map[name]) {
SearchPath spath(ARDOUR::ardour_search_path());
spath += ARDOUR::system_data_search_path();
SearchPath spath(ARDOUR::ardour_data_search_path());
spath.add_subdirectory_to_paths("pixmaps");
@ -521,15 +520,14 @@ get_icon_path (const char* cname)
string name = cname;
name += X_(".png");
SearchPath spath(ARDOUR::ardour_search_path());
spath += ARDOUR::system_data_search_path();
SearchPath spath(ARDOUR::ardour_data_search_path());
spath.add_subdirectory_to_paths("icons");
sys::path data_file_path;
if (!find_file_in_search_path (spath, name, data_file_path)) {
fatal << string_compose (_("cannot find icon image for %1"), name) << endmsg;
fatal << string_compose (_("cannot find icon image for %1 using %2"), name, spath.to_string()) << endmsg;
}
return data_file_path.to_string();

View file

@ -406,9 +406,7 @@ def build(bld):
'VERSIONSTRING="' + bld.env['VERSION'] + '"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'MODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"',
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']),
'locale') + '"',
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"'
]
obj.includes += ['../libs']
@ -450,6 +448,8 @@ def build(bld):
wrapper_subst_dict = {
'INSTALL_PREFIX' : bld.env['PREFIX'],
'LIBDIR' : os.path.normpath(bld.env['LIBDIR']),
'DATADIR' : os.path.normpath(bld.env['DATADIR']),
'SYSCONFDIR' : os.path.normpath(bld.env['SYSCONFDIR']),
'LIBS' : 'build/libs',
'VERSION' : '3.0',
'EXECUTABLE' : 'build/gtk2_ardour/ardour-3.0'
@ -645,8 +645,6 @@ def build(bld):
# Default UI configuration
bld.install_files('${SYSCONFDIR}/ardour3', 'ardour3_ui_default.conf')
# Generic widget style mappings
bld.install_files('${SYSCONFDIR}/ardour3', 'ardour3_widgets.rc')
# Default export stuff
bld.install_files('${SYSCONFDIR}/ardour3/export', bld.path.ant_glob('export/*.format'))

View file

@ -99,6 +99,7 @@ class Bundle : public PBD::ScopedConnectionList
void connect (boost::shared_ptr<Bundle>, AudioEngine &);
void disconnect (boost::shared_ptr<Bundle>, AudioEngine &);
bool connected_to (boost::shared_ptr<Bundle>, AudioEngine &);
bool connected_to_anything (AudioEngine &);
bool has_same_ports (boost::shared_ptr<Bundle>) const;
uint32_t type_channel_to_overall (DataType, uint32_t) const;
uint32_t overall_channel_to_type (DataType, uint32_t) const;

View file

@ -35,13 +35,20 @@ namespace ARDOUR {
* @return the path to the directory that contains the system wide ardour
* modules.
*/
PBD::sys::path ardour_module_directory ();
PBD::sys::path ardour_dll_directory ();
PBD::SearchPath ardour_search_path ();
/**
* @return the search path to be used when looking for per-system
* configuration files. This may include user configuration files.
*/
PBD::SearchPath ardour_config_search_path ();
PBD::SearchPath system_config_search_path ();
PBD::SearchPath system_data_search_path ();
/**
* @return the search path to be used when looking for data files
* that could be shared by systems (h/w and configuration independent
* files, such as icons, XML files, etc)
*/
PBD::SearchPath ardour_data_search_path ();
} // namespace ARDOUR

View file

@ -106,6 +106,7 @@ generate_inverse_coefficient_curve (boost::shared_ptr<Evoral::ControlList> dst,
static void
generate_db_fade (boost::shared_ptr<Evoral::ControlList> dst, double len, int num_steps, float dB_drop)
{
dst->clear ();
dst->fast_simple_add (0, 1);
//generate a fade-out curve by successively applying a gain drop
@ -1019,6 +1020,8 @@ AudioRegion::set_fade_in (FadeShape shape, framecnt_t len)
generate_db_fade (c1, len, 10, -1); // start off with a slow fade
generate_db_fade (c2, len, 10, -80); // end with a fast fade
merge_curves (_fade_in, c1, c2);
reverse_curve (c3, _fade_in);
_fade_in->copy_events (*c3);
generate_inverse_power_curve (_inverse_fade_in, _fade_in);
break;
@ -1032,20 +1035,22 @@ AudioRegion::set_fade_in (FadeShape shape, framecnt_t len)
break;
case FadeSymmetric:
// starts kind of like a constant power but has a slower fadeout
// however it is NOT constant power and there will be a level drop in the middle of the crossfade
c1->fast_simple_add (0.0, 1.0);
for ( int i = 1; i < 9; i++ ) {
float dist = (float)i/10.0;
c1->fast_simple_add ((len * dist), cos(dist*M_PI/10.0));
//start with a nearly linear cuve
_fade_in->fast_simple_add (0, 1);
_fade_in->fast_simple_add (0.5*len, 0.6);
//now generate a fade-out curve by successively applying a gain drop
const float breakpoint = 0.7; //linear for first 70%
const int num_steps = 9;
for (int i = 2; i < num_steps; i++) {
float coeff = (1.0-breakpoint);
for (int j = 0; j < i; j++) {
coeff *= 0.5; //6dB drop per step
}
c1->fast_simple_add (len, VERY_SMALL_SIGNAL);
//curve 2 is a slow fade at end
generate_db_fade (c2, len, 10, -30 );
merge_curves (c3, c1, c2);
reverse_curve (_fade_in, c3);
_fade_in->fast_simple_add (len* (breakpoint+((1.0-breakpoint)*(double)i/(double)num_steps)), coeff);
}
_fade_in->fast_simple_add (len, VERY_SMALL_SIGNAL);
reverse_curve (c3, _fade_in);
_fade_in->copy_events (*c3);
reverse_curve (_inverse_fade_in, _fade_in );
break;
}
@ -1108,19 +1113,21 @@ AudioRegion::set_fade_out (FadeShape shape, framecnt_t len)
break;
case FadeSymmetric:
//starts kind of like a constant power but has a slower fadeout
//however it is NOT constant power and there will be a level drop in the middle of the crossfade
c1->fast_simple_add (0.0, 1.0);
for ( int i = 1; i < 9; i++ ) {
float dist = (float)i/10.0;
c1->fast_simple_add ((len * dist), cos(dist*M_PI/10.0)); //cheesy way of making a flat line
//start with a nearly linear cuve
_fade_out->fast_simple_add (0, 1);
_fade_out->fast_simple_add (0.5*len, 0.6);
//now generate a fade-out curve by successively applying a gain drop
const float breakpoint = 0.7; //linear for first 70%
const int num_steps = 9;
for (int i = 2; i < num_steps; i++) {
float coeff = (1.0-breakpoint);
for (int j = 0; j < i; j++) {
coeff *= 0.5; //6dB drop per step
}
c1->fast_simple_add (len, VERY_SMALL_SIGNAL);
//curve 2 is a slow fade at end
generate_db_fade (c2, len, 10, -30);
merge_curves (_fade_out, c1, c2);
_fade_out->fast_simple_add (len* (breakpoint+((1.0-breakpoint)*(double)i/(double)num_steps)), coeff);
}
_fade_out->fast_simple_add (len, VERY_SMALL_SIGNAL);
reverse_curve (_inverse_fade_out, _fade_out);
break;
}
@ -1875,12 +1882,20 @@ AudioRegion::get_single_other_xfade_region (bool start) const
framecnt_t
AudioRegion::verify_xfade_bounds (framecnt_t len, bool start)
{
/* this is called from a UI to check on whether a new proposed
length for an xfade is legal or not. it returns the legal
length corresponding to @a len which may be shorter than or
equal to @a len itself.
*/
boost::shared_ptr<Region> other = get_single_other_xfade_region (start);
framecnt_t maxlen;
if (!other) {
/* zero or > 2 regions here, don't care about len */
return len;
/* zero or > 2 regions here, don't care about len, but
it can't be longer than the region itself.
*/
return min (length(), len);
}
/* we overlap a single region. clamp the length of an xfade to
@ -1894,7 +1909,7 @@ AudioRegion::verify_xfade_bounds (framecnt_t len, bool start)
maxlen = last_frame() - other->earliest_possible_position();
}
return min (maxlen, len);
return min (length(), min (maxlen, len));
}

View file

@ -440,6 +440,34 @@ Bundle::connected_to (boost::shared_ptr<Bundle> other, AudioEngine & engine)
return true;
}
/** This must not be called in code executed as a response to a JACK event,
* as it uses jack_port_get_all_connections().
* @return true if any of this bundle's channels are connected to anything.
*/
bool
Bundle::connected_to_anything (AudioEngine& engine)
{
for (uint32_t i = 0; i < nchannels().n_total(); ++i) {
Bundle::PortList const & ports = channel_ports (i);
for (uint32_t j = 0; j < ports.size(); ++j) {
/* ports[j] may not be an Ardour port, so use JACK directly
rather than doing it with Port.
*/
jack_port_t* jp = jack_port_by_name (engine.jack(), ports[j].c_str());
if (jp) {
const char ** c = jack_port_get_all_connections (engine.jack(), jp);
if (c) {
jack_free (c);
return true;
}
}
}
}
return false;
}
void
Bundle::set_ports_are_inputs ()
{

View file

@ -210,7 +210,7 @@ ControlProtocolManager::discover_control_protocols ()
dylib_extension_pattern, cp_modules);
DEBUG_TRACE (DEBUG::ControlProtocols,
string_compose (_("looking for control protocols in %1"), control_protocol_search_path().to_string()));
string_compose (_("looking for control protocols in %1\n"), control_protocol_search_path().to_string()));
for (vector<sys::path>::iterator i = cp_modules.begin(); i != cp_modules.end(); ++i) {
control_protocol_discover ((*i).to_string());
@ -222,12 +222,14 @@ ControlProtocolManager::control_protocol_discover (string path)
{
ControlProtocolDescriptor* descriptor;
/* don't load shared objects that are just symlinks to the real thing.
#ifdef __APPLE__
/* don't load OS X shared objects that are just symlinks to the real thing.
*/
if (Glib::file_test (path, Glib::FILE_TEST_IS_SYMLINK)) {
if (path.find (".dylib") && Glib::file_test (path, Glib::FILE_TEST_IS_SYMLINK)) {
return 0;
}
#endif
if ((descriptor = get_descriptor (path)) != 0) {

View file

@ -17,6 +17,8 @@
*/
#include <iostream>
#include <glibmm/miscutils.h>
#include "ardour/control_protocol_search_path.h"
@ -36,7 +38,7 @@ control_protocol_search_path ()
{
SearchPath spath (user_config_directory ());
spath += ardour_module_directory ();
spath += ardour_dll_directory ();
spath.add_subdirectory_to_paths (surfaces_dir_name);
bool surfaces_path_defined = false;

View file

@ -17,10 +17,11 @@
*/
#include <cstdlib>
#include <iostream>
#include "pbd/error.h"
#include "pbd/compose.h"
#include "pbd/filesystem_paths.h"
#include "pbd/strsplit.h"
#include <glibmm/miscutils.h>
#include <glibmm/fileutils.h>
@ -90,38 +91,72 @@ user_config_directory ()
}
sys::path
ardour_module_directory ()
ardour_dll_directory ()
{
sys::path module_directory(MODULE_DIR);
module_directory /= "ardour3";
return module_directory;
std::string s = Glib::getenv("ARDOUR_DLL_PATH");
if (s.empty()) {
std::cerr << _("ARDOUR_DLL_PATH not set in environment - exiting\n");
::exit (1);
}
return sys::path (s);
}
SearchPath
ardour_search_path ()
ardour_config_search_path ()
{
SearchPath spath_env(Glib::getenv("ARDOUR_PATH"));
return spath_env;
static bool have_path = false;
static SearchPath search_path;
if (!have_path) {
SearchPath sp (user_config_directory());
std::string s = Glib::getenv("ARDOUR_CONFIG_PATH");
if (s.empty()) {
std::cerr << _("ARDOUR_CONFIG_PATH not set in environment - exiting\n");
::exit (1);
}
std::vector<string> ss;
split (s, ss, ':');
for (std::vector<string>::iterator i = ss.begin(); i != ss.end(); ++i) {
sp += sys::path (*i);
}
search_path = sp;
have_path = true;
std::cerr << "CONFIG PATH: " << search_path.to_string() << std::endl;
}
return search_path;
}
SearchPath
system_config_search_path ()
ardour_data_search_path ()
{
SearchPath config_path(system_config_directories());
static bool have_path = false;
static SearchPath search_path;
config_path.add_subdirectory_to_paths("ardour3");
if (!have_path) {
SearchPath sp (user_config_directory());
return config_path;
std::string s = Glib::getenv("ARDOUR_DATA_PATH");
if (s.empty()) {
std::cerr << _("ARDOUR_DATA_PATH not set in environment - exiting\n");
::exit (1);
}
SearchPath
system_data_search_path ()
{
SearchPath data_path(system_data_directories());
std::vector<string> ss;
split (s, ss, ':');
for (std::vector<string>::iterator i = ss.begin(); i != ss.end(); ++i) {
sp += sys::path (*i);
}
data_path.add_subdirectory_to_paths("ardour3");
search_path = sp;
have_path = true;
std::cerr << "DATA PATH: " << search_path.to_string() << std::endl;
}
return data_path;
return search_path;
}
} // namespace ARDOUR

View file

@ -321,17 +321,6 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization)
AUPluginInfo::load_cached_info ();
#endif
/* Make VAMP look in our library ahead of anything else */
char *p = getenv ("VAMP_PATH");
string vamppath = VAMP_DIR;
if (p) {
vamppath += ':';
vamppath += p;
}
setenv ("VAMP_PATH", vamppath.c_str(), 1);
setup_hardware_optimization (try_optimization);
SourceFactory::init ();
@ -404,7 +393,7 @@ void
ARDOUR::find_bindings_files (map<string,string>& files)
{
vector<sys::path> found;
SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path();
SearchPath spath = ardour_config_search_path();
if (getenv ("ARDOUR_SAE")) {
Glib::PatternSpec pattern("*SAE-*.bindings");

View file

@ -564,6 +564,7 @@ Session::import_audiofiles (ImportStatus& status)
/* flush the final length(s) to the header(s) */
for (Sources::iterator x = all_new_sources.begin(); x != all_new_sources.end(); ) {
if ((afs = boost::dynamic_pointer_cast<AudioFileSource>(*x)) != 0) {
afs->update_header((*x)->natural_position(), *now, xnow);
afs->done_with_peakfile_writes ();
@ -575,6 +576,15 @@ Session::import_audiofiles (ImportStatus& status)
}
}
/* imported, copied files cannot be written or removed
*/
boost::shared_ptr<FileSource> fs = boost::dynamic_pointer_cast<FileSource>(*x);
if (fs) {
fs->mark_immutable ();
fs->mark_nonremovable ();
}
/* don't create tracks for empty MIDI sources (channels) */
if ((smfs = boost::dynamic_pointer_cast<SMFSource>(*x)) != 0 && smfs->is_empty()) {
@ -590,8 +600,12 @@ Session::import_audiofiles (ImportStatus& status)
std::copy (all_new_sources.begin(), all_new_sources.end(), std::back_inserter(status.sources));
} else {
// this can throw...but it seems very unlikely
try {
std::for_each (all_new_sources.begin(), all_new_sources.end(), remove_file_source);
} catch (...) {
error << _("Failed to remove some files after failed/cancelled import operation") << endmsg;
}
}
status.done = true;

View file

@ -1061,7 +1061,6 @@
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_3)",
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_4)",
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_5)",
NO_POSIX_MEMALIGN,
);
GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1 = "PACKAGE=\"\\\"libardour\\\"\"";
GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_2 = "CONFIG_DIR=\"\\\"/Library/Application\\ Support/Ardour/config\\\"\"";
@ -1110,7 +1109,6 @@
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_3)",
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_4)",
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_5)",
NO_POSIX_MEMALIGN,
);
GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1 = "PACKAGE=\"\\\"libardour\\\"\"";
GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_2 = "CONFIG_DIR=\"\\\"/Library/Application\\ Support/Ardour/config\\\"\"";

View file

@ -36,7 +36,7 @@ midi_patch_search_path ()
{
SearchPath spath (user_config_directory ());
spath += ardour_module_directory ();
spath += ardour_dll_directory ();
spath.add_subdirectory_to_paths(midi_patch_dir_name);
bool midi_patch_path_defined = false;

View file

@ -36,7 +36,7 @@ panner_search_path ()
{
SearchPath spath (user_config_directory ());
spath += ardour_module_directory ();
spath += ardour_dll_directory ();
spath.add_subdirectory_to_paths(panner_dir_name);
bool panner_path_defined = false;

View file

@ -84,7 +84,7 @@ RCConfiguration::load_state ()
/* load system configuration first */
if (find_file_in_search_path (ardour_search_path() + system_config_search_path(), "ardour_system.rc", system_rc_file)) {
if (find_file_in_search_path (ardour_config_search_path(), "ardour_system.rc", system_rc_file)) {
string rcfile = system_rc_file.to_string();
/* stupid XML Parser hates empty files */
@ -115,7 +115,7 @@ RCConfiguration::load_state ()
sys::path user_rc_file;
if (find_file_in_search_path (ardour_search_path() + user_config_directory(), "ardour.rc", user_rc_file)) {
if (find_file_in_search_path (ardour_config_search_path(), "ardour.rc", user_rc_file)) {
string rcfile = user_rc_file.to_string();
/* stupid XML parser hates empty files */

View file

@ -8,15 +8,20 @@ if [ ! -f './tempo.cc' ]; then
exit 1;
fi
srcdir=`pwd`
cd ../../build
cd ../..
top=`pwd`
cd build
libs='libs'
export LD_LIBRARY_PATH=$libs/audiographer:$libs/vamp-sdk:$libs/surfaces:$libs/surfaces/control_protocol:$libs/ardour:$libs/midi++2:$libs/pbd:$libs/rubberband:$libs/soundtouch:$libs/gtkmm2ext:$libs/appleutility:$libs/taglib:$libs/evoral:$libs/evoral/src/libsmf:$libs/timecode:/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH
export ARDOUR_CONFIG_PATH=$top:$top/gtk2_ardour:$libs/..:$libs/../gtk2_ardour
export ARDOUR_PANNER_PATH=$libs/panners/2in2out:$libs/panners/1in2out:$libs/panners/vbap
export ARDOUR_SURFACES_PATH=$libs/surfaces/osc:$libs/surfaces/generic_midi:$libs/surfaces/tranzport:$libs/surfaces/powermate:$libs/surfaces/mackie
export ARDOUR_MCP_PATH="../mcp"
export ARDOUR_DLL_PATH=$libs
export ARDOUR_DATA_PATH=$top/gtk2_ardour:$top/build/gtk2_ardour:.
if [ "$1" == "--debug" ]; then
gdb ./libs/ardour/run-tests

View file

@ -925,7 +925,7 @@ Session::load_state (string snapshot_name)
/* no version implies very old version of Ardour */
Stateful::loading_state_version = 1000;
} else {
if (prop->value().find ('.')) {
if (prop->value().find ('.') != string::npos) {
/* old school version format */
if (prop->value()[0] == '2') {
Stateful::loading_state_version = 2000;

View file

@ -339,7 +339,7 @@ SndFileSource::read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) con
if (ret != file_cnt) {
char errbuf[256];
sf_error_str (0, errbuf, sizeof (errbuf) - 1);
error << string_compose(_("SndFileSource: @ %1 could not read %2 within %3 (%4) (len = %5)"), start, file_cnt, _name.val().substr (1), errbuf, _length) << endl;
error << string_compose(_("SndFileSource: @ %1 could not read %2 within %3 (%4) (len = %5, ret was %6)"), start, file_cnt, _name.val().substr (1), errbuf, _length, ret) << endl;
}
_descriptor->release ();
return ret;

View file

@ -19,32 +19,20 @@ using namespace PBD;
namespace ARDOUR {
sys::path
system_template_directory ()
SearchPath
template_search_path ()
{
SearchPath spath(system_data_search_path());
SearchPath spath (ardour_data_search_path());
spath.add_subdirectory_to_paths(templates_dir_name);
// just return the first directory in the search path that exists
SearchPath::const_iterator i = std::find_if(spath.begin(), spath.end(), sys::exists);
if (i == spath.end()) return sys::path();
return *i;
return spath;
}
sys::path
system_route_template_directory ()
SearchPath
route_template_search_path ()
{
SearchPath spath(system_data_search_path());
SearchPath spath (ardour_data_search_path());
spath.add_subdirectory_to_paths(route_templates_dir_name);
// just return the first directory in the search path that exists
SearchPath::const_iterator i = std::find_if(spath.begin(), spath.end(), sys::exists);
if (i == spath.end()) return sys::path();
return *i;
return spath;
}
sys::path
@ -100,8 +88,7 @@ find_session_templates (vector<TemplateInfo>& template_names)
{
vector<string *> *templates;
PathScanner scanner;
SearchPath spath (system_template_directory());
spath += user_template_directory ();
SearchPath spath (template_search_path());
templates = scanner (spath.to_string(), template_filter, 0, true, true);
@ -137,8 +124,7 @@ find_route_templates (vector<TemplateInfo>& template_names)
{
vector<string *> *templates;
PathScanner scanner;
SearchPath spath (system_route_template_directory());
spath += user_route_template_directory ();
SearchPath spath (route_template_search_path());
templates = scanner (spath.to_string(), route_template_filter, 0, false, true);

View file

@ -367,11 +367,7 @@ def build(bld):
'PACKAGE="' + I18N_PACKAGE + '"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'MODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"',
'LOCALEDIR="' + os.path.join(
os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
'VAMP_DIR="' + os.path.join(
os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"',
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"'
]
@ -456,7 +452,6 @@ def build(bld):
'PACKAGE="libardour3test"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'MODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"',
'LOCALEDIR="' + os.path.join(
os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
'VAMP_DIR="' + os.path.join(
@ -488,7 +483,6 @@ def build(bld):
'PACKAGE="libardour3profile"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'MODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"',
'LOCALEDIR="' + os.path.join(
os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
'VAMP_DIR="' + os.path.join(

View file

@ -1,61 +0,0 @@
/*
Copyright (C) 2007 Tim Mayberry
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <glib.h>
#include "pbd/filesystem_paths.h"
namespace PBD {
std::vector<sys::path>
system_data_directories ()
{
std::vector<sys::path> tmp;
const char * const * dirs;
dirs = g_get_system_data_dirs ();
if (dirs == NULL) return tmp;
for (int i = 0; dirs[i] != NULL; ++i)
{
tmp.push_back(dirs[i]);
}
return tmp;
}
std::vector<sys::path>
system_config_directories ()
{
std::vector<sys::path> tmp;
const char * const * dirs;
dirs = g_get_system_config_dirs ();
if (dirs == NULL) return tmp;
for (int i = 0; dirs[i] != NULL; ++i)
{
tmp.push_back(dirs[i]);
}
return tmp;
}
} // namespace PBD

View file

@ -4,6 +4,7 @@
#include <cstring> // for memset
#include <cstdlib>
#include <stdint.h>
#include <assert.h>
#include "pbd/fpu.h"
#include "pbd/error.h"
@ -67,7 +68,7 @@ FPU::FPU ()
if (cpuflags & (1 << 24)) {
char* fxbuf = 0;
char** fxbuf = 0;
/* DAZ wasn't available in the first version of SSE. Since
setting a reserved bit in MXCSR causes a general protection
@ -79,25 +80,28 @@ FPU::FPU ()
supported, otherwise, it isn't.
*/
#ifdef NO_POSIX_MEMALIGN
if ((fxbuf = (char *) malloc(512)) == 0)
#ifndef HAVE_POSIX_MEMALIGN
fxbuf = (char **) malloc (sizeof (char *));
assert (fxbuf);
*fxbuf = (char *) malloc (512);
assert (*fxbuf);
#else
if (posix_memalign ((void**)&fxbuf, 16, 512))
posix_memalign ((void **) &fxbuf, 16, sizeof (char *));
assert (fxbuf);
posix_memalign ((void **) fxbuf, 16, 512);
assert (*fxbuf);
#endif
{
error << _("cannot allocate 16 byte aligned buffer for h/w feature detection") << endmsg;
} else {
memset (fxbuf, 0, 512);
memset (*fxbuf, 0, 512);
asm volatile (
"fxsave (%0)"
:
: "r" (fxbuf)
: "r" (*fxbuf)
: "memory"
);
uint32_t mxcsr_mask = *((uint32_t*) &fxbuf[28]);
uint32_t mxcsr_mask = *((uint32_t*) &((*fxbuf)[28]));
/* if the mask is zero, set its default value (from intel specs) */
@ -109,9 +113,9 @@ FPU::FPU ()
_flags = Flags (_flags | HasDenormalsAreZero);
}
free (*fxbuf);
free (fxbuf);
}
}
#endif
}

View file

@ -18,7 +18,7 @@ static const int CPU_CACHE_ALIGN = 16; /* arguably 32 on most arches, but it mat
int cache_aligned_malloc (void** memptr, size_t size)
{
#ifdef NO_POSIX_MEMALIGN
#ifndef HAVE_POSIX_MEMALIGN
if (((*memptr) = malloc (size)) == 0) {
fatal << string_compose (_("Memory allocation error: malloc (%1 * %2) failed (%3)"),
CPU_CACHE_ALIGN, size, strerror (errno)) << endmsg;

View file

@ -1,34 +0,0 @@
/*
Copyright (C) 2007 Tim Mayberry
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef PBD_FILESYSTEM_PATHS_INCLUDED
#define PBD_FILESYSTEM_PATHS_INCLUDED
#include <vector>
#include "pbd/filesystem.h"
namespace PBD {
std::vector<sys::path> system_data_directories ();
std::vector<sys::path> system_config_directories ();
} // namespace PBD
#endif

View file

@ -110,6 +110,11 @@ public:
ScopedConnection& operator= (UnscopedConnection const & o)
{
if (_c == o) {
return *this;
}
disconnect ();
_c = o;
return *this;
}

View file

@ -5,6 +5,14 @@ using namespace std;
CPPUNIT_TEST_SUITE_REGISTRATION (SignalsTest);
void
SignalsTest::setUp ()
{
if (!Glib::thread_supported ()) {
Glib::thread_init ();
}
}
class Emitter {
public:
void emit () {

View file

@ -10,6 +10,7 @@ class SignalsTest : public CppUnit::TestFixture
CPPUNIT_TEST_SUITE_END ();
public:
void setUp ();
void testEmission ();
void testDestruction ();
void testScopedConnectionList ();

View file

@ -43,8 +43,7 @@ def configure(conf):
conf.check(function_name='getmntent', header_name='mntent.h', define_name='HAVE_GETMNTENT',mandatory=False)
conf.check(header_name='execinfo.h', define_name='HAVE_EXECINFO',mandatory=False)
conf.check(header_name='unistd.h', define_name='HAVE_UNISTD',mandatory=False)
if conf.check_cc(function_name='posix_memalign', header_name='stdlib.h', cflags='-D_XOPEN_SOURCE=600',mandatory=False) == False:
conf.define ('NO_POSIX_MEMALIGN',1)
conf.check_cc(function_name='posix_memalign', header_name='stdlib.h', cflags='-D_XOPEN_SOURCE=600', define_name='HAVE_POSIX_MEMALIGN', mandatory=False)
conf.write_config_header('libpbd-config.h', remove=False)
@ -55,7 +54,7 @@ def configure(conf):
def build(bld):
# Make signal.h using signal.h.py
# Make signals_generated.h using signals.py
bld(rule = 'python ${SRC} ${TGT}', source = 'pbd/signals.py', target = 'pbd/signals_generated.h')
# Library
@ -80,7 +79,6 @@ def build(bld):
epa.cc
error.cc
filesystem.cc
filesystem_paths.cc
file_manager.cc
file_utils.cc
fpu.cc

View file

@ -114,7 +114,7 @@ system_midi_map_search_path ()
return spath_env;
}
SearchPath spath (system_data_search_path());
SearchPath spath (ardour_data_search_path());
spath.add_subdirectory_to_paths(midi_map_dir_name);
// just return the first directory in the search path that exists

View file

@ -421,7 +421,7 @@ static const char* const devinfo_dir_name = "mcp";
static const char* const devinfo_suffix = ".device";
static SearchPath
system_devinfo_search_path ()
devinfo_search_path ()
{
bool devinfo_path_defined = false;
sys::path spath_env (Glib::getenv (devinfo_env_variable_name, devinfo_path_defined));
@ -430,21 +430,12 @@ system_devinfo_search_path ()
return spath_env;
}
SearchPath spath (system_data_search_path());
SearchPath spath (ardour_data_search_path());
spath.add_subdirectory_to_paths(devinfo_dir_name);
return spath;
}
static sys::path
user_devinfo_directory ()
{
sys::path p(user_config_directory());
p /= devinfo_dir_name;
return p;
}
static bool
devinfo_filter (const string &str, void */*arg*/)
{
@ -459,8 +450,7 @@ DeviceInfo::reload_device_info ()
vector<string> s;
vector<string *> *devinfos;
PathScanner scanner;
SearchPath spath (system_devinfo_search_path());
spath += user_devinfo_directory ();
SearchPath spath (devinfo_search_path());
devinfos = scanner (spath.to_string(), devinfo_filter, 0, false, true);
device_info.clear ();

View file

@ -56,7 +56,7 @@ static const char* const devprofile_dir_name = "mcp";
static const char* const devprofile_suffix = ".profile";
static SearchPath
system_devprofile_search_path ()
devprofile_search_path ()
{
bool devprofile_path_defined = false;
sys::path spath_env (Glib::getenv (devprofile_env_variable_name, devprofile_path_defined));
@ -65,7 +65,7 @@ system_devprofile_search_path ()
return spath_env;
}
SearchPath spath (system_data_search_path());
SearchPath spath (ardour_data_search_path());
spath.add_subdirectory_to_paths(devprofile_dir_name);
return spath;
@ -94,8 +94,7 @@ DeviceProfile::reload_device_profiles ()
vector<string> s;
vector<string *> *devprofiles;
PathScanner scanner;
SearchPath spath (system_devprofile_search_path());
spath += user_devprofile_directory ();
SearchPath spath (devprofile_search_path());
devprofiles = scanner (spath.to_string(), devprofile_filter, 0, false, true);
device_profiles.clear ();

View file

@ -40,8 +40,8 @@ Meter::factory (Surface& surface, int id, const char* name, Group& group)
return m;
}
MidiByteArray
Meter::update_message (float dB)
void
Meter::send_update (Surface& surface, float dB)
{
float def = 0.0f; /* Meter deflection %age */
@ -75,12 +75,13 @@ Meter::update_message (float dB)
if (def > 100.0f) {
if (!overload_on) {
overload_on = true;
msg << MidiByteArray (2, 0xd0, (id() << 4) | 0xe);
surface.write (MidiByteArray (2, 0xd0, (id() << 4) | 0xe));
}
} else {
if (overload_on) {
overload_on = false;
msg << MidiByteArray (2, 0xd0, (id() << 4) | 0xf);
surface.write (MidiByteArray (2, 0xd0, (id() << 4) | 0xf));
}
}
@ -90,9 +91,12 @@ Meter::update_message (float dB)
if (last_segment_value_sent != segment) {
last_segment_value_sent = segment;
msg << MidiByteArray (2, 0xD0, (id()<<4) | segment);
surface.write (MidiByteArray (2, 0xD0, (id()<<4) | segment));
}
}
return msg;
MidiByteArray
Meter::zero ()
{
return MidiByteArray (2, 0xD0, (id()<<4 | 0));
}

View file

@ -35,9 +35,9 @@ public:
, last_segment_value_sent (-1)
, overload_on (false) {}
MidiByteArray update_message (float dB);
void send_update (Surface&, float dB);
MidiByteArray zero() { return update_message (-99999999.0); }
MidiByteArray zero();
static Control* factory (Surface&, int id, const char*, Group&);

View file

@ -163,7 +163,9 @@ Strip::set_route (boost::shared_ptr<Route> r, bool /*with_messages*/)
set_vpot_parameter (PanAzimuthAutomation);
_route->solo_control()->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context());
_route->solo_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context());
_route->listen_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context());
_route->mute_control()->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_mute_changed, this), ui_context());
boost::shared_ptr<Pannable> pannable = _route->pannable();
@ -239,7 +241,7 @@ void
Strip::notify_solo_changed ()
{
if (_route && _solo) {
_surface->write (_solo->set_state (_route->soloed() ? on : off));
_surface->write (_solo->set_state ((_route->soloed() || _route->listening_via_monitor()) ? on : off));
}
}
@ -687,7 +689,7 @@ Strip::update_meter ()
{
if (_meter) {
float dB = const_cast<PeakMeter&> (_route->peak_meter()).peak_power (0);
_surface->write (_meter->update_message (dB));
_meter->send_update (*_surface, dB);
}
}

View file

@ -191,8 +191,7 @@ OSC::start ()
PBD::sys::path url_file;
if (find_file_in_search_path (ardour_search_path() + system_config_search_path(),
"osc_url", url_file)) {
if (find_file_in_search_path (ardour_config_search_path(), "osc_url", url_file)) {
_osc_url_file = url_file.to_string();
ofstream urlfile;

View file

@ -44,9 +44,9 @@ def configure(conf):
for i in children:
sub_config_and_use(conf, i)
autowaf.check_pkg(conf, 'libusb-1.0', uselib_store='USB', mandatory=False)
if Options.options.tranzport and conf.is_defined('HAVE_USB'):
conf.define('BUILD_TRANZPORT', 1)
#autowaf.check_pkg(conf, 'libusb-1.0', uselib_store='USB', mandatory=False)
#if Options.options.tranzport and conf.is_defined('HAVE_USB'):
# conf.define('BUILD_TRANZPORT', 1)
conf.check_cc (header_name='linux/input.h', define_name='BUILD_POWERMATE',mandatory=False)
autowaf.check_pkg (conf, 'liblo', mandatory=False, uselib_store="LO", atleast_version="0.24")

14
mcp/cmc.device Normal file
View file

@ -0,0 +1,14 @@
<MackieProtocolDevice>
<Name value="Steinberg CMC series"/>
<Strips value="1"/>
<Extenders value="0"/>
<MasterFader value="yes"/>
<SegmentedDisplay value="no"/>
<TimecodeDisplay value="no"/>
<TwoCharacterDisplay value="no"/>
<GlobalControls value="yes"/>
<JogWheel value="yes"/>
<TouchSenseFaders value="yes"/>
<usesIPMIDI value="no"/>
<NoHandShake value="yes"/>
</MackieProtocolDevice>

18
mcp/wscript Normal file
View file

@ -0,0 +1,18 @@
#!/usr/bin/python
import os
top = '.'
out = 'build'
def configure(conf):
pass
def build(bld):
devinfo = bld.path.ant_glob ('*.device')
profiles = bld.path.ant_glob ('*.profile')
bld.install_files (os.path.join(bld.env['DATADIR'], 'ardour3', 'mcp'), devinfo)
bld.install_files (os.path.join(bld.env['DATADIR'], 'ardour3', 'mcp'), profiles)
def options(opt):
pass

16
patchfiles/wscript Normal file
View file

@ -0,0 +1,16 @@
#!/usr/bin/python
import os
top = '.'
out = 'build'
def configure(conf):
pass
def build(bld):
patchfiles = bld.path.ant_glob ('*.midnam')
bld.install_files (os.path.join(bld.env['DATADIR'], 'ardour3', 'patchfiles'), patchfiles)
def options(opt):
pass

View file

@ -1,5 +1,7 @@
#!/bin/sh
# This is Linux-specific startup script for a bundled version of Ardour
while [ $# -gt 0 ] ; do
echo "arg = $1"
case $1 in
@ -11,9 +13,9 @@ while [ $# -gt 0 ] ; do
esac
done
#LD_LIBRARY_PATH needs to be set (empty) so that epa can swap between the original and the bundled version
# LD_LIBRARY_PATH needs to be set here so that epa can swap between the original and the bundled version
# (the original one will be stored in PREBUNDLE_ENV)
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
export PREBUNDLE_ENV="$(env)"
BIN_DIR=$(dirname $(readlink -f $0))
@ -35,12 +37,13 @@ export ARDOUR_BUNDLED=true
%ENV%
export GTK_PATH=$INSTALL_DIR/libs/clearlooks${GTK_PATH:+:$GTK_PATH}
export GTK_MODULES="" # Disable extra modules from being loaded by gtk (example, libcanberra-gtk-module.so)
# Disable extra modules from being loaded by gtk (example, libcanberra-gtk-module.so)
export GTK_MODULES=""
# Set this so that the executable will find all the right libraries inside the bundle
export LD_LIBRARY_PATH=$INSTALL_DIR/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
# create install-location-dependent config files for Pango and GDK image loaders
# We have to do this every time because its possible that BIN_DIR has changed
# We have to do this every time because its possible that LIB_DIR has changed
sed "s?@ROOTDIR@/modules?$LIB_DIR/modules?" < $ETC_DIR/pango.modules.in > $USER_ARDOUR_DIR/pango.modules
sed "s?@ROOTDIR@/loaders?$LIB_DIR/loaders?" < $ETC_DIR/gdk-pixbuf.loaders.in > $USER_ARDOUR_DIR/gdk-pixbuf.loaders

View file

@ -144,16 +144,20 @@ APPLIB=$APPDIR/lib
Libraries=$APPLIB
Etc=$APPDIR/etc
Shared=$APPDIR/share
Plugins=$APPLIB/plugins
Surfaces=$APPLIB/surfaces
Panners=$APPLIB/panners
ExportFormats=$Shared/export
Locale=$Shared/locale
MidiMaps=$Shared/midi_maps
MackieControl=$Shared/mcp
Modules=$Libraries/modules
Loaders=$Libraries/loaders
Templates=$Shared/templates
ExportFormats=$Shared/export
Locale=$Shared/locale
MidiMaps=$Shared/midi_maps
PatchFiles=$Shared/patchfiles
MackieControl=$Shared/mcp
if [ x$PRINT_SYSDEPS != x ] ; then
#
@ -187,9 +191,11 @@ mkdir -p $Shared
mkdir -p $Locale
mkdir -p $Surfaces
mkdir -p $MidiMaps
mkdir -p $PatchFiles
mkdir -p $MackieControl
mkdir -p $ExportFormats
mkdir -p $Panners
mkdir -p $Templates
mkdir -p $Shared/templates
mkdir -p $Shared/doc
@ -466,6 +472,13 @@ for x in $BUILD_ROOT/../midi_maps/*.map ; do
echo Copied MIDI map $x
done
# MIDNAM Patch Files
# got to be careful with names here
for x in $BUILD_ROOT/../patchfiles/*.midnam ; do
cp "$x" $PatchFiles
echo Copied MIDNAM file "$x"
done
# MackieControl data
# got to be careful with names here
for x in $BUILD_ROOT/../mcp/*.device $BUILD_ROOT/../mcp/*.profile ; do
@ -473,6 +486,13 @@ for x in $BUILD_ROOT/../mcp/*.device $BUILD_ROOT/../mcp/*.profile ; do
echo Copied Mackie Control file $x
done
# Templates
for f in $BUILD_ROOT/../templates/* ; do
if [ -d "$f" ] ; then
echo Template: $f ; cp -r "$f" $Templates ;
fi
done
# ExportFormats
# got to be careful with names here
for x in $BUILD_ROOT/../export/*.preset $BUILD_ROOT/../export/*.format ; do
@ -515,7 +535,6 @@ while [ true ] ; do
# do not include libjack
deps=`LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file | awk '{print $3}'`
# LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file | egrep "(/opt/|/local/|libs/|/usr/lib|/gtk)" | grep -v 'libjack\.'
echo -n "."
for dep in $deps ; do
if test "not" = ${dep}; then
@ -534,9 +553,13 @@ while [ true ] ; do
if echo $dep | grep -qs "^/lib/" ; then continue; fi
# don't include jack
if echo $dep | grep -qs libjack ; then continue; fi
# don't include ALSA
if echo $dep | grep -qs libasound ; then continue; fi
# don't include any X Window libraries
if echo $dep | grep -qs libX ; then continue; fi
if echo $dep | grep -qs libX\. ; then continue; fi
if echo $dep | grep -qs libxcb ; then continue; fi
if echo $dep | grep -qs libICE\. ; then continue; fi
if echo $dep | grep -qs libSM\. ; then continue; fi
# don't include libc
if echo $dep | grep -qs 'libc\.' ; then continue; fi
# don't include libstdc++
@ -597,10 +620,10 @@ cp $BUILD_ROOT/gtk2_ardour/ardour3*.rc $Etc
cp ../../gtk2_ardour/ardour3_ui_default.conf $Etc/ardour3_ui_default.conf
cp ../../gtk2_ardour/ardour3_ui_default.conf $Etc/ardour3_ui.conf
cp ../../instant.xml $Etc/instant.xml
cp -r ../../gtk2_ardour/icons $Etc
cp -r ../../gtk2_ardour/pixmaps $Etc
cp ../../gtk2_ardour/step_editing.bindings $Etc
cp ../../gtk2_ardour/mixer.bindings $Etc
cp -r ../../gtk2_ardour/icons $Shared
cp -r ../../gtk2_ardour/pixmaps $Shared
#
@ -614,8 +637,6 @@ fi
# share stuff
cp -R ../../gtk2_ardour/splash.png $Shared
# currently no templates
#cp ../../templates/*.template $Shared/templates/
# go through and recursively remove any .svn dirs in the bundle
for svndir in `find $APPDIR -name .svn -type d`; do

View file

@ -377,7 +377,7 @@ else
fi
PGM_EXEC_PATH="${INSTALL_DEST_BASE}/${PGM_FULL_NAME}/bin/${PGM_EXEC_FILE}"
ICON_PATH="${INSTALL_DEST_BASE}/${PGM_FULL_NAME}/etc/icons"
ICON_PATH="${INSTALL_DEST_BASE}/${PGM_FULL_NAME}/share/icons"
MENU_FILE_PATH="${INSTALL_DEST_BASE}/${PGM_FULL_NAME}/share"
################################

View file

@ -3,6 +3,7 @@
# script for pulling together a MacOSX app bundle.
GTKQUARTZ_ROOT=$HOME/gtk/inst
ARDOURSTACK_ROOT=$HOME/a3/inst
if pkg-config --modversion gtk+-2.0 | grep -s 2.22 ; then
# older GTK
@ -95,18 +96,27 @@ echo "Info string is $info_string"
APPDIR=${APPNAME}.app
APPROOT=$APPDIR/Contents
Frameworks=$APPROOT/Frameworks
Frameworks=$APPROOT/lib
Resources=$APPROOT/Resources
Plugins=$APPROOT/Plugins
Surfaces=$APPROOT/Surfaces
Panners=$APPROOT/Panners
MidiMaps=$APPROOT/MidiMaps
MCP=$APPROOT/MCP
ExportFormats=$APPROOT/ExportFormats
Templates=$APPROOT/Templates
Shared=$Resources/share
Etc=$Resources/etc
#
# Since this is OS X, don't try to distinguish between etc and shared
# (machine dependent and independent data) - just put everything
# into Resources.
#
Shared=$Resources
Etc=$Resources
Locale=$Resources/locale
#
# Bundled Plugins live in a top level folder
#
Plugins=$APPROOT/Plugins
Surfaces=$Frameworks/surfaces
Panners=$Frameworks/panners
MidiMaps=$Shared/midi_maps
ExportFormats=$Shared/export
Templates=$Shared/templates
PatchFiles=$Shared/patchfiles
MackieControl=$Shared/mcp
if [ x$PRINT_SYSDEPS != x ] ; then
#
@ -141,6 +151,7 @@ mkdir -p $Templates
mkdir -p $Frameworks/modules
mkdir -p $Shared/templates
mkdir -p $Etc
mkdir -p $MackieControl
# maybe set variables
env=""
@ -280,35 +291,60 @@ cat > pangorc <<EOF
[Pango]
ModulesPath=$GTKQUARTZ_ROOT/lib/pango/1.6.0/modules
EOF
env PANGO_RC_FILE=pangorc $GTKQUARTZ_ROOT/bin/pango-querymodules | sed "s?$GTKQUARTZ_ROOT/lib/pango/1.6.0/modules/?@executable_path/../Frameworks/modules/?" > $Resources/pango.modules
env PANGO_RC_FILE=pangorc $GTKQUARTZ_ROOT/bin/pango-querymodules | sed "s?$GTKQUARTZ_ROOT/lib/pango/1.6.0/modules/?@executable_path/../lib/modules/?" > $Resources/pango.modules
rm pangorc
# generate a new GDK pixbufs loaders file
gdk-pixbuf-query-loaders | sed "s?$GDKPIXBUF_LOADERS/?@executable_path/../Frameworks/modules/?" > $Resources/gdk-pixbuf.loaders
gdk-pixbuf-query-loaders | sed "s?$GDKPIXBUF_LOADERS/?@executable_path/../lib/modules/?" > $Resources/gdk-pixbuf.loaders
# this one is special - we will set GTK_PATH to $Frameworks/clearlooks
cp $BUILD_ROOT/libs/clearlooks-newer/libclearlooks.dylib $Frameworks
mkdir -p $Frameworks/clearlooks/engines
(cd $Frameworks/clearlooks/engines && ln -s $BUILD_ROOT/libclearlooks.dylib libclearlooks.dylib && ln -s ../../libclearlooks.dylib libclearlooks.so)
# Control Surface shared libraries
cp $BUILD_ROOT/libs/surfaces/*/libardour_*.dylib $Surfaces
# hack ... move libardour_cp back into Frameworks
mv $Surfaces/libardourcp*.dylib $Frameworks
# Panners
cp $BUILD_ROOT/libs/panners/*/lib*.dylib $Panners
(cd ../../export &&
for f in *.preset ; do
echo ExportFormat: $f; cp "$f" ../tools/osx_packaging/$ExportFormats ;
done)
(cd $BUILD_ROOT/../templates && \
for f in * ; do
# Export Formats/Presets
for f in $BUILD_ROOT/../export/*.preset $BUILD_ROOT/../export/*.format ; do
echo ExportFormat: $f
cp "$f" $ExportFormats ;
done
# Session and Route templates
for f in $BUILD_ROOT/../templates/* ; do
if [ -d "$f" ] ; then
echo Template: $f ; cp -r "$f" ../tools/osx_packaging/$Templates ;
echo Template: $f
cp -r "$f" $Templates ;
fi
done)
done
# MIDI maps
cp ../../midi_maps/*.map $MidiMaps
# MidiMaps
# got to be careful with names here
for x in $BUILD_ROOT/../midi_maps/*.map ; do
cp "$x" $MidiMaps
echo Copied MIDI map $x
done
# Mackie support files
cp ../../mcp/*.{device,profile} $MCP
# MIDNAM Patch Files
# got to be careful with names here
for x in $BUILD_ROOT/../patchfiles/*.midnam ; do
cp "$x" $PatchFiles
echo Copied MIDNAM file "$x"
done
# MackieControl data
# got to be careful with names here
for x in $BUILD_ROOT/../mcp/*.device $BUILD_ROOT/../mcp/*.profile ; do
cp "$x" $MackieControl
echo Copied Mackie Control file $x
done
# VAMP plugins that we use
cp $BUILD_ROOT/libs/vamp-plugins/libardourvampplugins.dylib $Frameworks
@ -319,7 +355,7 @@ while [ true ] ; do
if ! file $file | grep -qs Mach-O ; then
continue
fi
deps=`otool -L $file | awk '{print $1}' | egrep "($GTKQUARTZ_ROOT|/opt/|/local/|libs/)" | grep -v 'libjack\.'`
deps=`otool -L $file | awk '{print $1}' | egrep "($GTKQUARTZ_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/)" | grep -v 'libjack\.'`
# echo -n "."
for dep in $deps ; do
base=`basename $dep`
@ -390,9 +426,9 @@ fi
for exe in $executables; do
EXE=$APPROOT/MacOS/$exe
changes=""
for lib in `otool -L $EXE | egrep "($GTKQUARTZ_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do
for lib in `otool -L $EXE | egrep "($GTKQUARTZ_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do
base=`basename $lib`
changes="$changes -change $lib @executable_path/../Frameworks/$base"
changes="$changes -change $lib @executable_path/../lib/$base"
done
if test "x$changes" != "x" ; then
install_name_tool $changes $EXE
@ -416,12 +452,12 @@ for libdir in $Frameworks $Frameworks/modules $Surfaces $Panners ; do
# change all the dependencies
changes=""
for lib in `otool -L $dylib | egrep "($GTKQUARTZ_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do
for lib in `otool -L $dylib | egrep "($GTKQUARTZ_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do
base=`basename $lib`
if echo $lib | grep -s libbase; then
changes="$changes -change $lib @executable_path/../$libbase/$base"
else
changes="$changes -change $lib @executable_path/../Frameworks/$base"
changes="$changes -change $lib @executable_path/../lib/$base"
fi
done

51
wscript
View file

@ -8,7 +8,7 @@ import subprocess
import sys
# Variables for 'waf dist'
VERSION = '3.0beta3'
VERSION = '3.0beta4'
APPNAME = 'Ardour3'
# Mandatory variables
@ -36,6 +36,7 @@ children = [
'templates',
'export',
'midi_maps',
'mcp',
'manual'
]
@ -232,11 +233,6 @@ def set_compiler_flags (conf,opt):
if not build_host_supports_sse:
print("\nWarning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be an error, especially if you are a package maintainer)")
# check this even if we aren't using FPU optimization
if not conf.is_defined('HAVE_POSIX_MEMALIGN'):
optimization_flags.append("-DNO_POSIX_MEMALIGN")
debug_flags.append("-DNO_POSIX_MEMALIGN")
# end optimization section
#
@ -408,8 +404,8 @@ def options(opt):
help='Raise a floating point exception if a denormal is detected')
opt.add_option('--test', action='store_true', default=False, dest='build_tests',
help="Build unit tests")
opt.add_option('--tranzport', action='store_true', default=False, dest='tranzport',
help='Compile with support for Frontier Designs Tranzport (if libusb is available)')
#opt.add_option('--tranzport', action='store_true', default=False, dest='tranzport',
# help='Compile with support for Frontier Designs Tranzport (if libusb is available)')
opt.add_option('--universal', action='store_true', default=False, dest='universal',
help='Compile as universal binary (OS X ONLY, requires that external libraries are universal)')
opt.add_option('--generic', action='store_true', default=False, dest='generic',
@ -463,9 +459,12 @@ def configure(conf):
print('Please use a different version or re-configure with --debug')
exit (1)
if sys.platform == 'darwin':
# libintl may or may not be trivially locatable
# libintl may or may not be trivially locatable. On OS X this is always
# true. On Linux it will depend on whether we're on a normal Linux distro,
# in which case libintl.h is going to be available in /usr/include and
# the library itself is part of glibc, or on a bare-bones build system
# where we need to pick it up from the GTK dependency stack.
#
if not os.path.isfile ('/usr/include/libintl.h'):
# XXXX hack hack hack
prefinclude = ''.join ([ '-I', os.path.expanduser ('~/gtk/inst/include') ])
@ -474,6 +473,8 @@ def configure(conf):
conf.env.append_value('CXXFLAGS', [prefinclude ])
conf.env.append_value('LINKFLAGS', [ preflib ])
if sys.platform == 'darwin':
# this is required, potentially, for anything we link and then relocate into a bundle
conf.env.append_value('LINKFLAGS', [ '-Xlinker', '-headerpad_max_install_names' ])
@ -487,12 +488,6 @@ def configure(conf):
conf.define ('TOP_MENUBAR',1)
conf.define ('GTKOSX',1)
#
# need this on OS X to pick up long long variants of several math functions
#
conf.env.append_value('CXXFLAGS_APPLEUTILITY', '-I../libs')
#
# Define OSX as a uselib to use when compiling
# on Darwin to add all applicable flags at once
#
@ -501,10 +496,13 @@ def configure(conf):
conf.env.append_value('CXXFLAGS_OSX', '-mmacosx-version-min=10.4')
conf.env.append_value('CFLAGS_OSX', '-mmacosx-version-min=10.4')
# It would be nice to be able to use this to force back-compatibility with 10.4
# but even by the time of 11, the 10.4 SDK is no longer available in any normal
# way.
#
#conf.env.append_value('CXXFLAGS_OSX', "-isysroot /Developer/SDKs/MacOSX10.4u.sdk")
#conf.env.append_value('CFLAGS_OSX', "-isysroot /Developer/SDKs/MacOSX10.4u.sdk")
#conf.env.append_value('LINKFLAGS_OSX', "-isysroot /Developer/SDKs/MacOSX10.4u.sdk")
#conf.env.append_value('LINKFLAGS_OSX', "-sysroot /Developer/SDKs/MacOSX10.4u.sdk")
#conf.env.append_value('LINKFLAGS_OSX', "-sysroot /Developer/SDKs/MacOSX10.4u.sdk")
conf.env.append_value('CXXFLAGS_OSX', "-msse")
@ -613,8 +611,8 @@ def configure(conf):
conf.env['ENABLE_NLS'] = True
if opts.build_tests:
conf.env['BUILD_TESTS'] = opts.build_tests
if opts.tranzport:
conf.env['TRANZPORT'] = 1
#if opts.tranzport:
# conf.env['TRANZPORT'] = 1
if opts.windows_vst:
conf.define('WINDOWS_VST_SUPPORT', 1)
conf.env['WINDOWS_VST_SUPPORT'] = True
@ -692,8 +690,7 @@ const char* const ardour_config_info = "\\n\\
write_config_text('Samplerate', conf.is_defined('HAVE_SAMPLERATE'))
# write_config_text('Soundtouch', conf.is_defined('HAVE_SOUNDTOUCH'))
write_config_text('Translation', opts.nls)
write_config_text('SoundGrid support', opts.soundgrid)
write_config_text('Tranzport', opts.tranzport)
# write_config_text('Tranzport', opts.tranzport)
write_config_text('Unit tests', conf.env['BUILD_TESTS'])
write_config_text('Universal binary', opts.universal)
write_config_text('Generic x86 CPU', opts.generic)
@ -763,11 +760,3 @@ def i18n_po(bld):
def i18n_mo(bld):
bld.recurse (i18n_children)
def install_not_supported(bld):
print ('Installing Ardour 3 is currently unsupported. Run it via the command ./ardev from within the gtk2_ardour directory.')
sys.exit (1)
from waflib import Build
class install(Build.InstallContext):
cmd = 'install'
fun = 'install_not_supported'