Merge branch 'master' into 3.0-SG

This commit is contained in:
Paul Davis 2013-05-01 00:06:09 -04:00
commit 4ef44ea127
29 changed files with 353 additions and 97 deletions

View file

@ -506,7 +506,7 @@
</menu>
<menu action = 'WindowMenu'>
<menuitem action='toggle-mixer'/>
<menuitem action='toggle-mixer-on-top'/>
<menuitem action='toggle-editor-mixer'/>
<separator/>

View file

@ -34,12 +34,14 @@ sigc::signal<void> ArdourDialog::CloseAllDialogs;
ArdourDialog::ArdourDialog (string title, bool modal, bool use_seperator)
: Dialog (title, modal, use_seperator)
, _splash_pushed (false)
{
init ();
}
ArdourDialog::ArdourDialog (Gtk::Window& parent, string title, bool modal, bool use_seperator)
: Dialog (title, parent, modal, use_seperator)
, _splash_pushed (false)
{
init ();
set_position (Gtk::WIN_POS_CENTER_ON_PARENT);
@ -47,6 +49,13 @@ ArdourDialog::ArdourDialog (Gtk::Window& parent, string title, bool modal, bool
ArdourDialog::~ArdourDialog ()
{
if (_splash_pushed) {
Splash* spl = Splash::instance();
if (spl) {
spl->pop_front();
}
}
}
bool
@ -73,15 +82,16 @@ ArdourDialog::on_unmap ()
void
ArdourDialog::on_show ()
{
Dialog::on_show ();
// never allow the splash screen to obscure any dialog
Splash* spl = Splash::instance();
if (spl) {
if (spl && spl->is_visible()) {
spl->pop_back_for (*this);
_splash_pushed = true;
}
Dialog::on_show ();
}
void

View file

@ -46,6 +46,7 @@ class ArdourDialog : public Gtk::Dialog, public ARDOUR::SessionHandlePtr
static void close_all_dialogs () { CloseAllDialogs(); }
private:
bool _splash_pushed;
void init ();
static sigc::signal<void> CloseAllDialogs;

View file

@ -3779,12 +3779,14 @@ audio may be played at the wrong sample rate.\n"), desired, PROGRAM_NAME, actual
image->show();
hbox->show();
switch (dialog.run ()) {
switch (dialog.run()) {
case RESPONSE_ACCEPT:
return 0;
default:
return 1;
break;
}
return 1;
}

View file

@ -310,7 +310,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
void goto_editor_window ();
void goto_mixer_window ();
void toggle_mixer_window ();
void toggle_mixer_on_top ();
void toggle_editor_mixer ();
int setup_windows ();
void setup_transport ();

View file

@ -150,21 +150,49 @@ ARDOUR_UI::toggle_mixer_window ()
}
void
ARDOUR_UI::toggle_mixer_on_top ()
ARDOUR_UI::toggle_editor_mixer ()
{
if (editor && mixer) {
if (gtk_window_is_active(Mixer_UI::instance()->gobj())) {
if (editor->get_screen() != mixer->get_screen()) {
// different screens, so don't do anything
return;
}
/* See if they are obscuring each other */
gint ex, ey, ew, eh;
gint mx, my, mw, mh;
editor->get_position (ex, ey);
editor->get_size (ew, eh);
mixer->get_position (mx, my);
mixer->get_size (mw, mh);
GdkRectangle e;
GdkRectangle m;
GdkRectangle r;
e.x = ex;
e.y = ey;
e.width = ew;
e.height = eh;
m.x = mx;
m.y = my;
m.width = mw;
m.height = mh;
if (!gdk_rectangle_intersect (&e, &m, &r)) {
/* they do not intersect so do not toggle */
return;
}
}
if (mixer && mixer->fully_visible()) {
goto_editor_window ();
} else {
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("toggle-mixer"));
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
/* Toggle the mixer to `visible' if required */
if (!tact->get_active ()) {
tact->set_active (true);
}
}
goto_mixer_window ();
}
}

View file

@ -239,7 +239,7 @@ ARDOUR_UI::install_actions ()
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::register_toggle_action (common_actions, X_("toggle-mixer"), S_("Window|Mixer"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_mixer_window));
ActionManager::register_action (common_actions, X_("toggle-mixer-on-top"), _("Mixer on Top"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_mixer_on_top));
ActionManager::register_action (common_actions, X_("toggle-editor-mixer"), _("Toggle Editor+Mixer"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_editor_mixer));
ActionManager::register_toggle_action (common_actions, X_("ToggleRCOptionsEditor"), _("Preferences"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_rc_options_window));
ActionManager::register_toggle_action (common_actions, X_("ToggleSessionOptionsEditor"), _("Properties"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_session_options_window));
act = ActionManager::register_toggle_action (common_actions, X_("ToggleInspector"), _("Tracks and Busses"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_route_params_window));

View file

@ -93,7 +93,7 @@ class AUPluginUI : public PlugUIBase, public Gtk::VBox
int prefwidth;
Gtk::HBox top_box;
Gtk::EventBox low_box;
Gtk::HBox low_box;
Gtk::VBox vpacker;
Gtk::Label automation_mode_label;
Gtk::ComboBoxText automation_mode_selector;

View file

@ -1,5 +1,3 @@
#include <gtkmm/stock.h>
#undef Marker
#define Marker FuckYouAppleAndYourLackOfNameSpaces
@ -170,13 +168,16 @@ AUPluginUI::AUPluginUI (boost::shared_ptr<PluginInsert> insert)
top_box.show ();
low_box.show ();
_activating_from_app = false;
cocoa_parent = 0;
_notify = 0;
cocoa_window = 0;
carbon_window = 0;
#ifdef WITH_CARBBON
_activating_from_app = false;
_notify = 0;
au_view = 0;
editView = 0;
carbon_window = 0;
#endif
/* prefer cocoa, fall back to cocoa, but use carbon if its there */
@ -227,6 +228,7 @@ AUPluginUI::~AUPluginUI ()
bool
AUPluginUI::test_carbon_view_support ()
{
#ifdef WITH_CARBON
bool ret = false;
carbon_descriptor.componentType = kAudioUnitCarbonViewComponentType;
@ -253,6 +255,9 @@ AUPluginUI::test_carbon_view_support ()
}
return ret;
#else
return false;
#endif
}
bool
@ -282,7 +287,7 @@ AUPluginUI::plugin_class_valid (Class pluginClass)
int
AUPluginUI::create_cocoa_view ()
{
BOOL wasAbleToLoadCustomView = NO;
bool wasAbleToLoadCustomView = false;
AudioUnitCocoaViewInfo* cocoaViewInfo = NULL;
UInt32 numberOfClasses = 0;
UInt32 dataSize;
@ -380,7 +385,7 @@ AUPluginUI::create_cocoa_view ()
free (cocoaViewInfo);
}
wasAbleToLoadCustomView = YES;
wasAbleToLoadCustomView = true;
}
}
@ -390,14 +395,16 @@ AUPluginUI::create_cocoa_view ()
au->get_au()));
au_view = [[AUGenericView alloc] initWithAudioUnit:*au->get_au()];
DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("view created @ %1\n", au_view));
[(AUGenericView *)au_view setShowsExpertParameters:YES];
[(AUGenericView *)au_view setShowsExpertParameters:1];
}
// Get the initial size of the new AU View's frame
NSRect rect = [au_view frame];
prefheight = rect.size.height;
prefwidth = rect.size.width;
low_box.set_size_request (rect.size.width, rect.size.height);
return 0;
}
@ -409,7 +416,7 @@ AUPluginUI::cocoa_view_resized ()
NSSize oldContentSize= [window contentRectForFrameRect:[window frame]].size;
NSSize newContentSize= [au_view frame].size;
NSRect windowFrame= [window frame];
oldContentSize.height -= topsize.height;
float dy = oldContentSize.height - newContentSize.height;
@ -427,7 +434,7 @@ AUPluginUI::cocoa_view_resized ()
NSUInteger old_auto_resize = [au_view autoresizingMask];
[au_view setAutoresizingMask:NSViewNotSizable];
[window setFrame:windowFrame display:YES];
[window setFrame:windowFrame display:1];
[au_view setAutoresizingMask:old_auto_resize];
[[NSNotificationCenter defaultCenter] addObserver:_notify
@ -603,7 +610,7 @@ AUPluginUI::parent_cocoa_window ()
return -1;
}
[win setAutodisplay:YES]; // turn of GTK stuff for this window
[win setAutodisplay:1]; // turn of GTK stuff for this window
Gtk::Container* toplevel = get_toplevel();
@ -620,7 +627,7 @@ AUPluginUI::parent_cocoa_window ()
NSPoint origin = { 0, a.height };
[au_view setFrameOrigin:origin];
[view addSubview:au_view positioned:NSWindowBelow relativeTo:nil];
[view addSubview:au_view positioned:NSWindowBelow relativeTo:nil];
// watch for size changes of the view
@ -681,7 +688,7 @@ AUPluginUI::on_realize ()
NSWindow* win = get_nswindow ();
if (win) {
[win setShowsResizeIndicator:NO];
[win setShowsResizeIndicator:0];
}
}

View file

@ -21,6 +21,13 @@
#ifndef __ardour_gtk_automation_controller_h__
#define __ardour_gtk_automation_controller_h__
#ifdef YES
#undef YES
#endif
#ifdef NO
#undef NO
#endif
#include <boost/shared_ptr.hpp>
#include <gtkmm.h>

View file

@ -233,7 +233,8 @@ pane_size_watcher (Paned* pane)
}
Editor::Editor ()
: _join_object_range_state (JOIN_OBJECT_RANGE_NONE)
: VisibilityTracker (*((Gtk::Window*) this))
, _join_object_range_state (JOIN_OBJECT_RANGE_NONE)
/* time display buttons */
, minsec_label (_("Mins:Secs"))

View file

@ -43,6 +43,7 @@
#include "gtkmm2ext/dndtreeview.h"
#include "gtkmm2ext/stateful_button.h"
#include "gtkmm2ext/bindings.h"
#include "gtkmm2ext/visibility_tracker.h"
#include "pbd/stateful.h"
#include "pbd/signals.h"
@ -146,7 +147,7 @@ class ImageFrameSocketHandler ;
class TimeAxisViewItem ;
/* </CMT Additions> */
class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr
class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public Gtkmm2ext::VisibilityTracker
{
public:
Editor ();

View file

@ -73,10 +73,10 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
temporal_zoom_step (false);
zoom_focus = temp_focus;
return true;
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
direction = GDK_SCROLL_LEFT;
goto retry;
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
if (!current_stepping_trackview) {
step_timeout = Glib::signal_timeout().connect (sigc::mem_fun(*this, &Editor::track_height_step_timeout), 500);
std::pair<TimeAxisView*, int> const p = trackview_by_y_position (ev->y + vertical_adjustment.get_value() - canvas_timebars_vsize);
@ -102,10 +102,10 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
temporal_zoom_step (true);
zoom_focus = temp_focus;
return true;
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
direction = GDK_SCROLL_RIGHT;
goto retry;
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
if (!current_stepping_trackview) {
step_timeout = Glib::signal_timeout().connect (sigc::mem_fun(*this, &Editor::track_height_step_timeout), 500);
std::pair<TimeAxisView*, int> const p = trackview_by_y_position (ev->y + vertical_adjustment.get_value() - canvas_timebars_vsize);

View file

@ -17,7 +17,6 @@
*/
#include <sigc++/retype.h>
#include <cstdlib>
#include <cmath>

View file

@ -83,6 +83,7 @@ Mixer_UI::instance ()
Mixer_UI::Mixer_UI ()
: Window (Gtk::WINDOW_TOPLEVEL)
, VisibilityTracker (*((Gtk::Window*) this))
, _visible (false)
, no_track_list_redisplay (false)
, in_group_row_change (false)

View file

@ -40,6 +40,8 @@
#include "ardour/types.h"
#include "ardour/session_handle.h"
#include "gtkmm2ext/visibility_tracker.h"
#include "enums.h"
#include "mixer_actor.h"
@ -53,7 +55,7 @@ class PluginSelector;
class MixerGroupTabs;
class MonitorSection;
class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public MixerActor
class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public MixerActor, public Gtkmm2ext::VisibilityTracker
{
public:
static Mixer_UI* instance();

View file

@ -219,7 +219,7 @@ This mode provides many different operations on both regions and control points,
@sess|Main/AddTrackBus|<@PRIMARY@><@TERTIARY@>n|add track(s) or bus(ses)
@sess|Main/New|<@PRIMARY@>n|open a new session
@rop|Region/toggle-region-mute|<@PRIMARY@>m|mute/unmute
@wvis|Common/toggle-mixer-on-top|<@WINDOW@>m|rotate editor \& mixer window
@wvis|Common/toggle-editor-mixer|<@WINDOW@>m|rotate editor \& mixer window
;; arrow keys, navigation etc.

View file

@ -226,6 +226,12 @@ PluginUIWindow::on_show ()
}
if (_pluginui) {
#if defined (HAVE_AUDIOUNITS) && defined(GTKOSX)
if (pre_deactivate_x >= 0) {
move (pre_deactivate_x, pre_deactivate_y);
}
#endif
if (_pluginui->on_window_show (_title)) {
Window::on_show ();
}
@ -239,6 +245,10 @@ PluginUIWindow::on_show ()
void
PluginUIWindow::on_hide ()
{
#if defined (HAVE_AUDIOUNITS) && defined(GTKOSX)
get_position (pre_deactivate_x, pre_deactivate_y);
#endif
Window::on_hide ();
if (_pluginui) {

View file

@ -25,6 +25,10 @@
#include "ardour/ardour.h"
#include "ardour/filesystem_paths.h"
#ifdef check
#undef check
#endif
#include "gui_thread.h"
#include "splash.h"
@ -96,15 +100,33 @@ Splash::~Splash ()
void
Splash::pop_back_for (Gtk::Window& win)
{
#ifdef __APPLE__
/* April 2013: window layering on OS X is a bit different to X Window. at present,
the "restack()" functionality in GDK will only operate on windows in the same
"level" (e.g. two normal top level windows, or two utility windows) and will not
work across them. The splashscreen is on its own "StatusWindowLevel" so restacking
is not going to work.
So for OS X, we just hide ourselves.
*/
hide();
#else
set_keep_above (false);
get_window()->restack (win.get_window(), false);
win.signal_hide().connect (sigc::mem_fun (*this, &Splash::pop_front));
#endif
}
void
Splash::pop_front ()
{
#ifdef __APPLE__
if (get_window()) {
show ();
}
#else
set_keep_above (true);
#endif
}
void

View file

@ -38,6 +38,8 @@
using namespace std;
void * interposer_thread (void *arg);
static void close_fd (int* fd) { if (!fd) return; if (*fd >= 0) ::close (*fd); *fd = -1; }
SystemExec::SystemExec (std::string c, std::string a)
: cmd(c)
{
@ -483,18 +485,18 @@ SystemExec::start (int stderr_mode)
pid=r;
/* check if execve was successful. */
::close(pok[1]);
close_fd(&pok[1]);
char buf;
for ( ;; ) {
ssize_t n = ::read(pok[0], &buf, 1 );
if ( n==1 ) {
/* child process returned from execve */
pid=0;
::close(pok[0]);
::close(pin[1]);
::close(pin[0]);
::close(pout[1]);
::close(pout[0]);
close_fd(&pok[0]);
close_fd(&pin[1]);
close_fd(&pin[0]);
close_fd(&pout[1]);
close_fd(&pout[0]);
pin[1] = -1;
return -3;
} else if ( n==-1 ) {
@ -503,7 +505,7 @@ SystemExec::start (int stderr_mode)
}
break;
}
::close(pok[0]);
close_fd(&pok[0]);
/* child started successfully */
#if 0
@ -519,17 +521,17 @@ SystemExec::start (int stderr_mode)
}
if (r == 0) {
/* 2nd child process - catch stdout */
::close(pin[1]);
::close(pout[1]);
close_fd(&pin[1]);
close_fd(&pout[1]);
output_interposer();
exit(0);
}
::close(pout[1]);
::close(pin[0]);
::close(pout[0]);
close_fd(&pout[1]);
close_fd(&pin[0]);
close_fd(&pout[0]);
#else /* use pthread */
::close(pout[1]);
::close(pin[0]);
close_fd(&pout[1]);
close_fd(&pin[0]);
int rv = pthread_create(&thread_id_tt, NULL, interposer_thread, this);
thread_active=true;
@ -543,15 +545,15 @@ SystemExec::start (int stderr_mode)
}
/* child process - exec external process */
::close(pok[0]);
close_fd(&pok[0]);
::fcntl(pok[1], F_SETFD, FD_CLOEXEC);
::close(pin[1]);
close_fd(&pin[1]);
if (pin[0] != STDIN_FILENO) {
::dup2(pin[0], STDIN_FILENO);
}
::close(pin[0]);
::close(pout[0]);
close_fd(&pin[0]);
close_fd(&pout[0]);
if (pout[1] != STDOUT_FILENO) {
::dup2(pout[1], STDOUT_FILENO);
}
@ -569,7 +571,7 @@ SystemExec::start (int stderr_mode)
}
if (pout[1] != STDOUT_FILENO && pout[1] != STDERR_FILENO) {
::close(pout[1]);
close_fd(&pout[1]);
}
if (nicelevel !=0) {
@ -596,7 +598,7 @@ SystemExec::start (int stderr_mode)
/* if we reach here something went wrong.. */
char buf = 0;
(void) ::write(pok[1], &buf, 1 );
(void) ::close(pok[1]);
close_fd(&pok[1]);
exit(-1);
return -1;
}
@ -631,11 +633,10 @@ void
SystemExec::close_stdin()
{
if (pin[1]<0) return;
::close(pin[0]);
::close(pin[1]);
::close(pout[0]);
::close(pout[1]);
pin[1] = - 1; // mark as closed
close_fd(&pin[0]);
close_fd(&pin[1]);
close_fd(&pout[0]);
close_fd(&pout[1]);
}
int

View file

@ -73,7 +73,6 @@ public:
AEffect * plugin () const { return _plugin; }
VSTState * state () const { return _state; }
void set_state (VSTState* s) { _state = s; }
int set_state (XMLNode const &, int);

View file

@ -34,8 +34,6 @@
#include <glibmm/fileutils.h>
#include "ardour/linux_vst_support.h"
#include "ardour/vst_plugin.h"
#include "pbd/basename.h"
#include "pbd/error.h"
@ -295,43 +293,36 @@ vstfx_unload (VSTHandle* fhandle)
return 0;
}
/**
Instantiates a VST plugin and also set _state of its plugin argument
*/
/*This instantiates a plugin*/
VSTState*
vstfx_instantiate (VSTHandle* fhandle, audioMasterCallback amc, void *ptr)
VSTState *
vstfx_instantiate (VSTHandle* fhandle, audioMasterCallback amc, void* userptr)
{
VSTState* vstfx = vstfx_new ();
ARDOUR::VSTPlugin* plugin = reinterpret_cast<ARDOUR::VSTPlugin*> (ptr);
if (fhandle == 0) {
if(fhandle == 0)
{
vstfx_error( "** ERROR ** VSTFX : The handle was 0\n" );
return 0;
}
if ((vstfx->plugin = fhandle->main_entry (amc)) == 0) {
if ((vstfx->plugin = fhandle->main_entry (amc)) == 0)
{
vstfx_error ("** ERROR ** VSTFX : %s could not be instantiated :(\n", fhandle->name);
free (vstfx);
return 0;
}
vstfx->handle = fhandle;
vstfx->plugin->user = plugin;
vstfx->plugin->user = userptr;
if (vstfx->plugin->magic != kEffectMagic) {
if (vstfx->plugin->magic != kEffectMagic)
{
vstfx_error ("** ERROR ** VSTFX : %s is not a VST plugin\n", fhandle->name);
free (vstfx);
return 0;
}
/* need to set this here because some plugins make audioMaster
* callbacks from within effOpen, and _state must be set for
* that to work.
*/
plugin->set_state (vstfx);
vstfx->plugin->dispatcher (vstfx->plugin, effOpen, 0, 0, 0, 0);
/*May or May not need to 'switch the plugin on' here - unlikely

View file

@ -32,7 +32,7 @@ LXVSTPlugin::LXVSTPlugin (AudioEngine& e, Session& session, VSTHandle* h)
{
/* Instantiate the plugin and return a VSTState* */
if (vstfx_instantiate (_handle, Session::vst_callback, this) == 0) {
if ((_state = vstfx_instantiate (_handle, Session::vst_callback, this)) == 0) {
throw failed_constructor();
}
@ -44,7 +44,7 @@ LXVSTPlugin::LXVSTPlugin (const LXVSTPlugin &other)
{
_handle = other._handle;
if (vstfx_instantiate (_handle, Session::vst_callback, this) == 0) {
if ((_state = vstfx_instantiate (_handle, Session::vst_callback, this)) == 0) {
throw failed_constructor();
}
_plugin = _state->plugin;

View file

@ -35,6 +35,10 @@ class VisibilityTracker {
void cycle_visibility ();
bool fully_visible() const;
bool not_visible() const;
bool partially_visible() const;
private:
Gtk::Window& window;
GdkVisibilityState _visibility;

View file

@ -41,10 +41,27 @@ VisibilityTracker::handle_visibility_notify_event (GdkEventVisibility* ev)
void
VisibilityTracker::cycle_visibility ()
{
if (window.is_mapped() && (_visibility == GDK_VISIBILITY_UNOBSCURED)) {
if (fully_visible ()) {
window.hide ();
} else {
window.present ();
}
}
bool
VisibilityTracker::fully_visible () const
{
return window.is_mapped() && (_visibility == GDK_VISIBILITY_UNOBSCURED);
}
bool
VisibilityTracker::not_visible () const
{
return !window.is_mapped() || (_visibility == GDK_VISIBILITY_FULLY_OBSCURED);
}
bool
VisibilityTracker::partially_visible () const
{
return window.is_mapped() && (_visibility == GDK_VISIBILITY_PARTIAL);
}

View file

@ -85,7 +85,6 @@ PBD::stacktrace (std::ostream& out, int levels)
for (i = 0; i < size && (levels == 0 || i < size_t(levels)); i++) {
out << " " << demangle (strings[i]) << std::endl;
std::cerr << " " << demangle (strings[i]) << std::endl;
}
free (strings);

View file

@ -530,9 +530,13 @@ done
if test x$WITH_HARVID != x ; then
cd $APPBIN
HARVID_VERSION=$(curl http://ardour.org/files/video-tools/latest_version_numer.txt)
HARVID_VERSION=$(curl http://ardour.org/files/video-tools/harvid_version.txt)
curl -L http://ardour.org/files/video-tools/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz \
| tar -x -z --exclude=README --exclude=harvid.1 --strip-components=1 || exit 1
XJADEO_VERSION=$(curl http://ardour.org/files/video-tools/xjadeo_version.txt)
curl -L http://ardour.org/files/video-tools/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz \
| tar -x -z --exclude=README --exclude=xjadeo.1 --strip-components=1 || exit 1
mv xjadeo xjremote
cd -
fi

View file

@ -62,9 +62,13 @@ while [ $# -gt 0 ] ; do
esac
done
#release_version=`grep -m 1 '[^A-Za-z_]OSX_VERSION = ' ../../wscript | cut -d' ' -f 3 | sed "s/'//g"`
release_version=3.0
revision=`grep -m 1 'revision =' ../../libs/ardour/revision.cc | cut -d' ' -f 8 | sed 's/[^0-9]//g'`
if test -z "$PRODUCT_PKG_DIR" -o -z "$APPNAME"; then
echo "application or product-name was not specified"
exit 1
fi
release_version=`grep -m 1 '[^A-Za-z_]OSX_VERSION = ' ../../wscript | cut -d"'" -f2`
revision=`grep -m 1 'revision =' ../../libs/ardour/revision.cc | cut -d'"' -f 2 | sed 's/^.*-//g'`
echo "Version is $release_version / $revision"
info_string="$release_version/$revision built on `hostname` by `whoami` on `date`"
echo "Info string is $info_string"

View file

@ -0,0 +1,146 @@
#!/bin/sh
TARGETDIR="$1"
if test -z "$(which curl)"; then
echo "This script requires 'curl' - please install it" >&2
exit 1
fi
###############################################################################
### look-up architecture
case $(uname -m) in
i[3456789]86|x86|i86pc)
echo "Architecture is x86"
MULTIARCH="i386"
;;
x86_64|amd64|AMD64)
echo "Architecture is x86_64"
MULTIARCH="x86_64"
;;
*)
echo
echo "ERROR: Unknown architecture `uname -m`" >&2
exit 1
;;
esac
case $(uname) in
Linux|linux)
MULTIARCH="${MULTIARCH}-linux-gnu"
;;
*)
echo
echo "ERROR: Platform `uname` is not supported by this script" >&2
exit 1
;;
esac
echo "Multiarch triplet is '$MULTIARCH'"
###############################################################################
### install target directory
checkdir () {
DUT="$1"
CHECKPATH="${2:-yes}"
ECHO="${3:-echo}"
if test -z "$DUT"; then
echo "-1"
return
fi
if test ! -d "$DUT"; then
$ECHO "ERROR: '$DUT' is not a directory'"; >&2
echo "-1"
return
fi
if test ! -w "$DUT"; then
$ECHO "ERROR: no write permissions for '$DUT'" >&2
echo "-1"
return
fi
echo $PATH | grep -q "$DUT"
if test $? != 0; then
if test "$CHECKPATH" != "yes"; then
$ECHO "WARNING: '$DUT' is not in \$PATH" >&2
else
$ECHO "ERROR: '$DUT' is not in \$PATH" >&2
echo "-1"
return
fi
fi
echo 0
}
while test $(checkdir "$TARGETDIR" no) != 0 ; do
ARDOUR=$(ls -td /opt/Ardour* 2>/dev/null | head -n 1)
if test -n "${ARDOUR}" -a $(checkdir "${ARDOUR}/bin" no true) = 0; then
echo -n "found ardour installation in '${ARDOUR}/bin'. Install there? [Y|n] "
read a;
if test "$a" != "n" -a "$a" != "N"; then
TARGETDIR="${ARDOUR}/bin"
continue
fi
fi
if test $(checkdir "/usr/bin" yes true) = 0; then
echo -n "Can write to '/usr/bin' Install there? [Y|n] "
read a;
if test "$a" != "n" -a "$a" != "N"; then
TARGETDIR="/usr/bin"
continue
fi
fi
if test $(checkdir "${HOME}/bin" yes true) = 0; then
echo -n "Found '${HOME}/bin' in PATH. Install there? [Y|n] "
read a;
if test "$a" != "n" -a "$a" != "N"; then
TARGETDIR="${HOME}/bin"
continue
fi
fi
if test $(checkdir "/usr/local/bin" yes true) = 0; then
echo -n "Can write to '/usr/local/bin' Install there? [Y|n] "
read a;
if test "$a" != "n" -a "$a" != "N"; then
TARGETDIR="/usr/local/bin"
continue
fi
fi
echo
echo "ERROR: Cannot find a suitable installation directory" >&2
echo "run: $0 /install/path/bin" >&2
echo "'/install/path/bin' must be an existing directory and should be in \$PATH" >&2
exit 1
done
###############################################################################
### actual install procedure
echo "installing video-tools to '${TARGETDIR}'."
cd "$TARGETDIR" || exit 1
HARVID_VERSION=$(curl -s http://ardour.org/files/video-tools/harvid_version.txt)
echo "Downloading harvid-${MULTIARCH}-${HARVID_VERSION}."
curl -L --progress-bar \
http://ardour.org/files/video-tools/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz \
| tar -x -z --exclude=README --exclude=harvid.1 --strip-components=1 || exit 1
XJADEO_VERSION=$(curl -s http://ardour.org/files/video-tools/xjadeo_version.txt)
echo "Downloading xjadeo-${MULTIARCH}-${XJADEO_VERSION}."
curl -L --progress-bar \
http://ardour.org/files/video-tools/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz \
| tar -x -z --exclude=README --exclude=xjadeo.1 --strip-components=1 || exit 1
mv xjadeo xjremote
echo "ardour video tools installed successfully."