improved disabling of skininstaller

This commit is contained in:
louis 2016-04-16 10:01:29 +02:00
parent 92553a8134
commit 0e93a8663f
4 changed files with 18 additions and 5 deletions

View File

@ -4,8 +4,8 @@
# $Id$ Makefile 1.0 2014/07/24 louis Exp $
# Config
CONFIG := #-DDOPROFILE # enable profiling code
CONFIG += -DUSE_SKININSTALLER # use skin installer in skindesigner setup
CONFIG := #-DDOPROFILE # enable profiling code
CONFIG += #-DDO_NOT_USE_SKININSTALLER # disable installer in skindesigner setup
# The official name of this plugin.
PLUGIN = skindesigner
@ -138,7 +138,7 @@ $(SOFILE): SUB_LIBS = libskindesignerapi/libskindesignerapi.so.$(shell pkg-confi
### Implicit rules:
%.o: %.c
$(CXX) $(CXXFLAGS) -std=c++11 -c $(DEFINES) $(SUB_DEFINES) $(INCLUDES) -o $@ $<
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -std=c++11 -c $(DEFINES) $(SUB_DEFINES) $(INCLUDES) -o $@ $<
### Dependencies:

7
README
View File

@ -56,7 +56,7 @@ the library has to be proper installed on your system.
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.
/usr/local.
After installation check if libskindesignerapi.pc is correctly found in your
PKG_CONFIG_PATH. Other Plugins using the library issue the following
@ -68,6 +68,11 @@ pkg-config --modversion libskindesignerapi
Note that skindesigner itself and all plugins which use libSkindesignerAPI have to
be build against the same major verison of the library to be compatible.
If you like to disable the possibility to install skins from skindesigner setup
menu, you can enable the option in the makefile or set the option
DO_NOT_USE_SKININSTALLER manually via CPP Flags:
make CPPFLAGS="-DDO_NOT_USE_SKININSTALLER"
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

@ -47,7 +47,9 @@ void cDesignerConfig::SetPathes(void) {
epgImagePath = cString::sprintf("%s/epgimages/", cPlugin::CacheDirectory(PLUGIN_NAME_I18N));
dsyslog("skindesigner: using Skin Directory %s", *skinPath);
#ifndef DO_NOT_USE_SKININSTALLER
dsyslog("skindesigner: using Installer Skin Directory %s", *installerSkinPath);
#endif
dsyslog("skindesigner: using common ChannelLogo Directory %s", *logoPath);
dsyslog("skindesigner: using EPG Images Directory %s", *epgImagePath);
@ -110,10 +112,13 @@ void cDesignerConfig::ReadSkinFolder(cString &skinFolder, vector<string> *contai
void cDesignerConfig::ReadSkins(void) {
ReadSkinFolder(skinPath, &deliveredSkins);
#ifndef DO_NOT_USE_SKININSTALLER
ReadSkinFolder(installerSkinPath, &installerSkins);
#endif
for (vector<string>::iterator it = deliveredSkins.begin(); it != deliveredSkins.end(); it++) {
skins.push_back(*it);
}
#ifndef DO_NOT_USE_SKININSTALLER
for (vector<string>::iterator it = installerSkins.begin(); it != installerSkins.end(); it++) {
string instSkin = *it;
bool found = false;
@ -126,6 +131,7 @@ void cDesignerConfig::ReadSkins(void) {
if (!found)
skins.push_back(instSkin);
}
#endif
}
void cDesignerConfig::ClearSkinSetups(void) {
@ -335,9 +341,11 @@ void cDesignerConfig::SetSkinSetupParameters(void) {
}
void cDesignerConfig::ReadSkinRepos(void) {
#ifndef DO_NOT_USE_SKININSTALLER
skinRepos.Init(*installerSkinPath);
skinRepos.Read(*installerSkinPath);
dsyslog("skindesigner: read %d skinrepositories from %s", skinRepos.Count(), *installerSkinPath);
#endif
}
bool cDesignerConfig::CheckVersion(string name, string &neededVersion) {

View File

@ -360,7 +360,7 @@ void cSkinDesignerSetup::SkinSetup(void) {
}
void cSkinDesignerSetup::InstallSkins(void) {
#ifdef USE_SKININSTALLER
#ifndef DO_NOT_USE_SKININSTALLER
Add(InfoItem(tr("Install new skins")));
config.InitSkinRepoIterator();