mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-01 15:07:49 +00:00
Merge pull request #298 from awiouy/dispmanx_vnc-7.0
backport of #271, #285 and #293
This commit is contained in:
commit
758956d531
38
packages/addons/addon-depends/libconfig/package.mk
Normal file
38
packages/addons/addon-depends/libconfig/package.mk
Normal file
@ -0,0 +1,38 @@
|
||||
#################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libconfig"
|
||||
PKG_VERSION="1.5"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="LGPL"
|
||||
PKG_SITE="http://hyperrealm.com/libconfig/libconfig.html"
|
||||
PKG_URL="https://github.com/hyperrealm/libconfig/archive/v$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="lib"
|
||||
PKG_SHORTDESC="C/C++ Configuration File Library"
|
||||
PKG_LONGDESC="C/C++ Configuration File Library"
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--enable-static \
|
||||
--disable-shared \
|
||||
--disable-examples \
|
||||
--with-sysroot=$SYSROOT_PREFIX"
|
@ -0,0 +1,12 @@
|
||||
diff -Naur a/tests/Makefile.am b/tests/Makefile.am
|
||||
--- a/tests/Makefile.am 2014-03-04 03:04:17.000000000 +0100
|
||||
+++ b/tests/Makefile.am 2016-01-22 21:22:38.742833399 +0100
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
libconfig_tests_SOURCES = tests.c
|
||||
|
||||
-libconfig_tests_CPPFLAGS = -I$(top_srcdir)/tinytest -I../lib
|
||||
+libconfig_tests_CPPFLAGS = -I$(top_srcdir)/tinytest -I$(top_srcdir)/lib
|
||||
|
||||
libconfig_tests_LDADD = -L$(top_builddir)/tinytest -ltinytest \
|
||||
-L$(top_builddir)/lib/.libs -lconfig
|
47
packages/addons/addon-depends/libvncserver/package.mk
Normal file
47
packages/addons/addon-depends/libvncserver/package.mk
Normal file
@ -0,0 +1,47 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libvncserver"
|
||||
PKG_VERSION="0.9.10"
|
||||
PKG_REV="0"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://libvnc.github.io/"
|
||||
PKG_URL="https://github.com/LibVNC/libvncserver/archive/LibVNCServer-$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="libvncserver-LibVNCServer-$PKG_VERSION"
|
||||
PKG_DEPENDS_TARGET="toolchain libjpeg-turbo libpng"
|
||||
PKG_SECTION="libs"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SHORTDESC="LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program."
|
||||
PKG_LONGDESC="LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program."
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
PKG_MAINTAINER="Lukas Rusak (lrusak at irc.freenode.net)"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--disable-shared \
|
||||
--enable-static \
|
||||
--with-sysroot=$SYSROOT_PREFIX \
|
||||
--with-jpeg \
|
||||
--with-png \
|
||||
--without-sdl \
|
||||
--without-gcrypt \
|
||||
--without-client-gcrypt \
|
||||
--without-gnutls"
|
5
packages/addons/service/dispmanx_vnc/changelog.txt
Normal file
5
packages/addons/service/dispmanx_vnc/changelog.txt
Normal file
@ -0,0 +1,5 @@
|
||||
7.0.101
|
||||
- Move settings to Kodi
|
||||
|
||||
7.0.100
|
||||
- Initial addon
|
BIN
packages/addons/service/dispmanx_vnc/icon/icon.png
Normal file
BIN
packages/addons/service/dispmanx_vnc/icon/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
51
packages/addons/service/dispmanx_vnc/package.mk
Normal file
51
packages/addons/service/dispmanx_vnc/package.mk
Normal file
@ -0,0 +1,51 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="dispmanx_vnc"
|
||||
PKG_VERSION="78e6673"
|
||||
PKG_REV="101"
|
||||
PKG_ARCH="arm"
|
||||
PKG_ADDON_PROJECTS="RPi RPi2"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="https://github.com/patrikolausson/dispmanx_vnc"
|
||||
PKG_URL="https://github.com/patrikolausson/dispmanx_vnc/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain libvncserver bcm2835-bootloader libconfig"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="service/system"
|
||||
PKG_SHORTDESC="VNC Server for Raspberry Pi"
|
||||
PKG_LONGDESC="VNC Server for Raspberry Pi using dispmanx"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="Raspberry Pi VNC"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
PKG_ADDON_REPOVERSION="7.0"
|
||||
PKG_MAINTAINER="Anton Voyl (awiouy at gmail dot com)"
|
||||
|
||||
pre_make_target() {
|
||||
export SYSROOT_PREFIX
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
: # nop
|
||||
}
|
||||
|
||||
addon() {
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -p $PKG_BUILD/dispmanx_vncserver $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
diff -Naur a/Makefile b/Makefile
|
||||
--- a/Makefile 2016-01-22 20:52:21.000000000 +0100
|
||||
+++ b/Makefile 2016-01-22 21:29:34.601124600 +0100
|
||||
@@ -1,9 +1,11 @@
|
||||
-CXX = g++
|
||||
-CXXFLAGS = -Wall -std=c++11 -O3 -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM
|
||||
+CXX ?= g++
|
||||
+CXXFLAGS += -Wall -std=c++11 -O3 -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM
|
||||
|
||||
-INCLUDES = -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
|
||||
-LIB_PATHS = -L/opt/vc/lib/
|
||||
-LIBS = -lGLESv2 -lEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lvncserver -lconfig++
|
||||
+SYSROOT_PREFIX ?=
|
||||
+
|
||||
+INCLUDES = -I$(SYSROOT_PREFIX)/usr/include/ -I$(SYSROOT_PREFIX)/usr/include/interface/vcos/pthreads -I$(SYSROOT_PREFIX)/usr/include/interface/vmcs_host/linux
|
||||
+LIB_PATHS = -L$(SYSROOT_PREFIX)/usr/lib/
|
||||
+LIBS = -lGLESv2 -lEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lconfig++ -lz -lssl -lcrypto -lresolv -lvncserver -ljpeg -lpng16
|
||||
|
||||
SOURCES = main.cpp \
|
||||
UFile.cpp \
|
55
packages/addons/service/dispmanx_vnc/source/bin/dispmanx_vncserver-service
Executable file
55
packages/addons/service/dispmanx_vnc/source/bin/dispmanx_vncserver-service
Executable file
@ -0,0 +1,55 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
. /etc/profile
|
||||
oe_setup_addon service.system.dispmanx_vnc
|
||||
|
||||
if [ -f "$ADDON_HOME/dispmanx_vncserver.conf" ]; then
|
||||
rm "$ADDON_HOME/dispmanx_vncserver.conf"
|
||||
fi
|
||||
|
||||
options="-p $vnc_port -s $vnc_screen -t $vnc_framerate"
|
||||
if [ "$vnc_relative" == "true" ]
|
||||
then
|
||||
options="$options -r"
|
||||
else
|
||||
options="$options -a"
|
||||
fi
|
||||
if [ "$vnc_unsafe" == "true" ]
|
||||
then
|
||||
options="$options -u"
|
||||
fi
|
||||
if [ "$vnc_fullscreen" == "true" ]
|
||||
then
|
||||
options="$options -f"
|
||||
fi
|
||||
if [ "$vnc_multithreaded" == "true" ]
|
||||
then
|
||||
options="$options -m"
|
||||
fi
|
||||
if [ ! -z "$vnc_password" ]
|
||||
then
|
||||
options="$options -P $vnc_password"
|
||||
fi
|
||||
if [ "$vnc_downscale" == "true" ]
|
||||
then
|
||||
options="$options -d"
|
||||
fi
|
||||
|
||||
#/bin/sleep 10
|
||||
dispmanx_vncserver $options
|
36
packages/addons/service/dispmanx_vnc/source/default.py
Normal file
36
packages/addons/service/dispmanx_vnc/source/default.py
Normal file
@ -0,0 +1,36 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
import subprocess
|
||||
import xbmc
|
||||
import xbmcaddon
|
||||
|
||||
|
||||
class Monitor(xbmc.Monitor):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
xbmc.Monitor.__init__(self)
|
||||
self.id = xbmcaddon.Addon().getAddonInfo('id')
|
||||
|
||||
def onSettingsChanged(self):
|
||||
subprocess.call(['systemctl', 'restart', self.id])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
Monitor().waitForAbort()
|
||||
|
@ -0,0 +1,46 @@
|
||||
# Kodi Media Center language file
|
||||
# Addon Name: dispmanx_vnc
|
||||
# Addon id: service.system.dispmanx_vnc
|
||||
# Addon Provider: awiouy at gmail dot com
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30000"
|
||||
msgid "Configuration"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30001"
|
||||
msgid "relative"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30002"
|
||||
msgid "port"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30003"
|
||||
msgid "screen"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30004"
|
||||
msgid "unsafe"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30005"
|
||||
msgid "fullscreen"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30006"
|
||||
msgid "multi-threaded"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30007"
|
||||
msgid "password"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30008"
|
||||
msgid "frame-rate"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30009"
|
||||
msgid "downscale"
|
||||
msgstr ""
|
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
<category label="30000">
|
||||
<setting label="30001" id="vnc_relative" type="bool" default="false" />
|
||||
<setting label="30002" id="vnc_port" type="number" default="5900" />
|
||||
<setting label="30003" id="vnc_screen" type="number" default="0" />
|
||||
<setting label="30004" id="vnc_unsafe" type="bool" default="false" />
|
||||
<setting label="30005" id="vnc_fullscreen" type="bool" default="false" />
|
||||
<setting label="30006" id="vnc_multithreaded" type="bool" default="false" />
|
||||
<setting label="30007" id="vnc_password" type="text" option="hidden" />
|
||||
<setting label="30008" id="vnc_framerate" type="number" default="15" />
|
||||
<setting label="30009" id="vnc_downscale" type="bool" default="false" />
|
||||
</category>
|
||||
</settings>
|
@ -0,0 +1,11 @@
|
||||
<settings>
|
||||
<setting id="vnc_downscale" value="false" />
|
||||
<setting id="vnc_framerate" value="15" />
|
||||
<setting id="vnc_fullscreen" value="false" />
|
||||
<setting id="vnc_multithreaded" value="false" />
|
||||
<setting id="vnc_password" value="" />
|
||||
<setting id="vnc_port" value="5900" />
|
||||
<setting id="vnc_relative" value="false" />
|
||||
<setting id="vnc_screen" value="0" />
|
||||
<setting id="vnc_unsafe" value="false" />
|
||||
</settings>
|
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=dispmanx_vnc
|
||||
After=kodi.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh /storage/.kodi/addons/service.system.dispmanx_vnc/bin/dispmanx_vncserver-service
|
||||
TimeoutStopSec=1
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
StartLimitInterval=0
|
||||
|
||||
[Install]
|
||||
WantedBy=kodi.target
|
Loading…
x
Reference in New Issue
Block a user