mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 06:06:43 +00:00
Merge pull request #3993 from MilhouseVH/le10_get_addon_id
LibreELEC-settings: make it easier to disable, or use alternative
This commit is contained in:
commit
e5dedd7ff3
@ -935,7 +935,7 @@ pkg_call_exists() {
|
|||||||
pkg_call() {
|
pkg_call() {
|
||||||
[ -n "${PKG_NAME}" ] || die "$(print_color CLR_ERROR "FAILURE: Cannot call ${1} package function when package is not known!")"
|
[ -n "${PKG_NAME}" ] || die "$(print_color CLR_ERROR "FAILURE: Cannot call ${1} package function when package is not known!")"
|
||||||
|
|
||||||
${1}
|
"${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
unset_functions() {
|
unset_functions() {
|
||||||
@ -955,7 +955,7 @@ unset_functions() {
|
|||||||
|
|
||||||
unset -f pre_install post_install
|
unset -f pre_install post_install
|
||||||
|
|
||||||
unset -f addon
|
unset -f addon post_install_addon
|
||||||
}
|
}
|
||||||
|
|
||||||
# p1: name of package to be sourced
|
# p1: name of package to be sourced
|
||||||
@ -1283,6 +1283,10 @@ install_addon_files() {
|
|||||||
install_addon_images "$1"
|
install_addon_images "$1"
|
||||||
create_addon_xml "$1"
|
create_addon_xml "$1"
|
||||||
python_fix_abi "$1"
|
python_fix_abi "$1"
|
||||||
|
|
||||||
|
if pkg_call_exists post_install_addon; then
|
||||||
|
INSTALL="$1" pkg_call post_install_addon
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install_driver_addon_files() {
|
install_driver_addon_files() {
|
||||||
|
@ -215,6 +215,7 @@
|
|||||||
|
|
||||||
# Settings package name - blank if not required
|
# Settings package name - blank if not required
|
||||||
DISTRO_PKG_SETTINGS="LibreELEC-settings"
|
DISTRO_PKG_SETTINGS="LibreELEC-settings"
|
||||||
|
DISTRO_PKG_SETTINGS_ID="service.libreelec.settings"
|
||||||
|
|
||||||
# IR remote keymaps supported in default config
|
# IR remote keymaps supported in default config
|
||||||
IR_REMOTE_KEYMAPS="rc6_mce xbox_360 xbox_one"
|
IR_REMOTE_KEYMAPS="rc6_mce xbox_360 xbox_one"
|
||||||
|
@ -98,5 +98,8 @@ addon() {
|
|||||||
|
|
||||||
# unclutter
|
# unclutter
|
||||||
cp -P $(get_build_dir unclutter)/.install_pkg/usr/bin/unclutter $ADDON_BUILD/$PKG_ADDON_ID/bin
|
cp -P $(get_build_dir unclutter)/.install_pkg/usr/bin/unclutter $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||||
|
}
|
||||||
|
|
||||||
|
post_install_addon() {
|
||||||
|
sed -e "s/@DISTRO_PKG_SETTINGS_ID@/${DISTRO_PKG_SETTINGS_ID}/g" -i "${INSTALL}/default.py"
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import xbmcaddon
|
|||||||
import subprocess
|
import subprocess
|
||||||
from xml.dom.minidom import parse
|
from xml.dom.minidom import parse
|
||||||
|
|
||||||
sys.path.append('/usr/share/kodi/addons/service.libreelec.settings')
|
sys.path.append('/usr/share/kodi/addons/@DISTRO_PKG_SETTINGS_ID@')
|
||||||
|
|
||||||
import oe
|
import oe
|
||||||
|
|
||||||
|
@ -146,3 +146,7 @@ addon() {
|
|||||||
# tini
|
# tini
|
||||||
cp -P $(get_build_dir tini)/.${TARGET_NAME}/tini-static ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/docker-init
|
cp -P $(get_build_dir tini)/.${TARGET_NAME}/tini-static ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/docker-init
|
||||||
}
|
}
|
||||||
|
|
||||||
|
post_install_addon() {
|
||||||
|
sed -e "s/@DISTRO_PKG_SETTINGS_ID@/${DISTRO_PKG_SETTINGS_ID}/g" -i "${INSTALL}/default.py"
|
||||||
|
}
|
||||||
|
@ -11,7 +11,7 @@ import xbmc
|
|||||||
import xbmcaddon
|
import xbmcaddon
|
||||||
import xbmcgui
|
import xbmcgui
|
||||||
|
|
||||||
sys.path.append('/usr/share/kodi/addons/service.libreelec.settings')
|
sys.path.append('/usr/share/kodi/addons/@DISTRO_PKG_SETTINGS_ID@')
|
||||||
import oe
|
import oe
|
||||||
|
|
||||||
__author__ = 'lrusak'
|
__author__ = 'lrusak'
|
||||||
|
@ -332,7 +332,9 @@ post_makeinstall_target() {
|
|||||||
xmlstarlet ed -L --subnode "/addons" -t elem -n "addon" -v "os.libreelec.tv" $ADDON_MANIFEST
|
xmlstarlet ed -L --subnode "/addons" -t elem -n "addon" -v "os.libreelec.tv" $ADDON_MANIFEST
|
||||||
xmlstarlet ed -L --subnode "/addons" -t elem -n "addon" -v "os.openelec.tv" $ADDON_MANIFEST
|
xmlstarlet ed -L --subnode "/addons" -t elem -n "addon" -v "os.openelec.tv" $ADDON_MANIFEST
|
||||||
xmlstarlet ed -L --subnode "/addons" -t elem -n "addon" -v "repository.libreelec.tv" $ADDON_MANIFEST
|
xmlstarlet ed -L --subnode "/addons" -t elem -n "addon" -v "repository.libreelec.tv" $ADDON_MANIFEST
|
||||||
xmlstarlet ed -L --subnode "/addons" -t elem -n "addon" -v "service.libreelec.settings" $ADDON_MANIFEST
|
if [ -n "$DISTRO_PKG_SETTINGS" ]; then
|
||||||
|
xmlstarlet ed -L --subnode "/addons" -t elem -n "addon" -v "$DISTRO_PKG_SETTINGS_ID" $ADDON_MANIFEST
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$DRIVER_ADDONS_SUPPORT" = "yes" ]; then
|
if [ "$DRIVER_ADDONS_SUPPORT" = "yes" ]; then
|
||||||
xmlstarlet ed -L --subnode "/addons" -t elem -n "addon" -v "script.program.driverselect" $ADDON_MANIFEST
|
xmlstarlet ed -L --subnode "/addons" -t elem -n "addon" -v "script.program.driverselect" $ADDON_MANIFEST
|
||||||
|
@ -154,6 +154,7 @@ Full list of overwrittable functions.
|
|||||||
| make_\[stage]<br>pre_make_\[stage]<br>post_make_\[stage] | yes | Build of the package |
|
| make_\[stage]<br>pre_make_\[stage]<br>post_make_\[stage] | yes | Build of the package |
|
||||||
| makeinstall_\[stage]<br>pre_makeinstall_\[stage]<br>post_makeinstall_\[stage] | yes | Installation of the files in the correct pathes<br>host: TOOLCHAIN<br>target: SYSROOT and IMAGE<br>bootstrap and init: temporary destination
|
| makeinstall_\[stage]<br>pre_makeinstall_\[stage]<br>post_makeinstall_\[stage] | yes | Installation of the files in the correct pathes<br>host: TOOLCHAIN<br>target: SYSROOT and IMAGE<br>bootstrap and init: temporary destination
|
||||||
| addon | - | Copy all files together for addon creation. This is requiered for addons |
|
| addon | - | Copy all files together for addon creation. This is requiered for addons |
|
||||||
|
| post_install_addon | - | Post processing of installed addon files in `${INSTALL}` directory |
|
||||||
|
|
||||||
## Late Binding variable assignment
|
## Late Binding variable assignment
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ check_func_name() {
|
|||||||
pre_configure \
|
pre_configure \
|
||||||
${TARGET_FUNCS} \
|
${TARGET_FUNCS} \
|
||||||
pre_install post_install \
|
pre_install post_install \
|
||||||
addon \
|
addon post_install_addon \
|
||||||
; do
|
; do
|
||||||
[[ ${line} =~ ^${f} ]] && return 0
|
[[ ${line} =~ ^${f} ]] && return 0
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user