mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 06:06:43 +00:00
xbmc: start wiimote and PS3 remote per udev (sorry udev, you are sooo good\!)
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
dad5ac5841
commit
14c404d283
@ -28,14 +28,6 @@ XBMC_ARGS="--standalone -fs --lircdev $LIRCDEV"
|
||||
|
||||
progress "starting XBMC"
|
||||
|
||||
# starting xbmc-wiimote if avaible
|
||||
[ "$(pidof bluetoothd)" -a -f /usr/bin/xbmc-wiiremote ] && \
|
||||
/usr/bin/xbmc-wiiremote >/dev/null 2>&1 &
|
||||
|
||||
# starting xbmc-ps3remote if avaible
|
||||
[ "$(pidof bluetoothd)" -a -f /usr/bin/xbmc-ps3remote ] && \
|
||||
/usr/bin/xbmc-ps3remote localhost 9777 >/dev/null 2>&1 &
|
||||
|
||||
# starting autoupdate
|
||||
[ -f /usr/bin/autoupdate ] && /usr/bin/autoupdate &
|
||||
|
||||
@ -45,7 +37,7 @@ progress "starting XBMC"
|
||||
# starting XBMC
|
||||
while true; do
|
||||
|
||||
DISPLAY=:0.0 xbmc $XBMC_ARGS > /dev/null 2>&1
|
||||
DISPLAY=:0.0 /usr/lib/xbmc/xbmc.bin $XBMC_ARGS > /dev/null 2>&1
|
||||
RET=$?
|
||||
|
||||
case "$RET" in
|
||||
|
@ -66,6 +66,8 @@ mkdir -p $PYTHON_LIBDIR/site-packages/xbmc
|
||||
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/rules.d
|
||||
cp $PKG_DIR/rules.d/98-wiiremote.rules $INSTALL/lib/udev/rules.d
|
||||
fi
|
||||
|
||||
if [ "$PS3REMOTE_SUPPORT" = yes ]; then
|
||||
@ -75,4 +77,6 @@ if [ "$PS3REMOTE_SUPPORT" = yes ]; then
|
||||
cp $PKG_BUILD/tools/EventClients/icons/bluetooth.png $INSTALL/usr/share/pixmaps/xbmc
|
||||
mkdir -p $PYTHON_LIBDIR/site-packages/xbmc
|
||||
echo 'ICON_PATH="/usr/share/pixmaps/xbmc/"' > $PYTHON_LIBDIR/site-packages/xbmc/defs.py
|
||||
mkdir -p $INSTALL/lib/udev/rules.d
|
||||
cp $PKG_DIR/rules.d/98-ps3remote.rules $INSTALL/lib/udev/rules.d
|
||||
fi
|
||||
|
31
packages/mediacenter/xbmc/rules.d/98-ps3remote.rules
Normal file
31
packages/mediacenter/xbmc/rules.d/98-ps3remote.rules
Normal file
@ -0,0 +1,31 @@
|
||||
################################################################################
|
||||
# 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
|
||||
################################################################################
|
||||
|
||||
# only does something with "bluetooth" subsystem devices.
|
||||
SUBSYSTEM!="bluetooth", GOTO="end"
|
||||
|
||||
# Start PS3 Remote support if bluetooth is starting
|
||||
ACTION=="add", RUN+="/usr/bin/xbmc-ps3remote localhost 9777"
|
||||
ACTION=="change", RUN+="/usr/bin/xbmc-ps3remote localhost 9777"
|
||||
|
||||
# remove PS3 Remote support if bluetooth is stopping
|
||||
ACTION=="remove", RUN+="killall xbmc-ps3remote"
|
||||
|
||||
LABEL="end"
|
31
packages/mediacenter/xbmc/rules.d/98-wiiremote.rules
Normal file
31
packages/mediacenter/xbmc/rules.d/98-wiiremote.rules
Normal file
@ -0,0 +1,31 @@
|
||||
################################################################################
|
||||
# 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
|
||||
################################################################################
|
||||
|
||||
# only does something with "bluetooth" subsystem devices.
|
||||
SUBSYSTEM!="bluetooth", GOTO="end"
|
||||
|
||||
# Start Wii Remote support if bluetooth is starting
|
||||
ACTION=="add", RUN+="/usr/bin/xbmc-wiiremote"
|
||||
ACTION=="change", RUN+="/usr/bin/xbmc-wiiremote"
|
||||
|
||||
# remove Wii Remote support if bluetooth is stopping
|
||||
ACTION=="remove", RUN+="killall xbmc-wiiremote"
|
||||
|
||||
LABEL="end"
|
Loading…
x
Reference in New Issue
Block a user