From a78c7c90777238b2ee246a50ba67341121f68aea Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Thu, 13 Aug 2009 17:52:15 +0000 Subject: [PATCH] * Some vendor-specific compilation/configuration tweaks. --- Makefile | 2 +- genconfig.sh | 6 +++++- icons.c | 2 +- upnpdescstrings.h | 24 +++++++++++++++--------- 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index f76f5de..f725c1f 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ minidlna.o: upnphttp.h upnpdescgen.h minidlnapath.h getifaddr.h upnpsoap.h minidlna.o: options.h minissdp.h daemonize.h upnpevents.h minidlna.o: commonrdr.h log.h upnphttp.o: config.h upnphttp.h upnpdescgen.h minidlnapath.h upnpsoap.h -upnphttp.o: upnpevents.h image_utils.h sql.h log.h +upnphttp.o: upnpevents.h image_utils.h sql.h log.h icons.c upnpdescgen.o: config.h upnpdescgen.h minidlnapath.h upnpglobalvars.h upnpdescgen.o: minidlnatypes.h upnpdescstrings.h log.h upnpsoap.o: config.h upnpglobalvars.h minidlnatypes.h log.h utils.h sql.h diff --git a/genconfig.sh b/genconfig.sh index d08468a..dc3c591 100755 --- a/genconfig.sh +++ b/genconfig.sh @@ -17,6 +17,7 @@ DB_PATH="/tmp/minidlna" OS_NAME=`uname -s` OS_VERSION=`uname -r` TIVO="/*#define TIVO_SUPPORT*/" +NETGEAR="/*#define NETGEAR*/" READYNAS="/*#define READYNAS*/" ${RM} ${CONFIGFILE} @@ -109,6 +110,7 @@ case $OS_NAME in OS_URL="http://www.readynas.com/" DB_PATH="/var/cache/minidlna" TIVO="#define TIVO_SUPPORT" + NETGEAR="#define NETGEAR" READYNAS="#define READYNAS" # Debian GNU/Linux special case elif [ -f /etc/debian_version ]; then @@ -158,7 +160,9 @@ echo "/*#define HAVE_INOTIFY_H*/" >> ${CONFIGFILE} fi echo "" >> ${CONFIGFILE} -echo "/* Enable NETGEAR ReadyNAS-specific tweaks. */" >> ${CONFIGFILE} +echo "/* Enable NETGEAR-specific tweaks. */" >> ${CONFIGFILE} +echo "${NETGEAR}" >> ${CONFIGFILE} +echo "/* Enable ReadyNAS-specific tweaks. */" >> ${CONFIGFILE} echo "${READYNAS}" >> ${CONFIGFILE} echo "/* Compile in TiVo support. */" >> ${CONFIGFILE} echo "${TIVO}" >> ${CONFIGFILE} diff --git a/icons.c b/icons.c index 453f5c6..4372518 100644 --- a/icons.c +++ b/icons.c @@ -1,4 +1,4 @@ -#ifdef READYNAS +#ifdef NETGEAR unsigned char png_sm[] = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\x30\x00\x00\x00\x30" "\x08\x06\x00\x00\x00\x57\x02\xf9\x87\x00\x00\x00\x01\x73\x52\x47\x42\x00\xae\xce\x1c\xe9\x00\x00" diff --git a/upnpdescstrings.h b/upnpdescstrings.h index 8f18279..336c258 100644 --- a/upnpdescstrings.h +++ b/upnpdescstrings.h @@ -9,16 +9,22 @@ #include "config.h" /* strings used in the root device xml description */ -#define ROOTDEV_MANUFACTURERURL OS_URL -#ifdef READYNAS -#define ROOTDEV_MANUFACTURER "NETGEAR" -#define ROOTDEV_MODELNAME "Windows Media Connect compatible (ReadyDLNA)" -#define ROOTDEV_MODELDESCRIPTION "ReadyDLNA on ReadyNAS RAIDiator OS" +#ifdef NETGEAR + #define ROOTDEV_MANUFACTURERURL "http://www.netgear.com/" + #define ROOTDEV_MANUFACTURER "NETGEAR" + #define ROOTDEV_MODELNAME "Windows Media Connect compatible (ReadyDLNA)" + #define ROOTDEV_MODELURL OS_URL + #ifdef READYNAS + #define ROOTDEV_MODELDESCRIPTION "ReadyDLNA on ReadyNAS RAIDiator OS" + #else + #define ROOTDEV_MODELDESCRIPTION "ReadyDLNA" + #endif #else -#define ROOTDEV_MANUFACTURER "Justin Maggard" -#define ROOTDEV_MODELNAME "Windows Media Connect compatible (MiniDLNA)" -#define ROOTDEV_MODELDESCRIPTION "MiniDLNA on " OS_NAME + #define ROOTDEV_MANUFACTURERURL OS_URL + #define ROOTDEV_MANUFACTURER "Justin Maggard" + #define ROOTDEV_MODELNAME "Windows Media Connect compatible (MiniDLNA)" + #define ROOTDEV_MODELDESCRIPTION "MiniDLNA on " OS_NAME + #define ROOTDEV_MODELURL OS_URL #endif -#define ROOTDEV_MODELURL OS_URL #endif