summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-01-14 17:42:07 +0000
committerDavid Robillard <d@drobilla.net>2012-01-14 17:42:07 +0000
commitf552cd3e49699ba96971265f9c8238761eb9c3bf (patch)
tree49813b5367ec85d406b3075c27995a942612c58f /src
parentb5582b542687399202985610568a575f49704660 (diff)
downloadingen-f552cd3e49699ba96971265f9c8238761eb9c3bf.tar.gz
ingen-f552cd3e49699ba96971265f9c8238761eb9c3bf.tar.bz2
ingen-f552cd3e49699ba96971265f9c8238761eb9c3bf.zip
Load files passed on command line without -l option (fix #804).
Patch from Albert Graef. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3940 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/ingen/main.cpp8
-rw-r--r--src/shared/Configuration.cpp10
2 files changed, 10 insertions, 8 deletions
diff --git a/src/ingen/main.cpp b/src/ingen/main.cpp
index 8a929458..4fd477d2 100644
--- a/src/ingen/main.cpp
+++ b/src/ingen/main.cpp
@@ -166,7 +166,7 @@ main(int argc, char** argv)
// Load necessary modules before activating engine (and Jack driver)
- if (conf.option("load").is_valid()) {
+ if (conf.option("load").is_valid() || !conf.files().empty()) {
ingen_try(world->load_module("serialisation"),
"Unable to load serialisation module");
}
@@ -184,7 +184,7 @@ main(int argc, char** argv)
}
// Load a patch
- if (conf.option("load").is_valid()) {
+ if (conf.option("load").is_valid() || !conf.files().empty()) {
boost::optional<Path> parent;
boost::optional<Symbol> symbol;
const Raul::Atom& path_option = conf.option("path");
@@ -204,7 +204,9 @@ main(int argc, char** argv)
ingen_try(world->parser(),
"Unable to create parser");
- const string path = conf.option("load").get_string();
+ const string path = conf.option("load").is_valid() ?
+ conf.option("load").get_string() :
+ conf.files().front();
engine_interface->get("ingen:plugins");
engine_interface->get("path:/");
diff --git a/src/shared/Configuration.cpp b/src/shared/Configuration.cpp
index 4cfc41e9..d2d1e9dc 100644
--- a/src/shared/Configuration.cpp
+++ b/src/shared/Configuration.cpp
@@ -32,11 +32,11 @@ Configuration::Configuration()
"clients, can communicate with the engine via any supported protocol, or host the\n"
"engine in the same process. Many clients can connect to an engine at once.\n\n"
"Examples:\n"
- " ingen -e # Run an engine, listen for OSC\n"
- " ingen -g # Run a GUI, connect via OSC\n"
- " ingen -eg # Run an engine and a GUI in one process\n"
- " ingen -egl patch.ttl # Run an engine and a GUI and load a patch file\n"
- " ingen -egl patch.ingen # Run an engine and a GUI and load a patch bundle")
+ " ingen -e # Run an engine, listen for OSC\n"
+ " ingen -g # Run a GUI, connect via OSC\n"
+ " ingen -eg # Run an engine and a GUI in one process\n"
+ " ingen -eg patch.ttl # Run an engine and a GUI and load a patch file\n"
+ " ingen -eg patch.ingen # Run an engine and a GUI and load a patch bundle")
{
add("client-port", 'C', "Client OSC port", Atom::INT, Atom())
.add("connect", 'c', "Connect to engine URI", Atom::STRING, "osc.udp://localhost:16180")