summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-27 15:59:28 +0000
committerDana Jansens <danakj@orodu.net>2003-01-27 15:59:28 +0000
commitd600bf8d58205ea476458970b8dda5f6e8d9220b (patch)
tree733bdba47c39ece5119a9e6642af4d77ae5c1e20
parent340c4c956ee9cf110deb091fac0c0f7c3ed0359c (diff)
openbox scripting works again! config too!
-rw-r--r--otk/Makefile.am4
-rw-r--r--src/Makefile.am8
-rw-r--r--src/python.cc2
-rw-r--r--src/swigruntime.i9
4 files changed, 5 insertions, 18 deletions
diff --git a/otk/Makefile.am b/otk/Makefile.am
index 29b35442..dd8d45f0 100644
--- a/otk/Makefile.am
+++ b/otk/Makefile.am
@@ -2,7 +2,7 @@ buttonsdir = $(pkgdatadir)/buttons
scriptdir = $(libdir)/openbox/python
CXXFLAGS=$(XFT_CFLAGS) $(PYTHON_CFLAGS) @CXXFLAGS@ \
--DBUTTONSDIR=\"$(buttonsdir)\"
+-DBUTTONSDIR=\"$(buttonsdir)\" -DSWIG_GLOBAL
INCLUDES= -I../src
@@ -40,6 +40,6 @@ otk.i: $(wildcard *.hh)
touch $@
%_wrap.cc: %.i
- swig -c $(filter -I%,$(CXXFLAGS)) -python -shadow -c++ -nodefault -o $@ $<
+ swig $(filter -I%,$(CXXFLAGS)) -python -shadow -c++ -nodefault -o $@ $<
# local dependencies
diff --git a/src/Makefile.am b/src/Makefile.am
index 154791dd..7fbddd7f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -7,8 +7,7 @@ CXXFLAGS=$(XFT_CFLAGS) $(PYTHON_CFLAGS) @CXXFLAGS@ \
-DDEFAULTMENU=\"$(DEFAULT_MENU)\" \
-DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\" \
-DLOCALEDIR=\"$(localedir)\" \
--DSCRIPTDIR=\"$(scriptdir)\" -DSWIG_GLOBAL
-# -DSWIG_GLOBAL is for the swigruntime.cc (see swigruntime.i for explanation)
+-DSCRIPTDIR=\"$(scriptdir)\"
LIBS=$(XFT_LIBS) $(PYTHON_LIBS) @LIBS@
@@ -21,7 +20,7 @@ openbox3_LDADD=-L../otk -lotk @LIBINTL@
openbox3_SOURCES= actions.cc client.cc frame.cc openbox.cc screen.cc \
main.cc backgroundwidget.cc labelwidget.cc \
buttonwidget.cc python.cc bindings.cc \
- swigruntime.cc openbox_wrap.cc
+ openbox_wrap.cc
openbox3_LDFLAGS= $(PYTHON_LDFLAGS)
script_DATA = ob.py
@@ -39,7 +38,4 @@ openbox.i: openbox.hh screen.hh client.hh python.hh frame.hh
%_wrap.cc: %.i
swig -c -I../otk $(filter -I%,$(CXXFLAGS)) -python -shadow -c++ -nodefault -o $@ $<
-swigruntime.cc: swigruntime.i
- swig -python -c++ -o $@ $<
-
# local dependencies
diff --git a/src/python.cc b/src/python.cc
index a7e2eada..9feddbd8 100644
--- a/src/python.cc
+++ b/src/python.cc
@@ -32,7 +32,7 @@ void python_init(char *argv0)
otk::expandTilde("~/.openbox/python") +
"')").c_str()));
PyRun_SimpleString("sys.path.append('" SCRIPTDIR "')");
- PyRun_SimpleString("import ob; import otk;");
+ PyRun_SimpleString("import ob; import otk; import config;");
// set up convenience global variables
PyRun_SimpleString("ob.openbox = ob.Openbox_instance()");
PyRun_SimpleString("otk.display = otk.Display_instance()");
diff --git a/src/swigruntime.i b/src/swigruntime.i
deleted file mode 100644
index d812c7ee..00000000
--- a/src/swigruntime.i
+++ /dev/null
@@ -1,9 +0,0 @@
-// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-
-/*
- This module exists just to link in the stuff that libswigpy would normally
- provide. This way you don't need swig to compile this package from
- distributed source tarballs.
-*/
-
-%module swigruntime