From: Colin Fletcher Date: Mon, 19 May 2014 19:54:36 +0000 (+0100) Subject: Merge branch 'export-dialog' into cairocanvas X-Git-Tag: 4.0-rc1~1601^2~1224 X-Git-Url: https://main.carlh.net/gitweb/?p=ardour.git;a=commitdiff_plain;h=5399425f534e2d96d07cf29f427bfa0f39d904b7 Merge branch 'export-dialog' into cairocanvas Fix merge conflicts in: gtk2_ardour/export_range_markers_dialog.cc gtk2_ardour/wscript libs/ardour/ardour/export_handler.h libs/ardour/system_exec.cc libs/pbd/pbd/system_exec.h libs/pbd/system_exec.cc --- 5399425f534e2d96d07cf29f427bfa0f39d904b7 diff --cc gtk2_ardour/wscript index 920f71bd7d,facc129714..2cfd2ea497 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@@ -204,6 -209,9 +204,7 @@@ gtk2_ardour_sources = 'session_option_editor.cc', 'sfdb_ui.cc', 'shuttle_control.cc', - 'simpleline.cc', - 'simplerect.cc', + 'soundcloud_export_selector.cc', 'splash.cc', 'speaker_dialog.cc', 'startup.cc', diff --cc libs/ardour/ardour/export_handler.h index 1bc80a80e9,e2c0a7b2b7..25a87045a8 --- a/libs/ardour/ardour/export_handler.h +++ b/libs/ardour/ardour/export_handler.h @@@ -29,8 -29,8 +29,9 @@@ #include "ardour/export_pointers.h" #include "ardour/session.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" + #include "pbd/signals.h" namespace AudioGrapher { class BroadcastInfo; @@@ -68,7 -68,7 +69,7 @@@ class LIBARDOUR_API ExportElementFactor Session & session; }; - class LIBARDOUR_API ExportHandler : public ExportElementFactory -class ExportHandler : public ExportElementFactory, public sigc::trackable ++class LIBARDOUR_API ExportHandler : public ExportElementFactory, public sigc::trackable { public: struct FileSpec { diff --cc libs/pbd/pbd/system_exec.h index 1232175fec,dc17ced2f6..ce6e5a9c4f --- a/libs/pbd/pbd/system_exec.h +++ b/libs/pbd/pbd/system_exec.h @@@ -42,7 -33,9 +42,9 @@@ #include #include #include + #include + -#ifdef NOPBD /* outside ardour */ +#ifdef NOPBD /* unit-test outside ardour */ #include #include #else @@@ -94,8 -85,26 +96,25 @@@ class LIBPBD_API SystemExe * */ SystemExec (std::string c, char ** a); + + /** similar to \ref SystemExec but expects a whole command line, and + * handles some simple escape sequences. + * + * @param command complete command-line to be executed + * @param subs a map of listing the % substitutions to + * be made. + * + * creates an argv array from the given command string, splitting into + * parameters at spaces. + * "\ " is non-splitting space, "\\" (and "\" at end of command) as "\", + * for "%", is looked up in subs and the corresponding string + * substituted. "%%" (and "%" at end of command) + * returns an argv array suitable for creating a new SystemExec with + */ + SystemExec (std::string command, const std::map subs); + virtual ~SystemExec (); - /** fork and execute the given program * * @param stderr_mode select what to do with program's standard error diff --cc libs/pbd/system_exec.cc index 0102323505,bf02fd7254..82398af0c8 --- a/libs/pbd/system_exec.cc +++ b/libs/pbd/system_exec.cc @@@ -149,11 -142,10 +149,10 @@@ static int close_allv(const int except_ return 0; } -#endif /* not on windows */ +#endif /* not on windows, nor vfork */ - - SystemExec::SystemExec (std::string c, std::string a) - : cmd(c) + void + SystemExec::init () { pthread_mutex_init(&write_lock, NULL); thread_active=false; @@@ -161,8 -153,7 +160,7 @@@ pin[1] = -1; nicelevel = 0; envp = NULL; - argp = NULL; -#ifdef __WIN32__ +#ifdef PLATFORM_WINDOWS stdinP[0] = stdinP[1] = INVALID_HANDLE_VALUE; stdoutP[0] = stdoutP[1] = INVALID_HANDLE_VALUE; stderrP[0] = stderrP[1] = INVALID_HANDLE_VALUE; @@@ -174,16 -173,9 +180,9 @@@ SystemExec::SystemExec (std::string c, SystemExec::SystemExec (std::string c, char **a) : cmd(c) , argp(a) { - pthread_mutex_init(&write_lock, NULL); - thread_active=false; - pid = 0; - pin[1] = -1; - nicelevel = 0; - envp = NULL; + init (); + -#ifdef __WIN32__ +#ifdef PLATFORM_WINDOWS - stdinP[0] = stdinP[1] = INVALID_HANDLE_VALUE; - stdoutP[0] = stdoutP[1] = INVALID_HANDLE_VALUE; - stderrP[0] = stderrP[1] = INVALID_HANDLE_VALUE; make_wargs(a); #endif make_envp();