mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-06 05:08:29 +02:00
neutrino: fix most hardcoded paths
Origin commit data
------------------
Commit: f63ddb9cce
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-03-10 (Sun, 10 Mar 2013)
This commit is contained in:
committed by
Jacek Jendrzej
parent
aaa3821cbc
commit
b5b43a00ec
@@ -459,7 +459,7 @@ void CPictureViewer::getSize(const char* name, int* width, int *height)
|
||||
}
|
||||
}
|
||||
|
||||
#define LOGO_DIR1 "/share/tuxbox/neutrino/icons/logo"
|
||||
#define LOGO_DIR1 DATADIR "/neutrino/icons/logo"
|
||||
#define LOGO_FMT ".jpg"
|
||||
|
||||
bool CPictureViewer::GetLogoName(uint64_t channel_id, std::string ChannelName, std::string & name, int *width, int *height)
|
||||
|
@@ -22,6 +22,7 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
@@ -32,8 +33,6 @@
|
||||
|
||||
#include "SIlanguage.hpp"
|
||||
|
||||
#define LANGUAGEFILE "/var/tuxbox/config/epglanguages.conf"
|
||||
|
||||
std::vector<std::string> SIlanguage::languages;
|
||||
pthread_mutex_t SIlanguage::languages_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
#include <sectionsdclient/sectionsdclient.h>
|
||||
|
||||
#define LANGUAGEFILE "/var/tuxbox/config/epglanguages.conf"
|
||||
#define LANGUAGEFILE CONFIGDIR "/epglanguages.conf"
|
||||
|
||||
class SIlanguage {
|
||||
public:
|
||||
|
@@ -17,7 +17,7 @@ std::set<int> TransponderUseTwoCharMapping;
|
||||
|
||||
int readEncodingFile()
|
||||
{
|
||||
FILE *f = fopen("/var/tuxbox/config/encoding.conf", "rt");
|
||||
FILE *f = fopen(CONFIGDIR "/encoding.conf", "rt");
|
||||
if (f) {
|
||||
CountryCodeDefaultMapping.clear();
|
||||
TransponderDefaultMapping.clear();
|
||||
|
@@ -1684,7 +1684,7 @@ void CEitThread::beforeSleep()
|
||||
messaging_zap_detected = false;
|
||||
unlockMessaging();
|
||||
if(notify_complete)
|
||||
system("/var/tuxbox/config/epgdone.sh");
|
||||
system(CONFIGDIR "/epgdone.sh");
|
||||
}
|
||||
|
||||
/********************************************************************************/
|
||||
|
@@ -47,8 +47,8 @@ extern bool reader_ready;
|
||||
extern pthread_rwlock_t eventsLock;
|
||||
extern bool dvb_time_update;
|
||||
|
||||
std::string epg_filter_dir = "/var/tuxbox/config/zapit/epgfilter.xml";
|
||||
std::string dvbtime_filter_dir = "/var/tuxbox/config/zapit/dvbtimefilter.xml";
|
||||
std::string epg_filter_dir = CONFIGDIR "/zapit/epgfilter.xml";
|
||||
std::string dvbtime_filter_dir = CONFIGDIR "/zapit/dvbtimefilter.xml";
|
||||
bool epg_filter_is_whitelist = false;
|
||||
bool epg_filter_except_current_next = false;
|
||||
|
||||
|
@@ -43,7 +43,7 @@
|
||||
#include <gui/widget/menue.h>
|
||||
|
||||
#define MAXBOOKMARKS 10
|
||||
#define BOOKMARKFILE "/var/tuxbox/config/bookmarks"
|
||||
#define BOOKMARKFILE CONFIGDIR "/bookmarks"
|
||||
|
||||
class CBookmark
|
||||
{
|
||||
|
@@ -92,7 +92,7 @@ int CKeybindSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
CFileFilter fileFilter;
|
||||
fileFilter.addFilter("conf");
|
||||
fileBrowser.Filter = &fileFilter;
|
||||
if (fileBrowser.exec("/var/tuxbox/config") == true) {
|
||||
if (fileBrowser.exec(CONFIGDIR) == true) {
|
||||
CNeutrinoApp::getInstance()->loadKeys(fileBrowser.getSelectedFile()->Name.c_str());
|
||||
printf("[neutrino keybind_setup] new keys: %s\n", fileBrowser.getSelectedFile()->Name.c_str());
|
||||
}
|
||||
|
@@ -163,7 +163,7 @@ void COsdLangSetup::showLanguageSetup(CMenuWidget *osdl_setup)
|
||||
struct dirent **namelist;
|
||||
int n;
|
||||
// printf("scanning locale dir now....(perhaps)\n");
|
||||
char *pfad[] = {(char *) DATADIR "/neutrino/locale",(char *) "/var/tuxbox/config/locale"};
|
||||
char *pfad[] = {(char *) DATADIR "/neutrino/locale",(char *) CONFIGDIR "/locale"};
|
||||
|
||||
osdl_setup->addIntroItems();
|
||||
|
||||
|
@@ -71,7 +71,7 @@ int CSettingsManager::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
{
|
||||
fileFilter.addFilter("conf");
|
||||
fileBrowser.Filter = &fileFilter;
|
||||
if (fileBrowser.exec("/var/tuxbox/config") == true)
|
||||
if (fileBrowser.exec(CONFIGDIR) == true)
|
||||
{
|
||||
CNeutrinoApp::getInstance()->loadSetup(fileBrowser.getSelectedFile()->Name.c_str());
|
||||
CColorSetupNotifier *colorSetupNotifier = new CColorSetupNotifier;
|
||||
|
@@ -514,14 +514,14 @@ void CControlAPI::GetTimeCGI(CyhookHandler *hh)
|
||||
// send services.xml
|
||||
void CControlAPI::GetServicesxmlCGI(CyhookHandler *hh)
|
||||
{
|
||||
hh->SendFile("/var/tuxbox/config/zapit/services.xml");
|
||||
hh->SendFile(CONFIGDIR "/zapit/services.xml");
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// send bouquets.xml
|
||||
void CControlAPI::GetBouquetsxmlCGI(CyhookHandler *hh)
|
||||
{
|
||||
hh->SendFile("/var/tuxbox/config/zapit/bouquets.xml");
|
||||
hh->SendFile(CONFIGDIR "/zapit/bouquets.xml");
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -101,26 +101,26 @@
|
||||
#define HTTPD_DEFAULT_LANGUAGE "English"
|
||||
#define AUTHUSER "root"
|
||||
|
||||
#define HTTPD_CONFIGDIR "/var/tuxbox/config"
|
||||
#define HTTPD_CONFIGDIR CONFIGDIR
|
||||
#define HTTPD_CONFIGFILE HTTPD_CONFIGDIR "/nhttpd.conf"
|
||||
#define YWEB_CONFIGFILE HTTPD_CONFIGDIR "/Y-Web.conf"
|
||||
#define PUBLICDOCUMENTROOT "/var/httpd"
|
||||
#define NEUTRINO_CONFIGFILE "/var/tuxbox/config/neutrino.conf"
|
||||
#define NEUTRINO_CONFIGFILE CONFIGDIR "/neutrino.conf"
|
||||
#define HOSTEDDOCUMENTROOT "/mnt/hosted"
|
||||
#define EXTRASDOCUMENTROOT "/mnt/hosted/extras"
|
||||
#define EXTRASDOCUMENTURL "/hosted/extras"
|
||||
#define ZAPITXMLPATH "/var/tuxbox/config/zapit"
|
||||
#define TUXBOX_LOGOS_URL "/usr/share/tuxbox/neutrino/icons/logos"
|
||||
#define ZAPITXMLPATH CONFIGDIR "/zapit"
|
||||
#define TUXBOX_LOGOS_URL DATADIR "/neutrino/icons/logos"
|
||||
|
||||
// switch for Box differences
|
||||
#ifdef CONFIG_SYSTEM_TUXBOX
|
||||
#define AUTHPASSWORD "dbox2"
|
||||
#define PRIVATEDOCUMENTROOT "/share/tuxbox/neutrino/httpd-y"
|
||||
#define PRIVATEDOCUMENTROOT DATADIR "/neutrino/httpd-y"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYSTEM_TUXBOX_COOLSTREAM
|
||||
#define AUTHPASSWORD "coolstream"
|
||||
#define PRIVATEDOCUMENTROOT "/share/tuxbox/neutrino/httpd"
|
||||
#define PRIVATEDOCUMENTROOT DATADIR "/neutrino/httpd"
|
||||
#undef Y_CONFIG_BUILD_AS_DAEMON // No Daemon
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -1,4 +1,5 @@
|
||||
INCLUDES = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/lib \
|
||||
-I$(top_srcdir)/src/zapit/include \
|
||||
-I$(top_srcdir)/src \
|
||||
|
@@ -3,6 +3,8 @@
|
||||
// yParser
|
||||
//=============================================================================
|
||||
// C
|
||||
#include <config.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <stdio.h>
|
||||
|
@@ -111,7 +111,7 @@ CLocaleManager::~CLocaleManager()
|
||||
delete[] defaultData;
|
||||
}
|
||||
|
||||
const char * path[2] = {"/var/tuxbox/config/locale/", DATADIR "/neutrino/locale/"};
|
||||
const char * path[2] = { CONFIGDIR "/locale/", DATADIR "/neutrino/locale/"};
|
||||
|
||||
CLocaleManager::loadLocale_ret_t CLocaleManager::loadLocale(const char * const locale, bool asdefault)
|
||||
{
|
||||
|
@@ -464,7 +464,7 @@ int CDataResetNotifier::exec(CMenuTarget* /*parent*/, const std::string& actionK
|
||||
return true;
|
||||
|
||||
if(delete_all) {
|
||||
my_system(3, "/bin/sh", "-c", "rm -f /var/tuxbox/config/zapit/*.conf");
|
||||
my_system(3, "/bin/sh", "-c", "rm -f " CONFIGDIR "/zapit/*.conf");
|
||||
CServiceManager::getInstance()->SatelliteList().clear();
|
||||
CZapit::getInstance()->LoadSettings();
|
||||
CZapit::getInstance()->GetConfig(zapitCfg);
|
||||
@@ -484,7 +484,7 @@ int CDataResetNotifier::exec(CMenuTarget* /*parent*/, const std::string& actionK
|
||||
CFrameBuffer::getInstance()->Clear();
|
||||
}
|
||||
if(delete_chan) {
|
||||
my_system(3, "/bin/sh", "-c", "rm -f /var/tuxbox/config/zapit/*.xml");
|
||||
my_system(3, "/bin/sh", "-c", "rm -f " CONFIGDIR "/zapit/*.xml");
|
||||
g_Zapit->reinitChannels();
|
||||
}
|
||||
return ret;
|
||||
|
@@ -21,8 +21,8 @@
|
||||
|
||||
#define PAL 0
|
||||
#define NTSC 1
|
||||
#define AUDIO_CONFIG_FILE "/var/tuxbox/config/zapit/audio.conf"
|
||||
#define VOLUME_CONFIG_FILE "/var/tuxbox/config/zapit/volume.conf"
|
||||
#define AUDIO_CONFIG_FILE CONFIGDIR "/zapit/audio.conf"
|
||||
#define VOLUME_CONFIG_FILE CONFIGDIR "/zapit/volume.conf"
|
||||
|
||||
typedef std::map<t_channel_id, audio_map_set_t> audio_map_t;
|
||||
typedef audio_map_t::iterator audio_map_iterator_t;
|
||||
|
Reference in New Issue
Block a user