diff --git a/packages/addons/driver/xbmc-wiimote/addon b/packages/addons/driver/xbmc-wiimote/addon new file mode 100755 index 0000000000..452bc7e5f5 --- /dev/null +++ b/packages/addons/driver/xbmc-wiimote/addon @@ -0,0 +1,29 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin + cp $BUILD/xbmc-*/tools/EventClients/Clients/WiiRemote/WiiUse_WiiRemote $ADDON_BUILD/$PKG_ADDON_ID/bin/wiimote + +mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib + cp -P $BUILD/wiiuse_v[0-9]*/src/release*/*.so $ADDON_BUILD/$PKG_ADDON_ID/lib diff --git a/packages/mediacenter/xbmc/udev.d/98-wiiremote.rules b/packages/addons/driver/xbmc-wiimote/build old mode 100644 new mode 100755 similarity index 82% rename from packages/mediacenter/xbmc/udev.d/98-wiiremote.rules rename to packages/addons/driver/xbmc-wiimote/build index b12c683a39..3a6aa3ca4b --- a/packages/mediacenter/xbmc/udev.d/98-wiiremote.rules +++ b/packages/addons/driver/xbmc-wiimote/build @@ -1,3 +1,5 @@ +#!/bin/sh + ################################################################################ # This file is part of OpenELEC - http://www.openelec.tv # Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) @@ -18,10 +20,9 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -# only does something with "bluetooth" subsystem devices. -SUBSYSTEM!="bluetooth", GOTO="end" +. config/options $1 -# Start Wii Remote support if bluetooth is starting -ACTION=="add|remove", RUN+="/lib/udev/wiiremote_helper" +$SCRIPTS/unpack xbmc -LABEL="end" +cd $BUILD/xbmc-*/tools/EventClients/Clients/WiiRemote + $CXX $CFLAGS -lwiiuse WiiUse_WiiRemote.cpp -o WiiUse_WiiRemote diff --git a/packages/addons/driver/xbmc-wiimote/changelog.txt b/packages/addons/driver/xbmc-wiimote/changelog.txt new file mode 100644 index 0000000000..860783318a --- /dev/null +++ b/packages/addons/driver/xbmc-wiimote/changelog.txt @@ -0,0 +1,2 @@ +1.0.0 +- initial version xbmc-wiimote diff --git a/packages/addons/driver/xbmc-wiimote/icon/icon.png b/packages/addons/driver/xbmc-wiimote/icon/icon.png new file mode 100644 index 0000000000..6da0cbd829 Binary files /dev/null and b/packages/addons/driver/xbmc-wiimote/icon/icon.png differ diff --git a/packages/addons/driver/xbmc-wiimote/meta b/packages/addons/driver/xbmc-wiimote/meta new file mode 100644 index 0000000000..1559f5a0a4 --- /dev/null +++ b/packages/addons/driver/xbmc-wiimote/meta @@ -0,0 +1,38 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="xbmc-wiimote" +PKG_VERSION="1.0" +PKG_REV="0" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.xbmc.org" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain wiiuse" +PKG_PRIORITY="optional" +PKG_SECTION="driver/remote" +PKG_SHORTDESC="xbmc-wiimote: a driver to support WiiMote Controllers." +PKG_LONGDESC="xbmc-wiimote is a driver to support WiiMote Controllers." + +PKG_IS_ADDON="yes" +PKG_ADDON_TYPE="xbmc.service" + +PKG_AUTORECONF="no" diff --git a/packages/addons/driver/xbmc-wiimote/source/bin/wiimote.service b/packages/addons/driver/xbmc-wiimote/source/bin/wiimote.service new file mode 100755 index 0000000000..9a47b482ca --- /dev/null +++ b/packages/addons/driver/xbmc-wiimote/source/bin/wiimote.service @@ -0,0 +1,33 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +# Addon settings + ADDON_DIR="$HOME/.xbmc/addons/driver.remote.xbmc-wiimote" + ADDON_HOME="$HOME/.xbmc/userdata/addon_data/driver.remote.xbmc-wiimote" + + +################################################################################ +# start ps3d +################################################################################ + chmod +x $ADDON_DIR/lib/* + + LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH" wiimote & diff --git a/packages/mediacenter/xbmc/scripts/wiiremote_helper b/packages/addons/driver/xbmc-wiimote/source/default.py old mode 100755 new mode 100644 similarity index 75% rename from packages/mediacenter/xbmc/scripts/wiiremote_helper rename to packages/addons/driver/xbmc-wiimote/source/default.py index 5f8d87556f..18c9e9113c --- a/packages/mediacenter/xbmc/scripts/wiiremote_helper +++ b/packages/addons/driver/xbmc-wiimote/source/default.py @@ -1,8 +1,6 @@ -#!/bin/sh - ################################################################################ -# Copyright (C) 2009-2010 OpenELEC.tv -# http://www.openelec.tv +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) # # 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 @@ -20,15 +18,6 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -case "${ACTION}" in - add) - if [ -f /usr/bin/xbmc-wiiremote ]; then - /usr/bin/xbmc-wiiremote & - fi - ;; - remove) - killall xbmc-wiiremote - ;; -esac +import xbmc, time, os, subprocess -exit 0 +os.system("wiimote.service") diff --git a/packages/mediacenter/xbmc/build b/packages/mediacenter/xbmc/build index f5b2aa35e3..a4d570c64f 100755 --- a/packages/mediacenter/xbmc/build +++ b/packages/mediacenter/xbmc/build @@ -239,9 +239,3 @@ cd $PKG_BUILD make externals make xbmc.bin make xbmc-xrandr - -if [ "$WIIMOTE_SUPPORT" = yes ]; then - (cd tools/EventClients/Clients/WiiRemote; - $CXX $CFLAGS -lwiiuse WiiUse_WiiRemote.cpp -o WiiUse_WiiRemote; - ) -fi diff --git a/packages/mediacenter/xbmc/install b/packages/mediacenter/xbmc/install index 8faf221ae7..dd85f76fee 100755 --- a/packages/mediacenter/xbmc/install +++ b/packages/mediacenter/xbmc/install @@ -99,10 +99,3 @@ if [ "$XBMC_EXTRA_FONTS" = yes ]; then mkdir -p $INSTALL/usr/share/xbmc/media/Fonts cp $PKG_DIR/fonts/*.ttf $INSTALL/usr/share/xbmc/media/Fonts fi - -if [ "$WIIMOTE_SUPPORT" = yes ]; then - mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/tools/EventClients/Clients/WiiRemote/WiiUse_WiiRemote $INSTALL/usr/bin/xbmc-wiiremote - mkdir -p $INSTALL/lib/udev - cp $PKG_DIR/scripts/wiiremote_helper $INSTALL/lib/udev -fi diff --git a/packages/mediacenter/xbmc/meta b/packages/mediacenter/xbmc/meta index 51a1c97830..c732828a98 100644 --- a/packages/mediacenter/xbmc/meta +++ b/packages/mediacenter/xbmc/meta @@ -117,11 +117,6 @@ if [ "$CRYSTALHD" = yes ]; then PKG_DEPENDS="$PKG_DEPENDS crystalhd" fi -if [ "$WIIMOTE_SUPPORT" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS wiiuse" - PKG_DEPENDS="$PKG_DEPENDS wiiuse" -fi - # some python stuff needed for various addons PKG_DEPENDS="$PKG_DEPENDS Imaging" PKG_DEPENDS="$PKG_DEPENDS simplejson" diff --git a/projects/ATV/options b/projects/ATV/options index ee319b7e77..22d08d354a 100644 --- a/projects/ATV/options +++ b/projects/ATV/options @@ -226,9 +226,6 @@ # build and install remote support (yes / no) REMOTE_SUPPORT="yes" -# build and install WiiMote support (yes / no) - WIIMOTE_SUPPORT="no" - # build and install ATV IR remote support (yes / no) ATVCLIENT_SUPPORT="yes" diff --git a/projects/Fusion/options b/projects/Fusion/options index ea117cf6fa..a8001ca3c1 100644 --- a/projects/Fusion/options +++ b/projects/Fusion/options @@ -226,9 +226,6 @@ # build and install remote support (yes / no) REMOTE_SUPPORT="yes" -# build and install WiiMote support (yes / no) - WIIMOTE_SUPPORT="yes" - # build and install ATV IR remote support (yes / no) ATVCLIENT_SUPPORT="no" diff --git a/projects/Generic/options b/projects/Generic/options index d913d2be93..eae46cea25 100644 --- a/projects/Generic/options +++ b/projects/Generic/options @@ -226,9 +226,6 @@ # build and install remote support (yes / no) REMOTE_SUPPORT="yes" -# build and install WiiMote support (yes / no) - WIIMOTE_SUPPORT="yes" - # build and install ATV IR remote support (yes / no) ATVCLIENT_SUPPORT="yes" diff --git a/projects/Generic_OSS/options b/projects/Generic_OSS/options index 3a1dd24019..dd53a6864f 100644 --- a/projects/Generic_OSS/options +++ b/projects/Generic_OSS/options @@ -226,9 +226,6 @@ # build and install remote support (yes / no) REMOTE_SUPPORT="yes" -# build and install WiiMote support (yes / no) - WIIMOTE_SUPPORT="yes" - # build and install ATV IR remote support (yes / no) ATVCLIENT_SUPPORT="yes" diff --git a/projects/ION/options b/projects/ION/options index 29636393f5..700677dc97 100644 --- a/projects/ION/options +++ b/projects/ION/options @@ -226,9 +226,6 @@ # build and install remote support (yes / no) REMOTE_SUPPORT="yes" -# build and install WiiMote support (yes / no) - WIIMOTE_SUPPORT="yes" - # build and install ATV IR remote support (yes / no) ATVCLIENT_SUPPORT="no" diff --git a/projects/Intel/options b/projects/Intel/options index f6370eb80c..5562865a95 100644 --- a/projects/Intel/options +++ b/projects/Intel/options @@ -226,9 +226,6 @@ # build and install remote support (yes / no) REMOTE_SUPPORT="yes" -# build and install WiiMote support (yes / no) - WIIMOTE_SUPPORT="yes" - # build and install ATV IR remote support (yes / no) ATVCLIENT_SUPPORT="no" diff --git a/projects/Ultra/options b/projects/Ultra/options index 839c969c21..534aef2e73 100644 --- a/projects/Ultra/options +++ b/projects/Ultra/options @@ -226,9 +226,6 @@ # build and install remote support (yes / no) REMOTE_SUPPORT="yes" -# build and install WiiMote support (yes / no) - WIIMOTE_SUPPORT="yes" - # build and install ATV IR remote support (yes / no) ATVCLIENT_SUPPORT="no"