Merge remote branch 'remotes/origin/acid-burn/bug_622_swupgrade_networkcheck'
authorghost <andreas.monzner@multimedia-labs.de>
Mon, 13 Dec 2010 12:23:15 +0000 (13:23 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Mon, 13 Dec 2010 12:23:15 +0000 (13:23 +0100)
144 files changed:
.gitignore
COPYING [new file with mode: 0644]
Makefile.am
README
acinclude.m4 [deleted file]
autogen.sh
config.h.in [deleted file]
configure.ac [changed mode: 0755->0644]
data/Makefile.am
data/fonts/Makefile.am
data/fonts/tuxtxt.ttf [new file with mode: 0644]
data/keymaps/Makefile.am [new file with mode: 0644]
data/keymaps/dream-de.info [new file with mode: 0644]
data/keymaps/dream-de.kmap [new file with mode: 0644]
data/keymaps/eng.info [new file with mode: 0644]
data/keymaps/eng.kmap [new file with mode: 0644]
data/skin_default.xml
data/skin_default/icons/Makefile.am
debug [deleted file]
debug.gdb [deleted file]
enigma2.bb [new file with mode: 0644]
include/Makefile.am
lib/actions/.gitignore [new file with mode: 0644]
lib/actions/Makefile.am
lib/actions/action.h
lib/actions/parseactions.py
lib/base/.gitignore [new file with mode: 0644]
lib/base/Makefile.am
lib/base/console.h
lib/base/eenv.cpp.in [new file with mode: 0644]
lib/base/eenv.h [new file with mode: 0644]
lib/base/encoding.cpp
lib/base/filepush.cpp
lib/base/filepush.h
lib/base/idatasource.h [deleted file]
lib/base/itssource.h [new file with mode: 0644]
lib/base/rawfile.h
lib/components/Makefile.am
lib/driver/Makefile.am
lib/driver/rcconsole.cpp
lib/driver/rcconsole.h
lib/driver/rcsdl.cpp [new file with mode: 0644]
lib/driver/rcsdl.h [new file with mode: 0644]
lib/dvb/Makefile.am
lib/dvb/db.cpp
lib/dvb/dvb.cpp
lib/dvb/dvb.h
lib/dvb/frontend.cpp
lib/dvb/idvb.h
lib/dvb/lowlevel/Makefile.am
lib/dvb/pmt.cpp
lib/dvb/pmt.h
lib/dvb/scan.cpp
lib/dvb/sec.cpp
lib/dvb/tstools.cpp
lib/dvb/tstools.h
lib/dvb_ci/Makefile.am
lib/gdi/Makefile.am
lib/gdi/epng.cpp
lib/gdi/font.cpp
lib/gdi/font.h
lib/gdi/gfbdc.cpp
lib/gdi/gfbdc.h
lib/gdi/glcddc.cpp
lib/gdi/glcddc.h
lib/gdi/gmaindc.cpp [new file with mode: 0644]
lib/gdi/gmaindc.h [new file with mode: 0644]
lib/gdi/grc.cpp
lib/gdi/grc.h
lib/gdi/lcd.cpp
lib/gdi/picload.cpp
lib/gdi/sdl.cpp
lib/gdi/sdl.h
lib/gui/Makefile.am
lib/gui/elistboxcontent.cpp
lib/gui/ewidgetdesktop.cpp
lib/mmi/Makefile.am
lib/nav/Makefile.am
lib/python/.gitignore [new file with mode: 0644]
lib/python/Components/Harddisk.py
lib/python/Components/Keyboard.py
lib/python/Components/NimManager.py
lib/python/Components/Renderer/Picon.py
lib/python/Components/UsageConfig.py
lib/python/Makefile.am
lib/python/Plugins/DemoPlugins/TPMDemo/Makefile.am
lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml
lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml
lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml
lib/python/Plugins/Extensions/DVDPlayer/Makefile.am
lib/python/Plugins/Extensions/DVDPlayer/plugin.py
lib/python/Plugins/Extensions/DVDPlayer/src/Makefile.am
lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
lib/python/Plugins/Extensions/Makefile.am
lib/python/Plugins/Extensions/SocketMMI/src/Makefile.am
lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py
lib/python/Plugins/SystemPlugins/Hotplug/plugin.py
lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py
lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py
lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py
lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py
lib/python/Plugins/SystemPlugins/SoftwareManager/ImageWizard.py
lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
lib/python/Plugins/SystemPlugins/TempFanControl/Makefile.am
lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py
lib/python/Plugins/newplugin.py [changed mode: 0644->0755]
lib/python/Screens/ChannelSelection.py
lib/python/Screens/Setup.py
lib/python/Screens/Wizard.py
lib/python/Tools/Directories.py
lib/python/connections.h
lib/python/enigma_python.i
lib/python/python.h
lib/service/Makefile.am
lib/service/servicedvb.cpp
lib/service/servicedvb.h
lib/service/servicemp3.cpp
lib/service/servicemp3.h
m4/.gitignore [new file with mode: 0644]
m4/ax_pkg_swig.m4 [new file with mode: 0644]
m4/ax_pthread.m4 [new file with mode: 0644]
m4/ax_python_devel.m4 [new file with mode: 0644]
m4/ax_swig_enable_cxx.m4 [new file with mode: 0644]
m4/ax_swig_python.m4 [new file with mode: 0644]
m4/tuxbox.m4 [new file with mode: 0644]
main/.gitignore
main/Makefile.am
main/bsod.cpp [changed mode: 0755->0644]
main/enigma-gdi.cpp
main/enigma-gui.cpp
main/enigma.cpp
main/version_info.cpp [new file with mode: 0644]
main/version_info.h [new file with mode: 0644]
main/xmlgenerator.cpp [new file with mode: 0644]
main/xmlgenerator.h [new file with mode: 0644]
po/.gitignore [new file with mode: 0644]
po/LINGUAS [deleted file]
po/Makefile.am [changed mode: 0755->0644]
po/enigma2.pot [deleted file]
skin.py
tools/.gitignore [new file with mode: 0644]
tools/Makefile.am
tools/enigma2.sh.in [new file with mode: 0755]

index 274231a..da59fcf 100644 (file)
@@ -2,16 +2,8 @@
 # Lines that start with '#' are comments.
 # For a project mostly in C, the following would be a good set of
 # exclude patterns (uncomment them if you want to use them):
-*.[oa]
 *~
-Makefile.in
-Makefile
-*.so
-*.so.0.0
-*.cxx
-.deps
-COPYING
-INSTALL
+*.a
 aclocal.m4
 autom4te.cache/
 config.guess
@@ -20,22 +12,24 @@ config.status
 config.sub
 configure
 depcomp
+.deps/
+enigma2_config.h
+enigma2_config.h.in
 enigma2.pc
+index-enigma2.xml
+INSTALL
 install-sh
-lib/actions/actionids.h
-lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.d
-lib/python/enigma.py
-missing
-py-compile
-po/
-main/enigma2
-version.h
-*.d
 *.la
-*.lo
 .libs/
-*.tar.gz
-config.h
 libtool
+*.lo
 ltmain.sh
+Makefile
+Makefile.in
+missing
+moc_*.cpp
+*.o
+py-compile
 stamp-h1
+*.tar.bz2
+*.tar.gz
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..322cb19
--- /dev/null
+++ b/COPYING
@@ -0,0 +1 @@
+See LICENSE.
index bc1770b..ab2d163 100755 (executable)
@@ -1,14 +1,18 @@
 SUBDIRS = include lib main data po tools
 
-installdir = $(pkglibdir)/python
+ACLOCAL_AMFLAGS = -I m4
 
+installdir = $(pkglibdir)/python
 install_PYTHON = \
        Navigation.py NavigationInstance.py RecordTimer.py SleepTimer.py ServiceReference.py \
        keyids.py keymapparser.py mytest.py skin.py timer.py tools.py GlobalActions.py \
        e2reactor.py
 
-install-exec-hook:
-               $(PYTHON) $(srcdir)/tools/genmetaindex.py $(DESTDIR)$(datadir)/meta/plugin_*.xml > $(DESTDIR)$(datadir)/meta/index-enigma2.xml
+metadir = $(datadir)/meta
+meta_DATA = index-enigma2.xml
+CLEANFILES = index-enigma2.xml
+
+EXTRA_DIST = lamedb
 
-uninstall-hook:
-       $(RM) $(DESTDIR)$(datadir)/meta/index-enigma2.xml
+index-enigma2.xml: $(top_srcdir)/tools/genmetaindex.py $(top_srcdir)/lib/python/Plugins/*/*/meta/plugin_*.xml
+       $(AM_V_GEN)$(PYTHON) $^ > $@
diff --git a/README b/README
index e69de29..f745e9c 100644 (file)
--- a/README
+++ b/README
@@ -0,0 +1,59 @@
+To build enigma2 on Ubuntu 10.04, follow these steps:
+
+0.) Consider using OE to build it for a Dreambox instead.
+
+    To build this version for a Dreambox, you will need
+    a recent OE (branch "opendreambox-1.6" will do, but "3.0" won't)
+    or at least a backported BitBake recipe from there.
+
+    See http://opendreambox.org/.
+
+    Stop reading here. It's not very useful for most people
+    to build enigma2 for a PC.
+
+1.) Install these packages:
+
+autoconf
+automake
+build-essential
+gettext
+libfreetype6-dev
+libfribidi-dev
+libgif-dev
+libgstreamer0.10-dev
+libgstreamer-plugins-base0.10-dev
+libjpeg62-dev
+libpng12-dev
+libsdl1.2-dev
+libsigc++-1.2-dev
+libtool
+libxml2-dev
+libxslt1-dev
+python-dev
+swig
+
+2.) Build and install libdvbsi++:
+
+git clone git://git.opendreambox.org/git/obi/libdvbsi++.git
+cd libdvbsi++
+dpkg-buildpackage -uc -us
+cd ..
+sudo dpkg -i libdvbsi++*.deb
+
+3.) Build and install libxmlccwrap:
+
+git clone git://git.opendreambox.org/git/obi/libxmlccwrap.git
+cd libxmlccwrap
+dpkg-buildpackage -uc -us
+cd ..
+sudo dpkg -i libxmlccwrap*.deb
+
+4.) Build and install enigma2:
+
+git clone git://git.opendreambox.org/git/enigma2.git
+cd enigma2
+autoreconf -i
+./configure --prefix=$HOME/enigma2 --with-libsdl
+make
+make install
+
diff --git a/acinclude.m4 b/acinclude.m4
deleted file mode 100644 (file)
index 6f1cb0a..0000000
+++ /dev/null
@@ -1,445 +0,0 @@
-AC_DEFUN([TUXBOX_APPS],[
-
-INSTALL="$INSTALL -p"
-
-AC_GNU_SOURCE
-AC_SYS_LARGEFILE
-
-AC_ARG_WITH(target,
-       [  --with-target=TARGET    target for compilation [[native,cdk]]],
-       [TARGET="$withval"],[TARGET="native"])
-
-AC_ARG_WITH(targetprefix,
-       [  --with-targetprefix=PATH  prefix relative to target root (only applicable in cdk mode)],
-       [targetprefix="$withval"],[targetprefix="NONE"])
-
-AC_ARG_WITH(debug,
-       [  --without-debug         disable debugging code],
-       [DEBUG="$withval"],[DEBUG="yes"])
-
-if test "$DEBUG" = "yes"; then
-       DEBUG_CFLAGS="-g3 -ggdb"
-       AC_DEFINE(DEBUG,1,[Enable debug messages])
-fi
-
-AC_MSG_CHECKING(target)
-
-if test "$TARGET" = "native"; then
-       AC_MSG_RESULT(native)
-
-       if test "$CFLAGS" = "" -a "$CXXFLAGS" = ""; then
-               CFLAGS="-Wall -O2 -pipe $DEBUG_CFLAGS"
-               CXXFLAGS="-Wall -O2 -pipe $DEBUG_CFLAGS"
-       fi
-       if test "$prefix" = "NONE"; then
-               prefix=/usr/local
-       fi
-       targetprefix=$prefix
-elif test "$TARGET" = "cdk"; then
-       AC_MSG_RESULT(cdk)
-
-       if test "$CC" = "" -a "$CXX" = ""; then
-               CC=powerpc-tuxbox-linux-gnu-gcc CXX=powerpc-tuxbox-linux-gnu-g++
-       fi
-       if test "$CFLAGS" = "" -a "$CXXFLAGS" = ""; then
-               CFLAGS="-Wall -Os -mcpu=823 -pipe $DEBUG_CFLAGS"
-               CXXFLAGS="-Wall -Os -mcpu=823 -pipe $DEBUG_CFLAGS"
-       fi
-       if test "$prefix" = "NONE"; then
-               AC_MSG_ERROR(invalid prefix, you need to specify one in cdk mode)
-       fi
-       if test "$targetprefix" = "NONE"; then
-               targetprefix=""
-       fi
-       if test "$host_alias" = ""; then
-               cross_compiling=yes
-               host_alias=powerpc-tuxbox-linux-gnu
-       fi
-else
-       AC_MSG_RESULT(none)
-       AC_MSG_ERROR([invalid target $TARGET, choose on from native,cdk]);
-fi
-
-AC_CANONICAL_BUILD
-AC_CANONICAL_HOST
-
-check_path () {
-       return $(perl -e "if(\"$1\"=~m#^/usr/(local/)?bin#){print \"0\"}else{print \"1\";}")
-}
-
-])
-
-AC_DEFUN([TUXBOX_APPS_DIRECTORY_ONE],[
-AC_ARG_WITH($1,[  $6$7 [[PREFIX$4$5]]],[
-       _$2=$withval
-       if test "$TARGET" = "cdk"; then
-               $2=`eval echo "${targetprefix}$withval"`
-       else
-               $2=$withval
-       fi
-],[
-       $2="\${$3}$5"
-       if test "$TARGET" = "cdk"; then
-               _$2=`eval echo "${target$3}$5"`
-       else
-               _$2=`eval echo "${$3}$5"`
-       fi
-])
-
-dnl automake <= 1.6 don't support this
-dnl AC_SUBST($2)
-AC_DEFINE_UNQUOTED($2,"$_$2",$7)
-])
-
-AC_DEFUN([TUXBOX_APPS_DIRECTORY],[
-AC_REQUIRE([TUXBOX_APPS])
-
-if test "$TARGET" = "cdk"; then
-       datadir="\${prefix}/share"
-       tuxboxdatadir="\${prefix}/share/tuxbox"
-       zoneinfodir="\${datadir}/zoneinfo"
-       sysconfdir="\${prefix}/etc"
-       localstatedir="\${prefix}/var"
-       localedir="\${prefix}/var"
-       libdir="\${prefix}/lib"
-       targetdatadir="\${targetprefix}/share"
-       targetsysconfdir="\${targetprefix}/etc"
-       targetlocalstatedir="\${targetprefix}/var"
-       targetlibdir="\${targetprefix}/lib"
-fi
-
-TUXBOX_APPS_DIRECTORY_ONE(configdir,CONFIGDIR,sysconfdir,/etc,,
-       [--with-configdir=PATH   ],[where to find the config files])
-
-TUXBOX_APPS_DIRECTORY_ONE(datadir,DATADIR,datadir,/share,,
-       [--with-datadir=PATH     ],[where to find data])
-
-TUXBOX_APPS_DIRECTORY_ONE(fontdir,FONTDIR,datadir,/share,/fonts,
-       [--with-fontdir=PATH     ],[where to find the fonts])
-
-TUXBOX_APPS_DIRECTORY_ONE(libdir,LIBDIR,libdir,/lib,,
-       [--with-libdir=PATH      ],[where to find the internal libs])
-])
-
-dnl automake <= 1.6 needs this specifications
-AC_SUBST(CONFIGDIR)
-AC_SUBST(DATADIR)
-AC_SUBST(FONTDIR)
-AC_SUBST(LIBDIR)
-dnl end workaround
-
-AC_DEFUN([TUXBOX_APPS_DVB],[
-AC_ARG_WITH(dvbincludes,
-       [  --with-dvbincludes=PATH  path for dvb includes [[NONE]]],
-       [DVBINCLUDES="$withval"],[DVBINCLUDES=""])
-
-if test "$DVBINCLUDES"; then
-       CPPFLAGS="$CPPFLAGS -I$DVBINCLUDES"
-fi
-
-AC_CHECK_HEADERS(ost/dmx.h,[
-       DVB_API_VERSION=1
-       AC_MSG_NOTICE([found dvb version 1])
-])
-
-if test -z "$DVB_API_VERSION"; then
-AC_CHECK_HEADERS(linux/dvb/version.h,[
-       AC_LANG_PREPROC_REQUIRE()
-       AC_REQUIRE([AC_PROG_EGREP])
-       AC_LANG_CONFTEST([AC_LANG_SOURCE([[
-#include <linux/dvb/version.h>
-version DVB_API_VERSION
-       ]])])
-       DVB_API_VERSION=`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | $EGREP "^version" | sed "s,version\ ,,"`
-       rm -f conftest*
-
-       AC_MSG_NOTICE([found dvb version $DVB_API_VERSION])
-])
-fi
-
-if test "$DVB_API_VERSION"; then
-       AC_DEFINE(HAVE_DVB,1,[Define to 1 if you have the dvb includes])
-       AC_DEFINE_UNQUOTED(HAVE_DVB_API_VERSION,$DVB_API_VERSION,[Define to the version of the dvb api])
-else
-       AC_MSG_ERROR([can't find dvb headers])
-fi
-])
-
-AC_DEFUN([_TUXBOX_APPS_LIB_CONFIG],[
-AC_PATH_PROG($1_CONFIG,$2,no)
-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
-               $1_CFLAGS=$($$1_CONFIG --cflags)
-               $1_LIBS=$($$1_CONFIG --libs)
-       fi
-fi
-
-AC_SUBST($1_CFLAGS)
-AC_SUBST($1_LIBS)
-])
-
-AC_DEFUN([TUXBOX_APPS_LIB_CONFIG],[
-_TUXBOX_APPS_LIB_CONFIG($1,$2,ERROR)
-if test "$$1_CONFIG" = "no"; then
-       AC_MSG_ERROR([could not find $2]);
-fi
-])
-
-AC_DEFUN([TUXBOX_APPS_LIB_CONFIG_CHECK],[
-_TUXBOX_APPS_LIB_CONFIG($1,$2,WARN)
-])
-
-AC_DEFUN([TUXBOX_APPS_PKGCONFIG],[
-AC_PATH_PROG(PKG_CONFIG, pkg-config,no)
-if test "$PKG_CONFIG" = "no" ; then
-       AC_MSG_ERROR([could not find pkg-config]);
-fi
-])
-
-AC_DEFUN([_TUXBOX_APPS_LIB_PKGCONFIG],[
-PKG_CHECK_MODULES($1,$2)
-AC_SUBST($1_CFLAGS)
-AC_SUBST($1_LIBS)
-])
-
-AC_DEFUN([_TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL],[
-PKG_CHECK_MODULES($1,$2,$3="yes",$3="no")
-if test "$$3" = "yes"; then
-       AC_DEFINE($3, 1, [$2 available])
-else
-       $1_CFLAGS=""
-       $1_LIBS=""
-fi
-AC_SUBST($1_CFLAGS)
-AC_SUBST($1_LIBS)
-])
-
-AC_DEFUN([TUXBOX_APPS_LIB_PKGCONFIG],[
-_TUXBOX_APPS_LIB_PKGCONFIG($1,$2)
-if test -z "$$1_CFLAGS" ; then
-       AC_MSG_ERROR([could not find package $2]);
-fi
-])
-
-AC_DEFUN([TUXBOX_APPS_LIB_PKGCONFIG_CHECK],[
-_TUXBOX_APPS_LIB_PKGCONFIG($1,$2)
-])
-
-AC_DEFUN([_TUXBOX_APPS_LIB_SYMBOL],[
-AC_CHECK_LIB($2,$3,HAVE_$1="yes",HAVE_$1="no")
-if test "$HAVE_$1" = "yes"; then
-       $1_LIBS=-l$2
-fi
-
-AC_SUBST($1_LIBS)
-])
-
-AC_DEFUN([TUXBOX_APPS_LIB_SYMBOL],[
-_TUXBOX_APPS_LIB_SYMBOL($1,$2,$3,ERROR)
-if test "$HAVE_$1" = "no"; then
-       AC_MSG_ERROR([could not find $2]);
-fi
-])
-
-AC_DEFUN([TUXBOX_APPS_LIB_CONFIG_SYMBOL],[
-_TUXBOX_APPS_LIB_SYMBOL($1,$2,$3,WARN)
-])
-
-AC_DEFUN([TUXBOX_APPS_GETTEXT],[
-AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-       [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
-       (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
-       :)
-AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-
-AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-       [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
-       (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
-       :)
-
-AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,[$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1],:)
-
-AC_MSG_CHECKING([whether NLS is requested])
-AC_ARG_ENABLE(nls,
-       [  --disable-nls           do not use Native Language Support],
-       USE_NLS=$enableval, USE_NLS=yes)
-AC_MSG_RESULT($USE_NLS)
-AC_SUBST(USE_NLS)
-
-if test "$USE_NLS" = "yes"; then
-       AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,[
-               AC_TRY_LINK([
-                       #include <libintl.h>
-                       #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
-                       #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
-                       #endif
-                       extern int _nl_msg_cat_cntr;
-                       extern int *_nl_domain_bindings;
-                       ],[
-                       bindtextdomain ("", "");
-                       return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings;
-                       ], gt_cv_func_gnugettext_libc=yes, gt_cv_func_gnugettext_libc=no
-               )]
-       )
-
-       if test "$gt_cv_func_gnugettext_libc" = "yes"; then
-               AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.])
-               gt_use_preinstalled_gnugettext=yes
-       else
-               USE_NLS=no
-       fi
-fi
-
-if test -f "$srcdir/po/LINGUAS"; then
-       ALL_LINGUAS=$(sed -e "/^#/d" "$srcdir/po/LINGUAS")
-fi
-
-POFILES=
-GMOFILES=
-UPDATEPOFILES=
-DUMMYPOFILES=
-for lang in $ALL_LINGUAS; do
-       POFILES="$POFILES $srcdirpre$lang.po"
-       GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
-       UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
-       DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
-done
-INST_LINGUAS=
-if test -n "$ALL_LINGUAS"; then
-       for presentlang in $ALL_LINGUAS; do
-               useit=no
-               if test -n "$LINGUAS"; then
-                       desiredlanguages="$LINGUAS"
-               else
-                       desiredlanguages="$ALL_LINGUAS"
-               fi
-               for desiredlang in $desiredlanguages; do
-                       case "$desiredlang" in
-                               "$presentlang"*) useit=yes;;
-                       esac
-               done
-               if test $useit = yes; then
-                       INST_LINGUAS="$INST_LINGUAS $presentlang"
-               fi
-       done
-fi
-CATALOGS=
-if test -n "$INST_LINGUAS"; then
-       for lang in $INST_LINGUAS; do
-               CATALOGS="$CATALOGS $lang.gmo"
-       done
-fi
-AC_SUBST(POFILES)
-AC_SUBST(GMOFILES)
-AC_SUBST(UPDATEPOFILES)
-AC_SUBST(DUMMYPOFILES)
-AC_SUBST(CATALOGS)
-])
-
-dnl backward compatiblity
-AC_DEFUN([AC_GNU_SOURCE],
-[AH_VERBATIM([_GNU_SOURCE],
-[/* Enable GNU extensions on systems that have them.  */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif])dnl
-AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
-AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
-AC_DEFINE([_GNU_SOURCE])
-])
-
-AC_DEFUN([AC_PROG_EGREP],
-[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
-   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
-    then ac_cv_prog_egrep='grep -E'
-    else ac_cv_prog_egrep='egrep'
-    fi])
- EGREP=$ac_cv_prog_egrep
- AC_SUBST([EGREP])
-])
-
-AC_DEFUN([AC_PYTHON_DEVEL],[
-       #
-       # should allow for checking of python version here...
-       #
-       if test $cross_compiling = "yes"; then
-               # Check for Python include path
-               AC_MSG_CHECKING([for Python include path])
-               
-               # FIXME: yes, this is wrong. sorry about that. (tmbinc)
-               cross_PYTHON_VERSION=$PYTHON_VERSION
-               python_path=
-               for i in $CPPFLAGS ; do
-                       p=`echo $i | sed "s,^-I,,"`
-                       p=`echo $p | sed "s,^-isystem,,"`
-                       if test -f "$p/python$cross_PYTHON_VERSION/Python.h"; then
-                               python_path="$p/python$cross_PYTHON_VERSION"
-                               break
-                       fi
-               done
-               AC_MSG_RESULT([$python_path])
-               if test -z "$python_path" ; then
-                                               AC_MSG_ERROR([cannot find Python include path])
-               fi
-               AC_SUBST([PYTHON_CPPFLAGS],[-I$python_path])
-
-               # Check for Python library path
-               AC_MSG_CHECKING([for Python library path])
-               python_path=
-               for i in $LDFLAGS; do
-                       l=`echo $i | sed "s,^-L,,"`
-                       python_path=`find $l -type f -name libpython$cross_PYTHON_VERSION.* -print | sed "1q"`
-                       if test -n "$python_path" ; then
-                               break
-                       fi
-               done
-               python_path=`echo $python_path | sed "s,/libpython.*$,,"`
-               AC_MSG_RESULT([$python_path])
-               if test -z "$python_path" ; then
-                                               AC_MSG_ERROR([cannot find Python library path])
-               fi
-               AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$cross_PYTHON_VERSION"])
-               #
-               python_site=`echo $python_path | sed "s/config/site-packages/"`
-               AC_SUBST([PYTHON_SITE_PKG],[$python_site])
-       else
-               AC_REQUIRE([AM_PATH_PYTHON])
-
-               # Check for Python include path
-               AC_MSG_CHECKING([for Python include path])
-               python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
-               for i in "$python_path/include/python$PYTHON_VERSION/" "$python_path/include/python/" "$python_path/" ; do
-                       python_path=`find $i -type f -name Python.h -print | sed "1q"`
-                       if test -n "$python_path" ; then
-                               break
-                       fi
-               done
-               python_path=`echo $python_path | sed "s,/Python.h$,,"`
-               AC_MSG_RESULT([$python_path])
-               if test -z "$python_path" ; then
-                       AC_MSG_ERROR([cannot find Python include path])
-               fi
-               AC_SUBST([PYTHON_CPPFLAGS],[-I$python_path])
-
-               # Check for Python library path
-               AC_MSG_CHECKING([for Python library path])
-               python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
-               for i in "$python_path/lib/python$PYTHON_VERSION/config/" "$python_path/lib/python$PYTHON_VERSION/" "$python_path/lib/python/config/" "$python_path/lib/python/" "$python_path/" ; do
-                       python_path=`find $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"`
-                       if test -n "$python_path" ; then
-                               break
-                       fi
-               done
-               python_path=`echo $python_path | sed "s,/libpython.*$,,"`
-               AC_MSG_RESULT([$python_path])
-               if test -z "$python_path" ; then
-                       AC_MSG_ERROR([cannot find Python library path])
-               fi
-               AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$PYTHON_VERSION"])
-               #
-               python_site=`echo $python_path | sed "s/config/site-packages/"`
-               AC_SUBST([PYTHON_SITE_PKG],[$python_site])
-       fi
-])
index 584a74e..68f4a17 100755 (executable)
@@ -1,60 +1,2 @@
 #!/bin/sh
-
-package="enigma2"
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-cd "$srcdir"
-DIE=0
-
-(autoconf --version) < /dev/null > /dev/null 2>&1 || {
-       echo
-       echo "You must have autoconf installed to compile $package."
-       echo "Download the appropriate package for your system,"
-       echo "or get the source from one of the GNU ftp sites"
-       echo "listed in http://www.gnu.org/order/ftp.html"
-       DIE=1
-}
-
-(automake --version) < /dev/null > /dev/null 2>&1 || {
-       echo
-       echo "You must have automake installed to compile $package."
-       echo "Download the appropriate package for your system,"
-       echo "or get the source from one of the GNU ftp sites"
-       echo "listed in http://www.gnu.org/order/ftp.html"
-       DIE=1
-}
-
-(libtool --version) < /dev/null > /dev/null 2>&1 || {
-       echo
-       echo "You must have libtool installed to compile $package."
-       echo "Download the appropriate package for your system,"
-       echo "or get the source from one of the GNU ftp sites"
-       echo "listed in http://www.gnu.org/order/ftp.html"
-       DIE=1
-}
-
-if test "$DIE" -eq 1; then
-       exit 1
-fi
-
-if [ ! -e acinclude.m4 ]; then
-       for i in .. ../.. ../../..; do
-               if [ -e `pwd`/$i/acinclude.m4 ]; then
-                       ln -s `pwd`/$i/acinclude.m4 .
-               fi
-       done
-fi
-
-echo "Generating configuration files for $package, please wait...."
-
-echo "  aclocal"
-aclocal
-echo "  libtoolize --automake"
-libtoolize --automake
-echo "  autoconf"
-autoconf
-echo "  automake --add-missing"
-automake --add-missing 
-
+autoreconf -i
diff --git a/config.h.in b/config.h.in
deleted file mode 100644 (file)
index 3564836..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* where to find the config files */
-#undef CONFIGDIR
-
-/* where to find data */
-#undef DATADIR
-
-/* Enable debug messages */
-#undef DEBUG
-
-/* Define to 1 if translation of program messages to the user's native
-   language is requested. */
-#undef ENABLE_NLS
-
-/* where to find the fonts */
-#undef FONTDIR
-
-/* where games data is stored */
-#undef GAMESDIR
-
-/* Define to 1 if you have the dvb includes */
-#undef HAVE_DVB
-
-/* Define to the version of the dvb api */
-#undef HAVE_DVB_API_VERSION
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the <linux/dvb/version.h> header file. */
-#undef HAVE_LINUX_DVB_VERSION_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the <ost/dmx.h> header file. */
-#undef HAVE_OST_DMX_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* where to find the internal libs */
-#undef LIBDIR
-
-/* where to find locales */
-#undef LOCALEDIR
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* where to find the plugins */
-#undef PLUGINDIR
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* where to find tuxbox data */
-#undef TUXBOXDATADIR
-
-/* Version number of package */
-#undef VERSION
-
-/* With SDL */
-#undef WITH_SDL
-
-/* where to find zoneinfo db */
-#undef ZONEINFODIR
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-#undef _FILE_OFFSET_BITS
-
-/* Enable GNU extensions on systems that have them.  */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
-
-/* Define for large files, on AIX-style hosts. */
-#undef _LARGE_FILES
old mode 100755 (executable)
new mode 100644 (file)
index 35fad77..48fea64
@@ -1,89 +1,99 @@
-AC_INIT(enigma2,2.4)
-AM_INIT_AUTOMAKE(enigma2,2.4)
+AC_INIT([enigma2],[2.8.0],[enigma2-devel@lists.elitedvb.net])
+AM_INIT_AUTOMAKE([dist-bzip2 no-define tar-pax -Wno-portability])
+AC_CONFIG_HEADERS([enigma2_config.h])
 
-TUXBOX_APPS
-TUXBOX_APPS_DIRECTORY
+# Silent rules are available since 1.11, but older versions
+# are still in use. So don't use them unconditionally.
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
 
 AC_PROG_CC
 AC_PROG_CXX
-AC_PROG_RANLIB
+m4_ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
+AC_CONFIG_MACRO_DIR([m4])
 
-AC_ARG_WITH(libsdl,
-       AC_HELP_STRING([--with-libsdl], [use sdl, yes or no]),
-       [[withsdl=$withval]],
-       [[withsdl=yes]]
-)
-
-AC_CHECK_HEADER(dreamdvd/ddvdlib.h,have_ddvdlib="yes",have_ddvdlib="no")
-if test x"${have_ddvdlib}" = xyes ; then
-       AC_DEFINE(HAVE_DDVDLIB, 1,[Define if ddvdlib is available])
-else
-       AC_MSG_NOTICE([ddvdlib not found... dont build dvd plugin])
+AC_CHECK_HEADERS([dbox/fp.h dbox/lcd-ks0713.h])
+
+AC_PATH_PROG(MSGFMT,[msgfmt])
+AC_PATH_PROG(MSGINIT,[msginit])
+AC_PATH_PROG(MSGMERGE,[msgmerge])
+AC_PATH_PROG(MSGUNIQ,[msguniq])
+AC_PATH_PROG(XGETTEXT,[xgettext])
+if test -z "$MSGFMT" -o -z "$MSGINIT" -o -z "$MSGMERGE" -o -z "$MSGUNIQ" -o -z "$XGETTEXT"; then
+       AC_MSG_ERROR([Could not find required gettext tools])
 fi
-AM_CONDITIONAL(HAVE_DDVDLIB, test "$have_ddvdlib" = "yes")
 
-AM_PATH_PYTHON()
-AC_PYTHON_DEVEL
-#AM_PATH_XINE(1.1.0,, AC_MSG_ERROR([*** Please install xine-lib (devel) first ***]))
+AM_PATH_PYTHON
+AX_PYTHON_DEVEL
+AX_PKG_SWIG
+AX_SWIG_ENABLE_CXX
+AX_SWIG_PYTHON
+AX_PTHREAD
 
 TUXBOX_APPS_DVB
 
-_TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(FREETYPE, freetype2, HAVE_FREETYPE2)
-if test "$HAVE_FREETYPE2" = "no" ; then
-       TUXBOX_APPS_LIB_CONFIG(FREETYPE, freetype-config)
+AM_CONDITIONAL(HAVE_GIT_DIR, test -d "$srcdir/.git")
+AM_CONDITIONAL(HAVE_FAKE_GIT_DIR, test -f "$srcdir/.git/last_commit_info")
+
+PKG_CHECK_MODULES(BASE, [freetype2 fribidi gstreamer-0.10 gstreamer-pbutils-0.10 libdvbsi++ libpng libxml-2.0 sigc++-1.2])
+PKG_CHECK_MODULES(LIBDDVD, libdreamdvd, HAVE_LIBDDVD="yes", HAVE_LIBDDVD="no")
+AM_CONDITIONAL(HAVE_LIBDDVD, test "$HAVE_LIBDDVD" = "yes")
+
+AC_CHECK_LIB([dl], [dlopen], [LIBDL_LIBS="-ldl"], [AC_MSG_ERROR([Could not find libdl])])
+AC_SUBST(LIBDL_LIBS)
+AC_CHECK_LIB([jpeg], [jpeg_set_defaults], [LIBJPEG_LIBS="-ljpeg"], [AC_MSG_ERROR([Could not find libjpeg])])
+AC_SUBST(LIBJPEG_LIBS)
+AC_CHECK_LIB([ungif], [DGifOpen], [LIBGIF_LIBS="-lungif"], [AC_CHECK_LIB([gif], [DGifOpen], [LIBGIF_LIBS="-lgif"], [AC_MSG_ERROR([Could not find libgif or libungif])])])
+AC_SUBST(LIBGIF_LIBS)
+
+AC_LANG_PUSH([C++])
+AC_CHECK_LIB([xmlccwrap], [exit], [LIBXMLCCWRAP_LIBS="-lxmlccwrap"], [AC_MSG_ERROR([Could not find libxmlccwrap])])
+AC_SUBST(LIBXMLCCWRAP_LIBS)
+AC_LANG_POP
+
+AC_ARG_WITH(libsdl,
+       AS_HELP_STRING([--with-libsdl],[use libsdl, yes or no]),
+       [with_libsdl=$withval],[with_libsdl=no])
+if test "$with_libsdl" = "yes"; then
+       PKG_CHECK_MODULES(LIBSDL, sdl)
 fi
-TUXBOX_APPS_LIB_PKGCONFIG(FRIBIDI,fribidi)
-TUXBOX_APPS_LIB_PKGCONFIG(ID3TAG,id3tag)
-TUXBOX_APPS_LIB_PKGCONFIG(MAD,mad)
-#TUXBOX_APPS_LIB_PKGCONFIG(PLUGINS,tuxbox-plugins)
-TUXBOX_APPS_LIB_PKGCONFIG(PNG,libpng)
-TUXBOX_APPS_LIB_PKGCONFIG(SIGC,sigc++-1.2)
-TUXBOX_APPS_LIB_PKGCONFIG(DVBSI,libdvbsi++)
-_TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(GSTREAMER,gstreamer,HAVE_GSTREAMER)
-_TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(GSTREAMERPBUTILS,gstreamer-pbutils,HAVE_GSTSTREAMERPBUTILS)
-_TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(LIBXINE,libxine,HAVE_LIBXINE)
-AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
-JPEG_LIBS="-ljpeg"
-AC_SUBST(JPEG_LIBS)
-
-AC_SUBST(LIBUNGIF_LIBS,"")
-AC_CHECK_HEADERS(gif_lib.h,
-       AC_CHECK_LIB(ungif,DGifOpen,
-       [AC_DEFINE(HAVE_LIBUNGIF,1,[Define if you have libgif/libungif including devel headers])
-               LIBUNGIF_LIBS="-lungif"],
-               [AC_CHECK_LIB(gif,DGifOpen,
-                       [AC_DEFINE(HAVE_LIUNBGIF,1)
-                       LIBUNGIF_LIBS="-lgif"])]))
-
-TUXBOX_APPS_LIB_PKGCONFIG(XML2,libxml-2.0)
-
-# ok, we are in trouble: XMLCCWRAP only defines C++ symbols. So let's just check if linking works,
-# and assume everything will be ok. Then just check for the "exit" symbol, which should be always there.
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-TUXBOX_APPS_LIB_SYMBOL(XMLCCWRAP, xmlccwrap, exit)
-AC_LANG_RESTORE
-
-if test "$withsdl" = "yes" ; then
-       _TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(SDL,sdl,WITH_SDL)
-       if test "$WITH_SDL" = "no" ; then
-               TUXBOX_APPS_LIB_CONFIG(SDL,sdl-config)
-               AC_DEFINE_UNQUOTED([WITH_SDL],[$withsdl],[With SDL])
-       fi
+AM_CONDITIONAL(HAVE_LIBSDL, test "$with_libsdl" = "yes")
+
+AC_ARG_WITH(libxine,
+       AS_HELP_STRING([--with-libxine],[use libxine, yes or no]),
+       [with_libxine=$withval],[with_libxine=no])
+if test "$with_libxine" = "yes"; then
+       PKG_CHECK_MODULES(LIBXINE, libxine)
+       AC_DEFINE([WITH_XINE],[1],[Define to 1 if you have libxine])
 fi
-# allow 'if WITH_SDL' conditionals in Makefile.am
-AM_CONDITIONAL(WITH_SDL, test "$WITH_SDL" = "yes")
+AM_CONDITIONAL(HAVE_LIBXINE, test "$with_libxine" = "yes")
 
-CPPFLAGS="$CPPFLAGS "'-I$(top_srcdir)'
-CPPFLAGS="$CPPFLAGS -D_REENTRANT $PYTHON_CPPFLAGS $MD5SUM_CFLAGS $FREETYPE_CFLAGS $FRIBIDI_CFLAGS $ID3TAG_CFLAGS $MAD_CFLAGS $PLUGINS_CFLAGS $PNG_CFLAGS $SDL_CFLAGS $SIGC_CFLAGS $XMLTREE_CFLAGS $DVBSI_CFLAGS $GSTREAMER_CFLAGS $GSTREAMERPBUTILS_CFLAGS $LIBXINE_CFLAGS $LIBUNGIF_CFLAGS"
-#CPPFLAGS="$CPPFLAGS -DMEMLEAK_CHECK"
-CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions -Wall"
-LDFLAGS="$LDFLAGS -pthread $PYTHON_LDFLAGS $SDL_LDFLAGS $GSTREAMER_LDFLAGS $GSTREAMERPBUTILS_LDFLAGS $LIBXINE_LDFLAGS $LIBUNGIF_LDFLAGS"
-#LDFLAGS="-rdynamic $LDFLAGS"
+AC_ARG_WITH(debug,
+       AS_HELP_STRING([--without-debug],[disable debugging code]),
+       [with_debug="$withval"],[with_debug="yes"])
+if test "$with_debug" = "yes"; then
+       DEBUG_CFLAGS="-ggdb3"
+       AC_DEFINE([DEBUG],[1],[Define to 1 to enable debugging code])
+fi
 
-TUXBOX_APPS_GETTEXT
+AC_ARG_WITH(memcheck,
+       AS_HELP_STRING([--with-memcheck],[enable memory leak checks]),
+       [with_memcheck="$withval"],[with_memcheck="no"])
+if test "$with_memcheck" = "yes"; then
+       AC_DEFINE([MEMLEAK_CHECK],[1],[Define to 1 to enable memory leak checks])
+fi
 
-AC_OUTPUT([
+AC_ARG_WITH(po,
+       AS_HELP_STRING([--without-po],[disable updating of po files]),
+       [with_po="$withval"],[with_po="yes"])
+AM_CONDITIONAL(UPDATE_PO, test "$with_po" = "yes")
+
+CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
+CXXFLAGS="$CXXFLAGS $BASE_CFLAGS $PTHREAD_CFLAGS $DEBUG_CFLAGS -fno-rtti -fno-exceptions -Wall"
+
+AC_CONFIG_FILES([
 Makefile
 data/Makefile
 data/fonts/Makefile
@@ -93,6 +103,7 @@ data/defaults/Dream/Makefile
 data/defaults/Dream/hdbouquets/Makefile
 data/defaults/Dream/sdbouquets/Makefile
 data/extensions/Makefile
+data/keymaps/Makefile
 data/skin_default/Makefile
 data/skin_default/menu/Makefile
 data/skin_default/icons/Makefile
@@ -102,6 +113,7 @@ include/Makefile
 lib/Makefile
 lib/actions/Makefile
 lib/base/Makefile
+lib/base/eenv.cpp
 lib/driver/Makefile
 lib/dvb/Makefile
 lib/dvb/lowlevel/Makefile
@@ -188,8 +200,7 @@ lib/components/Makefile
 po/Makefile
 main/Makefile
 tools/Makefile
+tools/enigma2.sh
 enigma2.pc
 ])
-
-#lib/python/Plugins/Extensions/SimpleRSS/Makefile
-#lib/python/Plugins/Extensions/FileManager/Makefile
+AC_OUTPUT
index 1ed9444..0eaa082 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = countries fonts defaults extensions skin_default
+SUBDIRS = countries fonts defaults extensions keymaps skin_default
 
 dist_pkgdata_DATA = \
        defaultsatlists.xml \
index f743b8c..2f7e7c7 100644 (file)
@@ -1,7 +1,8 @@
-installdir = $(FONTDIR)
+installdir = $(datadir)/fonts
 
 dist_install_DATA = \
        ae_AlMateen.ttf \
        lcd.ttf \
        md_khmurabi_10.ttf \
-       nmsbd.ttf
+       nmsbd.ttf \
+       tuxtxt.ttf
diff --git a/data/fonts/tuxtxt.ttf b/data/fonts/tuxtxt.ttf
new file mode 100644 (file)
index 0000000..9be6547
Binary files /dev/null and b/data/fonts/tuxtxt.ttf differ
diff --git a/data/keymaps/Makefile.am b/data/keymaps/Makefile.am
new file mode 100644 (file)
index 0000000..8499d99
--- /dev/null
@@ -0,0 +1,6 @@
+keymapsdir = $(datadir)/keymaps
+keymaps_DATA = \
+       dream-de.info \
+       dream-de.kmap \
+       eng.info \
+       eng.kmap
diff --git a/data/keymaps/dream-de.info b/data/keymaps/dream-de.info
new file mode 100644 (file)
index 0000000..d7f5b07
--- /dev/null
@@ -0,0 +1,2 @@
+kmap=dream-de.kmap
+name=Dreambox Keyboard Deutsch
diff --git a/data/keymaps/dream-de.kmap b/data/keymaps/dream-de.kmap
new file mode 100644 (file)
index 0000000..693317a
Binary files /dev/null and b/data/keymaps/dream-de.kmap differ
diff --git a/data/keymaps/eng.info b/data/keymaps/eng.info
new file mode 100644 (file)
index 0000000..d73372c
--- /dev/null
@@ -0,0 +1,2 @@
+kmap=eng.kmap
+name=Keyboard English
diff --git a/data/keymaps/eng.kmap b/data/keymaps/eng.kmap
new file mode 100644 (file)
index 0000000..15a722f
Binary files /dev/null and b/data/keymaps/eng.kmap differ
index dcd2e8b..376a4fd 100755 (executable)
@@ -29,6 +29,9 @@
                <color name="WindowTitleForeground" color="#ffffff" />
                <color name="WindowTitleBackground" color="#000000" />
        </windowstyle>
+       <fonts>
+               <font filename="nmsbd.ttf" name="Display" scale="90"/>
+       </fonts>
        <!-- Screwed Stone II skin (skin_default.xml) /Nemesis -->
        <!-- About screen -->
        <screen name="About" position="center,center" size="420,350" title="About">
@@ -1166,43 +1169,43 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
 
        <!-- LCD screen (channelselection) -->
        <screen name="ChannelSelection_summary" position="0,0" size="132,64" id="1">
-               <widget source="parent.ServiceEvent" render="Label" position="6,0" size="120,25" font="Regular;14" halign="center" valign="center" >
+               <widget source="parent.ServiceEvent" render="Label" position="6,0" size="120,25" font="Display;14" halign="center" valign="center" >
                        <convert type="ServiceName">Name</convert>
                </widget>
                <widget source="parent.ServiceEvent" render="Progress" position="16,27" size="100,5" borderWidth="1">
                        <convert type="EventTime">Progress</convert>
                </widget>
-               <widget source="global.CurrentTime" render="Label" position="6,32" size="90,32" font="Regular;32" halign="right" valign="top">
+               <widget source="global.CurrentTime" render="Label" position="6,32" size="90,32" font="Display;32" halign="right" valign="top">
                        <convert type="ClockToText">Format:%H:%M</convert>
                </widget>
-               <widget source="global.CurrentTime" render="Label" position="100,34" zPosition="1" size="26,30" font="Regular;16" valign="top">
+               <widget source="global.CurrentTime" render="Label" position="100,34" zPosition="1" size="26,30" font="Display;16" valign="top">
                        <convert type="ClockToText">Format:%S</convert>
                </widget>
        </screen> 
        <!-- Color OLED screen (ChannelSelection) -->
        <screen name="ChannelSelection_summary" position="0,0" size="96,64" id="2">
-               <widget source="parent.ServiceEvent" render="Label" position="0,0" size="96,28" font="Regular;16" halign="center" valign="center" >
+               <widget source="parent.ServiceEvent" render="Label" position="0,0" size="96,28" font="Display;16" halign="center" valign="center" >
                        <convert type="ServiceName">Name</convert>
                </widget>
                <widget source="session.Event_Now" render="Progress" position="0,30" size="96,8" borderWidth="1" backgroundColor="dark">
                        <convert type="EventTime">Progress</convert>
                </widget>
-               <widget source="global.CurrentTime" render="Label" position="0,38" size="96,26" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" >
+               <widget source="global.CurrentTime" render="Label" position="0,38" size="96,26" font="Display;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" >
                        <convert type="ClockToText">Format:%H:%M</convert>
                </widget>
        </screen>
        <!-- LCD screen (main) -->
        <screen name="InfoBarSummary" position="0,0" size="132,64" id="1">
-               <widget source="session.CurrentService" render="Label" position="6,0" size="120,25" font="Regular;14" halign="center" valign="center" >
+               <widget source="session.CurrentService" render="Label" position="6,0" size="120,25" font="Display;14" halign="center" valign="center" >
                        <convert type="ServiceName">Name</convert>
                </widget>
                <widget source="session.Event_Now" render="Progress" position="16,27" size="100,5" borderWidth="1">
                        <convert type="EventTime">Progress</convert>
                </widget>
-               <widget source="global.CurrentTime" render="Label" position="6,32" size="90,32" font="Regular;32" halign="right" valign="top">
+               <widget source="global.CurrentTime" render="Label" position="6,32" size="90,32" font="Display;32" halign="right" valign="top">
                        <convert type="ClockToText">Format:%H:%M</convert>
                </widget>
-               <widget source="global.CurrentTime" render="Label" position="100,34" zPosition="1" size="26,30" font="Regular;16" valign="top">
+               <widget source="global.CurrentTime" render="Label" position="100,34" zPosition="1" size="26,30" font="Display;16" valign="top">
                        <convert type="ClockToText">Format:%S</convert>
                </widget>
                <widget source="session.RecordState" render="FixedLabel" text=" " position="6,32" zPosition="1" size="126,32">
@@ -1212,13 +1215,13 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
        </screen>
        <!-- Color OLED screen (main) -->
        <screen name="InfoBarSummary" position="0,0" size="96,64" id="2">
-               <widget source="session.CurrentService" render="Label" position="0,0" size="96,28" font="Regular;16" halign="center" valign="center" >
+               <widget source="session.CurrentService" render="Label" position="0,0" size="96,28" font="Display;16" halign="center" valign="center" >
                        <convert type="ServiceName">Name</convert>
                </widget>
                <widget source="session.Event_Now" render="Progress" position="0,30" size="96,8" borderWidth="1" backgroundColor="dark">
                        <convert type="EventTime">Progress</convert>
                </widget>
-               <widget source="global.CurrentTime" render="Label" position="0,38" size="96,26" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" >
+               <widget source="global.CurrentTime" render="Label" position="0,38" size="96,26" font="Display;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" >
                        <convert type="ClockToText">Format:%H:%M</convert>
                </widget>
                <widget source="session.RecordState" render="FixedLabel" text=" " position="0,38" zPosition="1" size="96,26">
@@ -1228,13 +1231,13 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
        </screen>
        <!-- LCD screen (movieplayer) -->
        <screen name="InfoBarMoviePlayerSummary" position="0,0" size="132,64" id="1">
-               <widget source="session.CurrentService" render="Label" position="6,0" size="120,25" font="Regular;14" halign="center" valign="center" >
+               <widget source="session.CurrentService" render="Label" position="6,0" size="120,25" font="Display;14" halign="center" valign="center" >
                        <convert type="ServiceName">Name</convert>
                </widget>
                <widget source="session.CurrentService" render="Progress" position="16,27" size="100,5" borderWidth="1">
                        <convert type="ServicePosition">Position</convert>
                </widget>
-               <widget source="global.CurrentTime" render="Label" position="6,32" size="120,32" font="Regular;32" halign="center" valign="center">
+               <widget source="global.CurrentTime" render="Label" position="6,32" size="120,32" font="Display;32" halign="center" valign="center">
                        <convert type="ClockToText">Format:%H:%M</convert>
                </widget>
                <widget source="session.RecordState" render="FixedLabel" text=" " position="6,32" zPosition="1" size="120,32">
@@ -1244,13 +1247,13 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
        </screen>
        <!-- Color OLED screen (movieplayer) -->
        <screen name="InfoBarMoviePlayerSummary" position="0,0" size="96,64" id="2">
-               <widget source="session.CurrentService" render="Label" position="0,0" size="96,28" font="Regular;16" halign="center" valign="center" >
+               <widget source="session.CurrentService" render="Label" position="0,0" size="96,28" font="Display;16" halign="center" valign="center" >
                        <convert type="ServiceName">Name</convert>
                </widget>
                <widget source="session.Event_Now" render="Progress" position="0,30" size="96,8" borderWidth="1" backgroundColor="dark">
                        <convert type="EventTime">Progress</convert>
                </widget>
-               <widget source="global.CurrentTime" render="Label" position="0,38" size="96,26" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" >
+               <widget source="global.CurrentTime" render="Label" position="0,38" size="96,26" font="Display;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" >
                        <convert type="ClockToText">Format:%H:%M</convert>
                </widget>
                <widget source="session.RecordState" render="FixedLabel" text=" " position="0,38" zPosition="1" size="96,26">
@@ -1260,71 +1263,71 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
        </screen>
        <!-- LCD screen (ChoiceBox) -->
        <screen name="ChoiceBox_summary" position="0,0" size="132,64" id="1">
-               <widget source="parent.summary_list" render="Label" position="6,0" size="126,64" font="Regular;11" />
+               <widget source="parent.summary_list" render="Label" position="6,0" size="126,64" font="Display;11" />
        </screen>
        <!-- Color OLED screen (ChoiceBox) -->
        <screen name="ChoiceBox_summary" position="0,0" size="96,64" id="2">
-               <widget source="parent.summary_list" render="Label" position="0,0" size="96,64" font="Regular;10" />
+               <widget source="parent.summary_list" render="Label" position="0,0" size="96,64" font="Display;10" />
        </screen>       
        <!-- LCD screen (MessageBox) -->
        <screen name="MessageBox_summary" position="0,0" size="132,64" id="1">
-               <widget source="parent.Text" render="Label" position="0,0" size="132,52" font="Regular;11" halign="center" valign="center" />
-               <widget source="parent.selectedChoice" render="Label" position="6,50" size="120,14" font="Regular;14" halign="center" valign="center" />
+               <widget source="parent.Text" render="Label" position="0,0" size="132,52" font="Display;11" halign="center" valign="center" />
+               <widget source="parent.selectedChoice" render="Label" position="6,50" size="120,14" font="Display;14" halign="center" valign="center" />
        </screen>
        <!-- Color OLED screen (MessageBox) -->
        <screen name="MessageBox_summary" position="0,0" size="96,64" id="2">
-               <widget source="parent.Text" render="Label" position="0,0" size="96,52" font="Regular;10" halign="center" valign="center" />
-               <widget source="parent.selectedChoice" render="Label" position="0,50" size="96,14" font="Regular;12" halign="center" valign="center" />
+               <widget source="parent.Text" render="Label" position="0,0" size="96,52" font="Display;10" halign="center" valign="center" />
+               <widget source="parent.selectedChoice" render="Label" position="0,50" size="96,14" font="Display;12" halign="center" valign="center" />
        </screen>
        <!-- LCD screen (menus) -->
        <screen name="MenuSummary" position="0,0" size="132,64" id="1">
-               <widget source="parent.title" render="Label" position="6,0" size="120,32" font="Regular;14" halign="center" valign="center"/>
-               <widget source="parent.menu" render="Label" position="6,32" size="120,32" font="Regular;16" halign="center" valign="center">
+               <widget source="parent.title" render="Label" position="6,0" size="120,32" font="Display;14" halign="center" valign="center"/>
+               <widget source="parent.menu" render="Label" position="6,32" size="120,32" font="Display;16" halign="center" valign="center">
                        <convert type="StringListSelection" />
                </widget>
        </screen> 
        <!-- Color OLED screen (menus) -->
        <screen name="MenuSummary" position="0,0" size="96,64" id="2">
-               <widget source="parent.title" render="Label" position="0,0" size="96,32" font="Regular;15" halign="center" valign="center"/>
-               <widget source="parent.menu" render="Label" position="0,32" size="96,32" font="Regular;16" halign="center" valign="top">
+               <widget source="parent.title" render="Label" position="0,0" size="96,32" font="Display;15" halign="center" valign="center"/>
+               <widget source="parent.menu" render="Label" position="0,32" size="96,32" font="Display;16" halign="center" valign="top">
                        <convert type="StringListSelection" />
                </widget>
        </screen>       
        <!-- LCD screen (ServiceScan) -->
        <screen name="ServiceScanSummary" position="0,0" size="132,64" id="1">
-               <widget name="Title" position="6,4" size="120,42" font="Regular;16" transparent="1" />
-               <widget name="Service" position="6,22" size="120,26" font="Regular;12" transparent="1" />
+               <widget name="Title" position="6,4" size="120,42" font="Display;16" transparent="1" />
+               <widget name="Service" position="6,22" size="120,26" font="Display;12" transparent="1" />
                <widget name="scan_progress" position="6,50" zPosition="1" borderWidth="1" size="56,12" backgroundColor="dark" />
        </screen>
        <!-- Color OLED screen (ServiceScan) -->
        <screen name="ServiceScanSummary" position="0,0" size="96,64" id="2">
-               <widget name="Title" position="0,0" size="96,30" font="Regular;14" transparent="1" />
-               <widget name="Service" position="0,30" size="96,20" font="Regular;10" transparent="1" />
+               <widget name="Title" position="0,0" size="96,30" font="Display;14" transparent="1" />
+               <widget name="Service" position="0,30" size="96,20" font="Display;10" transparent="1" />
                <widget name="scan_progress" position="0,50" zPosition="1" borderWidth="1" size="96,12" backgroundColor="dark" />
        </screen>
        <!-- LCD screen (setup) -->
        <screen name="SetupSummary" position="0,0" size="132,64" id="1">
-               <widget source="SetupTitle" render="Label" position="6,0" size="120,16" font="Regular;12" />
-               <widget source="SetupEntry" render="Label" position="6,16" size="120,32" font="Regular;12" />
-               <widget source="SetupValue" render="Label" position="6,48" size="120,16" font="Regular;12" />
+               <widget source="SetupTitle" render="Label" position="6,0" size="120,16" font="Display;12" />
+               <widget source="SetupEntry" render="Label" position="6,16" size="120,32" font="Display;12" />
+               <widget source="SetupValue" render="Label" position="6,48" size="120,16" font="Display;12" />
        </screen>
        <!-- Color OLED screen (setup) -->
        <screen name="SetupSummary" position="0,0" size="96,64" id="2">
-               <widget source="SetupTitle" render="Label" position="0,0" size="96,16" font="Regular;10" />
-               <widget source="SetupEntry" render="Label" position="0,16" size="96,32" font="Regular;10" />
-               <widget source="SetupValue" render="Label" position="0,48" size="96,16" font="Regular;10" />
+               <widget source="SetupTitle" render="Label" position="0,0" size="96,16" font="Display;10" />
+               <widget source="SetupEntry" render="Label" position="0,16" size="96,32" font="Display;10" />
+               <widget source="SetupValue" render="Label" position="0,48" size="96,16" font="Display;10" />
        </screen>
        <!-- LCD screen (misc) -->
        <screen name="SimpleSummary" position="0,0" size="132,64" id="1">
-               <widget source="parent.Title" render="Label" position="6,0" size="120,64" font="Regular;16" halign="center" valign="center" />
+               <widget source="parent.Title" render="Label" position="6,0" size="120,64" font="Display;16" halign="center" valign="center" />
        </screen>
        <!-- Color OLED screen (misc) -->
        <screen name="SimpleSummary" position="0,0" size="96,64" id="2">
-               <widget source="parent.Title" render="Label" position="0,0" size="96,64" font="Regular;14" halign="center" valign="center" />
+               <widget source="parent.Title" render="Label" position="0,0" size="96,64" font="Display;14" halign="center" valign="center" />
        </screen>
        <!-- LCD screen (standby) -->
        <screen name="StandbySummary" position="0,0" size="132,64" id="1">
-               <widget source="global.CurrentTime" render="Label" position="6,0" size="120,64" font="Regular;40" halign="center" valign="center">
+               <widget source="global.CurrentTime" render="Label" position="6,0" size="120,64" font="Display;40" halign="center" valign="center">
                        <convert type="ClockToText">Format:%H:%M</convert>
                </widget>
                <widget source="session.RecordState" render="FixedLabel" position="6,0" zPosition="1" size="120,64" text=" ">
@@ -1334,7 +1337,7 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
        </screen>
        <!-- Color OLED screen (standby) -->
        <screen name="StandbySummary" position="0,0" size="96,64" id="2">
-               <widget source="global.CurrentTime" render="Label" position="0,0" size="96,64" font="Regular;38" halign="center" valign="center">
+               <widget source="global.CurrentTime" render="Label" position="0,0" size="96,64" font="Display;38" halign="center" valign="center">
                        <convert type="ClockToText">Format:%H:%M</convert>
                </widget>
                <widget source="session.RecordState" render="FixedLabel" position="0,0" zPosition="1" size="96,64" text=" ">
@@ -1344,33 +1347,33 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
        </screen>
        <!-- LCD screen (JobView) -->
        <screen name="JobView_summary" position="0,0" size="132,64" id="1">
-               <widget source="parent.summary_job_name" render="Label" position="6,4" size="120,42" font="Regular;16" />
-               <widget source="parent.summary_job_task" render="Label" position="6,22" size="120,26" font="Regular;12" />
+               <widget source="parent.summary_job_name" render="Label" position="6,4" size="120,42" font="Display;16" />
+               <widget source="parent.summary_job_task" render="Label" position="6,22" size="120,26" font="Display;12" />
                <widget source="parent.summary_job_progress" render="Progress" position="6,50" size="60,12" borderWidth="1" zPosition="1" />
-               <widget source="parent.summary_job_progress" render="Label" position="66,50" size="50,12" font="Regular;12" zPosition="2" halign="center" transparent="1"  >
+               <widget source="parent.summary_job_progress" render="Label" position="66,50" size="50,12" font="Display;12" zPosition="2" halign="center" transparent="1"  >
                        <convert type="ProgressToText" />
                </widget>
        </screen>
        <!-- Color OLED screen (JobView) -->
        <screen name="JobView_summary" position="0,0" size="96,64" id="2">
-               <widget source="parent.summary_job_name" render="Label" position="0,4" size="96,42" font="Regular;14" />
-               <widget source="parent.summary_job_task" render="Label" position="0,22" size="96,26" font="Regular;10" />
+               <widget source="parent.summary_job_name" render="Label" position="0,4" size="96,42" font="Display;14" />
+               <widget source="parent.summary_job_task" render="Label" position="0,22" size="96,26" font="Display;10" />
                <widget source="parent.summary_job_progress" render="Progress" position="0,50" size="60,12" borderWidth="1" zPosition="1" />
-               <widget source="parent.summary_job_progress" render="Label" position="60,50" size="36,12" font="Regular;10" zPosition="2" halign="center" transparent="1"  >
+               <widget source="parent.summary_job_progress" render="Label" position="60,50" size="36,12" font="Display;10" zPosition="2" halign="center" transparent="1"  >
                        <convert type="ProgressToText" />
                </widget>
        </screen>
        <!-- LCD screen (Wizard) -->
        <screen name="WizardSummary" position="0,0" size="132,64" id="1">
-               <widget source="text" render="Label" position="6,0" size="120,16" font="Regular;16" transparent="1" />
-               <widget source="parent.list" render="Label" position="6,18" size="120,46" font="Regular;12">
+               <widget source="text" render="Label" position="6,0" size="120,16" font="Display;16" transparent="1" />
+               <widget source="parent.list" render="Label" position="6,18" size="120,46" font="Display;12">
                        <convert type="StringListSelection" />
                </widget>
        </screen>
        <!-- Color OLED screen (Wizard) -->
        <screen name="WizardSummary" position="0,0" size="96,64" id="2">
-               <widget source="text" render="Label" position="0,0" size="96,16" font="Regular;14" transparent="1" />
-               <widget source="parent.list" render="Label" position="0,18" size="96,46" font="Regular;12">
+               <widget source="text" render="Label" position="0,0" size="96,16" font="Display;14" transparent="1" />
+               <widget source="parent.list" render="Label" position="0,18" size="96,46" font="Display;12">
                        <convert type="StringListSelection" />
                </widget>
        </screen>
index b453aa7..7a709b0 100755 (executable)
@@ -45,10 +45,10 @@ dist_install_DATA = \
        mp_buttons.png \
        network_wired.png \
        network_wired-active.png \
-       network_wired-inactive.png \    
+       network_wired-inactive.png \
        network_wireless.png \
        network_wireless-active.png \
-       network_wireless-inactive.png \ 
+       network_wireless-inactive.png \
        plugin.png \
        rass_logo.png \
        rass_page1.png \
diff --git a/debug b/debug
deleted file mode 100755 (executable)
index d247b3e..0000000
--- a/debug
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-/home/dump/tmb/oe-mono/build/tmp/work/gdb-cross-6.3-r0/install/gdb-cross/usr/local/mipsel/oe/bin/mipsel-linux-gdb main/enigma2 -x debug.gdb
-
diff --git a/debug.gdb b/debug.gdb
deleted file mode 100644 (file)
index 69cf5d0..0000000
--- a/debug.gdb
+++ /dev/null
@@ -1,3 +0,0 @@
-set solib-absolute-prefix /home/tmbinc/mips/target
-target remote 10.0.0.203:1234
-continue
diff --git a/enigma2.bb b/enigma2.bb
new file mode 100644 (file)
index 0000000..2da423c
--- /dev/null
@@ -0,0 +1,75 @@
+DESCRIPTION = "Enigma2 is an experimental, but useful framebuffer-based frontend for DVB functions"
+DESCRIPTION_append_enigma2-plugin-extensions-cutlisteditor = "enables you to cut your movies."
+DESCRIPTION_append_enigma2-plugin-extensions-graphmultiepg = "shows a graphical timeline EPG."
+DESCRIPTION_append_enigma2-plugin-extensions-pictureplayer = "displays photos on the TV."
+DESCRIPTION_append_enigma2-plugin-systemplugins-frontprocessorupdate = "keeps your frontprocessor up to date."
+DESCRIPTION_append_enigma2-plugin-systemplugins-positionersetup = "helps you installing a motorized dish."
+DESCRIPTION_append_enigma2-plugin-systemplugins-satelliteequipmentcontrol = "allows you to fine-tune DiSEqC-settings."
+DESCRIPTION_append_enigma2-plugin-systemplugins-satfinder = "helps you to align your dish."
+DESCRIPTION_append_enigma2-plugin-systemplugins-skinselector = "shows a menu with selectable skins."
+DESCRIPTION_append_enigma2-plugin-systemplugins-videomode = "selects advanced video modes"
+DESCRIPTION_append_enigma2-plugin-systemplugins-crashlogautosubmit = "automatically send crashlogs to Dream Multimedia"
+DESCRIPTION_append_enigma2-plugin-systemplugins-cleanupwizard = "informs you on low internal memory on system startup."
+DESCRIPTION_append_enigma2-plugin-extenstions-modem = "opens a menu to connect to internet via builtin modem."
+DESCRIPTION_append_enigma2-plugin-systemplugins-wirelesslan = "helps you configuring your wireless lan"
+DESCRIPTION_append_enigma2-plugin-systemplugins-networkwizard = "provides easy step by step network configuration"
+
+DEPENDS = "jpeg libungif libpng libsigc++-1.2 gettext-native \
+        dreambox-dvbincludes freetype libdvbsi++ python swig-native \
+        libfribidi libxmlccwrap libdreamdvd gstreamer gst-plugin-dvbmediasink \
+        gst-plugins-bad gst-plugins-good gst-plugins-ugly python-wifi"
+
+RDEPENDS = "python-codecs python-core python-lang python-re python-threading \
+        python-xml python-fcntl gst-plugin-decodebin gst-plugin-decodebin2 python-stringold \
+        python-pickle gst-plugin-app \
+        gst-plugin-id3demux gst-plugin-mad gst-plugin-ogg gst-plugin-playbin \
+        gst-plugin-typefindfunctions gst-plugin-audioconvert gst-plugin-audioresample \
+        gst-plugin-wavparse python-netclient gst-plugin-mpegstream gst-plugin-selector \
+        gst-plugin-flac gst-plugin-dvbmediasink gst-plugin-mpegdemux \
+        gst-plugin-souphttpsrc gst-plugin-mpegaudioparse gst-plugin-subparse \
+        gst-plugin-apetag gst-plugin-icydemux gst-plugin-autodetect \
+        glibc-gconv-iso8859-15 ethtool"
+
+GST_ALSA_RDEPENDS = "gst-plugin-alsa alsa-conf"
+GST_DVD_RDEPENDS = "gst-plugin-cdxaparse gst-plugin-cdio gst-plugin-vcdsrc"
+GST_MISC_RDEPENDS = "gst-plugin-matroska gst-plugin-qtdemux gst-plugin-vorbis gst-plugin-audioparsersbad"
+GST_RTSP_RDEPENDS = "gst-plugin-udp gst-plugin-rtsp gst-plugin-rtp gst-plugin-rtpmanager"
+GST_BASE_RDEPENDS = "${GST_ALSA_RDEPENDS} ${GST_MISC_RDEPENDS} ${GST_RTSP_RDEPENDS}"
+
+RDEPENDS_append_dm800 = " ${GST_BASE_RDEPENDS} gst-plugin-ivorbisdec"
+RDEPENDS_append_dm8000 = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
+RDEPENDS_append_dm500hd = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
+RDEPENDS_append_dm800se = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
+
+RDEPENDS_enigma2-plugin-extensions-cutlisteditor = "aio-grab"
+RDEPENDS_enigma2-plugin-extensions-dvdplayer = "libdreamdvd0"
+RDEPENDS_enigma2-plugin-systemplugins-nfiflash = "python-twisted-web"
+RDEPENDS_enigma2-plugin-systemplugins-softwaremanager = "python-twisted-web"
+RDEPENDS_enigma2-plugin-systemplugins-crashlogautosubmit = "twisted-mail twisted-names python-compression python-mime python-email"
+RDEPENDS_enigma2-plugin-extensions-modem = "dreambox-modem-ppp-scripts ppp"
+RDEPENDS_enigma2-plugin-systemplugins-wirelesslan = "wpa-supplicant wireless-tools python-wifi"
+
+RCONFLICTS_enigma2-plugin-systemplugins-softwaremanager = "enigma2-plugin-systemplugins-configurationbackup enigma2-plugin-systemplugins-softwareupdate"
+RREPLACES_enigma2-plugin-systemplugins-softwaremanager = "enigma2-plugin-systemplugins-configurationbackup enigma2-plugin-systemplugins-softwareupdate"
+
+PV = "${GITVER}"
+
+inherit srctree autotools gitver pkgconfig
+
+EXTRA_OECONF = " \
+        BUILD_SYS=${BUILD_SYS} \
+        HOST_SYS=${HOST_SYS} \
+        STAGING_INCDIR=${STAGING_INCDIR} \
+        STAGING_LIBDIR=${STAGING_LIBDIR} \
+"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+PACKAGES += "${PN}-meta"
+
+FILES_${PN} += "${datadir}/fonts"
+FILES_${PN}-meta = "${datadir}/meta"
+
+python populate_packages_prepend () {
+        enigma2_plugindir = bb.data.expand('${libdir}/enigma2/python/Plugins', d)
+        do_split_packages(d, enigma2_plugindir, '(.*?/.*?)/.*', 'enigma2-plugin-%s', '%s ', recursive=True, match_path=True, prepend=True)
+}
index d0c682f..ada16ca 100644 (file)
@@ -1,3 +1,3 @@
-EXTRA_DIST = \
+pkginclude_HEADERS = \
        connection.h \
        libsig_comp.h
diff --git a/lib/actions/.gitignore b/lib/actions/.gitignore
new file mode 100644 (file)
index 0000000..460e43d
--- /dev/null
@@ -0,0 +1 @@
+actionids.h
index 8da583f..eb8327d 100644 (file)
@@ -1,15 +1,27 @@
-INCLUDES = \
-       -I$(top_srcdir)/include
+AM_CPPFLAGS = \
+       -I$(top_builddir) \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
+
+EXTRA_DIST = parseactions.py
 
 noinst_LIBRARIES = libenigma_actions.a
 
 libenigma_actions_a_SOURCES = \
-       action.cpp 
+       action.cpp
 
-CLEANFILES = actionids.h
+actionsincludedir = $(pkgincludedir)/lib/actions
+actionsinclude_HEADERS = \
+       action.h
 
-action.cpp: actionids.h
+nodist_actionsinclude_HEADERS = \
+       actionids.h
+
+BUILT_SOURCES = actionids.h
+CLEANFILES = actionids.h
 
-actionids.h:
-        python ./parseactions.py include ../gui/*.h > actionids.h
-        python ./parseactions.py parse ../gui/*.h >> actionids.h
+actionids.h: $(srcdir)/parseactions.py $(top_srcdir)/lib/gui/*.h
+       $(AM_V_GEN)$(PYTHON) $(srcdir)/parseactions.py include $(top_srcdir)/lib/gui/*.h > $@
+       $(AM_V_at)$(PYTHON) $(srcdir)/parseactions.py parse $(top_srcdir)/lib/gui/*.h >> $@
index cbf5370..edcfac6 100644 (file)
@@ -3,10 +3,6 @@
 
 #include <lib/base/object.h>
 
-               /* avoid warnigs :) */
-#include <features.h>
-#undef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 200112L
 #include <lib/python/python.h>
 #include <string>
 #include <map>
index 2462a75..cad432a 100644 (file)
@@ -89,7 +89,7 @@ def do_file(f, mode):
 
                                                if mode == "include":
                                                        # hack hack hack!!
-                                                       print "#include <lib" + f[2:] + ">"
+                                                       print "#include <lib/" + '/'.join(f.split('/')[-2:]) + ">"
                                                else:
                                                        print "\t// " + f
 
diff --git a/lib/base/.gitignore b/lib/base/.gitignore
new file mode 100644 (file)
index 0000000..aa9ae18
--- /dev/null
@@ -0,0 +1 @@
+eenv.cpp
index 0508563..d76dfc9 100644 (file)
@@ -1,12 +1,56 @@
-INCLUDES = \
-       -I$(top_srcdir)/include
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LIBRARIES = libenigma_base.a
 
 libenigma_base_a_SOURCES = \
-       buffer.cpp ebase.cpp eerror.cpp elock.cpp \
-       init.cpp message.cpp thread.cpp \
-       smartptr.cpp estring.cpp connection.cpp \
-       filepush.cpp encoding.cpp console.cpp rawfile.cpp \
-       nconfig.cpp ioprio.cpp etpm.cpp
+       buffer.cpp \
+       connection.cpp \
+       console.cpp \
+       ebase.cpp \
+       eenv.cpp \
+       eerror.cpp \
+       elock.cpp \
+       encoding.cpp \
+       estring.cpp \
+       etpm.cpp \
+       filepush.cpp \
+       init.cpp \
+       ioprio.cpp \
+       message.cpp \
+       nconfig.cpp \
+       rawfile.cpp \
+       smartptr.cpp \
+       thread.cpp
 
+EXTRA_DIST = \
+       eenv.cpp.in
+
+baseincludedir = $(pkgincludedir)/lib/base
+baseinclude_HEADERS = \
+       buffer.h \
+       console.h \
+       ebase.h \
+       eenv.h \
+       eerror.h \
+       elock.h \
+       encoding.h \
+       eptrlist.h \
+       estring.h \
+       etpm.h \
+       filepush.h \
+       i18n.h \
+       itssource.h \
+       init.h \
+       init_num.h \
+       ioprio.h \
+       message.h \
+       nconfig.h \
+       object.h \
+       rawfile.h \
+       ringbuffer.h \
+       smartptr.h \
+       thread.h
index e730b40..60540da 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef __LIB_BASE_CONSOLE_H__
 #define __LIB_BASE_CONSOLE_H__
 
-#include "Python.h"
 #include <string>
 #include <lib/base/ebase.h>
 #include <lib/python/connections.h>
diff --git a/lib/base/eenv.cpp.in b/lib/base/eenv.cpp.in
new file mode 100644 (file)
index 0000000..52c4214
--- /dev/null
@@ -0,0 +1,117 @@
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <wordexp.h>
+#include <lib/base/eenv.h>
+#include <lib/base/eerror.h>
+
+bool eEnv::initialized = false;
+
+void eEnv::initialize()
+{
+       static const struct {
+               std::string name;
+               std::string value;
+       } cfgenv[] = {
+               { "prefix", "@prefix@" },
+               { "exec_prefix", "@exec_prefix@" },
+               { "bindir", "@bindir@" },
+               { "sbindir", "@sbindir@" },
+               { "libexecdir", "@libexecdir@" },
+               { "datarootdir", "@datarootdir@" },
+               { "datadir", "@datadir@" },
+               { "sysconfdir", "@sysconfdir@" },
+               { "sharedstatedir", "@sharedstatedir@" },
+               { "localstatedir", "@localstatedir@" },
+               { "libdir", "@libdir@" },
+               { "localedir", "@localedir@" },
+       };
+       size_t i;
+
+       // 1st pass, as generated by configure.
+       // Variables set by the user will not be overwritten.
+       for (i = 0; i < (sizeof(cfgenv) / sizeof(*cfgenv)); i++) {
+               eDebug("setenv('%s', '%s', 0)", cfgenv[i].name.c_str(), cfgenv[i].value.c_str());
+               setenv(cfgenv[i].name.c_str(), cfgenv[i].value.c_str(), 0);
+       }
+
+       // 2nd pass: Resolve directories.
+       for (i = 0; i < (sizeof(cfgenv) / sizeof(*cfgenv)); i++) {
+               std::string dest;
+               eEnv::resolveVar(dest, "${" + cfgenv[i].name + "}");
+               eDebug("setenv('%s', '%s', 1)", cfgenv[i].name.c_str(), dest.c_str());
+               setenv(cfgenv[i].name.c_str(), dest.c_str(), 1);
+       }
+}
+
+int eEnv::resolveVar(std::string &dest, const char *src)
+{
+       size_t i = 0;
+       int ret;
+       wordexp_t p;
+
+       ret = wordexp(src, &p, WRDE_NOCMD | WRDE_UNDEF);
+       if (ret != 0) {
+               switch (ret) {
+               case WRDE_BADCHAR:
+                       eDebug("%s: bad character", __func__);
+                       break;
+               case WRDE_BADVAL:
+                       eDebug("%s: bad value", __func__);
+                       break;
+               case WRDE_CMDSUB:
+                       eDebug("%s: invalid command substitution", __func__);
+                       break;
+               case WRDE_NOSPACE:
+                       eDebug("%s: out of memory", __func__);
+                       break;
+               case WRDE_SYNTAX:
+                       eDebug("%s: syntax error", __func__);
+                       break;
+               default:
+                       eDebug("%s: unknown error", __func__);
+                       break;
+               }
+
+               return -1;
+       }
+
+       while (i < p.we_wordc) {
+               if (strchr(p.we_wordv[i], '$')) {
+                       ret = eEnv::resolveVar(dest, p.we_wordv[i]);
+                       if (ret < 0)
+                               break;
+               } else {
+                       dest.append(p.we_wordv[i]);
+               }
+
+               if (++i < p.we_wordc)
+                       dest.append(" ");
+       }
+
+       wordfree(&p);
+       return ret;
+}
+
+int eEnv::resolveVar(std::string &dest, const std::string &src)
+{
+       return eEnv::resolveVar(dest, src.c_str());
+}
+
+std::string eEnv::resolve(const std::string &src)
+{
+       std::string dest;
+
+       if (!initialized) {
+               eEnv::initialize();
+               initialized = true;
+       }
+
+       eDebug("%s: resolve %s", __func__, src.c_str());
+
+       eEnv::resolveVar(dest, src);
+
+       eDebug("%s: -> %s", __func__, dest.c_str());
+
+       return dest;
+}
diff --git a/lib/base/eenv.h b/lib/base/eenv.h
new file mode 100644 (file)
index 0000000..3d149f5
--- /dev/null
@@ -0,0 +1,16 @@
+#ifndef __lib_base_paths_h
+#define __lib_base_paths_h
+
+#include <string>
+
+class eEnv {
+private:
+       static bool initialized;
+       static void initialize();
+       static int resolveVar(std::string &dest, const char *src);
+       static int resolveVar(std::string &dest, const std::string &src);
+public:
+       static std::string resolve(const std::string &path);
+};
+
+#endif
index 8b4b592..361acce 100644 (file)
@@ -2,6 +2,7 @@
 #include <cstdlib>
 #include <lib/base/encoding.h>
 #include <lib/base/eerror.h>
+#include <lib/base/eenv.h>
 
 eDVBTextEncodingHandler encodingHandler;  // the one and only instance
 
@@ -17,8 +18,8 @@ inline char toupper(char c)
 
 eDVBTextEncodingHandler::eDVBTextEncodingHandler()
 {
-       const char * file=DATADIR "/enigma2/encoding.conf";
-       FILE *f = fopen(file, "rt");
+       std::string file = eEnv::resolve("${datadir}/enigma2/encoding.conf");
+       FILE *f = fopen(file.c_str(), "rt");
        if (f)
        {
                char *line = (char*) malloc(256);
@@ -61,7 +62,7 @@ eDVBTextEncodingHandler::eDVBTextEncodingHandler()
                free(line);
        }
        else
-               eDebug("[eDVBTextEncodingHandler] couldn't open %s !", file);
+               eDebug("[eDVBTextEncodingHandler] couldn't open %s !", file.c_str());
 }
 
 void eDVBTextEncodingHandler::getTransponderDefaultMapping(int tsidonid, int &table)
index af5a8bb..e3e2a13 100644 (file)
@@ -227,7 +227,7 @@ void eFilePushThread::thread()
 void eFilePushThread::start(int fd, int fd_dest)
 {
        eRawFile *f = new eRawFile();
-       ePtr<iDataSource> source = f;
+       ePtr<iTsSource> source = f;
        f->setfd(fd);
        start(source, fd_dest);
 }
@@ -235,14 +235,14 @@ void eFilePushThread::start(int fd, int fd_dest)
 int eFilePushThread::start(const char *file, int fd_dest)
 {
        eRawFile *f = new eRawFile();
-       ePtr<iDataSource> source = f;
+       ePtr<iTsSource> source = f;
        if (f->open(file) < 0)
                return -1;
        start(source, fd_dest);
        return 0;
 }
 
-void eFilePushThread::start(ePtr<iDataSource> &source, int fd_dest)
+void eFilePushThread::start(ePtr<iTsSource> &source, int fd_dest)
 {
        m_source = source;
        m_fd_dest = fd_dest;
index eb8e792..a4457f6 100644 (file)
@@ -25,7 +25,7 @@ public:
        void start(int sourcefd, int destfd);
        int start(const char *filename, int destfd);
 
-       void start(ePtr<iDataSource> &source, int destfd);
+       void start(ePtr<iTsSource> &source, int destfd);
 
        void pause();
        void resume();
@@ -60,7 +60,7 @@ private:
        int m_blocksize;
        off_t m_current_position;
 
-       ePtr<iDataSource> m_source;
+       ePtr<iTsSource> m_source;
 
        eFixedMessagePump<int> m_messagepump;
 
diff --git a/lib/base/idatasource.h b/lib/base/idatasource.h
deleted file mode 100644 (file)
index 0daa526..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef __lib_base_idatasource_h
-#define __lib_base_idatasource_h
-
-#include <lib/base/object.h>
-
-class iDataSource: public iObject
-{
-public:
-        /* NOTE: should only be used to get current position or filelength */
-       virtual off_t lseek(off_t offset, int whence)=0;
-       
-       /* NOTE: you must be able to handle short reads! */
-       virtual ssize_t read(off_t offset, void *buf, size_t count)=0; /* NOTE: this is what you in normal case have to use!! */
-
-       virtual off_t length()=0;
-       virtual int valid()=0;
-};
-
-#endif
diff --git a/lib/base/itssource.h b/lib/base/itssource.h
new file mode 100644 (file)
index 0000000..91167ff
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef __lib_base_idatasource_h
+#define __lib_base_idatasource_h
+
+#include <lib/base/object.h>
+
+class iTsSource: public iObject
+{
+public:
+        /* NOTE: should only be used to get current position or filelength */
+       virtual off_t lseek(off_t offset, int whence)=0;
+       
+       /* NOTE: you must be able to handle short reads! */
+       virtual ssize_t read(off_t offset, void *buf, size_t count)=0; /* NOTE: this is what you in normal case have to use!! */
+
+       virtual off_t length()=0;
+       virtual int valid()=0;
+};
+
+#endif
index 1720d58..7b736a3 100644 (file)
@@ -2,9 +2,9 @@
 #define __lib_base_rawfile_h
 
 #include <string>
-#include <lib/base/idatasource.h>
+#include <lib/base/itssource.h>
 
-class eRawFile: public iDataSource
+class eRawFile: public iTsSource
 {
        DECLARE_REF(eRawFile);
        eSingleLock m_lock;
@@ -15,7 +15,7 @@ public:
        void setfd(int fd);
        int close();
 
-       // iDataSource
+       // iTsSource
        off_t lseek(off_t offset, int whence);
        ssize_t read(off_t offset, void *buf, size_t count);
        off_t length();
index e377ab8..364c694 100644 (file)
@@ -1,6 +1,16 @@
-INCLUDES = \
-       -I$(top_srcdir)/include
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LIBRARIES = libenigma_components.a
 
-libenigma_components_a_SOURCES = scan.cpp file_eraser.cpp
+libenigma_components_a_SOURCES = \
+       file_eraser.cpp \
+       scan.cpp
+
+componentsincludedir = $(pkgincludedir)/lib/components
+componentsinclude_HEADERS = \
+       file_eraser.h \
+       scan.h
index de1271b..b498a6c 100644 (file)
@@ -1,7 +1,38 @@
-INCLUDES = \
-       -I$(top_srcdir)/include
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
+
+AM_CXXFLAGS = \
+       $(LIBSDL_CFLAGS)
 
 noinst_LIBRARIES = libenigma_driver.a
 
 libenigma_driver_a_SOURCES = \
-       rc.cpp rcinput.cpp rcconsole.cpp avswitch.cpp rfmod.cpp etimezone.cpp misc_options.cpp
+       avswitch.cpp \
+       etimezone.cpp \
+       misc_options.cpp \
+       rc.cpp \
+       rcconsole.cpp \
+       rcinput.cpp \
+       rfmod.cpp
+
+driverincludedir = $(pkgincludedir)/lib/driver
+driverinclude_HEADERS = \
+       avswitch.h \
+       etimezone.h \
+       input_fake.h \
+       misc_options.h \
+       rc.h \
+       rcconsole.h \
+       rcdbox.h \
+       rcdreambox2.h \
+       rcinput.h \
+       rfmod.h
+
+if HAVE_LIBSDL
+libenigma_driver_a_SOURCES += \
+       rcsdl.cpp \
+       rcsdl.h
+endif
index eb5aee3..97a6e7c 100644 (file)
@@ -5,7 +5,7 @@
 #include <stdio.h>
 #include <fcntl.h>
 
-eRCConsoleDriver::eRCConsoleDriver(const char *filename): eRCDriver(eRCInput::getInstance())
+eRCConsoleDriver::eRCConsoleDriver(const char *filename): eRCDriver(eRCInput::getInstance()), m_escape(false)
 {
        handle=open(filename, O_RDONLY|O_NONBLOCK);
        if (handle<0)
@@ -38,7 +38,7 @@ void eRCConsoleDriver::keyPressed(int)
        unsigned char data[16];
        unsigned char *d = data;
        int num = read(handle, data, 16);
-       int code=-1;
+       unsigned char code;
        
        int km = input->getKeyboardMode();
 
@@ -47,42 +47,29 @@ void eRCConsoleDriver::keyPressed(int)
 
        while (num--)
        {
-//             eDebug("console code %08x\n", *d);
-               if (km == eRCInput::kmAll)
-                       code = *d++;
-               else
-               {
-                       if (*d == 27) // escape code
-                       {
-                               while (num)
-                               {
-                                       num--;
-                                       if (*++d != '[')
-                                               break;
-                               }
-                               code = -1;
-                       } else
-                               code = *d;
-                       ++d;
-
-                       if (code < 32)                  /* control characters */
-                               code = -1;
-                       else switch(code)
-                       {
-                       case 0x7E:  // mute, einfg, entf
-                       case 0x7F:  // backspace
-                       code = -1;
-                       default:
-                               break;
+               code = *d++;
+//             eDebug("console code %02x\n", code);
+               if (km == eRCInput::kmAscii) {
+                       if (m_escape) {
+                               if (code != '[')
+                                       m_escape = false;
+                               continue;
                        }
+
+                       if (code == 27) // escape code
+                               m_escape = true;
+
+                       if ((code < 32) ||      // control characters
+                           (code == 0x7e) ||   // mute, einfg, entf
+                           (code == 0x7f))     // backspace
+                               continue;
                }
 
-               if (code != -1)
-                       for (std::list<eRCDevice*>::iterator i(listeners.begin()); i!=listeners.end(); ++i)
-                       {
-//                             eDebug("ascii %08x", code);
-                               (*i)->handleCode(code);
-                       }
+               for (std::list<eRCDevice*>::iterator i(listeners.begin()); i!=listeners.end(); ++i)
+               {
+//                     eDebug("ascii %02x", code);
+                       (*i)->handleCode(code);
+               }
        }
 }
 
index 85234d5..8a24612 100644 (file)
@@ -10,6 +10,7 @@ class eRCConsoleDriver: public eRCDriver
 protected:
        int handle;
        ePtr<eSocketNotifier> sn;
+       bool m_escape;
        void keyPressed(int);
 public:
        eRCConsoleDriver(const char *filename);
diff --git a/lib/driver/rcsdl.cpp b/lib/driver/rcsdl.cpp
new file mode 100644 (file)
index 0000000..a907b80
--- /dev/null
@@ -0,0 +1,390 @@
+#include <lib/driver/rcsdl.h>
+//#include <lib/actions/action.h>
+#include <lib/base/init.h>
+#include <lib/base/init_num.h>
+#include <lib/driver/input_fake.h>
+
+/*
+ * eSDLInputDevice
+ */
+
+eSDLInputDevice::eSDLInputDevice(eRCDriver *driver) : eRCDevice("SDL", driver), m_escape(false), m_unicode(0)
+{
+}
+
+eSDLInputDevice::~eSDLInputDevice()
+{
+}
+
+void eSDLInputDevice::handleCode(long arg)
+{
+       const SDL_KeyboardEvent *event = (const SDL_KeyboardEvent *)arg;
+       const SDL_keysym *key = &event->keysym;
+       int km = input->getKeyboardMode();
+       int code, flags;
+
+       if (event->type == SDL_KEYDOWN) {
+               m_unicode = key->unicode;
+               flags = eRCKey::flagMake;
+       } else {
+               flags = eRCKey::flagBreak;
+       }
+
+       if (km == eRCInput::kmNone) {
+               code = translateKey(key->sym);
+       } else {
+               eDebug("unicode=%04x scancode=%02x", m_unicode, key->scancode);
+               if (m_unicode & 0xff80) {
+                       eDebug("SDL: skipping unicode character");
+                       return;
+               }
+               code = m_unicode & ~0xff80;
+               // unicode not set...!? use key symbol
+               if (code == 0) {
+                       // keysym is ascii
+                       if (key->sym >= 128) {
+                               eDebug("SDL: cannot emulate ASCII");
+                               return;
+                       }
+                       eDebug("SDL: emulate ASCII");
+                       code = key->sym;
+               }
+               if (km == eRCInput::kmAscii) {
+                       // skip ESC c or ESC '[' c
+                       if (m_escape) {
+                               if (code != '[')
+                                       m_escape = false;
+                               return;
+                       }
+
+                       if (code == SDLK_ESCAPE)
+                               m_escape = true;
+
+                       if ((code < SDLK_SPACE) ||
+                           (code == 0x7e) ||   // really?
+                           (code == SDLK_DELETE))
+                               return;
+               }
+               flags |= eRCKey::flagAscii;
+       }
+
+       eDebug("SDL code=%d flags=%d", code, flags);
+       input->keyPressed(eRCKey(this, code, flags));
+}
+
+const char *eSDLInputDevice::getDescription() const
+{
+       return "SDL";
+}
+
+int eSDLInputDevice::translateKey(SDLKey key)
+{
+       #define P(a)    case SDLK_##a: return KEY_##a
+       #define P2(a,b) case SDLK_##a: return KEY_##b
+
+       switch (key) {
+       P(BACKSPACE);
+       P(TAB);
+       P(CLEAR);
+       P2(RETURN,ENTER);
+       P(PAUSE);
+       P2(ESCAPE,ESC);
+       P(SPACE);
+#if 0
+       P(EXCLAIM);
+       P(QUOTEDBL);
+       P(HASH);
+#endif
+       P(DOLLAR);
+#if 0
+       P(AMPERSAND);
+#endif
+       P2(QUOTE,APOSTROPHE);
+#if 0
+       P(LEFTPAREN);
+       P(RIGHTPAREN);
+       P(ASTERISK);
+       P(PLUS);
+#endif
+       P(COMMA);
+       P(MINUS);
+       P2(PERIOD,DOT);
+       P(SLASH);
+       P(0);
+       P(1);
+       P(2);
+       P(3);
+       P(4);
+       P(5);
+       P(6);
+       P(7);
+       P(8);
+       P(9);
+#if 0
+       P(COLON);
+#endif
+       P(SEMICOLON);
+#if 0
+       P(LESS);
+#endif
+       P2(EQUALS,EQUAL);
+#if 0
+       P(GREATER);
+#endif
+       P(QUESTION);
+#if 0
+       P(AT);
+#endif
+       P2(LEFTBRACKET,LEFTBRACE);
+       P(BACKSLASH);
+       P2(RIGHTBRACKET,RIGHTBRACE);
+       P2(CARET,GRAVE);
+#if 0
+       P(UNDERSCORE);
+       P(BACKQUOTE);
+#endif
+       P2(a,A);
+       P2(b,B);
+       P2(c,C);
+       P2(d,D);
+       P2(e,E);
+       P2(f,F);
+       P2(g,G);
+       P2(h,H);
+       P2(i,I);
+       P2(j,J);
+       P2(k,K);
+       P2(l,L);
+       P2(m,M);
+       P2(n,N);
+       P2(o,O);
+       P2(p,P);
+       P2(q,Q);
+       P2(r,R);
+       P2(s,S);
+       P2(t,T);
+       P2(u,U);
+       P2(v,V);
+       P2(w,W);
+       P2(x,X);
+       P2(y,Y);
+       P2(z,Z);
+       P(DELETE);
+#if 0
+       P(WORLD_0);
+       P(WORLD_1);
+       P(WORLD_2);
+       P(WORLD_3);
+       P(WORLD_4);
+       P(WORLD_5);
+       P(WORLD_6);
+       P(WORLD_7);
+       P(WORLD_8);
+       P(WORLD_9);
+       P(WORLD_10);
+       P(WORLD_11);
+       P(WORLD_12);
+       P(WORLD_13);
+       P(WORLD_14);
+       P(WORLD_15);
+       P(WORLD_16);
+       P(WORLD_17);
+       P(WORLD_18);
+       P(WORLD_19);
+       P(WORLD_20);
+       P(WORLD_21);
+       P(WORLD_22);
+       P(WORLD_23);
+       P(WORLD_24);
+       P(WORLD_25);
+       P(WORLD_26);
+       P(WORLD_27);
+       P(WORLD_28);
+       P(WORLD_29);
+       P(WORLD_30);
+       P(WORLD_31);
+       P(WORLD_32);
+       P(WORLD_33);
+       P(WORLD_34);
+       P(WORLD_35);
+       P(WORLD_36);
+       P(WORLD_37);
+       P(WORLD_38);
+       P(WORLD_39);
+       P(WORLD_40);
+       P(WORLD_41);
+       P(WORLD_42);
+       P(WORLD_43);
+       P(WORLD_44);
+       P(WORLD_45);
+       P(WORLD_46);
+       P(WORLD_47);
+       P(WORLD_48);
+       P(WORLD_49);
+       P(WORLD_50);
+       P(WORLD_51);
+       P(WORLD_52);
+       P(WORLD_53);
+       P(WORLD_54);
+       P(WORLD_55);
+       P(WORLD_56);
+       P(WORLD_57);
+       P(WORLD_58);
+       P(WORLD_59);
+       P(WORLD_60);
+       P(WORLD_61);
+       P(WORLD_62);
+       P(WORLD_63);
+       P(WORLD_64);
+       P(WORLD_65);
+       P(WORLD_66);
+       P(WORLD_67);
+       P(WORLD_68);
+       P(WORLD_69);
+       P(WORLD_70);
+       P(WORLD_71);
+       P(WORLD_72);
+       P(WORLD_73);
+       P(WORLD_74);
+       P(WORLD_75);
+       P(WORLD_76);
+       P(WORLD_77);
+       P(WORLD_78);
+       P(WORLD_79);
+       P(WORLD_80);
+       P(WORLD_81);
+       P(WORLD_82);
+       P(WORLD_83);
+       P(WORLD_84);
+       P(WORLD_85);
+       P(WORLD_86);
+       P(WORLD_87);
+       P(WORLD_88);
+       P(WORLD_89);
+       P(WORLD_90);
+       P(WORLD_91);
+       P(WORLD_92);
+       P(WORLD_93);
+       P(WORLD_94);
+       P(WORLD_95);
+#endif
+       P(KP0);
+       P(KP1);
+       P(KP2);
+       P(KP3);
+       P(KP4);
+       P(KP5);
+       P(KP6);
+       P(KP7);
+       P(KP8);
+       P(KP9);
+       P2(KP_PERIOD,KPDOT);
+       P2(KP_DIVIDE,KPSLASH);
+       P2(KP_MULTIPLY,KPASTERISK);
+       P2(KP_MINUS,KPMINUS);
+       P2(KP_PLUS,KPPLUS);
+       P2(KP_ENTER,KPENTER);
+       P2(KP_EQUALS,KPEQUAL);
+       P(UP);
+       P(DOWN);
+       P(RIGHT);
+       P(LEFT);
+       P(INSERT);
+       P(HOME);
+       P(END);
+       P(PAGEUP);
+       P(PAGEDOWN);
+       P(F1);
+       P(F2);
+       P(F3);
+       P(F4);
+       P(F5);
+       P(F6);
+       P(F7);
+       P(F8);
+       P(F9);
+       P(F10);
+       P(F11);
+       P(F12);
+       P(F13);
+       P(F14);
+       P(F15);
+       P(NUMLOCK);
+       P(CAPSLOCK);
+       P2(SCROLLOCK,SCROLLLOCK);
+       P2(RSHIFT,RIGHTSHIFT);
+       P2(LSHIFT,LEFTSHIFT);
+       P2(RCTRL,RIGHTCTRL);
+       P2(LCTRL,LEFTCTRL);
+       P2(RALT,RIGHTALT);
+       P2(LALT,LEFTALT);
+       P2(RMETA,RIGHTMETA);
+       P2(LMETA,LEFTMETA);
+#if 0
+       P(LSUPER);
+       P(RSUPER);
+#endif
+       P(MODE);
+       P(COMPOSE);
+       P(HELP);
+       P(PRINT);
+       P2(SYSREQ,SYSRQ);
+       P(BREAK);
+       P(MENU);
+       P(POWER);
+       P(EURO);
+       P(UNDO);
+       default:
+               eDebug("unhandled SDL keycode: %d", key);
+               return KEY_RESERVED;
+       }
+
+       #undef P2
+       #undef P
+}
+
+/*
+ * eSDLInputDriver
+ */
+
+eSDLInputDriver *eSDLInputDriver::instance;
+
+eSDLInputDriver::eSDLInputDriver() : eRCDriver(eRCInput::getInstance())
+{
+       ASSERT(instance == 0);
+       instance = this;
+}
+
+eSDLInputDriver::~eSDLInputDriver()
+{
+       instance = 0;
+}
+
+void eSDLInputDriver::keyPressed(const SDL_KeyboardEvent *key)
+{
+       eDebug("km=%d enabled=%d locked=%d",
+               input->getKeyboardMode(), enabled, input->islocked());
+
+       if (!enabled || input->islocked())
+               return;
+
+       std::list<eRCDevice*>::iterator i(listeners.begin());
+       while (i != listeners.end()) {
+               (*i)->handleCode((long)key);
+               ++i;
+       }
+}
+
+class eRCSDLInit
+{
+private:
+       eSDLInputDriver driver;
+       eSDLInputDevice device;
+
+public:
+       eRCSDLInit(): driver(), device(&driver)
+       {
+       }
+};
+
+eAutoInitP0<eRCSDLInit> init_rcSDL(eAutoInitNumbers::rc+1, "SDL RC Driver");
diff --git a/lib/driver/rcsdl.h b/lib/driver/rcsdl.h
new file mode 100644 (file)
index 0000000..9732f5e
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef __lib_driver_rcsdl_h
+#define __lib_driver_rcsdl_h
+
+#include <lib/driver/rc.h>
+
+#include <SDL.h>
+
+class eSDLInputDevice : public eRCDevice
+{
+private:
+       bool m_escape;
+       unsigned int m_unicode;
+       int translateKey(SDLKey key);
+
+public:
+       eSDLInputDevice(eRCDriver *driver);
+       ~eSDLInputDevice();
+
+       virtual void handleCode(long arg);
+       virtual const char *getDescription() const;
+};
+
+class eSDLInputDriver : public eRCDriver
+{
+private:
+       static eSDLInputDriver *instance;
+
+public:
+       eSDLInputDriver();
+       ~eSDLInputDriver();
+
+       static eSDLInputDriver *getInstance() { return instance; }
+
+       void keyPressed(const SDL_KeyboardEvent *key);
+};
+
+#endif
index b47ffed..9b33755 100644 (file)
@@ -1,12 +1,64 @@
 SUBDIRS = lowlevel
 
-INCLUDES = \
-       -I$(top_srcdir)/include
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LIBRARIES = libenigma_dvb.a
 
-libenigma_dvb_a_SOURCES = dvb.cpp demux.cpp frontend.cpp esection.cpp db.cpp \
-       sec.cpp scan.cpp crc32.cpp pmt.cpp decoder.cpp eit.cpp rotor_calc.cpp \
-       epgcache.cpp dvbtime.cpp metaparser.cpp volume.cpp tstools.cpp pvrparse.cpp \
-       pesparse.cpp teletext.cpp radiotext.cpp subtitle.cpp
+libenigma_dvb_a_SOURCES = \
+       crc32.cpp \
+       db.cpp \
+       decoder.cpp \
+       demux.cpp \
+       dvb.cpp \
+       dvbtime.cpp \
+       eit.cpp \
+       epgcache.cpp \
+       esection.cpp \
+       frontend.cpp \
+       metaparser.cpp \
+       pesparse.cpp \
+       pmt.cpp \
+       pvrparse.cpp \
+       radiotext.cpp \
+       rotor_calc.cpp \
+       scan.cpp \
+       sec.cpp \
+       subtitle.cpp \
+       teletext.cpp \
+       tstools.cpp \
+       volume.cpp
 
+dvbincludedir = $(pkgincludedir)/lib/dvb
+dvbinclude_HEADERS = \
+       crc32.h \
+       db.h \
+       decoder.h \
+       demux.h \
+       dvb.h \
+       dvbtime.h \
+       eit.h \
+       epgcache.h \
+       esection.h \
+       frontend.h \
+       frontendparms.h \
+       idemux.h \
+       idvb.h \
+       isection.h \
+       list.h \
+       metaparser.h \
+       pesparse.h \
+       pmt.h \
+       pvrparse.h \
+       radiotext.h \
+       rotor_calc.h \
+       scan.h \
+       sec.h \
+       specs.h \
+       subtitle.h \
+       teletext.h \
+       tstools.h \
+       volume.h
index 38be635..522035e 100644 (file)
@@ -3,6 +3,7 @@
 #include <lib/dvb/dvb.h>
 #include <lib/dvb/frontend.h>
 #include <lib/dvb/epgcache.h>
+#include <lib/base/eenv.h>
 #include <lib/base/eerror.h>
 #include <lib/base/estring.h>
 #include <xmlccwrap/xmlccwrap.h>
@@ -73,7 +74,7 @@ RESULT eBouquet::moveService(const eServiceReference &ref, unsigned int pos)
 
 RESULT eBouquet::flushChanges()
 {
-       FILE *f=fopen((CONFIGDIR"/enigma2/"+m_filename).c_str(), "w");
+       FILE *f=fopen(eEnv::resolve("${sysconfdir}/enigma2/" + m_filename).c_str(), "w");
        if (!f)
                return -1;
        if ( fprintf(f, "#NAME %s\r\n", m_bouquet_name.c_str()) < 0 )
@@ -280,7 +281,7 @@ DEFINE_REF(eDVBDB);
 
 void eDVBDB::reloadServicelist()
 {
-       loadServicelist(CONFIGDIR"/enigma2/lamedb");
+       loadServicelist(eEnv::resolve("${sysconfdir}/enigma2/lamedb").c_str());
 }
 
 void eDVBDB::parseServiceData(ePtr<eDVBService> s, std::string str)
@@ -324,14 +325,14 @@ void eDVBDB::loadServicelist(const char *file)
 {
        eDebug("---- opening lame channel db");
        FILE *f=fopen(file, "rt");
-       if (!f && strcmp(file, CONFIGDIR"/enigma2/lamedb") == 0)
+       if (!f && strcmp(file, eEnv::resolve("${sysconfdir}/enigma2/lamedb").c_str()) == 0)
        {
                struct stat s;
                if ( !stat("lamedb", &s) )
                {
-                       if ( !stat(CONFIGDIR"/enigma2", &s) )
+                       if ( !stat(eEnv::resolve("${sysconfdir}/enigma2").c_str(), &s) )
                        {
-                               rename("lamedb", CONFIGDIR"/enigma2/lamedb" );
+                               rename("lamedb", eEnv::resolve("${sysconfdir}/enigma2/lamedb").c_str());
                                reloadServicelist();
                        }
                }
@@ -594,7 +595,7 @@ void eDVBDB::saveServicelist(const char *file)
 
 void eDVBDB::saveServicelist()
 {
-       saveServicelist(CONFIGDIR"/enigma2/lamedb");
+       saveServicelist(eEnv::resolve("${sysconfdir}/enigma2/lamedb").c_str());
 }
 
 void eDVBDB::loadBouquet(const char *path)
@@ -618,7 +619,7 @@ void eDVBDB::loadBouquet(const char *path)
        std::list<eServiceReference> &list = bouquet.m_services;
        list.clear();
 
-       std::string p = CONFIGDIR"/enigma2/";
+       std::string p = eEnv::resolve("${sysconfdir}/enigma2/");
        p+=path;
        eDebug("loading bouquet... %s", p.c_str());
        FILE *fp=fopen(p.c_str(), "rt");
index c980ac5..414ab8d 100644 (file)
@@ -1753,7 +1753,7 @@ RESULT eDVBChannel::getCurrentFrontendParameters(ePtr<iDVBFrontendParameters> &p
 RESULT eDVBChannel::playFile(const char *file)
 {
        eRawFile *f = new eRawFile();
-       ePtr<iDataSource> source = f;
+       ePtr<iTsSource> source = f;
 
        if (f->open(file) < 0)
        {
@@ -1764,7 +1764,7 @@ RESULT eDVBChannel::playFile(const char *file)
        return playSource(source, file);
 }
 
-RESULT eDVBChannel::playSource(ePtr<iDataSource> &source, const char *streaminfo_file)
+RESULT eDVBChannel::playSource(ePtr<iTsSource> &source, const char *streaminfo_file)
 {
        ASSERT(!m_frontend);
        if (m_pvr_thread)
@@ -1826,7 +1826,7 @@ void eDVBChannel::stopSource()
        }
        if (m_pvr_fd_dst >= 0)
                ::close(m_pvr_fd_dst);
-       ePtr<iDataSource> d;
+       ePtr<iTsSource> d;
        m_tstools.setSource(d);
 }
 
index 9277160..f612aff 100644 (file)
@@ -260,7 +260,7 @@ public:
        RESULT playFile(const char *file);
        void stopFile();
 
-       RESULT playSource(ePtr<iDataSource>& source, const char *priv=NULL);
+       RESULT playSource(ePtr<iTsSource>& source, const char *priv=NULL);
        void stopSource();
 
        void setCueSheet(eCueSheet *cuesheet);
index ebdad8a..ea9e738 100644 (file)
@@ -2111,8 +2111,8 @@ RESULT eDVBFrontend::prepare_sat(const eDVBFrontendParametersSatellite &feparm,
                                        return -EINVAL;
                        }
 #if HAVE_DVB_API_VERSION < 5
-                       parm_inversion |= (feparm.rolloff << 2); // Hack.. we use bit 2..3 of inversion param for rolloff
-                       parm_inversion |= (feparm.pilot << 4); // Hack.. we use bit 4..5 of inversion param for pilot
+                       parm_inversion = (fe_spectral_inversion_t)((feparm.rolloff << 2) | parm_inversion); // Hack.. we use bit 2..3 of inversion param for rolloff
+                       parm_inversion = (fe_spectral_inversion_t)((feparm.pilot << 4) | parm_inversion); // Hack.. we use bit 4..5 of inversion param for pilot
                        if (feparm.modulation == eDVBFrontendParametersSatellite::Modulation_8PSK) 
                        {
                                parm_u_qpsk_fec_inner = (fe_code_rate_t)((int)parm_u_qpsk_fec_inner+9);
index 3996b6b..f15cd04 100644 (file)
@@ -15,7 +15,7 @@
 #include <lib/base/object.h>
 #include <lib/base/ebase.h>
 #include <lib/base/elock.h>
-#include <lib/base/idatasource.h>
+#include <lib/base/itssource.h>
 #include <lib/service/service.h>
 #include <libsig_comp.h>
 #include <connection.h>
@@ -607,7 +607,7 @@ public:
        virtual void stopFile() = 0;
        
        /* new interface */
-       virtual RESULT playSource(ePtr<iDataSource> &source, const char *priv=NULL) = 0;
+       virtual RESULT playSource(ePtr<iTsSource> &source, const char *priv=NULL) = 0;
        virtual void stopSource() = 0;
        
        virtual void setCueSheet(eCueSheet *cuesheet) = 0;
index 98e89f9..1108097 100644 (file)
@@ -1,3 +1,4 @@
-EXTRA_DIST = \
+lowlevelincludedir = $(pkgincludedir)/lib/dvb/lowlevel
+lowlevelinclude_HEADERS = \
        eit.h \
        mhw.h
index 7b79966..46fa12e 100644 (file)
@@ -675,11 +675,11 @@ void eDVBServicePMTHandler::SDTScanEvent(int event)
 
 int eDVBServicePMTHandler::tune(eServiceReferenceDVB &ref, int use_decode_demux, eCueSheet *cue, bool simulate, eDVBService *service)
 {
-       ePtr<iDataSource> s;
+       ePtr<iTsSource> s;
        return tuneExt(ref, use_decode_demux, s, NULL, cue, simulate, service);
 }
 
-int eDVBServicePMTHandler::tuneExt(eServiceReferenceDVB &ref, int use_decode_demux, ePtr<iDataSource> &source, const char *streaminfo_file, eCueSheet *cue, bool simulate, eDVBService *service)
+int eDVBServicePMTHandler::tuneExt(eServiceReferenceDVB &ref, int use_decode_demux, ePtr<iTsSource> &source, const char *streaminfo_file, eCueSheet *cue, bool simulate, eDVBService *service)
 {
        RESULT res=0;
        m_reference = ref;
index 721a8fc..de0de05 100644 (file)
@@ -209,7 +209,7 @@ public:
        int tune(eServiceReferenceDVB &ref, int use_decode_demux, eCueSheet *sg=0, bool simulate=false, eDVBService *service = 0);
 
        /* new interface */
-       int tuneExt(eServiceReferenceDVB &ref, int use_decode_demux, ePtr<iDataSource> &, const char *streaminfo_file, eCueSheet *sg=0, bool simulate=false, eDVBService *service = 0);
+       int tuneExt(eServiceReferenceDVB &ref, int use_decode_demux, ePtr<iTsSource> &, const char *streaminfo_file, eCueSheet *sg=0, bool simulate=false, eDVBService *service = 0);
 
        void free();
 private:
index b37aa71..d559614 100644 (file)
@@ -10,6 +10,7 @@
 #include <lib/dvb/esection.h>
 #include <lib/dvb/scan.h>
 #include <lib/dvb/frontend.h>
+#include <lib/base/eenv.h>
 #include <lib/base/eerror.h>
 #include <lib/base/estring.h>
 #include <lib/python/python.h>
@@ -29,7 +30,8 @@ eDVBScan::eDVBScan(iDVBChannel *channel, bool usePAT, bool debug)
        if (m_channel->getDemux(m_demux))
                SCAN_eDebug("scan: failed to allocate demux!");
        m_channel->connectStateChange(slot(*this, &eDVBScan::stateChange), m_stateChanged_connection);
-       FILE *f = fopen("/etc/enigma2/scan_tp_valid_check.py", "r");
+       std::string filename = eEnv::resolve("${sysconfdir}/scan_tp_valid_check.py");
+       FILE *f = fopen(filename.c_str(), "r");
        if (f)
        {
                char code[16384];
@@ -37,7 +39,7 @@ eDVBScan::eDVBScan(iDVBChannel *channel, bool usePAT, bool debug)
                if (rd)
                {
                        code[rd]=0;
-                       m_additional_tsid_onid_check_func = Py_CompileString(code, "/etc/enigma2/scan_tp_valid_check.py", Py_file_input);
+                       m_additional_tsid_onid_check_func = Py_CompileString(code, filename.c_str(), Py_file_input);
                }
                fclose(f);
        }
index d48d44e..a2bc886 100644 (file)
@@ -212,7 +212,7 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite
 
                                eSecDebugNoSimulate("ret5 %d", ret);
 
-                               if (ret && lnb_param.SatCR_idx == -1)
+                               if (ret && !is_unicable)
                                {
                                        int lof = sat.frequency > lnb_param.m_lof_threshold ?
                                                lnb_param.m_lof_hi : lnb_param.m_lof_lo;
@@ -300,11 +300,6 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                if ( sit != lnb_param.m_satellites.end())
                {
                        eSecCommandList sec_sequence;
-
-                       lnb_param.guard_offset = 0; //HACK
-
-                       frontend.setData(eDVBFrontend::SATCR, lnb_param.SatCR_idx);
-                       
                        eDVBSatelliteSwitchParameters &sw_param = sit->second;
                        bool doSetFrontend = true;
                        bool doSetVoltageToneFrontend = true;
@@ -327,6 +322,11 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                        eDVBSatelliteDiseqcParameters::t_diseqc_mode diseqc_mode = di_param.m_diseqc_mode;
                        eDVBSatelliteSwitchParameters::t_voltage_mode voltage_mode = sw_param.m_voltage_mode;
                        bool diseqc13V = voltage_mode == eDVBSatelliteSwitchParameters::HV_13;
+                       bool is_unicable = lnb_param.SatCR_idx != -1;
+
+                       lnb_param.guard_offset = 0; //HACK
+
+                       frontend.setData(eDVBFrontend::SATCR, lnb_param.SatCR_idx);
 
                        if (diseqc13V)
                                voltage_mode = eDVBSatelliteSwitchParameters::HV;
@@ -371,13 +371,10 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
 
                        int lof = (band&1)?lnb_param.m_lof_hi:lnb_param.m_lof_lo;
 
-                       int local=0;
-
-
-                       if(lnb_param.SatCR_idx == -1)
+                       if(!is_unicable)
                        {
-                       // calc Frequency
-                               local = abs(sat.frequency 
+                               // calc Frequency
+                               int local= abs(sat.frequency 
                                        - lof);
                                parm.FREQUENCY = ((((local * 2) / 125) + 1) / 2) * 125;
                                frontend.setData(eDVBFrontend::FREQ_OFFSET, sat.frequency - parm.FREQUENCY);
@@ -551,6 +548,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
 
                                        if ( send_mask )
                                        {
+                                               int diseqc_repeats = diseqc_mode > eDVBSatelliteDiseqcParameters::V1_0 ? di_param.m_repeats : 0;
                                                int vlt = iDVBFrontend::voltageOff;
                                                eSecCommand::pair compare;
                                                compare.steps = +3;
@@ -623,7 +621,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                                                        if ( send_mask & 2 )
                                                                ++loops;
 
-                                                       loops <<= di_param.m_repeats;
+                                                       loops <<= diseqc_repeats;
 
                                                        for ( int i = 0; i < loops;)  // fill commands...
                                                        {
@@ -660,7 +658,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                                                                        int tmp = m_params[DELAY_BETWEEN_DISEQC_REPEATS];
                                                                        if (cmd)
                                                                        {
-                                                                               int delay = di_param.m_repeats ? (tmp - 54) / 2 : tmp;  // standard says 100msek between two repeated commands
+                                                                               int delay = diseqc_repeats ? (tmp - 54) / 2 : tmp;  // standard says 100msek between two repeated commands
                                                                                sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, delay) );
                                                                                diseqc.data[2]=cmd;
                                                                                diseqc.data[3]=(cmd==0x38) ? csw : ucsw;
@@ -693,7 +691,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                                        if ( RotorCmd != -1 && RotorCmd != lastRotorCmd )
                                        {
                                                eSecCommand::pair compare;
-                                               if (!send_mask && lnb_param.SatCR_idx == -1)
+                                               if (!send_mask && !is_unicable)
                                                {
                                                        compare.steps = +3;
                                                        compare.tone = iDVBFrontend::toneOff;
@@ -747,10 +745,10 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                                                        diseqc.data[3] = RotorCmd;
                                                        diseqc.data[4] = 0x00;
                                                }
-//                                             if(lnb_param.SatCR_idx == -1)
+//                                             if(!is_unicable)
                                                {
                                                        int mrt = m_params[MOTOR_RUNNING_TIMEOUT]; // in seconds!
-                                                       if ( rotor_param.m_inputpower_parameters.m_use || lnb_param.SatCR_idx == -1)
+                                                       if ( rotor_param.m_inputpower_parameters.m_use && !is_unicable)
                                                        { // use measure rotor input power to detect rotor state
                                                                bool turn_fast = need_turn_fast(rotor_param.m_inputpower_parameters.m_turning_speed);
                                                                eSecCommand::rotor cmd;
@@ -882,7 +880,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                        sec_fe->setData(eDVBFrontend::NEW_UCSW, ucsw);
                        sec_fe->setData(eDVBFrontend::NEW_TONEBURST, di_param.m_toneburst_param);
 
-                       if ((doSetVoltageToneFrontend) && (lnb_param.SatCR_idx == -1))
+                       if (doSetVoltageToneFrontend && !is_unicable)
                        {
                                eSecCommand::pair compare;
                                compare.voltage = voltage;
@@ -898,7 +896,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
 
                        sec_sequence.push_back( eSecCommand(eSecCommand::UPDATE_CURRENT_SWITCHPARMS) );
 
-                       if(lnb_param.SatCR_idx != -1)
+                       if(is_unicable)
                        {
                                // check if voltage is disabled
                                eSecCommand::pair compare;
index bd36308..1403059 100644 (file)
@@ -35,17 +35,17 @@ eDVBTSTools::~eDVBTSTools()
 int eDVBTSTools::openFile(const char *filename, int nostreaminfo)
 {
        eRawFile *f = new eRawFile();
-       ePtr<iDataSource> src = f;
+       ePtr<iTsSource> src = f;
 
        if (f->open(filename, 1) < 0)
                return -1;
 
-       setSource(src, filename);
+       setSource(src, nostreaminfo ? NULL : filename);
 
        return 0;
 }
 
-void eDVBTSTools::setSource(ePtr<iDataSource> &source, const char *stream_info_filename)
+void eDVBTSTools::setSource(ePtr<iTsSource> &source, const char *stream_info_filename)
 {
        closeFile();
 
index 1192cd2..9982792 100644 (file)
@@ -19,7 +19,7 @@ public:
        eDVBTSTools();
        ~eDVBTSTools();
 
-       void setSource(ePtr<iDataSource> &source, const char *streaminfo_filename=NULL);
+       void setSource(ePtr<iTsSource> &source, const char *streaminfo_filename=NULL);
        void closeSource();
 
        int openFile(const char *filename, int nostreaminfo = 0);
@@ -80,7 +80,7 @@ private:
        int m_pid;
        int m_maxrange;
 
-       ePtr<iDataSource> m_source;
+       ePtr<iTsSource> m_source;
 
        int m_begin_valid, m_end_valid;
        pts_t m_pts_begin, m_pts_end;
index fc7f762..9ef7249 100644 (file)
@@ -1,10 +1,28 @@
-INCLUDES = \
-       -I$(top_srcdir)/include
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LIBRARIES = libenigma_dvb_ci.a
 
-libenigma_dvb_ci_a_SOURCES = dvbci.cpp dvbci_session.cpp dvbci_resmgr.cpp \
-                                                                                                                dvbci_appmgr.cpp dvbci_camgr.cpp \
-                                                                                                                dvbci_datetimemgr.cpp dvbci_mmi.cpp \
-                                                                                                                dvbci_ui.cpp
+libenigma_dvb_ci_a_SOURCES = \
+       dvbci.cpp \
+       dvbci_appmgr.cpp \
+       dvbci_camgr.cpp \
+       dvbci_datetimemgr.cpp \
+       dvbci_mmi.cpp \
+       dvbci_resmgr.cpp \
+       dvbci_session.cpp \
+       dvbci_ui.cpp
 
+dvbciincludedir = $(pkgincludedir)/lib/dvb_ci
+dvbciinclude_HEADERS = \
+       dvbci.h \
+       dvbci_appmgr.h \
+       dvbci_camgr.h \
+       dvbci_datetimemgr.h \
+       dvbci_mmi.h \
+       dvbci_resmgr.h \
+       dvbci_session.h \
+       dvbci_ui.h
index 1280556..20321f5 100644 (file)
@@ -1,15 +1,58 @@
-INCLUDES = \
-       -I$(top_srcdir)/include -I$(top_srcdir)/lib/gdi/ati
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
+
+AM_CXXFLAGS = \
+       $(LIBSDL_CFLAGS)
 
 noinst_LIBRARIES = libenigma_gdi.a
 
 libenigma_gdi_a_SOURCES = \
-       region.cpp grc.cpp epng.cpp erect.cpp fb.cpp font.cpp font_arabic.cpp gfbdc.cpp  \
-       glcddc.cpp gpixmap.cpp lcd.cpp gfont.cpp accel.cpp picload.cpp picexif.cpp \
-       compositing.cpp bcm.cpp
+       accel.cpp \
+       bcm.cpp \
+       compositing.cpp \
+       epng.cpp \
+       erect.cpp \
+       fb.cpp \
+       font.cpp \
+       font_arabic.cpp \
+       gfont.cpp \
+       glcddc.cpp \
+       gmaindc.cpp \
+       gpixmap.cpp \
+       grc.cpp \
+       lcd.cpp \
+       picexif.cpp \
+       picload.cpp \
+       region.cpp
 
-if WITH_SDL
-libenigma_gdi_a_SOURCES += sdl.cpp
-endif
+gdiincludedir = $(pkgincludedir)/lib/gdi
+gdiinclude_HEADERS = \
+       accel.h \
+       compositing.h \
+       epng.h \
+       epoint.h \
+       erect.h \
+       esize.h \
+       fb.h \
+       font.h \
+       gfont.h \
+       glcddc.h \
+       gpixmap.h \
+       grc.h \
+       lcd.h \
+       picexif.h \
+       picload.h \
+       region.h
 
-#      ati/2dablt.cpp ati/2dcore.cpp ati/ati_core.cpp ati/test.cpp ati/2dutil.cpp
+if HAVE_LIBSDL
+libenigma_gdi_a_SOURCES += \
+       sdl.cpp \
+       sdl.h
+else
+libenigma_gdi_a_SOURCES += \
+       gfbdc.cpp \
+       gfbdc.h
+endif
index 972a89d..fd33298 100644 (file)
@@ -1,3 +1,4 @@
+#define PNG_SKIP_SETJMP_CHECK
 #include <png.h>
 #include <stdio.h>
 #include <lib/gdi/epng.h>
index a5db43a..9e17547 100644 (file)
 // use this for init Freetype...
 #include <ft2build.h>
 #include FT_FREETYPE_H
-#ifdef HAVE_FREETYPE2
 #define FTC_Image_Cache_New(a,b)       FTC_ImageCache_New(a,b)
 #define FTC_Image_Cache_Lookup(a,b,c,d)        FTC_ImageCache_Lookup(a,b,c,d,NULL)
 #define FTC_SBit_Cache_New(a,b)                FTC_SBitCache_New(a,b)
 #define FTC_SBit_Cache_Lookup(a,b,c,d) FTC_SBitCache_Lookup(a,b,c,d,NULL)
-#endif
 
 #include <lib/base/eerror.h>
 #include <lib/gdi/lcd.h>
 #include <lib/base/init.h>
 #include <lib/base/init_num.h>
 
-#define HAVE_FRIBIDI
-// until we have it in the cdk
-
-#ifdef HAVE_FRIBIDI
 #include <fribidi/fribidi.h>
-#endif
 
 #include <map>
 
@@ -42,10 +35,6 @@ fontRenderClass *fontRenderClass::instance;
 
 static pthread_mutex_t ftlock=PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP;
 
-#ifndef HAVE_FREETYPE2
-static FTC_Font cache_current_font=0;
-#endif
-
 struct fntColorCacheKey
 {
        gRGB start, end;
@@ -210,12 +199,8 @@ float fontRenderClass::getLineHeight(const gFont& font)
                return 0;
        singleLock s(ftlock);
        FT_Face current_face;
-#ifdef HAVE_FREETYPE2
        if ((FTC_Manager_LookupFace(cacheManager, fnt->scaler.face_id, &current_face) < 0) ||
            (FTC_Manager_LookupSize(cacheManager, &fnt->scaler, &fnt->size) < 0))
-#else
-       if (FTC_Manager_Lookup_Size(cacheManager, &fnt->font.font, &current_face, &fnt->size)<0)
-#endif
        {
                eDebug("FTC_Manager_Lookup_Size failed!");
                return 0;
@@ -263,7 +248,6 @@ DEFINE_REF(Font);
 Font::Font(fontRenderClass *render, FTC_FaceID faceid, int isize, int tw): tabwidth(tw)
 {
        renderer=render;
-#ifdef HAVE_FREETYPE2
        font.face_id = faceid;
        font.width = isize;
        font.height = isize;
@@ -272,12 +256,6 @@ Font::Font(fontRenderClass *render, FTC_FaceID faceid, int isize, int tw): tabwi
        scaler.width = isize;
        scaler.height = isize;
        scaler.pixel = 1;
-#else
-       font.font.face_id=faceid;
-       font.font.pix_width     = isize;
-       font.font.pix_height = isize;
-       font.image_type = ftc_image_grays;
-#endif
        height=isize;
        if (tabwidth==-1)
                tabwidth=8*isize;
@@ -474,18 +452,12 @@ void eTextPara::setFont(Font *fnt, Font *replacement)
                        // we ask for replacment_font first becauseof the cache
        if (replacement_font)
        {
-#ifdef HAVE_FREETYPE2
                if ((FTC_Manager_LookupFace(fontRenderClass::instance->cacheManager,
                                            replacement_font->scaler.face_id,
                                            &replacement_face) < 0) ||
                    (FTC_Manager_LookupSize(fontRenderClass::instance->cacheManager,
                                            &replacement_font->scaler,
                                            &replacement_font->size) < 0))
-#else
-               if (FTC_Manager_Lookup_Size(fontRenderClass::instance->cacheManager, 
-                               &replacement_font->font.font, &replacement_face, 
-                               &replacement_font->size)<0)
-#endif
                {
                        eDebug("FTC_Manager_Lookup_Size failed!");
                        return;
@@ -493,24 +465,17 @@ void eTextPara::setFont(Font *fnt, Font *replacement)
        }
        if (current_font)
        {
-#ifdef HAVE_FREETYPE2
                if ((FTC_Manager_LookupFace(fontRenderClass::instance->cacheManager,
                                            current_font->scaler.face_id,
                                            &current_face) < 0) ||
                    (FTC_Manager_LookupSize(fontRenderClass::instance->cacheManager,
                                            &current_font->scaler,
                                            &current_font->size) < 0))
-#else
-               if (FTC_Manager_Lookup_Size(fontRenderClass::instance->cacheManager, &current_font->font.font, &current_face, &current_font->size)<0)
-#endif
                {
                        eDebug("FTC_Manager_Lookup_Size failed!");
                        return;
                }
        }
-#ifndef HAVE_FREETYPE2
-       cache_current_font=&current_font->font.font;
-#endif
        previous=0;
        use_kerning=FT_HAS_KERNING(current_face);
 }
@@ -525,7 +490,6 @@ int eTextPara::renderString(const char *string, int rflags)
        if (!current_font)
                return -1;
 
-#ifdef HAVE_FREETYPE2
        if ((FTC_Manager_LookupFace(fontRenderClass::instance->cacheManager,
                                    current_font->scaler.face_id,
                                    &current_face) < 0) ||
@@ -536,17 +500,6 @@ int eTextPara::renderString(const char *string, int rflags)
                eDebug("FTC_Manager_Lookup_Size failed!");
                return -1;
        }
-#else
-       if (&current_font->font.font != cache_current_font)
-       {
-               if (FTC_Manager_Lookup_Size(fontRenderClass::instance->cacheManager, &current_font->font.font, &current_face, &current_font->size)<0)
-               {
-                       eDebug("FTC_Manager_Lookup_Size failed!");
-                       return -1;
-               }
-               cache_current_font=&current_font->font.font;
-       }
-#endif
 
        if (!current_face)
                eFatal("eTextPara::renderString: no current_face");
@@ -610,7 +563,6 @@ int eTextPara::renderString(const char *string, int rflags)
        
                // now do the usual logical->visual reordering
        int size=uc_shape.size();
-#ifdef HAVE_FRIBIDI
        FriBidiCharType dir=FRIBIDI_TYPE_ON;
        uc_visual.resize(size);
        // gaaanz lahm, aber anders geht das leider nicht, sorry.
@@ -618,9 +570,6 @@ int eTextPara::renderString(const char *string, int rflags)
        std::copy(uc_shape.begin(), uc_shape.end(), array);
        fribidi_log2vis(array, size, &dir, target, 0, 0, 0);
        uc_visual.assign(target, target+size);
-#else
-       uc_visual=uc_shape;
-#endif
 
        glyphs.reserve(size);
        
@@ -714,13 +663,11 @@ nprint:   isprintable=0;
        }
        bboxValid=false;
        calc_bbox();
-#ifdef HAVE_FRIBIDI
        if (dir & FRIBIDI_MASK_RTL)
        {
                realign(dirRight);
                doTopBottomReordering=true;
        }
-#endif
 
        if (charCount)
        {
@@ -739,7 +686,6 @@ void eTextPara::blit(gDC &dc, const ePoint &offset, const gRGB &background, cons
        if (!current_font)
                return;
 
-#ifdef HAVE_FREETYPE2
        if ((FTC_Manager_LookupFace(fontRenderClass::instance->cacheManager,
                                    current_font->scaler.face_id,
                                    &current_face) < 0) ||
@@ -750,17 +696,6 @@ void eTextPara::blit(gDC &dc, const ePoint &offset, const gRGB &background, cons
                eDebug("FTC_Manager_Lookup_Size failed!");
                return;
        }
-#else
-       if (&current_font->font.font != cache_current_font)
-       {
-               if (FTC_Manager_Lookup_Size(fontRenderClass::instance->cacheManager, &current_font->font.font, &current_face, &current_font->size)<0)
-               {
-                       eDebug("FTC_Manager_Lookup_Size failed!");
-                       return;
-               }
-               cache_current_font=&current_font->font.font;
-       }
-#endif
 
        ePtr<gPixmap> target;
        dc.getPixmap(target);
index 7dd9f89..6b82183 100644 (file)
@@ -8,11 +8,9 @@
 #include FT_CACHE_H
 #include FT_CACHE_IMAGE_H
 #include FT_CACHE_SMALL_BITMAPS_H
-#ifdef HAVE_FREETYPE2
 typedef FTC_ImageCache FTC_Image_Cache;
 typedef FTC_ImageTypeRec FTC_Image_Desc;
 typedef FTC_SBitCache FTC_SBit_Cache;
-#endif
 #include <vector>
 #include <list>
 
@@ -191,9 +189,7 @@ class Font: public iObject
 {
        DECLARE_REF(Font);
 public:
-#ifdef HAVE_FREETYPE2
        FTC_ScalerRec scaler;
-#endif
        FTC_Image_Desc font;
        fontRenderClass *renderer;
        FT_Error getGlyphBitmap(FT_ULong glyph_index, FTC_SBit *sbit);
index 80dd247..a4f65eb 100644 (file)
@@ -7,18 +7,8 @@
 
 #include <time.h>
 
-gFBDC *gFBDC::instance;
-
-ePtr<gFBDC> NewgFBDCPtr(void)
-{
-       ePtr<gFBDC> ptr;
-       gFBDC::getInstance(ptr);
-       return ptr;
-}
-
 gFBDC::gFBDC()
 {
-       instance=this;
        fb=new fbClass;
 
        if (!fb->Available())
@@ -34,7 +24,6 @@ gFBDC::~gFBDC()
 {
        delete fb;
        delete[] surface.clut.data;
-       instance=0;
 }
 
 void gFBDC::calcRamp()
@@ -91,7 +80,7 @@ void gFBDC::setPalette()
        fb->PutCMAP();
 }
 
-void gFBDC::exec(gOpcode *o)
+void gFBDC::exec(const gOpcode *o)
 {
        switch (o->opcode)
        {
@@ -242,7 +231,4 @@ void gFBDC::reloadSettings()
        setPalette();
 }
 
-// eAutoInitPtr<gFBDC> init_gFBDC(eAutoInitNumbers::graphic-1, "GFBDC");
-#ifndef WITH_SDL
 eAutoInitPtr<gFBDC> init_gFBDC(eAutoInitNumbers::graphic-1, "GFBDC");
-#endif
index 23051c4..7f76d0c 100644 (file)
@@ -3,17 +3,12 @@
 
 #include "fb.h"
 #include "gpixmap.h"
-#include "grc.h"
+#include "gmaindc.h"
 
-class gFBDC;
-
-SWIG_IGNORE(gFBDC);
-class gFBDC: public gDC
+class gFBDC: public gMainDC
 {
-#ifndef SWIG
        fbClass *fb;
-       static gFBDC *instance;
-       void exec(gOpcode *opcode);
+       void exec(const gOpcode *opcode);
        unsigned char ramp[256], rampalpha[256]; // RGB ramp 0..255
        int brightness, gamma, alpha;
        void calcRamp();
@@ -21,13 +16,8 @@ class gFBDC: public gDC
        gSurface surface, surface_back;
        int m_enable_double_buffering;
        int m_xres, m_yres;
-#else
-       gFBDC();
-       virtual ~gFBDC();
-#endif
 public:
        void setResolution(int xres, int yres);
-#ifndef SWIG
        void reloadSettings();
        void setAlpha(int alpha);
        void setBrightness(int brightness);
@@ -43,17 +33,7 @@ public:
 
        gFBDC();
        virtual ~gFBDC();
-       static int getInstance(ePtr<gFBDC> &ptr) { if (!instance) return -1; ptr = instance; return 0; }
        int islocked() { return fb->islocked(); }
-#endif
 };
-SWIG_TEMPLATE_TYPEDEF(ePtr<gFBDC>, gFBDC);
-SWIG_EXTEND(ePtr<gFBDC>,
-       static ePtr<gFBDC> getInstance()
-       {
-               extern ePtr<gFBDC> NewgFBDCPtr(void);
-               return NewgFBDCPtr();
-       }
-);
 
 #endif
index a593cfa..bade53b 100644 (file)
@@ -30,7 +30,7 @@ gLCDDC::~gLCDDC()
        instance=0;
 }
 
-void gLCDDC::exec(gOpcode *o)
+void gLCDDC::exec(const gOpcode *o)
 {
        switch (o->opcode)
        {
index 6d5f383..a2b3c7f 100644 (file)
@@ -9,7 +9,7 @@ class gLCDDC: public gDC
        eLCD *lcd;
        static gLCDDC *instance;
        int update;
-       void exec(gOpcode *opcode);
+       void exec(const gOpcode *opcode);
        gSurface surface;
 public:
        gLCDDC();
diff --git a/lib/gdi/gmaindc.cpp b/lib/gdi/gmaindc.cpp
new file mode 100644 (file)
index 0000000..4890027
--- /dev/null
@@ -0,0 +1,28 @@
+#include <lib/gdi/gmaindc.h>
+
+gMainDC *gMainDC::m_instance;
+
+ePtr<gMainDC> NewgMainDCPtr(void)
+{
+       ePtr<gMainDC> ptr;
+       gMainDC::getInstance(ptr);
+       return ptr;
+}
+
+gMainDC::gMainDC()
+{
+       ASSERT(m_instance == 0);
+       m_instance = this;
+}
+
+gMainDC::gMainDC(gPixmap *pixmap) : gDC(pixmap)
+{
+       ASSERT(m_instance == 0);
+       m_instance = this;
+}
+
+gMainDC::~gMainDC()
+{
+       m_instance = 0;
+}
+
diff --git a/lib/gdi/gmaindc.h b/lib/gdi/gmaindc.h
new file mode 100644 (file)
index 0000000..780be2e
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef __lib_gdi_gmaindc_h
+#define __lib_gdi_gmaindc_h
+
+#include "grc.h"
+
+class gMainDC;
+
+SWIG_IGNORE(gMainDC);
+class gMainDC: public gDC
+{
+protected:
+       static gMainDC *m_instance;
+
+       gMainDC();
+       gMainDC(gPixmap *pixmap);
+       virtual ~gMainDC();
+public:
+       virtual void setResolution(int xres, int yres) = 0;
+#ifndef SWIG
+       static int getInstance(ePtr<gMainDC> &ptr) { if (!m_instance) return -1; ptr = m_instance; return 0; }
+#endif
+};
+
+SWIG_TEMPLATE_TYPEDEF(ePtr<gMainDC>, gMainDC);
+SWIG_EXTEND(ePtr<gMainDC>,
+       static ePtr<gMainDC> getInstance()
+       {
+               extern ePtr<gMainDC> NewgMainDCPtr(void);
+               return NewgMainDCPtr();
+       }
+);
+
+#endif
index dff6b05..a45b3b1 100644 (file)
@@ -609,7 +609,7 @@ gDC::~gDC()
        delete[] m_spinner_pic;
 }
 
-void gDC::exec(gOpcode *o)
+void gDC::exec(const gOpcode *o)
 {
        switch (o->opcode)
        {
index 3b8201a..38caa10 100644 (file)
@@ -286,7 +286,7 @@ protected:
        eRect m_spinner_pos;
        int m_spinner_num, m_spinner_i;
 public:
-       virtual void exec(gOpcode *opcode);
+       virtual void exec(const gOpcode *opcode);
        gDC(gPixmap *pixmap);
        gDC();
        virtual ~gDC();
@@ -296,10 +296,10 @@ public:
        virtual eSize size() { return m_pixmap->size(); }
        virtual int islocked() { return 0; }
        
-       void enableSpinner();
-       void disableSpinner();
-       void incrementSpinner();
-       void setSpinner(eRect pos, ePtr<gPixmap> *pic, int len);
+       virtual void enableSpinner();
+       virtual void disableSpinner();
+       virtual void incrementSpinner();
+       virtual void setSpinner(eRect pos, ePtr<gPixmap> *pic, int len);
 };
 
 #endif
index a7dc22d..518ee1b 100644 (file)
@@ -4,8 +4,12 @@
 #include <fcntl.h>
 #include <sys/ioctl.h>
 
+#if defined(HAVE_DBOX_FP_H) && defined(HAVE_DBOX_LCD_KS0713_H)
 #include <dbox/fp.h>
 #include <dbox/lcd-ks0713.h>
+#else
+#define NO_LCD 1
+#endif
 
 #include <lib/gdi/esize.h>
 #include <lib/base/init.h>
@@ -70,10 +74,6 @@ eDBoxLCD::eDBoxLCD()
                eDebug("found OLED display!");
                is_oled = 1;
        }
-#else
-       lcdfd = -1;
-#endif
-       instance=this;
 
        if (lcdfd<0)
                eDebug("couldn't open LCD - load lcd.o!");
@@ -106,6 +106,9 @@ eDBoxLCD::eDBoxLCD()
                        is_oled = 3;
                }
        }
+#endif
+       instance=this;
+
        setSize(xres, yres, bpp);
 }
 
@@ -117,6 +120,7 @@ void eDBoxLCD::setInverted(unsigned char inv)
 
 int eDBoxLCD::setLCDContrast(int contrast)
 {
+#ifndef NO_LCD
        int fp;
        if((fp=open("/dev/dbox/fp0", O_RDWR))<=0)
        {
@@ -129,11 +133,13 @@ int eDBoxLCD::setLCDContrast(int contrast)
                eDebug("[LCD] can't set lcd contrast");
        }
        close(fp);
+#endif
        return(0);
 }
 
 int eDBoxLCD::setLCDBrightness(int brightness)
 {
+#ifndef NO_LCD
        eDebug("setLCDBrightness %d", brightness);
        FILE *f=fopen("/proc/stb/lcd/oled_brightness", "w");
        if (!f)
@@ -157,6 +163,7 @@ int eDBoxLCD::setLCDBrightness(int brightness)
                        eDebug("[LCD] can't set lcd brightness (%m)");
                close(fp);
        }
+#endif
        return(0);
 }
 
index c162f89..0ce10c0 100644 (file)
@@ -1,4 +1,5 @@
-#include <png.h>       // must be included before Python.h because of setjmp
+#define PNG_SKIP_SETJMP_CHECK
+#include <png.h>
 #include <fcntl.h>
 
 #include <lib/gdi/picload.h>
index 6dbdb67..eb4e2ae 100644 (file)
@@ -1,80 +1,83 @@
-#ifdef WITH_SDL
 #include <lib/gdi/sdl.h>
-
+#include <lib/actions/action.h>
 #include <lib/base/init.h>
 #include <lib/base/init_num.h>
+#include <lib/driver/input_fake.h>
+#include <lib/driver/rcsdl.h>
 
 #include <SDL.h>
 
-gSDLDC *gSDLDC::m_instance;
-
-gSDLDC::gSDLDC()
+gSDLDC::gSDLDC() : m_pump(eApp, 1)
 {
-       if (SDL_Init(SDL_INIT_VIDEO) < 0)
-       {
+       if (SDL_Init(SDL_INIT_VIDEO) < 0) {
                eWarning("Could not initialize SDL: %s", SDL_GetError());
                return;
        }
-       
-       m_screen = SDL_SetVideoMode(720, 576, 32, SDL_HWSURFACE);
-       if (!m_screen)
-       {
-               eWarning("Could not create SDL surface: %s", SDL_GetError());
-               return;
-       }
 
-       m_instance=this;
-       
+       setResolution(720, 576);
+
+       CONNECT(m_pump.recv_msg, gSDLDC::pumpEvent);
+
        m_surface.type = 0;
-       m_surface.x = m_screen->w;
-       m_surface.y = m_screen->h;
-       m_surface.bpp = m_screen->format->BitsPerPixel;
-       m_surface.bypp = m_screen->format->BytesPerPixel;
-       m_surface.stride = m_screen->pitch;
-       m_surface.data = m_screen->pixels;
-       m_surface.clut.colors=256;
-       m_surface.clut.data=new gRGB[m_surface.clut.colors];
-       
+       m_surface.clut.colors = 256;
+       m_surface.clut.data = new gRGB[m_surface.clut.colors];
+
        m_pixmap = new gPixmap(&m_surface);
-       
+
        memset(m_surface.clut.data, 0, sizeof(*m_surface.clut.data)*m_surface.clut.colors);
+
+       run();
 }
 
 gSDLDC::~gSDLDC()
 {
+       pushEvent(EV_QUIT);
+       kill();
        SDL_Quit();
-       m_instance=0;
 }
 
-void gSDLDC::setPalette()
+void gSDLDC::keyEvent(const SDL_Event &event)
 {
-       if (!m_surface.clut.data)
-               return;
-       
-/*     for (int i=0; i<256; ++i)
-       {
-               fb->CMAP()->red[i]=ramp[m_surface.clut.data[i].r]<<8;
-               fb->CMAP()->green[i]=ramp[m_surface.clut.data[i].g]<<8;
-               fb->CMAP()->blue[i]=ramp[m_surface.clut.data[i].b]<<8;
-               fb->CMAP()->transp[i]=rampalpha[m_surface.clut.data[i].a]<<8;
-               if (!fb->CMAP()->red[i])
-                       fb->CMAP()->red[i]=0x100;
-       }
-       fb->PutCMAP(); */
+       eSDLInputDriver *driver = eSDLInputDriver::getInstance();
+
+       eDebug("SDL Key %s: key=%d", (event.type == SDL_KEYDOWN) ? "Down" : "Up", event.key.keysym.sym);
+
+       if (driver)
+               driver->keyPressed(&event.key);
 }
 
-void gSDLDC::exec(gOpcode *o)
+void gSDLDC::pumpEvent(const SDL_Event &event)
 {
-       switch (o->opcode)
-       {
-       case gOpcode::setPalette:
-       {
-               gDC::exec(o);
-               setPalette();
+       switch (event.type) {
+       case SDL_KEYDOWN:
+       case SDL_KEYUP:
+               keyEvent(event);
+               break;
+       case SDL_QUIT:
+               eDebug("SDL Quit");
+               extern void quitMainloop(int exit_code);
+               quitMainloop(0);
                break;
        }
+}
+
+void gSDLDC::pushEvent(enum event code, void *data1, void *data2)
+{
+       SDL_Event event;
+
+       event.type = SDL_USEREVENT;
+       event.user.code = code;
+       event.user.data1 = data1;
+       event.user.data2 = data2;
+
+       SDL_PushEvent(&event);
+}
+
+void gSDLDC::exec(const gOpcode *o)
+{
+       switch (o->opcode) {
        case gOpcode::flush:
-               SDL_Flip(m_screen);
+               pushEvent(EV_FLIP);
                eDebug("FLUSH");
                break;
        default:
@@ -83,6 +86,68 @@ void gSDLDC::exec(gOpcode *o)
        }
 }
 
-eAutoInitPtr<gSDLDC> init_gSDLDC(eAutoInitNumbers::graphic-1, "gSDLDC");
+void gSDLDC::setResolution(int xres, int yres)
+{
+       pushEvent(EV_SET_VIDEO_MODE, (void *)xres, (void *)yres);
+}
+
+/*
+ * SDL thread below...
+ */
+
+void gSDLDC::evSetVideoMode(unsigned long xres, unsigned long yres)
+{
+       m_screen = SDL_SetVideoMode(xres, yres, 32, SDL_HWSURFACE);
+       if (!m_screen) {
+               eFatal("Could not create SDL surface: %s", SDL_GetError());
+               return;
+       }
 
-#endif
+       m_surface.x = m_screen->w;
+       m_surface.y = m_screen->h;
+       m_surface.bpp = m_screen->format->BitsPerPixel;
+       m_surface.bypp = m_screen->format->BytesPerPixel;
+       m_surface.stride = m_screen->pitch;
+       m_surface.data = m_screen->pixels;
+
+       SDL_EnableUNICODE(1);
+}
+
+void gSDLDC::evFlip()
+{
+       SDL_Flip(m_screen);
+}
+
+void gSDLDC::thread()
+{
+       hasStarted();
+
+       bool stop = false;
+       while (!stop) {
+               SDL_Event event;
+               if (SDL_WaitEvent(&event)) {
+                       switch (event.type) {
+                       case SDL_KEYDOWN:
+                       case SDL_KEYUP:
+                       case SDL_QUIT:
+                               m_pump.send(event);
+                               break;
+                       case SDL_USEREVENT:
+                               switch (event.user.code) {
+                               case EV_SET_VIDEO_MODE:
+                                       evSetVideoMode((unsigned long)event.user.data1, (unsigned long)event.user.data2);
+                                       break;
+                               case EV_FLIP:
+                                       evFlip();
+                                       break;
+                               case EV_QUIT:
+                                       stop = true;
+                                       break;
+                               }
+                               break;
+                       }
+               }
+       }
+}
+
+eAutoInitPtr<gSDLDC> init_gSDLDC(eAutoInitNumbers::graphic-1, "gSDLDC");
index 20ff04f..6d016cf 100644 (file)
@@ -1,27 +1,39 @@
 #ifndef __lib_gdi_sdl_h
 #define __lib_gdi_sdl_h
 
-#include "fb.h"
-#include "gpixmap.h"
-#include "grc.h"
+#include <lib/base/thread.h>
+#include <lib/gdi/gmaindc.h>
 
 #include <SDL.h>
 
-class gSDLDC: public gDC
+class gSDLDC: public gMainDC, public eThread, public Object
 {
+private:
        SDL_Surface *m_screen;
-       static gSDLDC *m_instance;
-       void exec(gOpcode *opcode);
+       void exec(const gOpcode *opcode);
 
-       void setPalette();
        gSurface m_surface;
+
+       eFixedMessagePump<SDL_Event> m_pump;
+       void keyEvent(const SDL_Event &event);
+       void pumpEvent(const SDL_Event &event);
+       virtual void thread();
+
+       enum event {
+               EV_SET_VIDEO_MODE,
+               EV_FLIP,
+               EV_QUIT,
+       };
+
+       void pushEvent(enum event code, void *data1 = 0, void *data2 = 0);
+       void evSetVideoMode(unsigned long xres, unsigned long yres);
+       void evFlip();
+
 public:
-       
+       void setResolution(int xres, int yres);
        gSDLDC();
        virtual ~gSDLDC();
-       static int getInstance(ePtr<gSDLDC> &ptr) { if (!m_instance) return -1; ptr = m_instance; return 0; }
        int islocked() { return 0; }
 };
 
-
 #endif
index f4de9d1..9d31bf7 100644 (file)
@@ -1,11 +1,50 @@
-INCLUDES = \
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
        -I$(top_srcdir)/include \
-       -I$(top_srcdir)/src
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LIBRARIES = libenigma_gui.a
 
 libenigma_gui_a_SOURCES = \
-       ebutton.cpp elabel.cpp eslider.cpp ewidget.cpp ewidgetdesktop.cpp  \
-       ewindow.cpp ewindowstyle.cpp elistbox.cpp elistboxcontent.cpp \
-       epixmap.cpp ewindowstyleskinned.cpp einput.cpp einputstring.cpp einputnumber.cpp \
-       ewidgetanimation.cpp epositiongauge.cpp evideo.cpp esubtitle.cpp ecanvas.cpp
+       ebutton.cpp \
+       ecanvas.cpp \
+       einput.cpp \
+       einputnumber.cpp \
+       einputstring.cpp \
+       elabel.cpp \
+       elistbox.cpp \
+       elistboxcontent.cpp \
+       epixmap.cpp \
+       epositiongauge.cpp \
+       eslider.cpp \
+       esubtitle.cpp \
+       evideo.cpp \
+       ewidget.cpp \
+       ewidgetanimation.cpp \
+       ewidgetdesktop.cpp \
+       ewindow.cpp \
+       ewindowstyle.cpp \
+       ewindowstyleskinned.cpp
+
+guiincludedir = $(pkgincludedir)/lib/gui
+guiinclude_HEADERS = \
+       ebutton.h \
+       ecanvas.h \
+       einput.h \
+       einputnumber.h \
+       einputstring.h \
+       elabel.h \
+       elistbox.h \
+       elistboxcontent.h \
+       epixmap.h \
+       epositiongauge.h \
+       eslider.h \
+       esubtitle.h \
+       evideo.h \
+       ewidget.h \
+       ewidgetanimation.h \
+       ewidgetdesktop.h \
+       ewindow.h \
+       ewindowstyle.h \
+       ewindowstyleskinned.h
index 97e2cc6..a19e11a 100644 (file)
@@ -501,6 +501,7 @@ eListboxPythonMultiContent::~eListboxPythonMultiContent()
 {
        Py_XDECREF(m_buildFunc);
        Py_XDECREF(m_selectableFunc);
+       Py_XDECREF(m_template);
 }
 
 void eListboxPythonMultiContent::setSelectionClip(eRect &rect, bool update)
@@ -1158,5 +1159,7 @@ void eListboxPythonMultiContent::entryRemoved(int idx)
 
 void eListboxPythonMultiContent::setTemplate(ePyObject tmplate)
 {
+       Py_XDECREF(m_template);
        m_template = tmplate;
+       Py_XINCREF(m_template);
 }
index 98bc1f7..08bd047 100644 (file)
@@ -381,7 +381,10 @@ void eWidgetDesktop::makeCompatiblePixmap(gPixmap &pm)
        ePtr<gPixmap> target_pixmap;
        m_screen.m_dc->getPixmap(target_pixmap);
        
-       ASSERT(target_pixmap);
+       if (!target_pixmap) {
+               eDebug("no target pixmap! assuming bpp > 8 for accelerated graphics.");
+               return;
+       }
        
        if (target_pixmap->surface && target_pixmap->surface->bpp > 8)
                return;
index 020c988..392c52c 100644 (file)
@@ -1,6 +1,14 @@
-INCLUDES = \
-       -I$(top_srcdir)/include
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LIBRARIES = libenigma_mmi.a
 
-libenigma_mmi_a_SOURCES = mmi_ui.cpp
+libenigma_mmi_a_SOURCES = \
+       mmi_ui.cpp
+
+mmiincludedir = $(pkgincludedir)/lib/mmi
+mmiinclude_HEADERS = \
+       mmi_ui.h
index 0320cb2..3d57d6a 100644 (file)
@@ -1,9 +1,16 @@
-INCLUDES = \
-       -I$(top_srcdir)/include
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LIBRARIES = libenigma_nav.a
 
 libenigma_nav_a_SOURCES = \
-       core.cpp pcore.cpp
-
+       core.cpp \
+       pcore.cpp
 
+navincludedir = $(pkgincludedir)/lib/nav
+navinclude_HEADERS = \
+       core.h \
+       pcore.h
diff --git a/lib/python/.gitignore b/lib/python/.gitignore
new file mode 100644 (file)
index 0000000..c1fa59f
--- /dev/null
@@ -0,0 +1,2 @@
+enigma.py
+enigma_python.cpp
index 7f83756..0f1a8fc 100644 (file)
@@ -15,17 +15,17 @@ def readFile(filename):
        file.close()
        return data
 
-class Harddisk:
-       DEVTYPE_UDEV = 0
-       DEVTYPE_DEVFS = 1
+DEVTYPE_UDEV = 0
+DEVTYPE_DEVFS = 1
 
+class Harddisk:
        def __init__(self, device):
                self.device = device
 
                if access("/dev/.udev", 0):
-                       self.type = self.DEVTYPE_UDEV
+                       self.type = DEVTYPE_UDEV
                elif access("/dev/.devfsd", 0):
-                       self.type = self.DEVTYPE_DEVFS
+                       self.type = DEVTYPE_DEVFS
                else:
                        print "Unable to determine structure of /dev"
 
@@ -37,11 +37,11 @@ class Harddisk:
                self.disk_path = ''
                self.phys_path = path.realpath(self.sysfsPath('device'))
 
-               if self.type == self.DEVTYPE_UDEV:
+               if self.type == DEVTYPE_UDEV:
                        self.dev_path = '/dev/' + self.device
                        self.disk_path = self.dev_path
 
-               elif self.type == self.DEVTYPE_DEVFS:
+               elif self.type == DEVTYPE_DEVFS:
                        tmp = readFile(self.sysfsPath('dev')).split(':')
                        s_major = int(tmp[0])
                        s_minor = int(tmp[1])
@@ -64,9 +64,9 @@ class Harddisk:
                return self.device < ob.device
 
        def partitionPath(self, n):
-               if self.type == self.DEVTYPE_UDEV:
+               if self.type == DEVTYPE_UDEV:
                        return self.dev_path + n
-               elif self.type == self.DEVTYPE_DEVFS:
+               elif self.type == DEVTYPE_DEVFS:
                        return self.dev_path + '/part' + n
 
        def sysfsPath(self, filename):
@@ -79,9 +79,9 @@ class Harddisk:
 
        def bus(self):
                # CF (7025 specific)
-               if self.type == self.DEVTYPE_UDEV:
+               if self.type == DEVTYPE_UDEV:
                        ide_cf = False  # FIXME
-               elif self.type == self.DEVTYPE_DEVFS:
+               elif self.type == DEVTYPE_DEVFS:
                        ide_cf = self.device[:2] == "hd" and "host0" not in self.dev_path
 
                internal = "pci" in self.phys_path
@@ -142,7 +142,7 @@ class Harddisk:
 
        def numPartitions(self):
                numPart = -1
-               if self.type == self.DEVTYPE_UDEV:
+               if self.type == DEVTYPE_UDEV:
                        try:
                                devdir = listdir('/dev')
                        except OSError:
@@ -151,7 +151,7 @@ class Harddisk:
                                if filename.startswith(self.device):
                                        numPart += 1
 
-               elif self.type == self.DEVTYPE_DEVFS:
+               elif self.type == DEVTYPE_DEVFS:
                        try:
                                idedir = listdir(self.dev_path)
                        except OSError:
@@ -413,24 +413,38 @@ class Partition:
                                return True
                return False
 
-DEVICEDB =  \
+DEVICEDB_SR = \
        {"dm8000":
                {
-                       # dm8000:
-                       "/devices/platform/brcm-ehci.0/usb1/1-1/1-1.1/1-1.1:1.0": "Front USB Slot",
-                       "/devices/platform/brcm-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0": "Back, upper USB Slot",
-                       "/devices/platform/brcm-ehci.0/usb1/1-1/1-1.3/1-1.3:1.0": "Back, lower USB Slot",
-                       "/devices/platform/brcm-ehci-1.1/usb2/2-1/2-1:1.0/host1/target1:0:0/1:0:0:0": "DVD Drive",
+                       "/devices/pci0000:01/0000:01:00.0/host0/target0:0:0/0:0:0:0": _("DVD Drive"),
+                       "/devices/pci0000:01/0000:01:00.0/host1/target1:0:0/1:0:0:0": _("DVD Drive"),
+                       "/devices/platform/brcm-ehci-1.1/usb2/2-1/2-1:1.0/host3/target3:0:0/3:0:0:0": _("DVD Drive"),
+               },
+       "dm800":
+       {
+       },
+       "dm7025":
+       {
+       }
+       }
+
+DEVICEDB = \
+       {"dm8000":
+               {
+                       "/devices/platform/brcm-ehci.0/usb1/1-1/1-1.1/1-1.1:1.0": _("Front USB Slot"),
+                       "/devices/platform/brcm-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0": _("Back, upper USB Slot"),
+                       "/devices/platform/brcm-ehci.0/usb1/1-1/1-1.3/1-1.3:1.0": _("Back, lower USB Slot"),
+                       "/devices/platform/brcm-ehci.0/usb1/1-1/1-1.1/1-1.1:1.0": _("Front USB Slot"),
+                       "/devices/platform/brcm-ehci-1.1/usb2/2-1/2-1:1.0/": _("Internal USB Slot"),
+                       "/devices/platform/brcm-ohci-1.1/usb4/4-1/4-1:1.0/": _("Internal USB Slot"),
                },
        "dm800":
        {
-               # dm800:
                "/devices/platform/brcm-ehci.0/usb1/1-2/1-2:1.0": "Upper USB Slot",
                "/devices/platform/brcm-ehci.0/usb1/1-1/1-1:1.0": "Lower USB Slot",
        },
        "dm7025":
        {
-               # dm7025:
                "/devices/pci0000:00/0000:00:14.1/ide1/1.0": "CF Card Slot", #hdc
                "/devices/pci0000:00/0000:00:14.1/ide0/0.0": "Internal Harddisk"
        }
@@ -441,6 +455,7 @@ class HarddiskManager:
                self.hdd = [ ]
                self.cd = ""
                self.partitions = [ ]
+               self.devices_scanned_on_init = [ ]
 
                self.on_partition_list_change = CList()
 
@@ -508,24 +523,23 @@ class HarddiskManager:
        def enumerateBlockDevices(self):
                print "enumerating block devices..."
                for blockdev in listdir("/sys/block"):
-                       error, blacklisted, removable, is_cdrom, partitions, medium_found = self.getBlockDevInfo(blockdev)
-                       print "found block device '%s':" % blockdev, 
-                       if error:
-                               print "error querying properties"
-                       elif blacklisted:
-                               print "blacklisted"
-                       elif not medium_found:
-                               print "no medium"
-                       else:
-                               print "ok, removable=%s, cdrom=%s, partitions=%s, device=%s" % (removable, is_cdrom, partitions, blockdev)
-
-                               self.addHotplugPartition(blockdev)
-                               for part in partitions:
-                                       self.addHotplugPartition(part)
+                       error, blacklisted, removable, is_cdrom, partitions, medium_found = self.addHotplugPartition(blockdev)
+                       if not error and not blacklisted:
+                               if medium_found:
+                                       for part in partitions:
+                                               self.addHotplugPartition(part)
+                               self.devices_scanned_on_init.append((blockdev, removable, is_cdrom, medium_found))
 
        def getAutofsMountpoint(self, device):
                return "/autofs/%s/" % (device)
 
+       def is_hard_mounted(self, device):
+               mounts = file('/proc/mounts').read().split('\n')
+               for x in mounts:
+                       if x.find('/autofs') == -1 and x.find(device) != -1:
+                               return True
+               return False
+
        def addHotplugPartition(self, device, physdev = None):
                if not physdev:
                        dev, part = self.splitDeviceName(device)
@@ -535,22 +549,36 @@ class HarddiskManager:
                                physdev = dev
                                print "couldn't determine blockdev physdev for device", device
 
-               # device is the device name, without /dev
-               # physdev is the physical device path, which we (might) use to determine the userfriendly name
-               description = self.getUserfriendlyDeviceName(device, physdev)
+               error, blacklisted, removable, is_cdrom, partitions, medium_found = self.getBlockDevInfo(device)
+               print "found block device '%s':" % device,
 
-               p = Partition(mountpoint = self.getAutofsMountpoint(device), description = description, force_mounted = True, device = device)
-               self.partitions.append(p)
-               self.on_partition_list_change("add", p)
+               if blacklisted:
+                       print "blacklisted"
+               else:
+                       if error:
+                               print "error querying properties"
+                       elif not medium_found:
+                               print "no medium"
+                       else:
+                               print "ok, removable=%s, cdrom=%s, partitions=%s" % (removable, is_cdrom, partitions)
+
+                       l = len(device)
+                       if l:
+                               # see if this is a harddrive
+                               if not device[l-1].isdigit() and not removable and not is_cdrom:
+                                       self.hdd.append(Harddisk(device))
+                                       self.hdd.sort()
+                                       SystemInfo["Harddisk"] = len(self.hdd) > 0
+
+                               if (not removable or medium_found) and not self.is_hard_mounted(device):
+                                       # device is the device name, without /dev
+                                       # physdev is the physical device path, which we (might) use to determine the userfriendly name
+                                       description = self.getUserfriendlyDeviceName(device, physdev)
+                                       p = Partition(mountpoint = self.getAutofsMountpoint(device), description = description, force_mounted = True, device = device)
+                                       self.partitions.append(p)
+                                       self.on_partition_list_change("add", p)
 
-               # see if this is a harddrive
-               l = len(device)
-               if l and not device[l-1].isdigit():
-                       error, blacklisted, removable, is_cdrom, partitions, medium_found = self.getBlockDevInfo(device)
-                       if not blacklisted and not removable and not is_cdrom and medium_found:
-                               self.hdd.append(Harddisk(device))
-                               self.hdd.sort()
-                               SystemInfo["Harddisk"] = len(self.hdd) > 0
+               return error, blacklisted, removable, is_cdrom, partitions, medium_found
 
        def removeHotplugPartition(self, device):
                mountpoint = self.getAutofsMountpoint(device)
@@ -608,15 +636,23 @@ class HarddiskManager:
        def getUserfriendlyDeviceName(self, dev, phys):
                dev, part = self.splitDeviceName(dev)
                description = "External Storage %s" % dev
+               have_model_descr = False
                try:
                        description = readFile("/sys" + phys + "/model")
+                       have_model_descr = True
                except IOError, s:
                        print "couldn't read model: ", s
                from Tools.HardwareInfo import HardwareInfo
-               for physdevprefix, pdescription in DEVICEDB.get(HardwareInfo().device_name,{}).items():
+               if dev.find('sr') == 0 and dev[2].isdigit():
+                       devicedb = DEVICEDB_SR
+               else:
+                       devicedb = DEVICEDB
+               for physdevprefix, pdescription in devicedb.get(HardwareInfo().device_name,{}).items():
                        if phys.startswith(physdevprefix):
-                               description = pdescription
-
+                               if have_model_descr:
+                                       description = pdescription + ' - ' + description
+                               else:
+                                       description = pdescription
                # not wholedisk and not partition 1
                if part and part != 1:
                        description += " (Partition %d)" % part
index 820d103..b026cd5 100755 (executable)
@@ -1,6 +1,7 @@
 from Components.Console import Console
 from os import listdir as os_listdir, path as os_path
 from re import compile as re_compile
+from enigma import eEnv
 
 class Keyboard:
        def __init__(self):
@@ -8,9 +9,9 @@ class Keyboard:
                self.readKeyboardMapFiles()
 
        def readKeyboardMapFiles(self):
-               for keymapfile in os_listdir('/usr/share/keymaps/'):
+               for keymapfile in os_listdir(eEnv.resolve('${datadir}/keymaps/')):
                        if (keymapfile.endswith(".info")):
-                               f = open('/usr/share/keymaps/' + keymapfile)
+                               f = open(eEnv.resolve('${datadir}/keymaps/') + keymapfile)
                                mapfile = None
                                mapname = None
                                for line in f:
@@ -32,7 +33,7 @@ class Keyboard:
                try:
                        keymap = self.keyboardmaps[index]
                        print "Activating keymap:",keymap[1]
-                       keymappath = '/usr/share/keymaps/' + keymap[0]
+                       keymappath = eEnv.resolve('${datadir}/keymaps/') + keymap[0]
                        if os_path.exists(keymappath):
                                Console().ePopen(("loadkmap < " + str(keymappath)))
                except:
index 7303186..7f7dd5c 100644 (file)
@@ -10,7 +10,7 @@ from enigma import eDVBSatelliteEquipmentControl as secClass, \
        eDVBSatelliteDiseqcParameters as diseqcParam, \
        eDVBSatelliteSwitchParameters as switchParam, \
        eDVBSatelliteRotorParameters as rotorParam, \
-       eDVBResourceManager, eDVBDB
+       eDVBResourceManager, eDVBDB, eEnv
 
 from time import localtime, mktime
 from datetime import datetime
@@ -390,6 +390,7 @@ class SecConfigure:
 
                                        if currLnb.diseqcMode.value == "1_0":
                                                currCO = currLnb.commandOrder1_0.value
+                                               sec.setRepeats(0)
                                        else:
                                                currCO = currLnb.commandOrder.value
 
@@ -1082,7 +1083,7 @@ def InitNimManager(nimmgr):
 
        unicablelnbproducts = {}
        unicablematrixproducts = {}
-       doc = xml.etree.cElementTree.parse("/usr/share/enigma2/unicable.xml")
+       doc = xml.etree.cElementTree.parse(eEnv.resolve("${datadir}/enigma2/unicable.xml"))
        root = doc.getroot()
 
        entry = root.find("lnb")
index 5ae43ed..51dc09a 100644 (file)
@@ -2,11 +2,11 @@
 ## Picon renderer by Gruffy .. some speedups by Ghost
 ##
 from Renderer import Renderer
-from enigma import ePixmap
+from enigma import ePixmap, eEnv
 from Tools.Directories import fileExists, SCOPE_SKIN_IMAGE, SCOPE_CURRENT_SKIN, resolveFilename
 
 class Picon(Renderer):
-       searchPaths = ('/usr/share/enigma2/%s/',
+       searchPaths = (eEnv.resolve('${datadir}/enigma2/%s/'),
                                '/media/cf/%s/',
                                '/media/usb/%s/')
 
index b86c1a1..8ea9aa6 100644 (file)
@@ -1,7 +1,7 @@
 from Components.Harddisk import harddiskmanager
 from config import ConfigSubsection, ConfigYesNo, config, ConfigSelection, ConfigText, ConfigNumber, ConfigSet, ConfigLocations
 from Tools.Directories import resolveFilename, SCOPE_HDD
-from enigma import Misc_Options, setTunerTypePriorityOrder;
+from enigma import Misc_Options, setTunerTypePriorityOrder, eEnv;
 from SystemInfo import SystemInfo
 import os
 
@@ -94,7 +94,7 @@ def InitUsageConfig():
 
        SystemInfo["12V_Output"] = Misc_Options.getInstance().detected_12V_output()
 
-       config.usage.keymap = ConfigText(default = "/usr/share/enigma2/keymap.xml")
+       config.usage.keymap = ConfigText(default = eEnv.resolve("${datadir}/enigma2/keymap.xml"))
 
        config.seek = ConfigSubsection()
        config.seek.selfdefined_13 = ConfigNumber(default=15)
index e38f7d8..666ba67 100644 (file)
@@ -1,23 +1,45 @@
-INCLUDES = \
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
        -I$(top_srcdir)/include \
-       -I$(top_srcdir)/src
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 SUBDIRS = Components Tools Screens Plugins
 
 noinst_LIBRARIES = libenigma_python.a
 
 libenigma_python_a_SOURCES = \
-       python.cpp enigma_python_wrap.cxx connections.cpp
+       connections.cpp \
+       python.cpp
 
-enigma_python_wrap.cxx: enigma_python.i
-       swig -I$(top_srcdir)/ -c++ -python -O -nortti -nothreads enigma_python.i
-       python enigma_py_patcher.py
+pythonincludedir = $(pkgincludedir)/lib/python
+pythoninclude_HEADERS = \
+       connections.h \
+       python.h \
+       swig.h
 
-enigma.py: enigma_python_wrap.cxx
+nodist_libenigma_python_a_SOURCES = \
+       enigma_python.cpp
 
-CLEANFILES = enigma.py enigma_python_wrap.cxx
+noinst_PYTHON = \
+       enigma_py_patcher.py
+
+EXTRA_DIST = \
+       enigma_python.i
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enigma_python.Pcpp@am__quote@
+
+.i.cpp:
+       $(AM_V_GEN)$(SWIG) $(AX_SWIG_PYTHON_OPT) -MT $@ -MD -MF $(DEPDIR)/$*.Tpo -I$(top_srcdir) -O -nortti -nothreads -o $@ $<
+       $(AM_V_at)mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Pcpp
+       $(AM_V_at)$(PYTHON) $(srcdir)/enigma_py_patcher.py
+
+enigma.py: enigma_python.cpp
+
+CLEANFILES = enigma.py enigma_python.cpp
 
 installdir = $(pkglibdir)/python
 
 install_PYTHON = \
        enigma.py
+
index 3ccca98..4828081 100644 (file)
@@ -1,4 +1,4 @@
-installdir = $(LIBDIR)/enigma2/python/Plugins/DemoPlugins/TPMDemo
+installdir = $(pkglibdir)/python/Plugins/DemoPlugins/TPMDemo
 
 install_PYTHON = \
        __init__.py \
index 7f755db..6dbcd49 100644 (file)
@@ -2,6 +2,7 @@ from Tools.Directories import fileExists
 from Components.config import config, ConfigSubsection, ConfigInteger, ConfigText, ConfigSelection, getConfigListEntry, ConfigSequence, ConfigSubList
 import DVDTitle
 import xml.dom.minidom
+from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_FONTS
 
 class ConfigColor(ConfigSequence):
        def __init__(self, default = [128,128,128]):
@@ -125,6 +126,14 @@ class DVDProject:
                        for key in self.filekeys:
                                val = self.settings.dict()[key].getValue()
                                if not fileExists(val):
+                                       if val[0] != "/":
+                                               if key.find("font") == 0:
+                                                       val = resolveFilename(SCOPE_FONTS)+val
+                                               else:
+                                                       val = resolveFilename(SCOPE_PLUGINS)+"Extensions/DVDBurn/"+val
+                                               if fileExists(val):
+                                                       self.settings.dict()[key].setValue(val)
+                                                       continue
                                        self.error += "\n%s '%s' not found" % (key, val)
                #except AttributeError:
                        #print "loadProject AttributeError", self.error
index 451e8a8..4645260 100644 (file)
@@ -3,11 +3,11 @@
        <settings
                name="Dreambox DVD record"
                authormode="menu_linked"
-               menutemplate="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml"
+               menutemplate="Thumbs_menu_clouds.ddvdm.xml"
                titlesetmode="multi"
-               vmgm="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/vmgmdream.mpg"
+               vmgm="vmgmdream.mpg"
                output="dvd"
-               isopath="/media/hdd/movie/"
+               isopath="/hdd/movie/"
                dataformat="iso9660_4"
        />
        <titles> </titles>
index 0de7f4b..bf6356a 100644 (file)
@@ -3,17 +3,17 @@
        <settings
                titleformat="$i. $t"
                subtitleformat="$D.$M.$Y, $T $C, $d"
-               menubg="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/dreamdvd_boat.jpg"
-               menuaudio="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/silence.mp2"
+               menubg="dreamdvd_boat.jpg"
+               menuaudio="silence.mp2"
                dimensions="(720, 576)"
                rows="5"
                cols="1"
                color_button="[8, 0, 0]"
                color_highlight="[0, 192, 192]"
                color_headline="[0, 0, 128]"
-               fontface_headline="/usr/share/fonts/nmsbd.ttf"
-               fontface_title="/usr/share/fonts/nmsbd.ttf"
-               fontface_subtitle="/usr/share/fonts/nmsbd.ttf"
+               fontface_headline="nmsbd.ttf"
+               fontface_title="nmsbd.ttf"
+               fontface_subtitle="nmsbd.ttf"
                fontsize_headline="46"
                fontsize_title="24"
                fontsize_subtitle="14"
index c00c3fe..074f203 100644 (file)
@@ -3,17 +3,17 @@
        <settings
                titleformat="$t"
                subtitleformat="$d"
-               menubg="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/dreamdvd_clouds.jpg"
-               menuaudio="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/silence.mp2"
+               menubg="dreamdvd_clouds.jpg"
+               menuaudio="silence.mp2"
                dimensions="(720, 576)"
                rows="2"
                cols="2"
                color_button="[8, 0, 0]"
                color_highlight="[128, 0, 0]"
                color_headline="[128, 0, 0]"
-               fontface_headline="/usr/share/fonts/nmsbd.ttf"
-               fontface_title="/usr/share/fonts/nmsbd.ttf"
-               fontface_subtitle="/usr/share/fonts/nmsbd.ttf"
+               fontface_headline="nmsbd.ttf"
+               fontface_title="nmsbd.ttf"
+               fontface_subtitle="nmsbd.ttf"
                fontsize_headline="46"
                fontsize_title="18"
                fontsize_subtitle="12"
index 71ea714..ec212e4 100644 (file)
@@ -1,4 +1,3 @@
-if HAVE_DDVDLIB
 SUBDIRS = src meta
 
 installdir = $(pkglibdir)/python/Plugins/Extensions/DVDPlayer
@@ -8,4 +7,3 @@ install_PYTHON = \
        plugin.py \
        keymap.xml \
        LICENSE
-endif
index 64b4ae5..e1ab3ef 100755 (executable)
@@ -39,8 +39,11 @@ class FileBrowser(Screen):
                                currDir = "/media/dvd/"
                        if not pathExists(currDir):
                                currDir = "/"
+                       if lastpath == "":  # 'None' is magic to start at the list of mountpoints
+                               currDir = None
 
-                       self.filelist = FileList(currDir, matchingPattern = "(?i)^.*\.(iso)", useServiceRef = True)
+                       inhibitDirs = ["/bin", "/boot", "/dev", "/etc", "/home", "/lib", "/proc", "/sbin", "/share", "/sys", "/tmp", "/usr", "/var"]
+                       self.filelist = FileList(currDir, matchingPattern = "(?i)^.*\.(iso|img)", useServiceRef = True)
                        self["filelist"] = self.filelist
 
                self["FilelistActions"] = ActionMap(["SetupActions"],
@@ -79,6 +82,12 @@ class FileBrowser(Screen):
                                        lastpath = (pathname.rstrip("/").rsplit("/",1))[0]
                                        print "lastpath video_ts.ifo=", lastpath
                                        self.close(pathname)
+                               if fileExists(pathname+"VIDEO_TS/VIDEO_TS.IFO"):
+                                       print "dvd structure found, trying to open..."
+                                       lastpath = (pathname.rstrip("/").rsplit("/",1))[0]
+                                       print "lastpath video_ts.ifo=", lastpath
+                                       pathname += "VIDEO_TS"
+                                       self.close(pathname)
                        else:
                                lastpath = filename[0:filename.rfind("/")]
                                print "lastpath directory=", lastpath
@@ -625,6 +634,14 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP
                        newref = eServiceReference(4369, 0, val)
                        print "play", newref.toString()
                        if curref is None or curref != newref:
+                               if newref.toString().endswith("/VIDEO_TS") or newref.toString().endswith("/"):
+                                       names = newref.toString().rsplit("/",3)
+                                       if names[2].startswith("Disk ") or names[2].startswith("DVD "):
+                                               name = str(names[1]) + " - " + str(names[2])
+                                       else:
+                                               name = names[2]
+                                       print "setting name to: ", self.service
+                                       newref.setName(str(name))
                                self.session.nav.playService(newref)
                                self.service = self.session.nav.getCurrentService()
                                print "self.service", self.service
index 27c751c..7aaec9b 100644 (file)
@@ -1,17 +1,15 @@
-OBJS := servicedvd.cpp
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
--include $(OBJS:.cpp=.d)
+plugindir = $(pkglibdir)/python/Plugins/Extensions/DVDPlayer
 
-installdir = $(pkglibdir)/python/Plugins/Extensions/DVDPlayer
+plugin_LTLIBRARIES = servicedvd.la
 
-install_PYTHON = \
-       servicedvd.so
+servicedvd_la_SOURCES = \
+       servicedvd.cpp \
+       servicedvd.h
 
-servicedvd.so:
-       $(CXX) $(CPPFLAGS) -MD $(CXXFLAGS) $(DEFS) -I$(top_srcdir)/include \
-       -Wall -W $(OBJS) -shared -fPIC -Wl,-soname,servicedvd.so -o servicedvd.so \
-       $(LDFLAGS) -ldreamdvd
-
-all: servicedvd.so
-
-CLEANFILES = servicedvd.so servicedvd.d
+servicedvd_la_LDFLAGS = -avoid-version -module
index 2ba5392..5fbfb0a 100644 (file)
@@ -32,6 +32,7 @@ eServiceFactoryDVD::eServiceFactoryDVD()
        {
                std::list<std::string> extensions;
                extensions.push_back("iso");
+               extensions.push_back("img");
                sc->addServiceFactory(eServiceFactoryDVD::id, this, extensions);
        }
 }
@@ -480,7 +481,10 @@ RESULT eServiceDVD::getName(std::string &name)
        if ( m_ddvd_titlestring[0] != '\0' )
                name = m_ddvd_titlestring;
        else
-               name = m_ref.path;
+               if ( !m_ref.name.empty() )
+                       name = m_ref.name;
+               else
+                       name = m_ref.path;
        return 0;
 }
 
index 5a6e3f3..7a3a9be 100755 (executable)
@@ -1,6 +1,10 @@
 installdir = $(pkglibdir)/python/Plugins/Extensions
 
-SUBDIRS = TuxboxPlugins CutListEditor PicturePlayer MediaScanner MediaPlayer GraphMultiEPG SocketMMI DVDPlayer DVDBurn Modem
+SUBDIRS = TuxboxPlugins CutListEditor PicturePlayer MediaScanner MediaPlayer GraphMultiEPG SocketMMI DVDBurn Modem
+
+if HAVE_LIBDDVD
+SUBDIRS += DVDPlayer
+endif
 
 install_PYTHON =       \
        __init__.py
index 8e80e18..5ce7d03 100644 (file)
@@ -1,17 +1,15 @@
-OBJS = socket_mmi.cpp
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
--include $(OBJS:.cpp=.d)
+plugindir = $(pkglibdir)/python/Plugins/Extensions/SocketMMI
 
-installdir = $(pkglibdir)/python/Plugins/Extensions/SocketMMI
+plugin_LTLIBRARIES = socketmmi.la
 
-install_PYTHON = \
-       socketmmi.so
+socketmmi_la_SOURCES = \
+       socket_mmi.cpp \
+       socket_mmi.h
 
-socketmmi.so: socket_mmi.cpp socket_mmi.h
-       $(CXX) $(CPPFLAGS) -MD $(CXXFLAGS) $(DEFS) -I$(top_srcdir)/include \
-       -Wall -W $(OBJS) -shared -fPIC -Wl,-soname,socketmmi.so -o socketmmi.so \
-       $(LDFLAGS)
-
-all: socketmmi.so
-
-CLEANFILES = socketmmi.so socketmmi.d
+socketmmi_la_LDFLAGS = -avoid-version -module
index 2c0edf5..52296c6 100755 (executable)
@@ -12,7 +12,7 @@ from ServiceReference import ServiceReference
 from Plugins.Plugin import PluginDescriptor
 from xml.etree.cElementTree import parse as ci_parse
 from Tools.XMLTools import elementsWithTag, mergeText, stringToXML
-from enigma import eDVBCI_UI, eDVBCIInterfaces
+from enigma import eDVBCI_UI, eDVBCIInterfaces, eEnv
 
 from os import system, path as os_path
 
@@ -115,7 +115,7 @@ class CIconfigMenu(Screen):
 
                Screen.__init__(self, session)
                self.ci_slot=ci_slot
-               self.filename="/etc/enigma2/ci"+str(self.ci_slot)+".xml"
+               self.filename = eEnv.resolve("${sysconfdir}/enigma2/ci") + str(self.ci_slot) + ".xml"
 
                self["key_red"] = StaticText(_("Delete"))
                self["key_green"] = StaticText(_("add Service"))
@@ -567,7 +567,7 @@ def activate_all(session):
                        return Len > 0 and definitions[Len-1].text or default   
 
                for ci in range(NUM_CI):
-                       filename="/etc/enigma2/ci"+str(ci)+".xml"
+                       filename = eEnv.resolve("${sysconfdir}/enigma2/ci") + str(ci) + ".xml"
 
                        if not os_path.exists(filename):
                                print "[CI_Activate_Config_CI%d] no config file found" %ci
index b19007c..1f379f1 100644 (file)
 from Plugins.Plugin import PluginDescriptor
-from twisted.internet.protocol import Protocol, Factory
-from twisted.internet import reactor
 from Components.Harddisk import harddiskmanager
+from Tools.Directories import fileExists
 
 hotplugNotifier = [ ]
+bdpoll = None
 
-class Hotplug(Protocol):
-       def connectionMade(self):
-               self.received = ""
+def processHotplugData(self, v):
+       print "hotplug:", v
+       action = v.get("ACTION")
+       device = v.get("DEVPATH")
+       physdevpath = v.get("PHYSDEVPATH")
+       media_state = v.get("X_E2_MEDIA_STATUS")
 
-       def dataReceived(self, data):
-               self.received += data
+       dev = device.split('/')[-1]
 
-       def connectionLost(self, reason):
-               data = self.received.split('\0')[:-1]
+       if action is not None and action == "add":
+               error, blacklisted, removable, is_cdrom, partitions, medium_found = harddiskmanager.addHotplugPartition(dev, physdevpath)
+               if bdpoll and removable or is_cdrom:
+                       bdpoll.addDevice(dev, is_cdrom, medium_found)
+       elif action is not None and action == "remove":
+               if bdpoll:
+                       bdpoll.removeDevice(dev)
+               harddiskmanager.removeHotplugPartition(dev)
+       elif media_state is not None:
+               if media_state == '1':
+                       harddiskmanager.removeHotplugPartition(dev)
+                       harddiskmanager.addHotplugPartition(dev, physdevpath)
+               elif media_state == '0':
+                       harddiskmanager.removeHotplugPartition(dev)
 
-               v = {}
+       for callback in hotplugNotifier:
+               try:
+                       callback(dev, action or media_state)
+               except AttributeError:
+                       hotplugNotifier.remove(callback)
 
-               for x in data:
-                       i = x.find('=')
-                       var, val = x[:i], x[i+1:]
-                       v[var] = val
+CDROM_DRIVE_STATUS = 0x5326
+CDROM_MEDIA_CHANGED = 0x5325
+CDSL_CURRENT = ((int)(~0>>1))
+CDS_NO_INFO = 0
+CDS_NO_DISC = 1
+CDS_TRAY_OPEN = 2
+CDS_DRIVE_NOT_READY = 3
+CDS_DISC_OK = 4
+ENOMEDIUM = 159
+IOC_NRBITS = 8
+IOC_NRSHIFT = 0
+IOC_TYPESHIFT = (IOC_NRSHIFT+IOC_NRBITS)
+BLKRRPART = ((0x12<<IOC_TYPESHIFT) | (95<<IOC_NRSHIFT))
 
-               print "hotplug:", v
+def autostart(reason, **kwargs):
+       if reason == 0:
+               print "starting hotplug handler"
 
-               action = v.get("ACTION")
-               device = v.get("DEVPATH")
-               physdevpath = v.get("PHYSDEVPATH")
-               media_state = v.get("X_E2_MEDIA_STATUS")
+               if fileExists('/dev/.udev'):
+                       global netlink
+                       global bdpoll
+                       from enigma import eSocketNotifier, eTimer, ePythonMessagePump
+                       import socket
+                       from select import POLLIN, POLLPRI
 
-               dev = device.split('/')[-1]
+                       class Netlink:
+                               def __init__(self):
+                                       self.netlink = socket.socket(socket.AF_NETLINK, socket.SOCK_DGRAM, 15)
+                                       self.netlink.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 65536)
+                                       self.netlink.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 65536)
+                                       self.netlink.bind((0, 1))
+                                       self.sn = eSocketNotifier(self.netlink.fileno(), POLLIN|POLLPRI)
+                                       self.sn.callback.append(self.dataAvail)
 
-               if action is not None and action == "add":
-                       harddiskmanager.addHotplugPartition(dev, physdevpath)
-               elif action is not None and action == "remove":
-                       harddiskmanager.removeHotplugPartition(dev)
-               elif media_state is not None:
-                       if media_state == '1':
-                               harddiskmanager.removeHotplugPartition(dev)
-                               harddiskmanager.addHotplugPartition(dev, physdevpath)
-                       elif media_state == '0':
-                               harddiskmanager.removeHotplugPartition(dev)
-               
-               for callback in hotplugNotifier:
-                       try:
-                               callback(dev, action or media_state)
-                       except AttributeError:
-                               hotplugNotifier.remove(callback)
+                               def dataAvail(self, what):
+                                       received = self.netlink.recvfrom(16384)
+#                                      print "HOTPLUG(%d):" %(what), received
 
-def autostart(reason, **kwargs):
-       if reason == 0:
-               print "starting hotplug handler"
-               factory = Factory()
-               factory.protocol = Hotplug
+                                       data = received[0].split('\0')[:-1]
+                                       v = {}
+
+                                       for x in data:
+                                               i = x.find('=')
+                                               var, val = x[:i], x[i+1:]
+                                               v[var] = val
+
+                                       if v['SUBSYSTEM'] == 'block' and v['ACTION'] in ('add', 'remove'):
+                                               processHotplugData(self, v)
+
+                       from threading import Thread, Semaphore, Lock
+
+                       class ThreadQueue:
+                               def __init__(self):
+                                       self.__list = [ ]
+                                       self.__lock = Lock()
+
+                               def push(self, val):
+                                       list = self.__list
+                                       lock = self.__lock
+                                       lock.acquire()
+                                       list.append(val)
+                                       lock.release()
+
+                               def pop(self):
+                                       list = self.__list
+                                       lock = self.__lock
+                                       lock.acquire()
+                                       ret = list[0]
+                                       del list[0]
+                                       lock.release()
+                                       return ret
 
-               try:
                        import os
-                       os.remove("/tmp/hotplug.socket")
-               except OSError:
-                       pass
+                       import errno
+                       import fcntl
+
+                       class BDPoll(Thread):
+                               CHECK_INTERVAL = 2000
+                               MSG_MEDIUM_REMOVED = 1
+                               MSG_MEDIUM_INSERTED = 2
+                               MSG_POLL_FINISHED = 4
+                               def __init__(self):
+                                       Thread.__init__(self)
+                                       self.__sema = Semaphore(0)
+                                       self.__lock = Lock()
+                                       self.running = False
+                                       self.devices_to_poll = { }
+                                       self.messages = ThreadQueue()
+                                       self.checkTimer = eTimer()
+                                       self.checkTimer.callback.append(self.timeout)
+                                       self.checkTimer.start(BDPoll.CHECK_INTERVAL, True)
+                                       self.mp = ePythonMessagePump()
+                                       self.mp.recv_msg.get().append(self.gotThreadMsg)
+                                       self.start()
+
+                               def gotThreadMsg(self, msg):
+                                       msg = self.messages.pop()
+                                       if msg[0] == BDPoll.MSG_MEDIUM_REMOVED:
+                                               print "MSG_MEDIUM_REMOVED"
+                                               harddiskmanager.removeHotplugPartition(msg[1])
+                                       elif msg[0] == BDPoll.MSG_MEDIUM_INSERTED:
+                                               print "MSG_MEDIUM_INSERTED"
+                                               harddiskmanager.addHotplugPartition(msg[1])
+                                       elif msg[0] == BDPoll.MSG_POLL_FINISHED:
+                                               self.checkTimer.start(BDPoll.CHECK_INTERVAL, True)
+
+                               def timeout(self):
+                                       self.__sema.release() # start bdpoll loop in thread
+
+                               def is_mounted(self, dev):
+                                       mounts = file('/proc/mounts').read()
+                                       return mounts.find(dev) != -1
+
+                               def run(self):
+                                       sema = self.__sema
+                                       lock = self.__lock
+                                       messages = self.messages
+                                       mp = self.mp
+                                       self.running = True
+                                       while self.running:
+                                               sema.acquire()
+                                               self.__lock.acquire()
+                                               devices_to_poll = self.devices_to_poll.items()
+                                               self.__lock.release()
+                                               devices_to_poll_processed = [ ]
+                                               for device, state in devices_to_poll:
+                                                       got_media = False
+                                                       is_cdrom, prev_media_state = state
+                                                       if is_cdrom:
+                                                               try:
+                                                                       fd = os.open("/dev/" + device, os.O_RDONLY | os.O_NONBLOCK | os.O_EXCL)
+                                                               except OSError, err:
+                                                                       if err.errno == errno.EBUSY:
+                                                                               print "open cdrom exclusive failed:",
+                                                                               if not self.is_mounted(device):
+                                                                                       print "not mounted"
+                                                                                       continue
+                                                                               try:
+                                                                                       print "mounted... try non exclusive"
+                                                                                       fd = os.open("/dev/" + device, os.O_RDONLY | os.O_NONBLOCK)
+                                                                               except OSError, err:
+                                                                                       print "open cdrom not exclusive failed", os.strerror(err.errno)
+                                                                                       continue
+                                                               #here the fs must be valid!
+                                                               try:
+                                                                       ret = fcntl.ioctl(fd, CDROM_DRIVE_STATUS, CDSL_CURRENT)
+                                                               except IOError, err:
+                                                                       print "ioctl CDROM_DRIVE_STATUS failed", os.strerror(err.errno)
+                                                               else:
+                                                                       if ret in (CDS_NO_INFO, CDS_NO_DISC, CDS_TRAY_OPEN, CDS_DRIVE_NOT_READY):
+                                                                               pass
+                                                                       elif ret == CDS_DISC_OK:
+                                                                               #todo new kernels support events to userspace event on media change
+                                                                               #but not 2.6.18.... see hotplug-ng bdpoll.c
+                                                                               got_media = True
+                                                               os.close(fd)
+                                                       else:
+                                                               try:
+                                                                       fd = os.open("/dev/" + device, os.O_RDONLY)
+                                                               except OSError, err:
+                                                                       if err.errno == ENOMEDIUM:
+                                                                               pass
+                                                                       else:
+                                                                               print "open non cdrom failed", os.strerror(err.errno)
+                                                                               continue
+                                                               else:
+                                                                       got_media = True
+                                                                       os.close(fd)
+                                                       if prev_media_state:
+                                                               if not got_media:
+                                                                       print "media removal detected on", device
+                                                                       try:
+                                                                               fd = os.open("/dev/" + device, os.O_RDONLY | os.O_NONBLOCK)
+                                                                       except OSError, err:
+                                                                               print "open device for blkrrpart ioctl failed", os.strerror(err.errno)
+                                                                       else:
+                                                                               try:
+                                                                                       fcntl.ioctl(fd, BLKRRPART)
+                                                                               except IOError, err:
+                                                                                       print "ioctl BLKRRPART failed", os.strerror(err.errno)
+                                                                               os.close(fd)
+                                                       else:
+                                                               if got_media:
+                                                                       print "media insertion detected on", device
+                                                       devices_to_poll_processed.append((device, is_cdrom, got_media))
+                                               self.__lock.acquire()
+                                               for device, is_cdrom, state in devices_to_poll_processed:
+                                                       old_state = self.devices_to_poll.get(device)
+                                                       if old_state is not None and old_state[1] != state:
+                                                               msg = state and BDPoll.MSG_MEDIUM_INSERTED or BDPoll.MSG_MEDIUM_REMOVED
+                                                               self.devices_to_poll[device] = (is_cdrom, state)
+                                                               messages.push((msg, device))
+                                                               mp.send(0)
+
+                                               self.__lock.release()
+                                               messages.push((self.MSG_POLL_FINISHED,))
+                                               mp.send(0)
+
+                               def addDevice(self, device, is_cdrom, inserted):
+                                       self.__lock.acquire()
+                                       if device in self.devices_to_poll:
+                                               print "device", device, "already in bdpoll"
+                                       else:
+                                               print "add device", device, "to bdpoll current state:",
+                                               if inserted:
+                                                       print "medium inserted"
+                                               else:
+                                                       print "medium removed"
+                                               self.devices_to_poll[device] = (is_cdrom, inserted)
+                                       self.__lock.release()
+
+                               def removeDevice(self, device):
+                                       self.__lock.acquire()
+                                       if device in self.devices_to_poll:
+                                               print "device", device, "removed from bdpoll"
+                                               del self.devices_to_poll[device]
+                                       else:
+                                               print "try to del not exist device", device, "from bdpoll"
+                                       self.__lock.release()
+
+                       netlink = Netlink()
+                       bdpoll = BDPoll()
+                       for blockdev, removable, is_cdrom, medium_found in harddiskmanager.devices_scanned_on_init:
+                               if removable or is_cdrom:
+                                       bdpoll.addDevice(blockdev, is_cdrom, medium_found)
+               else:
+                       from twisted.internet.protocol import Protocol, Factory
+                       from twisted.internet import reactor
+
+                       try:
+                               import os
+                               os.remove("/tmp/hotplug.socket")
+                       except OSError:
+                               pass
+
+                       class Hotplug(Protocol):
+                               def connectionMade(self):
+                                       print "HOTPLUG connection!"
+                                       self.received = ""
+
+                               def dataReceived(self, data):
+                                       print "hotplug:", data
+                                       self.received += data
+                                       print "complete", self.received
+
+                               def connectionLost(self, reason):
+                                       print "HOTPLUG connection lost!"
+                                       data = self.received.split('\0')[:-1]
+                                       v = {}
+
+                                       for x in data:
+                                               i = x.find('=')
+                                               var, val = x[:i], x[i+1:]
+                                               v[var] = val
+
+                                       processHotplugData(self, v)
 
-               reactor.listenUNIX("/tmp/hotplug.socket", factory)
+                       factory = Factory()
+                       factory.protocol = Hotplug
+                       reactor.listenUNIX("/tmp/hotplug.socket", factory)
 
 def Plugins(**kwargs):
        return PluginDescriptor(name = "Hotplug", description = "listens to hotplug events", where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart)
index 296d3bc..85ecc92 100644 (file)
@@ -16,7 +16,7 @@ from Components.MultiContent import MultiContentEntryText
 from Components.ScrollLabel import ScrollLabel
 from Components.Harddisk import harddiskmanager
 from Components.Task import Task, Job, job_manager, Condition
-from Tools.Directories import fileExists, isMount
+from Tools.Directories import fileExists, isMount, resolveFilename, SCOPE_HDD, SCOPE_MEDIA
 from Tools.HardwareInfo import HardwareInfo
 from Tools.Downloader import downloadWithProgress
 from enigma import eConsoleAppContainer, gFont, RT_HALIGN_LEFT, RT_HALIGN_CENTER, RT_VALIGN_CENTER, RT_WRAP, eTimer
@@ -391,7 +391,7 @@ class NFIDownload(Screen):
                
                self.box = HardwareInfo().get_device_name()
                self.feed_base = "http://www.dreamboxupdate.com/opendreambox" #/1.5/%s/images/" % self.box      
-               self.usbmountpoint = "/mnt/usb/"
+               self.usbmountpoint = resolveFilename(SCOPE_MEDIA)+"usb/"
 
                self.menulist = []
 
@@ -570,7 +570,7 @@ class NFIDownload(Screen):
 
        def ackedDestination(self):
                print "[ackedDestination]", self.branch, self.target_dir
-               self.container.setCWD("/mnt")
+               self.container.setCWD(resolveFilename(SCOPE_MEDIA)+"usb/")
                if self.target_dir[:8] == "/autofs/":
                        self.target_dir = "/dev/" + self.target_dir[8:-1]
 
@@ -792,13 +792,14 @@ If you already have a prepared bootable USB stick, please insert it now. Otherwi
                self.umountCallback()
 
 def main(session, **kwargs):
-       session.open(NFIDownload,"/home/root")
+       session.open(NFIDownload,resolveFilename(SCOPE_HDD))
 
 def filescan_open(list, session, **kwargs):
        dev = "/dev/" + (list[0].path).rsplit('/',1)[0][7:]
-       print "mounting device " + dev + " to /mnt/usb..."
-       system("mount "+dev+" /mnt/usb/ -o rw,sync")
-       session.open(NFIDownload,"/mnt/usb/")
+       print "mounting device " + dev + " to /media/usb..."
+       usbmountpoint = resolveFilename(SCOPE_MEDIA)+"usb/"
+       system("mount %s %s -o rw,sync" % (dev, usbmountpoint))
+       session.open(NFIDownload,usbmountpoint)
 
 def filescan(**kwargs):
        from Components.Scanner import Scanner, ScanPath
index ba96c07..3504d4c 100755 (executable)
@@ -14,7 +14,7 @@ from Screens.TaskView import JobView
 from Tools.Directories import fileExists
 from Tools.HardwareInfo import HardwareInfo
 from os import system
-from enigma import eConsoleAppContainer, quitMainloop
+from enigma import eConsoleAppContainer, quitMainloop, eEnv
 from Components.About import about
 
 class md5Postcondition(Condition):
@@ -51,7 +51,7 @@ class md5verify(Task):
 class writeNAND(Task):
        def __init__(self, job, param, box):
                Task.__init__(self,job, ("Writing image file to NAND Flash"))
-               self.setTool("/usr/lib/enigma2/python/Plugins/SystemPlugins/NFIFlash/writenfi-mipsel-2.6.18-r1")
+               self.setTool(eEnv.resolve("${libdir}/enigma2/python/Plugins/SystemPlugins/NFIFlash/writenfi-mipsel-2.6.18-r1"))
                if box == "dm7025":
                        self.end = 256
                elif box[:5] == "dm800":
@@ -226,4 +226,4 @@ class NFIFlash(Screen):
                if self.job.status == self.job.FINISHED:
                        self["status"].text = ("rebooting...")
                        from os import system
-                       system("/usr/lib/enigma2/python/Plugins/SystemPlugins/NFIFlash/kill_e2_reboot.sh")
+                       system(eEnv.resolve("${libdir}/enigma2/python/Plugins/SystemPlugins/NFIFlash/kill_e2_reboot.sh"))
index 997b957..30cbb6b 100755 (executable)
@@ -12,12 +12,13 @@ from Plugins.Plugin import PluginDescriptor
 from Components.config import config
 from Tools.Directories import resolveFilename, SCOPE_PLUGINS
 from os import path, walk
+from enigma import eEnv
 
 class SkinSelector(Screen):
        # for i18n:
        # _("Choose your Skin")
        skinlist = []
-       root = "/usr/share/enigma2/"
+       root = eEnv.resolve("${datadir}/enigma2/")
 
        def __init__(self, session, args = None):
 
index 7bd7d7a..01649bb 100755 (executable)
@@ -11,7 +11,7 @@ from Components.config import config
 from Components.ConfigList import ConfigList,ConfigListScreen
 from Components.FileList import MultiFileSelectList
 from Plugins.Plugin import PluginDescriptor
-from enigma import eTimer
+from enigma import eTimer, eEnv
 from Tools.Directories import *
 from os import popen, path, makedirs, listdir, access, stat, rename, remove, W_OK, R_OK
 from time import gmtime, strftime, localtime
@@ -20,7 +20,7 @@ from datetime import date
 
 config.plugins.configurationbackup = ConfigSubsection()
 config.plugins.configurationbackup.backuplocation = ConfigText(default = '/media/hdd/', visible_width = 50, fixed_size = False)
-config.plugins.configurationbackup.backupdirs = ConfigLocations(default=['/etc/enigma2/', '/etc/network/interfaces', '/etc/wpa_supplicant.conf', '/etc/resolv.conf', '/etc/default_gw', '/etc/hostname'])
+config.plugins.configurationbackup.backupdirs = ConfigLocations(default=[eEnv.resolve('${sysconfdir}/enigma2/'), '/etc/network/interfaces', '/etc/wpa_supplicant.conf', '/etc/resolv.conf', '/etc/default_gw', '/etc/hostname'])
 
 def getBackupPath():
        backuppath = config.plugins.configurationbackup.backuplocation.value
index 1797e4f..32d7140 100755 (executable)
@@ -9,13 +9,14 @@ from Plugins.Plugin import PluginDescriptor
 from Tools.Directories import fileExists, resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE
 from Components.Pixmap import Pixmap, MovingPixmap, MultiPixmap
 from os import popen, path, makedirs, listdir, access, stat, rename, remove, W_OK, R_OK
+from enigma import eEnv
 
 from Components.config import config, getConfigListEntry, ConfigSubsection, ConfigText, ConfigLocations, ConfigBoolean
 from Components.Harddisk import harddiskmanager
 config.misc.firstrun = ConfigBoolean(default = True)
 config.plugins.configurationbackup = ConfigSubsection()
 config.plugins.configurationbackup.backuplocation = ConfigText(default = '/media/hdd/', visible_width = 50, fixed_size = False)
-config.plugins.configurationbackup.backupdirs = ConfigLocations(default=['/etc/enigma2/', '/etc/network/interfaces', '/etc/wpa_supplicant.conf'])
+config.plugins.configurationbackup.backupdirs = ConfigLocations(default=[eEnv.resolve('${sysconfdir}/enigma2/'), '/etc/network/interfaces', '/etc/wpa_supplicant.conf'])
 
 
 backupfile = "enigma2settingsbackup.tar.gz"
index de127b0..896d9f2 100755 (executable)
@@ -28,7 +28,7 @@ from Components.Network import iNetwork
 from Tools.Directories import pathExists, fileExists, resolveFilename, SCOPE_PLUGINS, SCOPE_CURRENT_PLUGIN, SCOPE_CURRENT_SKIN, SCOPE_METADIR
 from Tools.LoadPixmap import LoadPixmap
 from Tools.NumericalTextInput import NumericalTextInput
-from enigma import eTimer, quitMainloop, RT_HALIGN_LEFT, RT_VALIGN_CENTER, eListboxPythonMultiContent, eListbox, gFont, getDesktop, ePicLoad, eRCInput, getPrevAsciiCode
+from enigma import eTimer, quitMainloop, RT_HALIGN_LEFT, RT_VALIGN_CENTER, eListboxPythonMultiContent, eListbox, gFont, getDesktop, ePicLoad, eRCInput, getPrevAsciiCode, eEnv
 from cPickle import dump, load
 from os import path as os_path, system as os_system, unlink, stat, mkdir, popen, makedirs, listdir, access, rename, remove, W_OK, R_OK, F_OK
 from time import time, gmtime, strftime, localtime
@@ -43,7 +43,7 @@ from SoftwareTools import iSoftwareTools
 
 config.plugins.configurationbackup = ConfigSubsection()
 config.plugins.configurationbackup.backuplocation = ConfigText(default = '/media/hdd/', visible_width = 50, fixed_size = False)
-config.plugins.configurationbackup.backupdirs = ConfigLocations(default=['/etc/enigma2/', '/etc/network/interfaces', '/etc/wpa_supplicant.conf', '/etc/resolv.conf', '/etc/default_gw', '/etc/hostname'])
+config.plugins.configurationbackup.backupdirs = ConfigLocations(default=[eEnv.resolve('${sysconfdir}/enigma2/'), '/etc/network/interfaces', '/etc/wpa_supplicant.conf', '/etc/resolv.conf', '/etc/default_gw', '/etc/hostname'])
 
 config.plugins.SoftwareManager = ConfigSubsection()
 config.plugins.SoftwareManager.overwriteConfigFiles = ConfigSelection(
@@ -261,9 +261,6 @@ class UpdatePluginMenu(Screen):
                                        for x in parts:
                                                if not access(x[1], F_OK|R_OK|W_OK) or x[1] == '/':
                                                        parts.remove(x)
-                                       for x in parts:
-                                               if x[1].startswith('/autofs/'):
-                                                       parts.remove(x)
                                        if len(parts):
                                                self.session.openWithCallback(self.backuplocation_choosen, ChoiceBox, title = _("Please select medium to use as backup location"), list = parts)
                                elif (currentEntry == "backupfiles"):
@@ -278,14 +275,20 @@ class UpdatePluginMenu(Screen):
 
        def backupfiles_choosen(self, ret):
                self.backupdirs = ' '.join( config.plugins.configurationbackup.backupdirs.value )
-
+               config.plugins.configurationbackup.backupdirs.save()
+               config.plugins.configurationbackup.save()
+               config.save()
+               
        def backuplocation_choosen(self, option):
+               oldpath = config.plugins.configurationbackup.backuplocation.getValue()
                if option is not None:
                        config.plugins.configurationbackup.backuplocation.value = str(option[1])
                config.plugins.configurationbackup.backuplocation.save()
                config.plugins.configurationbackup.save()
                config.save()
-               self.createBackupfolders()
+               newpath = config.plugins.configurationbackup.backuplocation.getValue()
+               if newpath != oldpath:
+                       self.createBackupfolders()
 
        def runUpgrade(self, result):
                if result:
@@ -1702,7 +1705,7 @@ class PacketManager(Screen, NumericalTextInput):
                self.cmdList = []
                self.cachelist = []
                self.cache_ttl = 86400  #600 is default, 0 disables, Seconds cache is considered valid (24h should be ok for caching ipkgs)
-               self.cache_file = '/usr/lib/enigma2/python/Plugins/SystemPlugins/SoftwareManager/packetmanager.cache' #Path to cache directory   
+               self.cache_file = eEnv.resolve('${libdir}/enigma2/python/Plugins/SystemPlugins/SoftwareManager/packetmanager.cache') #Path to cache directory
                self.oktext = _("\nAfter pressing OK, please wait!")
                self.unwanted_extensions = ('-dbg', '-dev', '-doc', 'busybox')
                self.opkgAvail = fileExists('/usr/bin/opkg')
index cfdeb65..490a772 100755 (executable)
@@ -1,4 +1,4 @@
-installdir = $(LIBDIR)/enigma2/python/Plugins/SystemPlugins/TempFanControl
+installdir = $(pkglibdir)/python/Plugins/SystemPlugins/TempFanControl
 
 SUBDIRS = meta
 
@@ -6,4 +6,4 @@ install_PYTHON = \
        __init__.py \
        plugin.py
 
-dist_install_DATA = LICENSE
\ No newline at end of file
+dist_install_DATA = LICENSE
index 28ee363..a13c797 100755 (executable)
@@ -1,4 +1,4 @@
-from enigma import eTimer, eTPM
+from enigma import eTimer, eTPM, eEnv
 from Screens.Screen import Screen
 from Components.ActionMap import ActionMap, NumberActionMap
 from Components.Pixmap import Pixmap,MultiPixmap
@@ -18,7 +18,7 @@ from Tools.HardwareInfo import HardwareInfo
 from Wlan import Wlan, wpaSupplicant, iStatus
 import sha
 
-plugin_path = "/usr/lib/enigma2/python/Plugins/SystemPlugins/WirelessLan"
+plugin_path = eEnv.resolve("${libdir}/enigma2/python/Plugins/SystemPlugins/WirelessLan")
 
 list = []
 list.append("WEP")
old mode 100644 (file)
new mode 100755 (executable)
index c1c6f94..32c7269
@@ -137,7 +137,7 @@ def Plugins(**kwargs):
 file.close()
 
 makefile = open(pluginpath + "/Makefile.am", "w")
-makefile.write("""installdir = $(LIBDIR)/enigma2/python/Plugins/%s/%s
+makefile.write("""installdir = $(pkglibdir)/python/Plugins/%s/%s
 
 install_PYTHON = \\
        __init__.py \\
index 34316f0..c07e349 100644 (file)
@@ -8,7 +8,7 @@ from Components.MenuList import MenuList
 from Components.ServiceEventTracker import ServiceEventTracker, InfoBarBase
 profile("ChannelSelection.py 1")
 from EpgSelection import EPGSelection
-from enigma import eServiceReference, eEPGCache, eServiceCenter, eRCInput, eTimer, eDVBDB, iPlayableService, iServiceInformation, getPrevAsciiCode
+from enigma import eServiceReference, eEPGCache, eServiceCenter, eRCInput, eTimer, eDVBDB, iPlayableService, iServiceInformation, getPrevAsciiCode, eEnv
 from Components.config import config, ConfigSubsection, ConfigText
 from Tools.NumericalTextInput import NumericalTextInput
 profile("ChannelSelection.py 2")
@@ -544,7 +544,7 @@ class ChannelSelectionEdit:
                        refstr = refstr[pos+14:]
                        pos = refstr.find('"')
                        if pos != -1:
-                               filename = '/etc/enigma2/' + refstr[:pos] # FIXMEEE !!! HARDCODED /etc/enigma2
+                               filename = eEnv.resolve('${sysconfdir}/enigma2/') + refstr[:pos]
                self.removeCurrentService()
                try:
                        if filename is not None:
index e9c3c68..61e6fdd 100755 (executable)
@@ -4,6 +4,7 @@ from Components.config import config, ConfigNothing
 from Components.SystemInfo import SystemInfo
 from Components.ConfigList import ConfigListScreen
 from Components.Sources.StaticText import StaticText
+from enigma import eEnv
 
 import xml.etree.cElementTree
 
@@ -14,7 +15,7 @@ try:
        setupfile = file('data/setup.xml', 'r')
 except:
        # if not found in the current path, we use the global datadir-path
-       setupfile = file('/usr/share/enigma2/setup.xml', 'r')
+       setupfile = file(eEnv.resolve('${datadir}/enigma2/setup.xml'), 'r')
 setupdom = xml.etree.cElementTree.parse(setupfile)
 setupfile.close()
 
index a752d31..61e1d5e 100755 (executable)
@@ -10,7 +10,7 @@ from Components.ActionMap import NumberActionMap
 from Components.MenuList import MenuList
 from Components.ConfigList import ConfigList
 from Components.Sources.List import List
-from enigma import eTimer
+from enigma import eTimer, eEnv
 
 from xml.sax import make_parser
 from xml.sax.handler import ContentHandler
@@ -178,7 +178,7 @@ class Wizard(Screen):
                parser.setContentHandler(wizardHandler)
                for xmlfile in self.xmlfile:
                        if xmlfile[0] != '/':
-                               parser.parse('/usr/share/enigma2/' + xmlfile)
+                               parser.parse(eEnv.resolve('${datadir}/enigma2/') + xmlfile)
                        else:
                                parser.parse(xmlfile)
 
index 8ed2c8a..518db49 100755 (executable)
@@ -3,6 +3,7 @@
 from os import path as os_path, mkdir, rmdir, system, walk, stat as os_stat, listdir, readlink, makedirs, error as os_error, symlink, access, F_OK, R_OK, W_OK
 from stat import S_IMODE
 from re import compile
+from enigma import eEnv
 
 try:
        from os import chmod
@@ -39,26 +40,26 @@ PATH_CREATE = 0
 PATH_DONTCREATE = 1
 PATH_FALLBACK = 2
 defaultPaths = {
-               SCOPE_TRANSPONDERDATA: ("/etc/", PATH_DONTCREATE),
-               SCOPE_SYSETC: ("/etc/", PATH_DONTCREATE),
-               SCOPE_FONTS: ("/usr/share/fonts/", PATH_DONTCREATE),
-               SCOPE_CONFIG: ("/etc/enigma2/", PATH_CREATE),
-               SCOPE_PLUGINS: ("/usr/lib/enigma2/python/Plugins/", PATH_CREATE),
+               SCOPE_TRANSPONDERDATA: (eEnv.resolve("${sysconfdir}/"), PATH_DONTCREATE),
+               SCOPE_SYSETC: (eEnv.resolve("${sysconfdir}/"), PATH_DONTCREATE),
+               SCOPE_FONTS: (eEnv.resolve("${datadir}/fonts/"), PATH_DONTCREATE),
+               SCOPE_CONFIG: (eEnv.resolve("${sysconfdir}/enigma2/"), PATH_CREATE),
+               SCOPE_PLUGINS: (eEnv.resolve("${libdir}/enigma2/python/Plugins/"), PATH_CREATE),
 
-               SCOPE_LANGUAGE: ("/usr/share/enigma2/po/", PATH_DONTCREATE),
+               SCOPE_LANGUAGE: (eEnv.resolve("${datadir}/enigma2/po/"), PATH_DONTCREATE),
 
-               SCOPE_SKIN: ("/usr/share/enigma2/", PATH_DONTCREATE),
-               SCOPE_SKIN_IMAGE: ("/usr/share/enigma2/", PATH_DONTCREATE),
+               SCOPE_SKIN: (eEnv.resolve("${datadir}/enigma2/"), PATH_DONTCREATE),
+               SCOPE_SKIN_IMAGE: (eEnv.resolve("${datadir}/enigma2/"), PATH_DONTCREATE),
                SCOPE_HDD: ("/hdd/movie/", PATH_DONTCREATE),
                SCOPE_MEDIA: ("/media/", PATH_DONTCREATE),
-               SCOPE_PLAYLIST: ("/etc/enigma2/playlist/", PATH_CREATE),
+               SCOPE_PLAYLIST: (eEnv.resolve("${sysconfdir}/enigma2/playlist/"), PATH_CREATE),
                
                SCOPE_USERETC: ("", PATH_DONTCREATE), # user home directory
                
-               SCOPE_DEFAULTDIR: ("/usr/share/enigma2/defaults/", PATH_CREATE),
+               SCOPE_DEFAULTDIR: (eEnv.resolve("${datadir}/enigma2/defaults/"), PATH_CREATE),
                SCOPE_DEFAULTPARTITION: ("/dev/mtdblock/6", PATH_DONTCREATE),
-               SCOPE_DEFAULTPARTITIONMOUNTDIR: ("/usr/share/enigma2/dealer", PATH_CREATE),
-               SCOPE_METADIR: ("/usr/share/meta", PATH_CREATE),
+               SCOPE_DEFAULTPARTITIONMOUNTDIR: (eEnv.resolve("${datadir}/enigma2/dealer"), PATH_CREATE),
+               SCOPE_METADIR: (eEnv.resolve("${datadir}/meta"), PATH_CREATE),
        }
 
 FILE_COPY = 0 # copy files from fallback dir to the basedir
@@ -67,7 +68,7 @@ PATH_COPY = 2 # copy the complete fallback dir to the basedir
 PATH_MOVE = 3 # move the fallback dir to the basedir (can be used for changes in paths)
 fallbackPaths = {
                SCOPE_CONFIG: [("/home/root/", FILE_MOVE),
-                                          ("/usr/share/enigma2/defaults/", FILE_COPY)],
+                                          (eEnv.resolve("${datadir}/enigma2/defaults/"), FILE_COPY)],
                SCOPE_HDD: [("/hdd/movies", PATH_MOVE)]
        }
 
index ad76198..b4cd1c7 100644 (file)
@@ -3,11 +3,6 @@
 
 #include <libsig_comp.h>
 
-               /* avoid warnigs :) */
-#include <features.h>
-#undef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 200112L
-
 #include <lib/python/python.h>
 
 class PSignal
index 19fb925..7c99927 100644 (file)
@@ -38,6 +38,7 @@ is usually caused by not marking PSignals as immutable.
 #define SWIG_COMPILE
 #include <lib/base/ebase.h>
 #include <lib/base/smartptr.h>
+#include <lib/base/eenv.h>
 #include <lib/base/eerror.h>
 #include <lib/base/etpm.h>
 #include <lib/base/nconfig.h>
@@ -50,7 +51,7 @@ is usually caused by not marking PSignals as immutable.
 #include <lib/gdi/fb.h>
 #include <lib/gdi/font.h>
 #include <lib/gdi/gpixmap.h>
-#include <lib/gdi/gfbdc.h>
+#include <lib/gdi/gmaindc.h>
 #include <lib/gui/ewidget.h>
 #include <lib/gui/elabel.h>
 #include <lib/gui/einput.h>
@@ -133,6 +134,7 @@ typedef long time_t;
 %include "std_string.i"
 %include <lib/python/swig.h>
 %include <lib/base/object.h>
+%include <lib/base/eenv.h>
 %include <lib/base/eerror.h>
 
 %immutable eSocketNotifier::activated;
@@ -164,7 +166,7 @@ typedef long time_t;
 %include <lib/gdi/fb.h>
 %include <lib/gdi/font.h>
 %include <lib/gdi/gpixmap.h>
-%include <lib/gdi/gfbdc.h>
+%include <lib/gdi/gmaindc.h>
 %include <lib/gdi/epoint.h>
 %include <lib/gdi/erect.h>
 %include <lib/gdi/esize.h>
index 18fdac7..f5b6e4d 100644 (file)
@@ -4,7 +4,6 @@
        #define __lib_python_python_class_h
 #endif
 
-#include <Python.h>
 #include <string>
 #include <lib/base/object.h>
 
index ed09d73..edafd1a 100644 (file)
@@ -1,9 +1,37 @@
-INCLUDES = \
-       -I$(top_srcdir)/include
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
+
+AM_CXXFLAGS = \
+       $(LIBXINE_CFLAGS)
 
 noinst_LIBRARIES = libenigma_service.a
 
 libenigma_service_a_SOURCES = \
-       listboxservice.cpp service.cpp servicemp3.cpp servicedvb.cpp servicefs.cpp \
-       event.cpp servicedvbrecord.cpp
-       
+       event.cpp \
+       listboxservice.cpp \
+       service.cpp \
+       servicedvb.cpp \
+       servicedvbrecord.cpp \
+       servicefs.cpp \
+       servicemp3.cpp
+
+serviceincludedir = $(pkgincludedir)/lib/service
+serviceinclude_HEADERS = \
+       event.h \
+       iservice.h \
+       listboxservice.h \
+       service.h \
+       servicedvb.h \
+       servicedvbrecord.h \
+       servicefs.h \
+       servicemp3.h
+
+if HAVE_LIBXINE
+libenigma_service_a_SOURCES += \
+       servicexine.cpp
+serviceinclude_HEADERS += \
+       servicexine.h
+endif
index 1e58d84..f1858c9 100644 (file)
@@ -309,7 +309,9 @@ eStaticServiceDVBPVRInformation::eStaticServiceDVBPVRInformation(const eServiceR
 RESULT eStaticServiceDVBPVRInformation::getName(const eServiceReference &ref, std::string &name)
 {
        ASSERT(ref == m_ref);
-       if (m_parser.m_name.size())
+       if (!ref.name.empty())
+               name = ref.name;
+       else if (!m_parser.m_name.empty())
                name = m_parser.m_name;
        else
        {
@@ -1094,7 +1096,7 @@ void eDVBServicePlay::serviceEventTimeshift(int event)
 
                        if (m_skipmode < 0)
                                m_cue->seekTo(0, -1000);
-                       ePtr<iDataSource> source = createDataSource(r);
+                       ePtr<iTsSource> source = createTsSource(r);
                        m_service_handler_timeshift.tuneExt(r, 1, source, r.path.c_str(), m_cue, 0, m_dvb_service); /* use the decoder demux for everything */
 
                        m_event((iPlayableService*)this, evUser+1);
@@ -1124,7 +1126,7 @@ void eDVBServicePlay::serviceEventTimeshift(int event)
                                m_service_handler_timeshift.free();
                                resetTimeshift(1);
 
-                               ePtr<iDataSource> source = createDataSource(r);
+                               ePtr<iTsSource> source = createTsSource(r);
                                m_service_handler_timeshift.tuneExt(r, 1, source, m_timeshift_file_next.c_str(), m_cue, 0, m_dvb_service); /* use the decoder demux for everything */
 
                                m_event((iPlayableService*)this, evUser+1);
@@ -1155,7 +1157,7 @@ RESULT eDVBServicePlay::start()
                m_event(this, evStart);
 
        m_first_program_info = 1;
-       ePtr<iDataSource> source = createDataSource(service);
+       ePtr<iTsSource> source = createTsSource(service);
        m_service_handler.tuneExt(service, m_is_pvr, source, service.path.c_str(), m_cue, false, m_dvb_service);
 
        if (m_is_pvr)
@@ -2360,11 +2362,11 @@ void eDVBServicePlay::resetTimeshift(int start)
                m_timeshift_active = 0;
 }
 
-ePtr<iDataSource> eDVBServicePlay::createDataSource(eServiceReferenceDVB &ref)
+ePtr<iTsSource> eDVBServicePlay::createTsSource(eServiceReferenceDVB &ref)
 {
        eRawFile *f = new eRawFile();
        f->open(ref.path.c_str());
-       return ePtr<iDataSource>(f);
+       return ePtr<iTsSource>(f);
 }
 
 void eDVBServicePlay::switchToTimeshift()
@@ -2379,7 +2381,7 @@ void eDVBServicePlay::switchToTimeshift()
 
        m_cue->seekTo(0, -1000);
 
-       ePtr<iDataSource> source = createDataSource(r);
+       ePtr<iTsSource> source = createTsSource(r);
        m_service_handler_timeshift.tuneExt(r, 1, source, m_timeshift_file.c_str(), m_cue, 0, m_dvb_service); /* use the decoder demux for everything */
 
        eDebug("eDVBServicePlay::switchToTimeshift, in pause mode now.");
index 23675bf..3efc259 100644 (file)
@@ -290,7 +290,7 @@ protected:
        ePtr<eConnection> m_video_event_connection;
        void video_event(struct iTSMPEGDecoder::videoEvent);
 
-       virtual ePtr<iDataSource> createDataSource(eServiceReferenceDVB &ref);
+       virtual ePtr<iTsSource> createTsSource(eServiceReferenceDVB &ref);
 };
 
 class eStaticServiceDVBBouquetInformation: public iStaticServiceInformation
index 1fb1e44..e453a2b 100644 (file)
@@ -1,5 +1,3 @@
-#ifdef HAVE_GSTREAMER
-
        /* note: this requires gstreamer 0.10.x and a big list of plugins. */
        /* it's currently hardcoded to use a big-endian alsasink as sink. */
 #include <lib/base/ebase.h>
@@ -1791,6 +1789,3 @@ void eServiceMP3::setPCMDelay(int delay)
        }
 }
 
-#else
-#warning gstreamer not available, not building media player
-#endif
index 01f7cf7..b864a10 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef __servicemp3_h
 #define __servicemp3_h
 
-#ifdef HAVE_GSTREAMER
 #include <lib/base/message.h>
 #include <lib/service/iservice.h>
 #include <lib/dvb/pmt.h>
@@ -228,6 +227,5 @@ private:
        std::string m_useragent;
        RESULT trickSeek(gdouble ratio);
 };
-#endif
 
 #endif
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644 (file)
index 0000000..38066dd
--- /dev/null
@@ -0,0 +1,5 @@
+libtool.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+lt~obsolete.m4
diff --git a/m4/ax_pkg_swig.m4 b/m4/ax_pkg_swig.m4
new file mode 100644 (file)
index 0000000..81226fb
--- /dev/null
@@ -0,0 +1,133 @@
+# ===========================================================================
+#        http://www.gnu.org/software/autoconf-archive/ax_pkg_swig.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_PKG_SWIG([major.minor.micro], [action-if-found], [action-if-not-found])
+#
+# DESCRIPTION
+#
+#   This macro searches for a SWIG installation on your system. If found,
+#   then SWIG is AC_SUBST'd; if not found, then $SWIG is empty.  If SWIG is
+#   found, then SWIG_LIB is set to the SWIG library path, and AC_SUBST'd.
+#
+#   You can use the optional first argument to check if the version of the
+#   available SWIG is greater than or equal to the value of the argument. It
+#   should have the format: N[.N[.N]] (N is a number between 0 and 999. Only
+#   the first N is mandatory.) If the version argument is given (e.g.
+#   1.3.17), AX_PKG_SWIG checks that the swig package is this version number
+#   or higher.
+#
+#   As usual, action-if-found is executed if SWIG is found, otherwise
+#   action-if-not-found is executed.
+#
+#   In configure.in, use as:
+#
+#     AX_PKG_SWIG(1.3.17, [], [ AC_MSG_ERROR([SWIG is required to build..]) ])
+#     AX_SWIG_ENABLE_CXX
+#     AX_SWIG_MULTI_MODULE_SUPPORT
+#     AX_SWIG_PYTHON
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de>
+#   Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
+#   Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>
+#   Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
+#
+#   This program is free software; you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation; either version 2 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You