mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #4704 from mglae/le92_chrome_stable
chrome: update to 87 and using fixed versions / minor downloader fixes
This commit is contained in:
commit
6913364e50
@ -1,6 +1,6 @@
|
|||||||
104
|
104
|
||||||
- fix getting default audio device
|
- fix getting default audio device
|
||||||
- support for latest Chrome
|
- updated to 87.0.4280
|
||||||
|
|
||||||
103
|
103
|
||||||
- add flag for dark mode
|
- add flag for dark mode
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
PKG_NAME="chrome"
|
PKG_NAME="chrome"
|
||||||
PKG_VERSION="1.0"
|
PKG_VERSION="1.0"
|
||||||
|
# curl -s http://dl.google.com/linux/chrome/deb/dists/stable/main/binary-amd64/Packages | grep -B 1 Version
|
||||||
|
PKG_VERSION_NUMBER="87.0.4280.66"
|
||||||
PKG_REV="104"
|
PKG_REV="104"
|
||||||
PKG_ARCH="x86_64"
|
PKG_ARCH="x86_64"
|
||||||
PKG_LICENSE="Custom"
|
PKG_LICENSE="Custom"
|
||||||
@ -33,6 +35,7 @@ addon() {
|
|||||||
|
|
||||||
# config
|
# config
|
||||||
cp -P $PKG_DIR/config/* $ADDON_BUILD/$PKG_ADDON_ID/config
|
cp -P $PKG_DIR/config/* $ADDON_BUILD/$PKG_ADDON_ID/config
|
||||||
|
echo "CHROME_VERSION=${PKG_VERSION_NUMBER}" >$ADDON_BUILD/$PKG_ADDON_ID/config/chrome.version
|
||||||
|
|
||||||
# atk
|
# atk
|
||||||
cp -PL $(get_build_dir atk)/.$TARGET_NAME/atk/libatk-1.0.so.0 $ADDON_BUILD/$PKG_ADDON_ID/lib
|
cp -PL $(get_build_dir atk)/.$TARGET_NAME/atk/libatk-1.0.so.0 $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||||
|
@ -6,9 +6,14 @@
|
|||||||
. /etc/profile
|
. /etc/profile
|
||||||
oe_setup_addon browser.chrome
|
oe_setup_addon browser.chrome
|
||||||
|
|
||||||
ICON=$ADDON_DIR/resources/icon.png
|
ICON="$ADDON_DIR/resources/icon.png"
|
||||||
CONTROL_FILE=/tmp/curl.done
|
CONTROL_FILE="/tmp/curl.done"
|
||||||
DATA_FILE=/tmp/curl.data
|
DATA_FILE="/tmp/curl.data"
|
||||||
|
CHROME_VERSION_FILE="$ADDON_DIR/config/chrome.version"
|
||||||
|
|
||||||
|
. "$CHROME_VERSION_FILE"
|
||||||
|
|
||||||
|
CHROME_FILE="google-chrome-stable_${CHROME_VERSION}-1_amd64.deb"
|
||||||
|
|
||||||
# check for enough free disk space
|
# check for enough free disk space
|
||||||
if [ $(df . | awk 'END {print $4}') -lt 400000 ]; then
|
if [ $(df . | awk 'END {print $4}') -lt 400000 ]; then
|
||||||
@ -38,12 +43,12 @@ echo "Downloading Chrome"
|
|||||||
# download chrome
|
# download chrome
|
||||||
rm -f ${CONTROL_FILE} ${DATA_FILE}
|
rm -f ${CONTROL_FILE} ${DATA_FILE}
|
||||||
(
|
(
|
||||||
curl -# -O -C - https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb 2>${DATA_FILE}
|
curl -# -O -C - https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/${CHROME_FILE} 2>${DATA_FILE}
|
||||||
touch ${CONTROL_FILE}
|
touch ${CONTROL_FILE}
|
||||||
) | \
|
) | \
|
||||||
while [ : ]; do
|
while [ : ]; do
|
||||||
[ -f ${DATA_FILE} ] && prog="$(tr '\r' '\n' < ${DATA_FILE} | tail -n 1 | sed -r 's/^[# ]+/#/;s/^[^0-9]*//g')" || prog=
|
[ -f ${DATA_FILE} ] && prog="$(tr '\r' '\n' < ${DATA_FILE} | tail -n 1 | sed -r 's/^[# ]+/#/;s/^[^0-9]*//g')" || prog=
|
||||||
kodi-send --action="Notification(Downloading Chrome,"${prog:-0.0%}",3000,${ICON})" >/dev/null
|
kodi-send --action="Notification(Downloading Chrome,\"${prog:-0.0%}\",3000,${ICON})" >/dev/null
|
||||||
[ -f ${CONTROL_FILE} ] && break
|
[ -f ${CONTROL_FILE} ] && break
|
||||||
sleep 4
|
sleep 4
|
||||||
done
|
done
|
||||||
@ -53,13 +58,14 @@ rm -f ${CONTROL_FILE} ${DATA_FILE}
|
|||||||
## extract chrome
|
## extract chrome
|
||||||
# extrat chrome.deb
|
# extrat chrome.deb
|
||||||
kodi-send --action="Notification(Extracting Chrome,starting,1000,${ICON})" >/dev/null
|
kodi-send --action="Notification(Extracting Chrome,starting,1000,${ICON})" >/dev/null
|
||||||
ar -x google-chrome-stable_current_amd64.deb
|
ar -x ${CHROME_FILE}
|
||||||
|
|
||||||
# extract data.tar.xz to chrome-bin directory
|
# extract data.tar.xz to chrome-bin directory
|
||||||
mkdir $ADDON_DIR/chrome-bin
|
mkdir $ADDON_DIR/chrome-bin
|
||||||
tar xf data.tar.xz --strip-components=4 -C $ADDON_DIR/chrome-bin ./opt/google/chrome
|
tar xf data.tar.xz --strip-components=4 -C $ADDON_DIR/chrome-bin ./opt/google/chrome
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
|
cd $ADDON_DIR
|
||||||
rm -rf $ADDON_DIR/tmp_download
|
rm -rf $ADDON_DIR/tmp_download
|
||||||
touch $ADDON_DIR/extract.ok
|
touch $ADDON_DIR/extract.ok
|
||||||
kodi-send --action="Notification(Extracting Chrome,finished,1000,${ICON})" >/dev/null
|
kodi-send --action="Notification(Extracting Chrome,finished,1000,${ICON})" >/dev/null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user