changed build and install process

This commit is contained in:
louis 2015-04-06 15:34:08 +02:00
parent d70bfe7091
commit fe10143fd8
7 changed files with 46 additions and 23 deletions

View File

@ -282,4 +282,6 @@ Version 0.4.1
- added locks around cTextWrappers to avoid crashed when concurrently
accessing fonts
- changed build and install process

View File

@ -54,10 +54,6 @@ LIBS += $(shell pkg-config --libs librsvg-2.0 cairo-png) -ljpeg
LIBS += $(shell xml2-config --libs)
INCLUDES += $(shell pkg-config --cflags libskindesignerapi)
LIBS += $(shell pkg-config --libs libskindesignerapi)
DEFINES += -DLIBSKINDESIGNERAPIVERSION='"$(shell pkg-config --modversion libskindesignerapi)"'
### The object files:
OBJS = $(PLUGIN).o \
config.o \
@ -113,12 +109,32 @@ OBJS = $(PLUGIN).o \
### The main target:
all: $(SOFILE) i18n
all: subprojects $(SOFILE) i18n
### subprojects:
.PHONY: libskindesignerapi subprojects
libskindesignerapi:
$(MAKE) -C libskindesignerapi
subprojects: libskindesignerapi
install-subprojects:
$(MAKE) -C libskindesignerapi install
clean-subprojects:
$(MAKE) -C libskindesignerapi clean
### get version of subprojects in specific targets when subprojects have been built
%.o: SUB_DEFINES = -DLIBSKINDESIGNERAPIVERSION='"$(shell pkg-config --modversion libskindesignerapi/libskindesignerapi.pc)"'
$(SOFILE): SUB_LIBS = libskindesignerapi/libskindesignerapi.so.$(shell pkg-config --modversion libskindesignerapi/libskindesignerapi.pc)
### Implicit rules:
%.o: %.c
$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
$(CXX) $(CXXFLAGS) -c $(DEFINES) $(SUB_DEFINES) $(INCLUDES) -o $@ $<
### Dependencies:
@ -158,7 +174,7 @@ install-i18n: $(I18Nmsgs)
### Targets:
$(SOFILE): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LIBS) -o $@
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LIBS) $(SUB_LIBS) -o $@
install-lib: $(SOFILE)
install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
@ -177,7 +193,7 @@ install-scripts:
mkdir -p $(DESTDIR)$(SKINDESIGNER_SCRIPTDIR)
cp -r scripts/* $(DESTDIR)$(SKINDESIGNER_SCRIPTDIR)
install: install-lib install-i18n install-themes install-skins install-scripts
install: install-subprojects install-lib install-i18n install-themes install-skins install-scripts
dist: $(I18Npo) clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@ -187,6 +203,6 @@ dist: $(I18Npo) clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@echo Distribution package created as $(PACKAGE).tgz
clean:
clean: clean-subprojects
@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~

23
README
View File

@ -41,20 +41,25 @@ Requirements
Installation
------------
First you have to install libSkindesignerAPI:
Skindesigner consists of the Skindesigner Plugin itself and a shared library
called "libSkindesignerAPI" which allows other Plugins to use the facilities of
Skindesigner. Since these other Plugins need to have access to the library,
the library has to be proper installed on your system.
cd <PLUGINSOURCEDIR>/libskindesignerapi
make clean
make install
With a "make install" both the plugin and the library are installed on your
system. The destination where the library will be installed can be set with
the PREFIX parameter: "PREFIX=/usr make install". Default of PREFIX is
/usr/local.
After installation check if libskindesignerapi.pc is correctly found in your
PKG_CONFIG_PATH.
PKG_CONFIG_PATH. Other Plugins using the library issue the following
commands in their makefiles which should also work on your commandline:
pkg-config --cflags libskindesignerapi
pkg-config --libs libskindesignerapi
pkg-config --modversion libskindesignerapi
Note that skindesigner itself and all plugins which use libSkindesignerAPI have to
be build against the same major verison of this lib to be compatible.
After installing the lib the Skindesigner Plugin has to be installed as any other
VDR Plugin has to be installed for your Distribution.
be build against the same major verison of the library to be compatible.
After installation you have to care about the paths for the XML skins and epg images.
The following paths can be set at startup:

View File

@ -1,6 +1,6 @@
#ifndef __DISPLAYMENU_H
#define __DISPLAYMENU_H
#include <libskindesignerapi/skindesignerapi.h>
#include "libskindesignerapi/skindesignerapi.h"
#include "libtemplate/template.h"
#include "views/displaymenurootview.h"

View File

@ -1,7 +1,7 @@
#ifndef __DISPLAYPLUGIN_H
#define __DISPLAYPLUGIN_H
#include <libskindesignerapi/skindesignerapi.h>
#include "libskindesignerapi/skindesignerapi.h"
#include "libtemplate/template.h"
#include "views/displaypluginview.h"

View File

@ -12,7 +12,7 @@ TARGET_LIB = $(SONAME).$(MINOR)
PREFIX ?= /usr/local
INCDIR ?= $(PREFIX)/include
LIBDIR ?= $(PREFIX)/lib
PCDIR ?= $(shell pkg-config --variable pc_path pkg-config |cut -d ':' -f1)
PCDIR ?= $(PREFIX)/lib/pkgconfig
TMPDIR ?= /tmp
### The name of the distribution archive:

View File

@ -7,7 +7,7 @@
*/
#include <getopt.h>
#include <vdr/plugin.h>
#include <libskindesignerapi/skindesignerapi.h>
#include "libskindesignerapi/skindesignerapi.h"
#define DEFINE_CONFIG 1
#include "config.h"
@ -19,7 +19,7 @@
#endif
static const char *VERSION = "0.4.1";
static const char *VERSION = "0.4.2";
static const char *DESCRIPTION = trNOOP("Skin Designer");
class cPluginSkinDesigner : public cPlugin, public skindesignerapi::SkindesignerAPI {