From dc64c044a11ea1bdea24a160f410cff4ad9573bd Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Sun, 9 Mar 2014 16:08:44 +0200 Subject: [PATCH] Fixed installation target bugs (Thanks to Alexander Grothe). --- HISTORY | 4 ++++ Makefile | 4 +++- config.c | 7 +++++++ config.h | 3 +++ iptv.c | 5 +++-- po/de_DE.po | 6 +++--- po/fi_FI.po | 6 +++--- po/fr_FR.po | 6 +++--- po/it_IT.po | 6 +++--- po/nl_NL.po | 6 +++--- po/ru_RU.po | 6 +++--- protocolext.c | 2 +- 12 files changed, 39 insertions(+), 22 deletions(-) diff --git a/HISTORY b/HISTORY index 8473423..e956b54 100644 --- a/HISTORY +++ b/HISTORY @@ -225,3 +225,7 @@ VDR Plugin 'iptv' Revision History - Made devices to shutdown already in cPluginManager::Stop() to prevent possible crashes while VDR shutdown. + +2014-03-09: Version 2.0.3 + +- Fixed installation target bugs (Thanks to Alexander Grothe). diff --git a/Makefile b/Makefile index 74f8b09..48c8b2c 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,7 @@ PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(s LIBDIR = $(call PKGCFG,libdir) LOCDIR = $(call PKGCFG,locdir) PLGCFG = $(call PKGCFG,plgcfg) +RESDIR = $(call PKGCFG,resdir) CFGDIR = $(call PKGCFG,configdir) # TMPDIR ?= /tmp @@ -147,7 +148,8 @@ install-lib: $(SOFILE) install-conf: @mkdir -p $(DESTDIR)$(CFGDIR)/plugins/$(PLUGIN) - @cp -pn $(PLUGIN)/* $(DESTDIR)$(CFGDIR)/plugins/$(PLUGIN)/ + @mkdir -p $(DESTDIR)$(RESDIR)/plugins/$(PLUGIN) + @cp -pn $(PLUGIN)/* $(DESTDIR)$(RESDIR)/plugins/$(PLUGIN)/ install: install-lib install-i18n install-conf diff --git a/config.c b/config.c index 1285d70..fe85649 100644 --- a/config.c +++ b/config.c @@ -19,6 +19,7 @@ cIptvConfig::cIptvConfig(void) for (unsigned int i = 0; i < ARRAY_SIZE(disabledFiltersM); ++i) disabledFiltersM[i] = -1; memset(configDirectoryM, 0, sizeof(configDirectoryM)); + memset(resourceDirectoryM, 0, sizeof(resourceDirectoryM)); } unsigned int cIptvConfig::GetDisabledFiltersCount(void) const @@ -45,3 +46,9 @@ void cIptvConfig::SetConfigDirectory(const char *directoryP) debug("cIptvConfig::%s(%s)", __FUNCTION__, directoryP); ERROR_IF(!realpath(directoryP, configDirectoryM), "Cannot canonicalize configuration directory"); } + +void cIptvConfig::SetResourceDirectory(const char *directoryP) +{ + debug("cIptvConfig::%s(%s)", __FUNCTION__, directoryP); + ERROR_IF(!realpath(directoryP, resourceDirectoryM), "Cannot canonicalize resource directory"); +} diff --git a/config.h b/config.h index dc7c687..c6c9bc4 100644 --- a/config.h +++ b/config.h @@ -21,6 +21,7 @@ private: unsigned int sectionFilteringM; int disabledFiltersM[SECTION_FILTER_TABLE_SIZE]; char configDirectoryM[PATH_MAX]; + char resourceDirectoryM[PATH_MAX]; public: cIptvConfig(); @@ -30,6 +31,7 @@ public: unsigned int GetUseBytes(void) const { return useBytesM; } unsigned int GetSectionFiltering(void) const { return sectionFilteringM; } const char *GetConfigDirectory(void) const { return configDirectoryM; } + const char *GetResourceDirectory(void) const { return resourceDirectoryM; } unsigned int GetDisabledFiltersCount(void) const; int GetDisabledFilters(unsigned int indexP) const; void SetTsBufferSize(unsigned int sizeP) { tsBufferSizeM = sizeP; } @@ -39,6 +41,7 @@ public: void SetSectionFiltering(unsigned int onOffP) { sectionFilteringM = onOffP; } void SetDisabledFilters(unsigned int indexP, int numberP); void SetConfigDirectory(const char *directoryP); + void SetResourceDirectory(const char *directoryP); }; extern cIptvConfig IptvConfig; diff --git a/iptv.c b/iptv.c index c1ee373..edeaa3d 100644 --- a/iptv.c +++ b/iptv.c @@ -21,7 +21,7 @@ #define GITVERSION "" #endif - const char VERSION[] = "2.0.2" GITVERSION; + const char VERSION[] = "2.0.3" GITVERSION; static const char DESCRIPTION[] = trNOOP("Experience the IPTV"); class cPluginIptv : public cPlugin { @@ -99,7 +99,8 @@ bool cPluginIptv::Initialize(void) { debug("cPluginIptv::%s()", __FUNCTION__); // Initialize any background activities the plugin shall perform. - IptvConfig.SetConfigDirectory(cPlugin::ResourceDirectory(PLUGIN_NAME_I18N)); + IptvConfig.SetConfigDirectory(cPlugin::ConfigDirectory(PLUGIN_NAME_I18N)); + IptvConfig.SetResourceDirectory(cPlugin::ResourceDirectory(PLUGIN_NAME_I18N)); return cIptvDevice::Initialize(deviceCountM); } diff --git a/po/de_DE.po b/po/de_DE.po index a4691ae..e8c3bdf 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 2.0.2\n" +"Project-Id-Version: vdr-iptv 2.0.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-08 01:18+0200\n" -"PO-Revision-Date: 2014-01-08 01:18+0200\n" +"POT-Creation-Date: 2014-03-09 03:09+0200\n" +"PO-Revision-Date: 2014-03-09 03:09+0200\n" "Last-Translator: Tobias Grimm \n" "Language-Team: German \n" "Language: de\n" diff --git a/po/fi_FI.po b/po/fi_FI.po index d01348f..d81de48 100644 --- a/po/fi_FI.po +++ b/po/fi_FI.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 2.0.2\n" +"Project-Id-Version: vdr-iptv 2.0.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-08 01:18+0200\n" -"PO-Revision-Date: 2014-01-08 01:18+0200\n" +"POT-Creation-Date: 2014-03-09 03:09+0200\n" +"PO-Revision-Date: 2014-03-09 03:09+0200\n" "Last-Translator: Rolf Ahrenberg\n" "Language-Team: Finnish \n" "Language: fi\n" diff --git a/po/fr_FR.po b/po/fr_FR.po index 63f623e..086fbed 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -6,10 +6,10 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 2.0.2\n" +"Project-Id-Version: vdr-iptv 2.0.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-08 01:18+0200\n" -"PO-Revision-Date: 2014-01-08 01:18+0200\n" +"POT-Creation-Date: 2014-03-09 03:09+0200\n" +"PO-Revision-Date: 2014-03-09 03:09+0200\n" "Last-Translator: NIVAL Michaƫl \n" "Language-Team: French \n" "Language: fr\n" diff --git a/po/it_IT.po b/po/it_IT.po index 52f6aae..35089e5 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 2.0.2\n" +"Project-Id-Version: vdr-iptv 2.0.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-08 01:18+0200\n" -"PO-Revision-Date: 2014-01-08 01:18+0200\n" +"POT-Creation-Date: 2014-03-09 03:09+0200\n" +"PO-Revision-Date: 2014-03-09 03:09+0200\n" "Last-Translator: Diego Pierotto \n" "Language-Team: Italian \n" "Language: it\n" diff --git a/po/nl_NL.po b/po/nl_NL.po index 858f182..2e7f2bc 100644 --- a/po/nl_NL.po +++ b/po/nl_NL.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 2.0.2\n" +"Project-Id-Version: vdr-iptv 2.0.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-08 01:18+0200\n" -"PO-Revision-Date: 2014-01-08 01:18+0200\n" +"POT-Creation-Date: 2014-03-09 03:09+0200\n" +"PO-Revision-Date: 2014-03-09 03:09+0200\n" "Last-Translator: Carel\n" "Language-Team: Dutch \n" "Language: nl\n" diff --git a/po/ru_RU.po b/po/ru_RU.po index 02759cb..1518a0d 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: vdr-iptv 2.0.2\n" +"Project-Id-Version: vdr-iptv 2.0.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-08 01:18+0200\n" -"PO-Revision-Date: 2014-01-08 01:18+0200\n" +"POT-Creation-Date: 2014-03-09 03:09+0200\n" +"PO-Revision-Date: 2014-03-09 03:09+0200\n" "Last-Translator: Alexander Gross \n" "Language-Team: Russian \n" "Language: ru\n" diff --git a/protocolext.c b/protocolext.c index 556665c..3a73c85 100644 --- a/protocolext.c +++ b/protocolext.c @@ -158,7 +158,7 @@ bool cIptvProtocolExt::Set(const char* locationP, const int parameterP, const in if (!isempty(locationP)) { struct stat stbuf; // Update script file and parameter - scriptFileM = cString::sprintf("%s/%s", IptvConfig.GetConfigDirectory(), locationP); + scriptFileM = cString::sprintf("%s/%s", IptvConfig.GetResourceDirectory(), locationP); if ((stat(*scriptFileM, &stbuf) != 0) || (strstr(*scriptFileM, "..") != 0)) { error("Non-existent or relative path script '%s'", *scriptFileM); return false;