summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-02-24 20:07:29 +0000
committerDavid Robillard <d@drobilla.net>2015-02-24 20:07:29 +0000
commitf69c75e637cc3c789a675d1811a2f632732bafc0 (patch)
treeb82b69f45d6c92ae3c7000cc465ee18bfa0bbb15 /src
parent9d7c1e971d51561c4bb28fa1064503e5f266908f (diff)
downloadingen-f69c75e637cc3c789a675d1811a2f632732bafc0.tar.gz
ingen-f69c75e637cc3c789a675d1811a2f632732bafc0.tar.bz2
ingen-f69c75e637cc3c789a675d1811a2f632732bafc0.zip
Remove crusty old internal bindings.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5608 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/Configuration.cpp1
-rw-r--r--src/bindings/Client.hpp42
-rwxr-xr-xsrc/bindings/build.sh4
-rw-r--r--src/bindings/ingen.i47
-rw-r--r--src/bindings/ingen_bindings.cpp61
-rw-r--r--src/bindings/ingen_bindings.hpp32
-rwxr-xr-xsrc/bindings/test_ingen.py34
-rw-r--r--src/gui/ingen_gui.ui9
-rw-r--r--src/ingen/ingen.cpp16
-rw-r--r--src/ingen/ingen.grind2
10 files changed, 3 insertions, 245 deletions
diff --git a/src/Configuration.cpp b/src/Configuration.cpp
index 169791e0..6944c8a2 100644
--- a/src/Configuration.cpp
+++ b/src/Configuration.cpp
@@ -62,7 +62,6 @@ Configuration::Configuration(Forge& forge)
add("load", "load", 'l', "Load graph", SESSION, forge.String, Atom());
add("path", "path", 'L', "Target path for loaded graph", SESSION, forge.String, Atom());
add("queueSize", "queue-size", 'q', "Event queue size", GLOBAL, forge.Int, forge.make(4096));
- add("run", "run", 'r', "Run script", SESSION, forge.String, Atom());
add("humanNames", "human-names", 0, "Show human names in GUI", GUI, forge.Bool, forge.make(true));
add("portLabels", "port-labels", 0, "Show port labels in GUI", GUI, forge.Bool, forge.make(true));
add("graphDirectory", "graph-directory", 0, "Default directory for opening graphs", GUI, forge.String, Atom());
diff --git a/src/bindings/Client.hpp b/src/bindings/Client.hpp
deleted file mode 100644
index f277e7f9..00000000
--- a/src/bindings/Client.hpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- This file is part of Ingen.
- Copyright 2007-2012 David Robillard <http://drobilla.net/>
-
- Ingen is free software: you can redistribute it and/or modify it under the
- terms of the GNU Affero General Public License as published by the Free
- Software Foundation, either version 3 of the License, or any later version.
-
- Ingen 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 Affero General Public License for details.
-
- You should have received a copy of the GNU Affero General Public License
- along with Ingen. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <string>
-
-#include "ingen/Resource.hpp"
-
-/** Need a stub ClientInterface without pure virtual methods
- * to allow inheritance in the script
- */
-class Client : public Ingen::ClientInterface
-{
-public:
- /** Wrapper for engine->register_client to appease SWIG */
- virtual void subscribe(Ingen::ServerInterface* engine) {
- engine->register_client(this);
- }
-
- void bundle_begin() {}
- void bundle_end() {}
- void response(int32_t id, Status status, const std::string& subject) {}
- void error(const std::string& msg) {}
- void put(const Raul::URI& path, const Ingen::Resource::Properties& properties) {}
- void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path) {}
- void del(const Raul::URI& uri) {}
- void move(const Raul::Path& old_path, const Raul::Path& new_path) {}
- void disconnect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path) {}
- void set_property(const Raul::URI& subject, const Raul::URI& key, const Atom& value) {}
-};
diff --git a/src/bindings/build.sh b/src/bindings/build.sh
deleted file mode 100755
index a1f17e8a..00000000
--- a/src/bindings/build.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-swig -c++ -python ./ingen.i
-
-gcc -shared -o _ingen.so ./ingen_wrap.cxx ./ingen_bindings.cpp -I.. -I../.. `pkg-config --cflags --libs glibmm-2.4` `python-config --cflags --ldflags` -fPIC
diff --git a/src/bindings/ingen.i b/src/bindings/ingen.i
deleted file mode 100644
index b29a61ce..00000000
--- a/src/bindings/ingen.i
+++ /dev/null
@@ -1,47 +0,0 @@
-%include "stl.i"
-%module(directors="1") ingen
-%{
-#include "ingen/CommonInterface.hpp"
-#include "ingen/ClientInterface.hpp"
-#include "ingen/EngineInterface.hpp"
-#include "module/World.hpp"
-#include "ingen_bindings.hpp"
-#include "Client.hpp"
-%}
-
-%include "../../ingen/CommonInterface.hpp"
-%include "../../ingen/ClientInterface.hpp"
-%include "../../ingen/EngineInterface.hpp"
-%include "../../includemodule/World.hpp"
-//%include "../module/module.h"
-%include "ingen_bindings.hpp"
-
-// generate directors for all classes that have virtual methods
-%feature("director");
-%feature("director") Ingen::ClientInterface;
-
-typedef Ingen::World World;
-namespace Ingen {
-%extend World {
- World() {
- if (!Ingen::ingen_world) {
- fprintf(stderr, "ERROR: World uninitialized (running within Ingen?)\n");
- abort();
- } else {
- return Ingen::ingen_world;
- }
- }
-
- void iteration() {
- Ingen::script_iteration($self);
- }
-
- /*LILVWorld lilv() { return $self->me->lilv_world; }*/
-};
-
-}
-
-
-%include "Client.hpp"
-
-%feature("director") Client;
diff --git a/src/bindings/ingen_bindings.cpp b/src/bindings/ingen_bindings.cpp
deleted file mode 100644
index b289e685..00000000
--- a/src/bindings/ingen_bindings.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- This file is part of Ingen.
- Copyright 2007-2012 David Robillard <http://drobilla.net/>
-
- Ingen is free software: you can redistribute it and/or modify it under the
- terms of the GNU Affero General Public License as published by the Free
- Software Foundation, either version 3 of the License, or any later version.
-
- Ingen 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 Affero General Public License for details.
-
- You should have received a copy of the GNU Affero General Public License
- along with Ingen. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "python2.4/Python.h"
-#include "ingen_bindings.hpp"
-#include "server/Engine.hpp"
-#include "ingen/World.hpp"
-
-bool
-run(Ingen::World* world, const char* filename)
-{
- ingen_world = world;
-
- FILE* fd = fopen(filename, "r");
- if (fd) {
- info << "Executing script " << filename << endl;
- Py_Initialize();
- PyRun_SimpleFile(fd, filename);
- Py_Finalize();
- return true;
- } else {
- error << "Unable to open script " << filename << endl;
- return false;
- }
-}
-
-struct IngenBindingsModule : public Ingen::Module {
- void load(Ingen::World* world) {
- world->script_runners.insert(make_pair("application/x-python", &run));
- }
-};
-
-extern "C" {
-
-Ingen::Module*
-ingen_module_load()
-{
- return new IngenBindingsModule();
-}
-
-void
-script_iteration(Ingen::World* world)
-{
- if (world->engine())
- world->engine()->main_iteration();
-}
-
-} // extern "C"
diff --git a/src/bindings/ingen_bindings.hpp b/src/bindings/ingen_bindings.hpp
deleted file mode 100644
index b07baae8..00000000
--- a/src/bindings/ingen_bindings.hpp
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- This file is part of Ingen.
- Copyright 2007-2012 David Robillard <http://drobilla.net/>
-
- Ingen is free software: you can redistribute it and/or modify it under the
- terms of the GNU Affero General Public License as published by the Free
- Software Foundation, either version 3 of the License, or any later version.
-
- Ingen 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 Affero General Public License for details.
-
- You should have received a copy of the GNU Affero General Public License
- along with Ingen. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef INGEN_BINDINGS_HPP
-#define INGEN_BINDINGS_HPP
-
-namespace Ingen {
-
-class World;
-extern World* ingen_world;
-
-extern "C" {
-bool run(World* world, const char* filename);
-void script_iteration(World* world);
-}
-
-} // namespace Ingen
-
-#endif // INGEN_BINDINGS_HPP
diff --git a/src/bindings/test_ingen.py b/src/bindings/test_ingen.py
deleted file mode 100755
index da90b988..00000000
--- a/src/bindings/test_ingen.py
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env python
-
-import ingen
-import time
-
-world = ingen.World()
-
-class PythonClient(ingen.Client):
- def error(self, msg):
- print "*** Received error:", msg
-
- def bundle_begin(self):
- print "*** Receiving Bundle {"
-
- def bundle_end(self):
- print "*** }"
-
- def put(self, path, properties):
- print "*** Received Object:", path
-
-c = PythonClient()
-c.enable()
-
-e = world.engine
-e.activate()
-
-c.subscribe(e)
-
-e.create_port("/dynamic_port", "http://lv2plug.in/ns/lv2core#AudioPort", False)
-
-while True:
- world.iteration()
- time.sleep(0.1)
-
diff --git a/src/gui/ingen_gui.ui b/src/gui/ingen_gui.ui
index b51a4227..d0751100 100644
--- a/src/gui/ingen_gui.ui
+++ b/src/gui/ingen_gui.ui
@@ -13,14 +13,7 @@
<property name="license" translatable="yes">Licensed under the GNU Affero GPL, Version 3 or later.
See COPYING file included with this distribution, or http://www.gnu.org/licenses/agpl.txt for more information</property>
- <property name="authors">Author:
- David Robillard &lt;d@drobilla.net&gt;
-
-Contributors:
- Lars Luthman - DSSI enhancements, bugfixes
- Mario Lang - SuperCollider bindings, bugfixes
- Leonard Ritter - Python bindings
-</property>
+ <property name="authors">David Robillard &lt;d@drobilla.net&gt;</property>
<property name="translator_credits" translatable="yes" comments="TRANSLATORS: Replace this string with your names, one name per line.">translator-credits</property>
<property name="artists">Usability / UI Design:
Thorsten Wilms</property>
diff --git a/src/ingen/ingen.cpp b/src/ingen/ingen.cpp
index 3f68369c..a63b4196 100644
--- a/src/ingen/ingen.cpp
+++ b/src/ingen/ingen.cpp
@@ -36,9 +36,6 @@
#include "ingen/client/ThreadedSigClientInterface.hpp"
#include "ingen/runtime_paths.hpp"
#include "ingen/types.hpp"
-#ifdef WITH_BINDINGS
-#include "bindings/ingen_bindings.hpp"
-#endif
#ifdef HAVE_SOCKET
#include "ingen/client/SocketClient.hpp"
#endif
@@ -193,18 +190,7 @@ main(int argc, char** argv)
if (conf.option("gui").get<int32_t>()) {
world->run_module("gui");
- } else if (conf.option("run").is_valid()) {
- // Run a script
-#ifdef WITH_BINDINGS
- ingen_try(world->load_module("bindings"),
- "Unable to load bindings module");
-
- world->run("application/x-python", conf.option("run").ptr<char>());
-#else
- cerr << "This build of ingen does not support scripting." << endl;
-#endif
-
- } else if (world->engine() && !conf.option("gui").get<int32_t>()) {
+ } else if (world->engine()) {
// Run engine main loop until interrupt
while (world->engine()->main_iteration()) {
Glib::usleep(125000); // 1/8 second
diff --git a/src/ingen/ingen.grind b/src/ingen/ingen.grind
index 9e597d44..9e60915b 100644
--- a/src/ingen/ingen.grind
+++ b/src/ingen/ingen.grind
@@ -1,5 +1,5 @@
#!/usr/bin/env sh
-export INGEN_MODULE_PATH="`pwd`/../../libs/engine/.libs:`pwd`/../../libs/serialisation/.libs:`pwd`/../../libs/gui/.libs:`pwd`/../../libs/client/.libs:`pwd`/../../bindings/.libs"
+export INGEN_MODULE_PATH="`pwd`/../../libs/engine/.libs:`pwd`/../../libs/gui/.libs:`pwd`/../../libs/client/.libs"
export INGEN_GLADE_PATH="`pwd`/../../libs/gui/ingen_gui.glade"
libtool --mode=execute valgrind ./ingen $@