From 6c09d2b3d3b786ac94e93211bd850993b9a969e9 Mon Sep 17 00:00:00 2001 From: "[CST] Bas" Date: Tue, 13 Nov 2012 12:45:17 +0800 Subject: [PATCH] neutrino: fix config file locations. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/e4261043998af5cb1692dd90b448450ec7702833 Author: [CST] Bas Date: 2012-11-13 (Tue, 13 Nov 2012) --- acinclude.m4 | 21 ++++++++++-------- src/gui/bookmarkmanager.h | 2 +- .../tuxboxapi/coolstream/neutrinoyparser.cpp | 7 +++--- src/nhttpd/yconfig.h | 22 +++++++++++-------- src/nhttpd/yhttpd.cpp | 1 + 5 files changed, 31 insertions(+), 22 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 6d3d2014d..16ee8e762 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -48,6 +48,9 @@ elif test "$TARGET" = "cdk"; then if test "$prefix" = "NONE"; then AC_MSG_ERROR(invalid prefix, you need to specify one in cdk mode) fi + if test "$targetprefix" != "NONE"; then + AC_DEFINE_UNQUOTED(TARGETPREFIX, "${targetprefix}",[The targets prefix]) + fi if test "$targetprefix" = "NONE"; then targetprefix="" fi @@ -216,18 +219,18 @@ if test "$$1_CONFIG" != "no"; then if test "$TARGET" = "cdk" && check_path "$$1_CONFIG"; then AC_MSG_$3([could not find a suitable version of $2]); else - if test "$1" = "CURL"; then - $1_CFLAGS=$($$1_CONFIG --cflags) + if test "$1" = "CURL"; then + $1_CFLAGS=$($$1_CONFIG --cflags) $1_LIBS=$($$1_CONFIG --libs) else - if test "$1" = "FREETYPE"; then - $1_CFLAGS=$($$1_CONFIG --cflags) - $1_LIBS=$($$1_CONFIG --libs) - else - $1_CFLAGS=$($$1_CONFIG --prefix=$targetprefix --cflags) - $1_LIBS=$($$1_CONFIG --prefix=$targetprefix --libs) + if test "$1" = "FREETYPE"; then + $1_CFLAGS=$($$1_CONFIG --cflags) + $1_LIBS=$($$1_CONFIG --libs) + else + $1_CFLAGS=$($$1_CONFIG --prefix=$targetprefix --cflags) + $1_LIBS=$($$1_CONFIG --prefix=$targetprefix --libs) fi - fi + fi fi fi diff --git a/src/gui/bookmarkmanager.h b/src/gui/bookmarkmanager.h index e1f88e02a..7d0cffbe1 100644 --- a/src/gui/bookmarkmanager.h +++ b/src/gui/bookmarkmanager.h @@ -43,7 +43,7 @@ #include #define MAXBOOKMARKS 10 -#define BOOKMARKFILE "/var/tuxbox/config/bookmarks" +#define BOOKMARKFILE CONFIGDIR"/bookmarks" class CBookmark { diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp index a4ba3bce3..64b5ebdb8 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoyparser.cpp @@ -12,6 +12,10 @@ #include //ntohs #include //ntohs #include //ntohs + +#include +#include +#include // yhttpd #include "yhttpd.h" #include "ytypes_globals.h" @@ -22,9 +26,6 @@ #include "neutrinoyparser.h" #include "neutrinoapi.h" -#include -#include -#include #include #include diff --git a/src/nhttpd/yconfig.h b/src/nhttpd/yconfig.h index c248efcd0..3912dc04c 100644 --- a/src/nhttpd/yconfig.h +++ b/src/nhttpd/yconfig.h @@ -101,26 +101,30 @@ #define HTTPD_DEFAULT_LANGUAGE "English" #define AUTHUSER "root" -#define HTTPD_CONFIGDIR "/var/tuxbox/config" -#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" +#ifndef TARGETPREFIX +#define TARGETPREFIX "" +#endif + +#define HTTPD_CONFIGDIR TARGETPREFIX"/var/tuxbox/config" +#define HTTPD_CONFIGFILE HTTPD_CONFIGDIR"/nhttpd.conf" +#define YWEB_CONFIGFILE HTTPD_CONFIGDIR"/Y-Web.conf" +#define PUBLICDOCUMENTROOT TARGETPREFIX"/var/httpd" +#define NEUTRINO_CONFIGFILE TARGETPREFIX"/var/tuxbox/config/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 TARGETPREFIX"/var/tuxbox/config/zapit" +#define TUXBOX_LOGOS_URL TARGETPREFIX"/usr/share/neutrino/icons/logos" // switch for Box differences #ifdef CONFIG_SYSTEM_TUXBOX #define AUTHPASSWORD "dbox2" -#define PRIVATEDOCUMENTROOT "/share/tuxbox/neutrino/httpd-y" +#define PRIVATEDOCUMENTROOT TARGETPREFIX"/share/tuxbox/neutrino/httpd-y" #endif #ifdef CONFIG_SYSTEM_TUXBOX_COOLSTREAM #define AUTHPASSWORD "coolstream" -#define PRIVATEDOCUMENTROOT "/share/tuxbox/neutrino/httpd" +#define PRIVATEDOCUMENTROOT TARGETPREFIX"/share/tuxbox/neutrino/httpd" #undef Y_CONFIG_BUILD_AS_DAEMON // No Daemon #endif //----------------------------------------------------------------------------- diff --git a/src/nhttpd/yhttpd.cpp b/src/nhttpd/yhttpd.cpp index a7039798b..7f4530e2a 100644 --- a/src/nhttpd/yhttpd.cpp +++ b/src/nhttpd/yhttpd.cpp @@ -56,6 +56,7 @@ static CmodCache mod_cache; // static instance //----------------------------------------------------------------------------- #if defined(CONFIG_SYSTEM_TUXBOX) || defined(CONFIG_SYSTEM_TUXBOX_COOLSTREAM) #include "neutrinoapi.h" +#include static CNeutrinoAPI *NeutrinoAPI; #endif