mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-31 06:36:41 +00:00
Merge pull request #1730 from InuSasha/feature/chormium
chromium: update to newer version
This commit is contained in:
commit
34c46c0204
38
packages/addons/addon-depends/node/package.mk
Normal file
38
packages/addons/addon-depends/node/package.mk
Normal file
@ -0,0 +1,38 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# OpenELEC 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.
|
||||
#
|
||||
# OpenELEC 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. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="node"
|
||||
PKG_VERSION="8.9.3"
|
||||
PKG_SHA256="a5042d983f9815ee18a5c6fd75f8b3b2022ed96a2aaa8834300cd1ee81e8870c"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://nodejs.org"
|
||||
PKG_URL="https://github.com/nodejs/node/archive/v$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_HOST="toolchain"
|
||||
PKG_SHORTDESC="Node.js JavaScript runtime"
|
||||
PKG_LONGDESC="Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. The Node.js package ecosystem, npm, is the largest ecosystem of open source libraries in the world."
|
||||
|
||||
HOST_CONFIGURE_OPTS="--prefix=$TOOLCHAIN \
|
||||
--fully-static \
|
||||
--with-intl=none \
|
||||
--without-npm \
|
||||
--without-ssl"
|
||||
|
||||
pre_configure_host() {
|
||||
cd ..
|
||||
}
|
@ -25,7 +25,7 @@ PKG_ARCH="any"
|
||||
PKG_LICENSE="Mozilla Public License"
|
||||
PKG_SITE="http://ftp.mozilla.org/"
|
||||
PKG_URL="http://ftp.mozilla.org/pub/security/nss/releases/NSS_3_29_5_RTM/src/nss-3.29.5-with-nspr-4.13.1.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain nss:host nspr zlib"
|
||||
PKG_DEPENDS_TARGET="toolchain nss:host nspr zlib sqlite"
|
||||
PKG_SECTION="security"
|
||||
PKG_SHORTDESC="The Network Security Services (NSS) package is a set of libraries designed to support cross-platform development of security-enabled client and server applications"
|
||||
PKG_LONGDESC="The Network Security Services (NSS) package is a set of libraries designed to support cross-platform development of security-enabled client and server applications"
|
||||
@ -55,6 +55,7 @@ make_target() {
|
||||
make BUILD_OPT=1 $TARGET_USE_64 \
|
||||
NSS_USE_SYSTEM_SQLITE=1 \
|
||||
NSPR_INCLUDE_DIR=$SYSROOT_PREFIX/usr/include/nspr \
|
||||
NSS_USE_SYSTEM_SQLITE=1 \
|
||||
USE_SYSTEM_ZLIB=1 ZLIB_LIBS=-lz \
|
||||
SKIP_SHLIBSIGN=1 \
|
||||
OS_TEST=$TARGET_ARCH \
|
||||
|
@ -19,14 +19,15 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="chromium"
|
||||
PKG_VERSION="55.0.2883.75"
|
||||
PKG_SHA256="5bcf7180935bebc7648f7e2577f612da681f7846127f79dac22630ded9984e55"
|
||||
PKG_REV="107"
|
||||
PKG_VERSION="63.0.3239.84"
|
||||
PKG_SHA256="6de2754dfc333675ae6a67ae13c95666009b35c84f847b058edbf312e42fa3af"
|
||||
PKG_REV="107.009"
|
||||
PKG_ARCH="x86_64"
|
||||
PKG_LICENSE="Mixed"
|
||||
PKG_SITE="http://www.chromium.org/Home"
|
||||
PKG_URL="https://commondatastorage.googleapis.com/chromium-browser-official/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS_TARGET="toolchain pciutils dbus libXcomposite libXcursor libXtst alsa-lib bzip2 yasm nss libXScrnSaver libexif ninja:host libpng harfbuzz atk gtk+ libva-vdpau-driver unclutter xdotool"
|
||||
PKG_DEPENDS_HOST="toolchain ninja:host Python2:host"
|
||||
PKG_DEPENDS_TARGET="chromium:host node:host pciutils dbus libXcomposite libXcursor libXtst alsa-lib bzip2 yasm nss libXScrnSaver libexif libpng atk gtk+ libva-vdpau-driver unclutter xdotool"
|
||||
PKG_SECTION="browser"
|
||||
PKG_SHORTDESC="Chromium Browser: the open-source web browser from Google"
|
||||
PKG_LONGDESC="Chromium Browser ($PKG_VERSION): the open-source web browser from Google"
|
||||
@ -37,28 +38,35 @@ PKG_ADDON_NAME="Chromium"
|
||||
PKG_ADDON_TYPE="xbmc.python.script"
|
||||
PKG_ADDON_PROVIDES="executable"
|
||||
|
||||
pre_make_target() {
|
||||
strip_lto
|
||||
|
||||
sed -i -e 's/@WIDEVINE_VERSION@/Pinkie Pie/' third_party/widevine/cdm/stub/widevine_cdm_version.h
|
||||
}
|
||||
|
||||
make_target() {
|
||||
export LDFLAGS="$LDFLAGS -ludev"
|
||||
export LD=$CXX
|
||||
post_patch() {
|
||||
cd $(get_build_dir chromium)
|
||||
|
||||
# Use Python 2
|
||||
find . -name '*.py' -exec sed -i -r "s|/usr/bin/python$|$TOOLCHAIN/bin/python|g" {} +
|
||||
|
||||
# set correct widevine
|
||||
sed -i -e 's/@WIDEVINE_VERSION@/Pinkie Pie/' ./third_party/widevine/cdm/stub/widevine_cdm_version.h
|
||||
}
|
||||
|
||||
make_host() {
|
||||
./tools/gn/bootstrap/bootstrap.py --no-rebuild --no-clean --verbose
|
||||
}
|
||||
|
||||
make_target() {
|
||||
strip_lto
|
||||
export LDFLAGS="$LDFLAGS -ludev"
|
||||
export LD=$CXX
|
||||
|
||||
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
|
||||
# Note: These are for OpenELEC use ONLY. For your own distribution, please
|
||||
# get your own set of keys.
|
||||
|
||||
_google_api_key=AIzaSyAQ6L9vt9cnN4nM0weaa6Y38K4eyPvtKgI
|
||||
_google_default_client_id=740889307901-4bkm4e0udppnp1lradko85qsbnmkfq3b.apps.googleusercontent.com
|
||||
_google_default_client_secret=9TJlhL661hvShQub4cWhANXa
|
||||
local _google_api_key=AIzaSyAQ6L9vt9cnN4nM0weaa6Y38K4eyPvtKgI
|
||||
local _google_default_client_id=740889307901-4bkm4e0udppnp1lradko85qsbnmkfq3b.apps.googleusercontent.com
|
||||
local _google_default_client_secret=9TJlhL661hvShQub4cWhANXa
|
||||
|
||||
local _flags=(
|
||||
"host_toolchain=\"//build/toolchain/linux:x64_host\""
|
||||
'is_clang=false'
|
||||
'clang_use_chrome_plugins=false'
|
||||
'symbol_level=0'
|
||||
@ -73,6 +81,7 @@ make_target() {
|
||||
'linux_use_bundled_binutils=false'
|
||||
'use_allocator="none"'
|
||||
'use_cups=false'
|
||||
'use_custom_libcxx=false'
|
||||
'use_gconf=false'
|
||||
'use_gnome_keyring=false'
|
||||
'use_gold=false'
|
||||
@ -80,44 +89,29 @@ make_target() {
|
||||
'use_kerberos=false'
|
||||
'use_pulseaudio=false'
|
||||
'use_sysroot=true'
|
||||
'use_vaapi=true'
|
||||
'use_v8_context_snapshot=false'
|
||||
'enable_vulkan=false'
|
||||
"target_sysroot=\"${SYSROOT_PREFIX}\""
|
||||
'exclude_unwind_tables=true'
|
||||
'enable_hangout_services_extension=true'
|
||||
'enable_widevine=true'
|
||||
'enable_nacl=false'
|
||||
'enable_nacl_nonsfi=false'
|
||||
'enable_swiftshader=false'
|
||||
'enable_vulkan=false'
|
||||
"google_api_key=\"${_google_api_key}\""
|
||||
"google_default_client_id=\"${_google_default_client_id}\""
|
||||
"google_default_client_secret=\"${_google_default_client_secret}\""
|
||||
)
|
||||
|
||||
# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
|
||||
local _system_libs=(
|
||||
harfbuzz-ng
|
||||
libjpeg
|
||||
libpng
|
||||
libxslt
|
||||
yasm
|
||||
)
|
||||
|
||||
# Remove bundled libraries for which we will use the system copies; this
|
||||
# *should* do what the remove_bundled_libraries.py script does, with the
|
||||
# added benefit of not having to list all the remaining libraries
|
||||
local _lib
|
||||
for _lib in ${_system_libs}; do
|
||||
find -type f -path "*third_party/$_lib/*" \
|
||||
\! -path "*third_party/$_lib/chromium/*" \
|
||||
\! -path "*third_party/$_lib/google/*" \
|
||||
\! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
|
||||
-delete
|
||||
done
|
||||
|
||||
./build/linux/unbundle/replace_gn_files.py --system-libraries "${_system_libs}"
|
||||
./third_party/libaddressinput/chromium/tools/update-strings.py
|
||||
|
||||
./tools/gn/bootstrap/bootstrap.py --gn-gen-args "${_flags[*]}"
|
||||
./out/Release/gn gen out/Release --args="${_flags[*]}" --script-executable=$TOOLCHAIN/bin/python
|
||||
mkdir -p $PKG_BUILD/third_party/node/linux/node-linux-x64/bin
|
||||
ln -fs $TOOLCHAIN/bin/node $PKG_BUILD/third_party/node/linux/node-linux-x64/bin/node
|
||||
|
||||
ninja -C out/Release chrome chrome_sandbox widevinecdmadapter
|
||||
ninja -j${CONCURRENCY_MAKE_LEVEL} -C out/Release chrome chrome_sandbox widevinecdmadapter
|
||||
}
|
||||
|
||||
addon() {
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- chromium-59.0.3071.109/./chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc.org 2017-06-26 20:32:34.907628561 +0200
|
||||
+++ chromium-59.0.3071.109/./chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc 2017-06-26 20:31:05.855206203 +0200
|
||||
@@ -99,7 +99,7 @@
|
||||
IMEDriver::Register();
|
||||
#endif
|
||||
|
||||
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if 0
|
||||
// On the Linux desktop, we want to prevent the user from logging in as root,
|
||||
// so that we don't destroy the profile. Now that we have some minimal ui
|
||||
// initialized, check to see if we're running as root and bail if we are.
|
@ -1,15 +0,0 @@
|
||||
diff -up chromium-52.0.2743.116/third_party/WebKit/Source/wtf/allocator/PageAllocator.cpp.madv_free chromium-52.0.2743.116/third_party/WebKit/Source/wtf/allocator/PageAllocator.cpp
|
||||
--- chromium-52.0.2743.116/third_party/WebKit/Source/wtf/allocator/PageAllocator.cpp.madv_free 2016-08-15 13:07:29.279655676 -0400
|
||||
+++ chromium-52.0.2743.116/third_party/WebKit/Source/wtf/allocator/PageAllocator.cpp 2016-08-15 13:08:38.447317416 -0400
|
||||
@@ -41,6 +41,11 @@
|
||||
#include <errno.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
+#if OS(LINUX) && defined(MADV_FREE)
|
||||
+// Added in Linux 4.5, but it breaks the sandbox.
|
||||
+#undef MADV_FREE
|
||||
+#endif
|
||||
+
|
||||
#ifndef MADV_FREE
|
||||
#define MADV_FREE MADV_DONTNEED
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,48 @@
|
||||
--- a/build/toolchain/linux/BUILD.gn 2017-08-30 14:08:06.342205027 +0200
|
||||
+++ b/build/toolchain/linux/BUILD.gn 2017-08-30 14:15:18.648503216 +0200
|
||||
@@ -129,12 +129,13 @@
|
||||
}
|
||||
|
||||
gcc_toolchain("x64") {
|
||||
- cc = "gcc"
|
||||
- cxx = "g++"
|
||||
+ toolchainprefix = "x86_64-libreelec-linux-gnu-"
|
||||
+ cc = "${toolchainprefix}gcc"
|
||||
+ cxx = "${toolchainprefix}g++"
|
||||
|
||||
- readelf = "readelf"
|
||||
- nm = "nm"
|
||||
- ar = "ar"
|
||||
+ readelf = "${toolchainprefix}readelf"
|
||||
+ nm = "${toolchainprefix}nm"
|
||||
+ ar = "${toolchainprefix}ar"
|
||||
ld = cxx
|
||||
|
||||
# Output linker map files for binary size analysis.
|
||||
@@ -147,6 +148,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
+gcc_toolchain("x64_host") {
|
||||
+ toolchainprefix = "host-"
|
||||
+ cc = "${toolchainprefix}gcc"
|
||||
+ cxx = "${toolchainprefix}g++"
|
||||
+
|
||||
+ readelf = "readelf"
|
||||
+ nm = "nm"
|
||||
+ ar = "ar"
|
||||
+ ld = cxx
|
||||
+
|
||||
+ # Output linker map files for binary size analysis.
|
||||
+ enable_linker_map = true
|
||||
+
|
||||
+ toolchain_args = {
|
||||
+ current_cpu = "x64"
|
||||
+ current_os = "linux"
|
||||
+ is_clang = false
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
clang_toolchain("clang_mipsel") {
|
||||
toolchain_args = {
|
||||
current_cpu = "mipsel"
|
@ -1,22 +0,0 @@
|
||||
--- a/build/toolchain/linux/BUILD.gn 2016-11-09 19:49:39.000000000 -0800
|
||||
+++ b/build/toolchain/linux/BUILD.gn 2016-11-10 20:33:18.200587987 -0800
|
||||
@@ -102,13 +102,14 @@
|
||||
}
|
||||
|
||||
gcc_toolchain("x64") {
|
||||
- cc = "gcc"
|
||||
- cxx = "g++"
|
||||
+ toolprefix = "x86_64-libreelec-linux-gnu-"
|
||||
+ cc = "${toolprefix}gcc"
|
||||
+ cxx = "${toolprefix}g++"
|
||||
|
||||
- readelf = "readelf"
|
||||
- nm = "nm"
|
||||
- ar = "ar"
|
||||
+ ar = "${toolprefix}ar"
|
||||
ld = cxx
|
||||
+ readelf = "${toolprefix}readelf"
|
||||
+ nm = "${toolprefix}nm"
|
||||
|
||||
toolchain_args = {
|
||||
current_cpu = "x64"
|
@ -0,0 +1,44 @@
|
||||
From 1fc37227522ccd314f82ec893ed15c6129296604 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Jensen <pauljensen@chromium.org>
|
||||
Date: Wed, 11 Oct 2017 08:37:34 -0400
|
||||
Subject: [PATCH] Move exclude_unwind_tables back into declare_args
|
||||
|
||||
There is desire to adjust this flag manually.
|
||||
|
||||
BUG=762629
|
||||
R=thakis@chromium.org
|
||||
|
||||
Change-Id: I3bd134c19270cd1f729b3ea078674e734493d4ab
|
||||
---
|
||||
|
||||
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
|
||||
index ad40fd9..50e19a4 100644
|
||||
--- a/build/config/compiler/compiler.gni
|
||||
+++ b/build/config/compiler/compiler.gni
|
||||
@@ -68,18 +68,18 @@
|
||||
|
||||
# Whether or not we should use position independent code.
|
||||
use_pic = true
|
||||
+
|
||||
+ # Exclude unwind tables for official builds as unwinding can be done from
|
||||
+ # stack dumps produced by Crashpad at a later time "offline" in the crash
|
||||
+ # server. For unofficial (e.g. development) builds and non-Chrome branded
|
||||
+ # (e.g. Cronet which doesn't use Crashpad, crbug.com/479283) builds it's
|
||||
+ # useful to be able to unwind at runtime.
|
||||
+ exclude_unwind_tables = (is_chrome_branded && is_official_build) ||
|
||||
+ (is_chromecast && !is_cast_desktop_build && !is_debug)
|
||||
}
|
||||
|
||||
assert(!is_cfi || use_thin_lto, "CFI requires ThinLTO")
|
||||
|
||||
-# Exclude unwind tables for official builds as unwinding can be done from stack
|
||||
-# dumps produced by Crashpad at a later time "offline" in the crash server.
|
||||
-# For unofficial (e.g. development) builds and non-Chrome branded (e.g. Cronet
|
||||
-# which doesn't use Crashpad, crbug.com/479283) builds it's useful to be able
|
||||
-# to unwind at runtime.
|
||||
-exclude_unwind_tables = (is_chrome_branded && is_official_build) ||
|
||||
- (is_chromecast && !is_cast_desktop_build && !is_debug)
|
||||
-
|
||||
# If true, optimize for size. Does not affect windows builds.
|
||||
# Linux & Mac favor speed over size.
|
||||
# TODO(brettw) it's weird that Mac and desktop Linux are different. We should
|
@ -1,12 +1,12 @@
|
||||
diff -Naur a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
|
||||
--- a/tools/gn/bootstrap/bootstrap.py 2016-10-20 15:02:19.000000000 -0700
|
||||
+++ b/tools/gn/bootstrap/bootstrap.py 2016-11-10 09:26:36.026611661 -0800
|
||||
@@ -563,7 +563,7 @@
|
||||
}
|
||||
|
||||
if is_linux:
|
||||
- libs.extend(['-lrt', '-latomic'])
|
||||
+ libs.extend(['-lrt'])
|
||||
ldflags.extend(['-pthread'])
|
||||
|
||||
static_libraries['xdg_user_dirs'] = {
|
||||
--- a/tools/gn/bootstrap/bootstrap.py 2017-08-10 17:18:53.767165155 +0200
|
||||
+++ b/tools/gn/bootstrap/bootstrap.py 2017-08-10 17:23:28.668750638 +0200
|
||||
@@ -657,7 +657,7 @@
|
||||
'base/allocator/allocator_shim.cc',
|
||||
'base/allocator/allocator_shim_default_dispatch_to_glibc.cc',
|
||||
])
|
||||
- libs.extend(['-lrt', '-latomic'])
|
||||
+ libs.extend(['-lrt'])
|
||||
static_libraries['libevent']['include_dirs'].extend([
|
||||
os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux')
|
||||
])
|
||||
|
@ -0,0 +1,10 @@
|
||||
--- chromium-63.0.3239.84//third_party/webrtc/p2p/base/port.cc.org 2017-12-09 01:53:55.490672425 +0100
|
||||
+++ chromium-63.0.3239.84//third_party/webrtc/p2p/base/port.cc 2017-12-09 01:54:10.826751406 +0100
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
+#include <cmath>
|
||||
|
||||
#include "p2p/base/common.h"
|
||||
#include "p2p/base/portallocator.h"
|
@ -0,0 +1,10 @@
|
||||
--- a/chrome/browser/ui/libgtkui/gtk_ui.h 2017-10-19 00:15:47.451704332 +0200
|
||||
+++ b/chrome/browser/ui/libgtkui/gtk_ui.h 2017-10-18 23:53:19.328373980 +0200
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "base/observer_list.h"
|
||||
#include "chrome/browser/ui/libgtkui/gtk_signal.h"
|
||||
#include "chrome/browser/ui/libgtkui/libgtkui_export.h"
|
||||
+#include "chrome/browser/ui/libgtkui/nav_button_layout_manager.h"
|
||||
#include "ui/gfx/color_utils.h"
|
||||
#include "ui/views/linux_ui/linux_ui.h"
|
||||
#include "ui/views/window/frame_buttons.h"
|
@ -0,0 +1,16 @@
|
||||
Source: https://aur.archlinux.org/packages/chromium-vaapi/ chromium-gcc-r1.patch
|
||||
|
||||
diff --git a/base/numerics/safe_math_shared_impl.h b/base/numerics/safe_math_shared_impl.h
|
||||
index 99f230ce7e9a..de2415d402f5 100644
|
||||
--- a/base/numerics/safe_math_shared_impl.h
|
||||
+++ b/base/numerics/safe_math_shared_impl.h
|
||||
@@ -21,8 +21,7 @@
|
||||
#if !defined(__native_client__) && \
|
||||
((defined(__clang__) && \
|
||||
((__clang_major__ > 3) || \
|
||||
- (__clang_major__ == 3 && __clang_minor__ >= 4))) || \
|
||||
- (defined(__GNUC__) && __GNUC__ >= 5))
|
||||
+ (__clang_major__ == 3 && __clang_minor__ >= 4))))
|
||||
#include "base/numerics/safe_math_clang_gcc_impl.h"
|
||||
#define BASE_HAS_OPTIMIZED_SAFE_MATH (1)
|
||||
#else
|
@ -16,19 +16,29 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
oe_setup_addon browser.chromium
|
||||
if [ -e $ADDON_HOME/env ]
|
||||
then
|
||||
. $ADDON_HOME/env
|
||||
fi
|
||||
|
||||
# drop profile for testing only
|
||||
#rm -rf /storage/.kodi/userdata/addon_data/browser.chromium/profile
|
||||
|
||||
# fix file permissons (zip packaging)
|
||||
chmod +x $ADDON_DIR/bin/chromium $ADDON_DIR/bin/chromium.bin
|
||||
chmod 4755 $ADDON_DIR/bin/chrome-sandbox
|
||||
|
||||
# make sure we use "own" gtk/pango/nss/etc
|
||||
export LD_LIBRARY_PATH=/storage/.kodi/addons/browser.chromium/lib
|
||||
export LD_LIBRARY_PATH=$ADDON_DIR/lib
|
||||
|
||||
# configure pango/pixbuf
|
||||
export PANGO_RC_FILE=/storage/.kodi/addons/browser.chromium/config/pangorc
|
||||
export GDK_PIXBUF_MODULE_FILE=/storage/.kodi/addons/browser.chromium/config/pixbuf.loaders.cache
|
||||
export PANGO_RC_FILE=$ADDON_DIR/config/pangorc
|
||||
export GDK_PIXBUF_MODULE_FILE=$ADDON_DIR/config/pixbuf.loaders.cache
|
||||
|
||||
# font rendering in gtk widgets is brokeen with nvidia blob. use our Xdefaults
|
||||
export XENVIRONMENT=/storage/.kodi/addons/browser.chromium/config/Xdefaults
|
||||
export XENVIRONMENT=$ADDON_DIR/config/Xdefaults
|
||||
|
||||
# start unclutter
|
||||
if [ "$HIDE_CURSOR" == "true" ]
|
||||
@ -37,10 +47,57 @@ then
|
||||
UNCLUTTER_PID=$!
|
||||
fi
|
||||
|
||||
# vaapi
|
||||
LIBVA_DRIVERS_PATH="/usr/lib/dri:$ADDON_DIR/lib"
|
||||
LIBVA_DRIVER_NAME=''
|
||||
case $VAAPI_MODE in
|
||||
'intel')
|
||||
LIBVA_DRIVER_NAME='i965'
|
||||
CHROMIUM_OPTS="$CHROMIUM_OPTS --enable-accelerated-video"
|
||||
;;
|
||||
'amd')
|
||||
LIBVA_DRIVER_NAME='vdpau'
|
||||
CHROMIUM_OPTS="$CHROMIUM_OPTS --enable-accelerated-video"
|
||||
;;
|
||||
'nvidia')
|
||||
LIBVA_DRIVER_NAME='vdpau'
|
||||
CHROMIUM_OPTS="$CHROMIUM_OPTS --enable-accelerated-video --allow-no-sandbox-job --disable-gpu-sandbox"
|
||||
;;
|
||||
*)
|
||||
LIBGL_ALWAYS_SOFTWARE='1'
|
||||
export LIBGL_ALWAYS_SOFTWARE
|
||||
esac
|
||||
export LIBVA_DRIVER_NAME LIBVA_DRIVERS_PATH
|
||||
|
||||
# windowed
|
||||
case $WINDOW_MODE in
|
||||
'maximized') CHROMIUM_OPTS="$CHROMIUM_OPTS --start-maximized";;
|
||||
'kiosk') CHROMIUM_OPTS="$CHROMIUM_OPTS --kiosk";;
|
||||
esac
|
||||
|
||||
# rasterization
|
||||
case $RASTER_MODE in
|
||||
'off') CHROMIUM_OPTS="$CHROMIUM_OPTS --disable-accelerated-2d-canvas --disable-gpu-compositing";;
|
||||
'force') CHROMIUM_OPTS="$CHROMIUM_OPTS --enable-gpu-rasterization --enable-accelerated-2d-canvas --ignore-gpu-blacklist";;
|
||||
esac
|
||||
|
||||
# flash
|
||||
if [ -e $ADDON_DIR/PepperFlash/libpepflashplayer.so ]; then
|
||||
CHROMIUM_OPTS="$CHROMIUM_OPTS --ppapi-flash-path=$ADDON_DIR/PepperFlash/libpepflashplayer.so"
|
||||
fi
|
||||
|
||||
# alsa
|
||||
if [ ! -z $ALSA_DEVICE ]; then
|
||||
CHROMIUM_OPTS="$CHROMIUM_OPTS --alsa-output-device=$ALSA_DEVICE"
|
||||
fi
|
||||
|
||||
# start chromium
|
||||
LD_PRELOAD=/usr/lib/libGL.so /storage/.kodi/addons/browser.chromium/bin/chromium.bin \
|
||||
--user-data-dir=/storage/.kodi/userdata/addon_data/browser.chromium/profile \
|
||||
--test-type $@
|
||||
LD_PRELOAD=/usr/lib/libGL.so $ADDON_DIR/bin/chromium.bin \
|
||||
$CHROMIUM_OPTS \
|
||||
--no-sandbox \
|
||||
--user-data-dir=$ADDON_HOME/profile \
|
||||
--test-type $@ \
|
||||
2>&1 | tee $ADDON_LOG_FILE
|
||||
|
||||
# kill unclutter
|
||||
if [ "$HIDE_CURSOR" == "true" ]
|
||||
|
@ -93,57 +93,21 @@ def resumeXbmc():
|
||||
xbmc.enableNavSounds(True)
|
||||
|
||||
def startChromium(args):
|
||||
oe.execute('chmod +x ' + __path__ + 'chromium')
|
||||
oe.execute('chmod +x ' + __path__ + 'chromium.bin')
|
||||
oe.execute('chmod 4755 ' + __path__ + 'chrome-sandbox')
|
||||
|
||||
try:
|
||||
window_mode = {
|
||||
'maximized': '--start-maximized',
|
||||
'kiosk': '--kiosk',
|
||||
'none': '',
|
||||
}
|
||||
|
||||
raster_mode = {
|
||||
'default': '',
|
||||
'off': '--disable-accelerated-2d-canvas --disable-gpu-compositing',
|
||||
'force': '--enable-gpu-rasterization --enable-accelerated-2d-canvas --ignore-gpu-blacklist',
|
||||
}
|
||||
|
||||
new_env = os.environ.copy()
|
||||
vaapi_mode = __addon__.getSetting('VAAPI_MODE')
|
||||
gpu_accel_mode = ''
|
||||
if vaapi_mode == 'intel':
|
||||
new_env['LIBVA_DRIVERS_PATH'] = '/usr/lib/va'
|
||||
new_env['LIBVA_DRIVER_NAME'] = 'i965'
|
||||
elif vaapi_mode == 'amd':
|
||||
new_env['LIBVA_DRIVERS_PATH'] = os.path.join(__addon__.getAddonInfo('path'), 'lib')
|
||||
new_env['LIBVA_DRIVER_NAME'] = 'vdpau'
|
||||
elif vaapi_mode == 'nvidia':
|
||||
new_env['LIBVA_DRIVERS_PATH'] = os.path.join(__addon__.getAddonInfo('path'), 'lib')
|
||||
new_env['LIBVA_DRIVER_NAME'] = 'vdpau'
|
||||
gpu_accel_mode = '--allow-no-sandbox-job --disable-gpu-sandbox'
|
||||
else:
|
||||
new_env['LIBGL_ALWAYS_SOFTWARE'] = '1'
|
||||
|
||||
flash_plugin = ''
|
||||
if os.path.exists(__path__ + 'PepperFlash/libpepflashplayer.so'):
|
||||
flash_plugin = '--ppapi-flash-path=' + __path__ + 'PepperFlash/libpepflashplayer.so'
|
||||
new_env['VAAPI_MODE'] = __addon__.getSetting('VAAPI_MODE')
|
||||
new_env['WINDOW_MODE'] = __addon__.getSetting('WINDOW_MODE')
|
||||
new_env['RASTER_MODE'] = __addon__.getSetting('RASTER_MODE')
|
||||
|
||||
new_env['ALSA_DEVICE'] = ''
|
||||
if __addon__.getSetting('USE_CUST_AUDIODEVICE') == 'true':
|
||||
alsa_device = __addon__.getSetting('CUST_AUDIODEVICE_STR')
|
||||
else:
|
||||
alsa_device = getAudioDevice()
|
||||
alsa_param = ''
|
||||
if not alsa_device == None and not alsa_device == '':
|
||||
alsa_param = '--alsa-output-device=' + alsa_device
|
||||
new_env['ALSA_DEVICE'] = alsa_device
|
||||
|
||||
chrome_params = window_mode.get(__addon__.getSetting('WINDOW_MODE')) + ' ' + \
|
||||
raster_mode.get(__addon__.getSetting('RASTER_MODE')) + ' ' + \
|
||||
flash_plugin + ' ' + \
|
||||
gpu_accel_mode + ' ' + \
|
||||
alsa_param + ' ' + \
|
||||
args + ' ' + \
|
||||
chrome_params = args + ' ' + \
|
||||
__addon__.getSetting('HOMEPAGE')
|
||||
subprocess.call(__path__ + 'chromium ' + chrome_params, shell=True, env=new_env)
|
||||
except Exception, e:
|
||||
|
@ -5,7 +5,7 @@
|
||||
<setting type="sep" />
|
||||
<setting id="PAUSE_XBMC" type="bool" label="1021" default="true" />
|
||||
<setting id="VAAPI_MODE" type="labelenum" label="1022" values="off|intel|amd|nvidia" default="off"/>
|
||||
<setting id="RASTER_MODE" type="labelenum" label="1023" values="default|off|force" default="default" subsetting="true" enable="gt(-1,0)"/>
|
||||
<setting id="RASTER_MODE" type="labelenum" label="1023" values="default|off|force" default="default" subsetting="true" enable="!eq(-1,0)"/>
|
||||
<setting id="WINDOW_MODE" type="labelenum" label="1024" values="maximized|kiosk|none" default="maximized" />
|
||||
<setting id="HOMEPAGE" type="text" label="1025" default="https://libreelec.tv" />
|
||||
<setting id="USE_CUST_AUDIODEVICE" type="bool" label="1026" default="false" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user