new addon: create addon 'xbmc-ps3remote'

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-10-24 04:51:17 +02:00
parent 7efc137aad
commit f213fb12b3
6 changed files with 138 additions and 0 deletions

View File

@ -0,0 +1,32 @@
#!/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/pixmaps
cp $BUILD/xbmc-*/tools/EventClients/icons/bluetooth.png $ADDON_BUILD/$PKG_ADDON_ID/pixmaps
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/pylib
cp $BUILD/xbmc-*/tools/EventClients/Clients/PS3\ BD\ Remote/ps3_remote.py $ADDON_BUILD/$PKG_ADDON_ID/pylib
cp -R $BUILD/PyBluez-*/.install/usr/lib/python*/site-packages/* $ADDON_BUILD/$PKG_ADDON_ID/pylib
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/pylib/xbmc
cp -R $BUILD/xbmc-*/tools/EventClients/lib/python/* $ADDON_BUILD/$PKG_ADDON_ID/pylib/xbmc

View File

@ -0,0 +1,2 @@
1.0.0
- initial version xbmc-ps3remote

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -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-ps3remote"
PKG_VERSION="1.0"
PKG_REV="0"
PKG_ARCH="any"
PKG_LICENSE="OSS"
PKG_SITE="http://www.xbmc.org"
PKG_URL=""
PKG_DEPENDS="PyBluez"
PKG_BUILD_DEPENDS="toolchain xbmc PyBluez"
PKG_PRIORITY="optional"
PKG_SECTION="driver/remote"
PKG_SHORTDESC="xbmc-ps3remote: a quick port of brandonj's PS3 remote script to use the event server for sending input events."
PKG_LONGDESC="xbmc-ps3remote is a quick port of brandonj's PS3 remote script to use the event server for sending input events."
PKG_IS_ADDON="yes"
PKG_ADDON_TYPE="xbmc.service"
PKG_AUTORECONF="no"

View File

@ -0,0 +1,43 @@
#!/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-ps3remote"
ADDON_HOME="$HOME/.xbmc/userdata/addon_data/driver.remote.xbmc-ps3remote"
PIXMAPS_DIR="$ADDON_DIR/pixmaps"
export PYTHONPATH="$PYTHONPATH:$ADDON_DIR/pylib"
################################################################################
# setup ps3remote
################################################################################
if [ ! -f $ADDON_DIR/pylib/xbmc/defs.py ]; then
echo "ICON_PATH=\"$PIXMAPS_DIR\"" > $ADDON_DIR/pylib/xbmc/defs.py
fi
################################################################################
# start ps3remote
################################################################################
usleep 1000000
python $ADDON_DIR/pylib/ps3_remote.py localhost 9777 &

View File

@ -0,0 +1,23 @@
################################################################################
# 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
################################################################################
import xbmc, time, os, subprocess
os.system("xbmc-ps3remote.service")