summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY33
-rw-r--r--Makefile9
-rw-r--r--PLUGINS.html11
-rw-r--r--PLUGINS/src/hello/Makefile8
-rw-r--r--PLUGINS/src/osddemo/Makefile8
-rw-r--r--PLUGINS/src/servicedemo/Makefile10
-rw-r--r--PLUGINS/src/skincurses/Makefile8
-rw-r--r--PLUGINS/src/sky/Makefile8
-rw-r--r--PLUGINS/src/status/Makefile8
-rw-r--r--PLUGINS/src/svdrpdemo/Makefile8
-rw-r--r--config.h15
-rwxr-xr-xnewplugin8
-rw-r--r--plugin.c6
13 files changed, 98 insertions, 42 deletions
diff --git a/HISTORY b/HISTORY
index ce71fd8a..45bbb177 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4534,6 +4534,8 @@ Video Disk Recorder Revision History
other than /usr/include/linux/dvb, you can define DVBDIR in the Make.config
file (see also INSTALL). Any reference to DVBDIR should be removed from all
plugins' Makefiles, like this:
+
+ ------------------------------------------------------------
--- PLUGINS/src/hello/Makefile 2005/11/11 13:20:14 1.10
+++ PLUGINS/src/hello/Makefile 2006/04/15 11:58:46 1.11
@@ -20,7 +20,6 @@
@@ -4552,6 +4554,7 @@ Video Disk Recorder Revision History
+INCLUDES += -I$(VDRDIR)/include
DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
+ ------------------------------------------------------------
Thanks to Marco Schlüßler for pointing out this problem.
- Implemented kNext and kPrev keys (based on a patch from Peter Juszack).
@@ -4561,3 +4564,33 @@ Video Disk Recorder Revision History
allow updating only the PIDs (see MANUAL for details). When updating to this
version of VDR, please verify that the setting is as you want it to be, because
the values have been shifted.
+- The new APIVERSION (see config.h) now allows existing compiled plugins to be
+ used with newer versions of VDR, as long as there have been no changes to the
+ VDR header files since the last APIVERSION. Existing plugins' Makefiles should
+ have all references to VDRVERSION changed to APIVERSION, like this:
+
+ ------------------------------------------------------------
+ --- PLUGINS/src/hello/Makefile 2006/04/15 11:58:46 1.11
+ +++ PLUGINS/src/hello/Makefile 2006/04/16 09:03:50 1.12
+ @@ -28,9 +28,9 @@
+
+ -include $(VDRDIR)/Make.config
+
+ -### The version number of VDR (taken from VDR's "config.h"):
+ +### The version number of VDR's plugin API (taken from VDR's "config.h"):
+
+ -VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+ +APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+
+ ### The name of the distribution archive:
+
+ @@ -67,7 +67,7 @@
+
+ libvdr-$(PLUGIN).so: $(OBJS)
+ $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
+ - @cp $@ $(LIBDIR)/$@.$(VDRVERSION)
+ + @cp $@ $(LIBDIR)/$@.$(APIVERSION)
+
+ dist: clean
+ @-rm -rf $(TMPDIR)/$(ARCHIVE)
+ ------------------------------------------------------------
diff --git a/Makefile b/Makefile
index d18be29a..f5862139 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
-# $Id: Makefile 1.86 2006/04/15 12:24:28 kls Exp $
+# $Id: Makefile 1.87 2006/04/16 09:00:30 kls Exp $
.DELETE_ON_ERROR:
@@ -79,9 +79,10 @@ DEFINES += -D_GNU_SOURCE
DEFINES += -DVIDEODIR=\"$(VIDEODIR)\"
DEFINES += -DPLUGINDIR=\"$(PLUGINLIBDIR)\"
-# The version number of VDR (taken from VDR's "config.h"):
+# The version numbers of VDR and the plugin API (taken from VDR's "config.h"):
VDRVERSION = $(shell grep 'define VDRVERSION ' config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+APIVERSION = $(shell grep 'define APIVERSION ' config.h | awk '{ print $$3 }' | sed -e 's/"//g')
ifdef VFAT
# for people who want their video directory on a VFAT partition
@@ -183,7 +184,7 @@ plugins: include-dir
clean-plugins:
@for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do $(MAKE) -C "$(PLUGINDIR)/src/$$i" clean; done
- @-rm -f $(PLUGINDIR)/lib/libvdr-*.so.$(VDRVERSION)
+ @-rm -f $(PLUGINDIR)/lib/libvdr-*.so.$(APIVERSION)
# Install the files:
@@ -215,7 +216,7 @@ install-doc:
install-plugins: plugins
@mkdir -p $(PLUGINLIBDIR)
- @cp $(PLUGINDIR)/lib/libvdr-*.so.$(VDRVERSION) $(PLUGINLIBDIR)
+ @cp $(PLUGINDIR)/lib/libvdr-*.so.$(APIVERSION) $(PLUGINLIBDIR)
# Source documentation:
diff --git a/PLUGINS.html b/PLUGINS.html
index 8f0e12ef..b1c4877e 100644
--- a/PLUGINS.html
+++ b/PLUGINS.html
@@ -165,11 +165,20 @@ loadable library file for that plugin (we'll get to the details later).
The <tt>lib</tt> directory contains the dynamically loadable libraries of all
available plugins. Note that the names of these files are created by concatenating
<p>
+<!--X1.3.47--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
<table border=2>
<tr><td align=center><b><tt>libvdr-</tt></b></td><td align=center><b><tt>hello</tt></b></td><td align=center><b><tt>.so.</tt></b></td><td align=center><b><tt>1.1.0</tt></b></td></tr>
-<tr><td align=center><font size=-1>VDR plugin<br>library prefix</font></td><td align=center><font size=-1>name of<br>the plugin</font></td><td align=center><font size=-1>shared object<br>indicator</font></td><td align=center><font size=-1>VDR version number<br>this plugin was<br>compiled for</font></td></tr>
+<tr><td align=center><font size=-1>VDR plugin<br>library prefix</font></td><td align=center><font size=-1>name of<br>the plugin</font></td><td align=center><font size=-1>shared object<br>indicator</font></td><td align=center><font size=-1>API version number<br>this plugin was<br>compiled for</font></td></tr>
</table>
<p>
+The <i>API version number</i> refers to the plugin API version number of the VDR
+version this plugin was compiled with. Compiled plugins can run with newer versions
+of VDR as long as their plugin API version number is still the same as that of
+the current VDR version. That way minor fixes to VDR, that don't require changes
+to the VDR header files, can be made without requiring all plugins to be
+recompiled.
+<!--X1.3.47--></td></tr></table>
+<p>
The plugin library files can be stored in any directory. If the default organization
is not used, the path to the plugin directory has be be given to VDR through the
<b><tt>-L</tt></b> option.
diff --git a/PLUGINS/src/hello/Makefile b/PLUGINS/src/hello/Makefile
index 33b2064b..6f3dd4c7 100644
--- a/PLUGINS/src/hello/Makefile
+++ b/PLUGINS/src/hello/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.11 2006/04/15 11:58:46 kls Exp $
+# $Id: Makefile 1.12 2006/04/16 09:03:50 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -28,9 +28,9 @@ TMPDIR = /tmp
-include $(VDRDIR)/Make.config
-### The version number of VDR (taken from VDR's "config.h"):
+### The version number of VDR's plugin API (taken from VDR's "config.h"):
-VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
### The name of the distribution archive:
@@ -67,7 +67,7 @@ all: libvdr-$(PLUGIN).so
libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
- @cp $@ $(LIBDIR)/$@.$(VDRVERSION)
+ @cp $@ $(LIBDIR)/$@.$(APIVERSION)
dist: clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
diff --git a/PLUGINS/src/osddemo/Makefile b/PLUGINS/src/osddemo/Makefile
index 9f5662f6..8a0aef4b 100644
--- a/PLUGINS/src/osddemo/Makefile
+++ b/PLUGINS/src/osddemo/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.5 2006/04/15 11:59:01 kls Exp $
+# $Id: Makefile 1.6 2006/04/16 09:03:55 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -28,9 +28,9 @@ TMPDIR = /tmp
-include $(VDRDIR)/Make.config
-### The version number of VDR (taken from VDR's "config.h"):
+### The version number of VDR's plugin API (taken from VDR's "config.h"):
-VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
### The name of the distribution archive:
@@ -67,7 +67,7 @@ all: libvdr-$(PLUGIN).so
libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
- @cp $@ $(LIBDIR)/$@.$(VDRVERSION)
+ @cp $@ $(LIBDIR)/$@.$(APIVERSION)
dist: clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
diff --git a/PLUGINS/src/servicedemo/Makefile b/PLUGINS/src/servicedemo/Makefile
index 77665eff..c76b871f 100644
--- a/PLUGINS/src/servicedemo/Makefile
+++ b/PLUGINS/src/servicedemo/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.3 2006/04/15 11:59:07 kls Exp $
+# $Id: Makefile 1.4 2006/04/16 09:03:59 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -29,9 +29,9 @@ TMPDIR = /tmp
-include $(VDRDIR)/Make.config
-### The version number of VDR (taken from VDR's "config.h"):
+### The version number of VDR's plugin API (taken from VDR's "config.h"):
-VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
### The name of the distribution archive:
@@ -68,11 +68,11 @@ all: libvdr-$(PLUGIN1).so libvdr-$(PLUGIN2).so
libvdr-$(PLUGIN1).so: $(PLUGIN1).o
$(CXX) $(CXXFLAGS) -shared $(PLUGIN1).o -o $@
- @cp $@ $(LIBDIR)/$@.$(VDRVERSION)
+ @cp $@ $(LIBDIR)/$@.$(APIVERSION)
libvdr-$(PLUGIN2).so: $(PLUGIN2).o
$(CXX) $(CXXFLAGS) -shared $(PLUGIN2).o -o $@
- @cp $@ $(LIBDIR)/$@.$(VDRVERSION)
+ @cp $@ $(LIBDIR)/$@.$(APIVERSION)
dist: clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
diff --git a/PLUGINS/src/skincurses/Makefile b/PLUGINS/src/skincurses/Makefile
index 30503405..360b0d2f 100644
--- a/PLUGINS/src/skincurses/Makefile
+++ b/PLUGINS/src/skincurses/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.3 2006/04/15 11:59:12 kls Exp $
+# $Id: Makefile 1.4 2006/04/16 09:04:04 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -28,9 +28,9 @@ TMPDIR = /tmp
-include $(VDRDIR)/Make.config
-### The version number of VDR (taken from VDR's "config.h"):
+### The version number of VDR's plugin API (taken from VDR's "config.h"):
-VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
### The name of the distribution archive:
@@ -67,7 +67,7 @@ all: libvdr-$(PLUGIN).so
libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) -shared $(OBJS) -lncurses -o $@
- @cp $@ $(LIBDIR)/$@.$(VDRVERSION)
+ @cp $@ $(LIBDIR)/$@.$(APIVERSION)
dist: clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
diff --git a/PLUGINS/src/sky/Makefile b/PLUGINS/src/sky/Makefile
index cc8fdf0b..e9435380 100644
--- a/PLUGINS/src/sky/Makefile
+++ b/PLUGINS/src/sky/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.5 2006/04/15 11:59:17 kls Exp $
+# $Id: Makefile 1.6 2006/04/16 09:04:06 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -28,9 +28,9 @@ TMPDIR = /tmp
-include $(VDRDIR)/Make.config
-### The version number of VDR (taken from VDR's "config.h"):
+### The version number of VDR's plugin API (taken from VDR's "config.h"):
-VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
### The name of the distribution archive:
@@ -67,7 +67,7 @@ all: libvdr-$(PLUGIN).so
libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
- @cp $@ $(LIBDIR)/$@.$(VDRVERSION)
+ @cp $@ $(LIBDIR)/$@.$(APIVERSION)
dist: clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
diff --git a/PLUGINS/src/status/Makefile b/PLUGINS/src/status/Makefile
index c41af407..e6525e9e 100644
--- a/PLUGINS/src/status/Makefile
+++ b/PLUGINS/src/status/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.9 2006/04/15 11:59:23 kls Exp $
+# $Id: Makefile 1.10 2006/04/16 09:04:10 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -28,9 +28,9 @@ TMPDIR = /tmp
-include $(VDRDIR)/Make.config
-### The version number of VDR (taken from VDR's "config.h"):
+### The version number of VDR's plugin API (taken from VDR's "config.h"):
-VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
### The name of the distribution archive:
@@ -67,7 +67,7 @@ all: libvdr-$(PLUGIN).so
libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
- @cp $@ $(LIBDIR)/$@.$(VDRVERSION)
+ @cp $@ $(LIBDIR)/$@.$(APIVERSION)
dist: clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
diff --git a/PLUGINS/src/svdrpdemo/Makefile b/PLUGINS/src/svdrpdemo/Makefile
index 789f4750..27258748 100644
--- a/PLUGINS/src/svdrpdemo/Makefile
+++ b/PLUGINS/src/svdrpdemo/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.3 2006/04/15 11:59:28 kls Exp $
+# $Id: Makefile 1.4 2006/04/16 09:04:13 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -28,9 +28,9 @@ TMPDIR = /tmp
-include $(VDRDIR)/Make.config
-### The version number of VDR (taken from VDR's "config.h"):
+### The version number of VDR's plugin API (taken from VDR's "config.h"):
-VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
### The name of the distribution archive:
@@ -67,7 +67,7 @@ all: libvdr-$(PLUGIN).so
libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
- @cp $@ $(LIBDIR)/$@.$(VDRVERSION)
+ @cp $@ $(LIBDIR)/$@.$(APIVERSION)
dist: clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
diff --git a/config.h b/config.h
index 14cd0b8b..7e518bde 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h 1.250 2006/04/14 09:46:32 kls Exp $
+ * $Id: config.h 1.251 2006/04/16 09:36:10 kls Exp $
*/
#ifndef __CONFIG_H
@@ -19,9 +19,22 @@
#include "i18n.h"
#include "tools.h"
+// VDR's own version number:
+
#define VDRVERSION "1.3.47"
#define VDRVERSNUM 10347 // Version * 10000 + Major * 100 + Minor
+// The plugin API's version number:
+
+#define APIVERSION "1.3.47"
+#define APIVERSNUM 10347 // Version * 10000 + Major * 100 + Minor
+
+// When loading plugins, VDR searches them by their APIVERSION, which
+// may be smaller than VDRVERSION in case there have been no changes to
+// VDR header files since the last APIVERSION. This allows compiled
+// plugins to work with newer versions of the core VDR as long as no
+// VDR header files have changed.
+
#define MAXPRIORITY 99
#define MAXLIFETIME 99
diff --git a/newplugin b/newplugin
index dfa0fc07..9ac83c85 100755
--- a/newplugin
+++ b/newplugin
@@ -12,7 +12,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
-# $Id: newplugin 1.24 2006/04/15 11:59:43 kls Exp $
+# $Id: newplugin 1.25 2006/04/16 09:04:21 kls Exp $
$PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin <name>\n";
@@ -83,9 +83,9 @@ TMPDIR = /tmp
-include \$(VDRDIR)/Make.config
-### The version number of VDR (taken from VDR's "config.h"):
+### The version number of VDR's plugin API (taken from VDR's "config.h"):
-VDRVERSION = \$(shell grep 'define VDRVERSION ' \$(VDRDIR)/config.h | awk '{ print \$\$3 }' | sed -e 's/"//g')
+APIVERSION = \$(shell grep 'define APIVERSION ' \$(VDRDIR)/config.h | awk '{ print \$\$3 }' | sed -e 's/"//g')
### The name of the distribution archive:
@@ -122,7 +122,7 @@ all: libvdr-\$(PLUGIN).so
libvdr-\$(PLUGIN).so: \$(OBJS)
\$(CXX) \$(CXXFLAGS) -shared \$(OBJS) -o \$\@
- \@cp \$\@ \$(LIBDIR)/\$\@.\$(VDRVERSION)
+ \@cp \$\@ \$(LIBDIR)/\$\@.\$(APIVERSION)
dist: clean
\@-rm -rf \$(TMPDIR)/\$(ARCHIVE)
diff --git a/plugin.c b/plugin.c
index 4f673f76..88841899 100644
--- a/plugin.c
+++ b/plugin.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: plugin.c 1.20 2006/04/15 11:17:03 kls Exp $
+ * $Id: plugin.c 1.21 2006/04/16 09:23:30 kls Exp $
*/
#include "plugin.h"
@@ -290,7 +290,7 @@ void cPluginManager::AddPlugin(const char *Args)
if (p) {
*p = 0;
p += strlen(SO_INDICATOR);
- if (strcmp(p, VDRVERSION) == 0) {
+ if (strcmp(p, APIVERSION) == 0) {
char *name = e->d_name + strlen(LIBVDR_PREFIX);
if (strcmp(name, "*") != 0) { // let's not get into a loop!
AddPlugin(e->d_name + strlen(LIBVDR_PREFIX));
@@ -306,7 +306,7 @@ void cPluginManager::AddPlugin(const char *Args)
if (p)
*p = 0;
char *buffer = NULL;
- asprintf(&buffer, "%s/%s%s%s%s", directory, LIBVDR_PREFIX, s, SO_INDICATOR, VDRVERSION);
+ asprintf(&buffer, "%s/%s%s%s%s", directory, LIBVDR_PREFIX, s, SO_INDICATOR, APIVERSION);
dlls.Add(new cDll(buffer, Args));
free(buffer);
free(s);