2017年7月30日

ChromiumOS 安裝 Flash LPayer

由 arnoldthebat 開發的 ChromiumOS 並沒有把 Flash Player 包在系統裡面,雖然目前各大瀏覽器,也都陸續不再支援 Flash ,但是目前這種過渡期, Flash Player 仍然不可沒有。

Chromium OS 沒有把 Flash Player 包在裡面,而 CloudReady 是做成 選裝 。


討論串在此:點我
(可以透過那隻 flash.sh 懶人安裝 )


#!/bin/bash
base="$(dirname "$(readlink -f "${0}")")"

# Clear the ugly screen.
clear

#Are we root?
if (( $EUID != 0 )); then
echo - "You need to run this script as root!"
exit
fi

# Make sure the filesystem is RW
#echo "1 - Remounting root fs as read/write.\n"
mount -o remount,rw /

#
# Download the appropriate files (based on arch)
#
# Check 32 vs 64-bit and set paths accordingly
if [ `uname -m` == 'x86_64' ]; then
    echo -e "64-bit system\n"
baseurl="http://www.brash.ca/x64.tar.gz"
elif [ `uname -m` == 'i686' ]; then
    echo -e "32-bit system\n"
baseurl="http://www.brash.ca/x86.tar.gz"
else
echo -e "Sorry, only x86 compatible CPUs are supported\n"
exit
fi

# Do the downloading...
mkdir -p /opt/tmp
cd /opt/tmp
echo -e "\nDownloading pepper-flash libraries and codecs...\n \n"
wget -qnv --show-progress "$baseurl" -O data.tar.gz
tar xzf data.tar.gz

echo -e "Creating folders...\n"
# Create directories (create all regardless of architecture - let's be lazy)
mkdir -p /usr/lib/mozilla/plugins/
mkdir -p /usr/lib64/mozilla/plugins/
mkdir -p /usr/lib/cromo/
mkdir -p /usr/lib64/cromo/
mkdir -p /opt/google/chrome/pepper/

echo -e "Copying codec file...\n"
# Media Codecs (all arch)
cp libffmpegsumo.so /usr/lib/cromo/ -f
cp libffmpegsumo.so /usr/lib64/cromo/ -f
cp libffmpegsumo.so /usr/lib/mozilla/plugins/ -f
cp libffmpegsumo.so /usr/lib64/mozilla/plugins/ -f

echo -e "Copying Flash files...\n"
# Flash player
cp PepperFlash/* /opt/google/chrome/pepper/ -f
#cp PepperFlash/manifest.json /opt/google/chrome/pepper/ -f

# Create flash version file
#flashversion=`cat PepperFlash/manifest.json | grep version | sed 's/[^0-9.]*//g'`
#echo -e "FILE_NAME=/opt/google/chrome/pepper/libpepflashplayer.so\nPLUGIN_NAME=\"Shockwave #Flash\"\nVERSION=\"$flashversion\"\nVISIBLE_VERSION=\"$flashversion\"\nMIME_TYPES=\"application/x-shockwave-flash\"" >/opt/google/chrome/pepper/pepper-flash.info

# Delete temp files
echo -e "Cleanup time!\n"
cd /opt
rm -fR tmp

echo -e "Remounting the filesystem as read-only...\n"
# Remount the filesystem as RO
mount -o remount,ro /

echo -e "All done. You should restart the user interface by running 'restart ui'."

1 則留言:

廖阿邦 提到...

CloudReady 要安裝 Flash Player 比較容易,透過溝選就可以了。

ChromiumOS 要安裝 Flash Player 必須要用文字介面登入, Ctrl + Alt + F2 ,帳號用 root 直接登入,沒有密碼。

再輸入指令
# curl -L http://www.brash.ca/flash.sh |bash

重新開機,這樣就有 Flash Player 可以用囉。