No hardcoded Opera directory in apt hook. Some text messages and readme changes

This commit is contained in:
Ld-Hagen
2021-10-14 18:42:27 +03:00
parent f73a02813b
commit 8c64261203
4 changed files with 14 additions and 11 deletions

View File

@@ -1,8 +1,8 @@
# Fix Opera Linux ffmpeg & WidevineCdm # Fix Opera Linux libffmpeg & WidevineCdm
* Fix Opera html5 media content including DRM-protected one. * Fixes Opera html5 media content including DRM-protected one.
* It script must be execute all times opera will fails on showing html5 media content. * This script must be executed all times opera fails on showing html5 media content.
* On Debian-based and Arch-based distros it may be started automatically after Opera update. * On Debian-based and Arch-based distributions it could be started automatically after Opera each update or reinstall.
## Requirements ## Requirements
@@ -12,9 +12,12 @@
2. **unzip** (Is needed for unpacking the downloaded file) 2. **unzip** (Is needed for unpacking the downloaded file)
```sudo apt install unzip``` ```sudo apt install unzip```
2. **git** (Is needed for fetching this script)
```sudo apt install git```
## Usage ## Usage
1. Clone this repo and 1. Clone this repo
```git clone https://github.com/Ld-Hagen/fix-opera-linux-ffmpeg-widevine.git``` ```git clone https://github.com/Ld-Hagen/fix-opera-linux-ffmpeg-widevine.git```

View File

@@ -51,7 +51,7 @@ create_hook ()
done done
} }
ptintf 'Installing script to ypur system...\n' printf 'Installing script to your system...\n'
printf 'Would you like to apply Widevine CDM fix? [y/n]' printf 'Would you like to apply Widevine CDM fix? [y/n]'
while read FIX_WIDEVINE; do while read FIX_WIDEVINE; do

View File

@@ -1,2 +1,2 @@
DPkg::Pre-Invoke {"stat -c %Z /usr/lib/x86_64-linux-gnu/opera/opera > /tmp/opera.timestamp";}; DPkg::Pre-Invoke {"stat -c %Z $(readlink -f $(which opera)) > /tmp/opera.timestamp";};
DPkg::Post-Invoke {"if [ `stat -c %Z /usr/lib/x86_64-linux-gnu/opera/opera` -ne `cat /tmp/opera.timestamp` ]; then /root/.scripts/fix-opera.sh; fi; rm /tmp/opera.timestamp";}; DPkg::Post-Invoke {"if [ `stat -c %Z $(readlink -f $(which opera))` -ne `cat /tmp/opera.timestamp` ]; then /root/.scripts/fix-opera.sh; fi; rm /tmp/opera.timestamp";};

View File

@@ -92,7 +92,7 @@ if $FIX_WIDEVINE; then
fi fi
#Moving libraries to its place #Moving libraries to its place
printf 'Moving libraries to its place...\n' printf 'Moving libraries to their places...\n'
##ffmpeg ##ffmpeg
mv -f "$TEMP_DIR/opera-fix/$FFMPEG_SO_NAME" "$OPERA_LIB_DIR" mv -f "$TEMP_DIR/opera-fix/$FFMPEG_SO_NAME" "$OPERA_LIB_DIR"
chmod 0644 "$OPERA_LIB_DIR/$FFMPEG_SO_NAME" chmod 0644 "$OPERA_LIB_DIR/$FFMPEG_SO_NAME"
@@ -105,6 +105,6 @@ if $FIX_WIDEVINE; then
printf "[\n {\n \"preload\": \"$OPERA_WIDEVINE_DIR\"\n }\n]\n" > "$OPERA_WIDEVINE_CONFIG" printf "[\n {\n \"preload\": \"$OPERA_WIDEVINE_DIR\"\n }\n]\n" > "$OPERA_WIDEVINE_CONFIG"
fi fi
#Removing temprary files #Removing temporary files
printf 'Removing temprary files...\n' printf 'Removing temporary files...\n'
rm -rf "$TEMP_DIR/opera-fix" rm -rf "$TEMP_DIR/opera-fix"