⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flashplayer-installer

📁 flash编辑软件的安装方法
💻
📖 第 1 页 / 共 2 页
字号:
#!/bin/sh## Copyright(C) 2002-2003 Macromedia, Inc.  All rights reserved.## Macromedia Flash Player Installer#PRODUCT="Macromedia Flash Player"VERSION="6"PLATFORM="Linux"FPVERSIONMAJ=6FPVERSIONMIN=0FPVERSIONREV=60# Environment variablesPATH=.:/bin:/usr/bin:/usr/local/bin:/sbin:$PATHexport PATH# Get the path of this scriptcwd=`dirname $0`# Minimum glibcMIN_GLIBCMAJOR=2MIN_GLIBCMINOR=2############################### Subroutines############################### the os is not supportedexit_os () {  echo ""  echo "ERROR: Your operating system is not supported by the"  echo "       $PRODUCT installer."  echo ""  exit 1}# the architecture is not supportedexit_cpu () {  echo ""  echo "ERROR: Your architecture, \'$1\', is not supported by the"  echo "       $PRODUCT installer."  echo ""  exit 1}# glibc is older than supportedexit_glibc () {  echo ""  echo "ERROR: Your glibc library is older than $MIN_GLIBCMAJOR.$MIN_GLIBCMINOR."  echo "       Please update your glibc library."  echo ""  exit 1}# exit installerexit_error () {  echo ""  echo "Exiting the $PRODUCT $VERSION installer."  echo ""  exit 1}# check glibccheck_glibc () {  ICONV=`iconv --version | sed -e '2,$d'`  if [ $? -ne 0 ]; then    echo "no-iconv"  else    ICONVVER=`echo "$ICONV" | awk '{print $4}'`    GLIBCMAJOR=`echo $ICONVVER | cut -d'.' -f1`    GLIBCMINOR=`echo $ICONVVER | cut -d'.' -f2`    if [ \( $GLIBCMAJOR -ge $MIN_GLIBCMAJOR \) -a \( $GLIBCMINOR -ge $MIN_GLIBCMINOR \) ]; then      echo "valid-glibc"    else      echo "invalid-glibc"    fi  fi}# check entered directorycheck_browser_dir () {  CHECKDIR="$1"  # blank?  if [ -z "$CHECKDIR" ]; then    echo "blank"    exit  fi  # is a directory?   if [ -d "$CHECKDIR" ]; then    # is writable?    if [ -w "$CHECKDIR" ]; then      # contains plugins and components dirs?      if [ -d "$CHECKDIR/plugins" -a -d "$CHECKDIR/components" ]; then        # could be Mozilla or Netscape        if [ ! -w "$CHECKDIR/plugins" ]; then          echo "invalid-plugins-not-writable"          return        else          echo "valid"          return        fi      elif [ -d "$CHECKDIR/plugins" ]; then        if [ ! -w "$CHECKDIR/plugins" ]; then          echo "invalid-plugins-not-writable"          return        fi        # is Opera or Netscape Communicator?        OPERABIN=`find $CHECKDIR -type f -name "opera" -print`        if [ -f "$OPERABIN" ]; then          echo "valid-opera"          return        elif [ -f "$CHECKDIR/netscape-communicator" ]; then          echo "valid-communicator"          return        fi      fi    else      echo "invalid-not-writable"      return    fi  else    echo "invalid-not-directory"    return  fi  echo "invalid"}# fix dir if necessaryfix_dir () {  FIXDIR="$1"  FIRSTCHAR=`expr "$FIXDIR" : '\(.\).*'`  if [ "$FIRSTCHAR" != '/' ]; then    currentdir=`pwd`    echo "$currentdir/$FIXDIR"  else    echo "$1"  fi}# warn libflashplayer.so is a symbolic linkwarn_symbolic_link () {  echo ""  echo "WARNING: The $PRODUCT binary is a symbolic link."  echo "         The installer will replace this symbolic link with the actual binary."  echo ""}# compare versionscompare_versions () {  BIN="$1"  MYFPVERSIONSTR=`strings "$1" | grep -e "^Shockwave Flash [.\d+]*" | sed -e "s/Shockwave Flash //g"`  MYFPVERSION=`echo "$MYFPVERSIONSTR" | awk '{print $1}'`  MYFPVERSIONMAJ=`echo "$MYFPVERSION" | cut -d'.' -f1`  MYFPVERSIONMIN=`echo "$MYFPVERSION" | cut -d'.' -f2`  MYFPVERSIONREV=`echo "$MYFPVERSIONSTR" | awk '{print $2}' | sed -e "s/^r//g"`  # check major version  if [ \( $MYFPVERSIONMAJ -lt $FPVERSIONMAJ \) ]; then    echo "version-older"  elif [ \( $MYFPVERSIONMAJ -gt $FPVERSIONMAJ \) ]; then    echo "version-newer"  elif [ \( $MYFPVERSIONMAJ -eq $FPVERSIONMAJ \) ]; then    # check minor version    if [ \( $MYFPVERSIONMIN -lt $FPVERSIONMIN \) ]; then      echo "version-older"    elif [ \( $MYFPVERSIONMIN -gt $FPVERSIONMIN \) ]; then      echo "version-newer"    elif [ \( $MYFPVERSIONMIN -eq $FPVERSIONMIN \) ]; then      # check rev version      if [ \( $MYFPVERSIONREV -lt $FPVERSIONREV \) ]; then        echo "version-older"      elif [ \( $MYFPVERSIONREV -gt $FPVERSIONREV \) ]; then        echo "version-newer"      elif [ \( $MYFPVERSIONREV -eq $FPVERSIONREV \) ]; then        echo "version-same"      fi    fi  fi}# check plugins dircheck_plugins_dir () {  CHECKPLUGINSDIR="$1"  if [ -d "$CHECKPLUGINSDIR" ]; then    # does it exist?    if [ -e "$CHECKPLUGINSDIR/libflashplayer.so" ]; then      # is it a file?      if [ -f "$CHECKPLUGINSDIR/libflashplayer.so" ]; then        # is it a symbolic link?        if [ -L "$CHECKPLUGINSDIR/libflashplayer.so" ]; then          warn_symbolic_link "$CHECKPLUGINSDIR/libflashplayer.so"          SYMBOLIC_LINK=1        else          VERSIONSTATUS=`compare_versions "$CHECKPLUGINSDIR/libflashplayer.so"`          case $VERSIONSTATUS in            version-older)              echo ""              echo "WARNING: An older version of the $PRODUCT has been detected in"              echo "         $CHECKPLUGINSDIR."              echo "         The installer will overwrite this existing binary."              echo ""              ;;            version-newer)              echo ""              echo "WARNING: A newer version of the $PRODUCT has been detected in"              echo "         $CHECKPLUGINSDIR."              echo "         The installer will overwrite this existing binary."              echo ""              ;;            version-same)              echo ""              echo "WARNING: The same version of the $PRODUCT has been detected in"              echo "         $CHECKPLUGINSDIR."              echo "         The installer will overwrite this existing binary."              echo ""              ;;          esac        fi      fi    fi  fi}############################### Main Section##############################ROOTINSTALL=0# check userUSERID=`id | sed -e 's/).*//; s/^.*(//;'`if [ "X$USERID" = "Xroot" ]; then  ROOTINSTALL=1fi# check OSos=`uname -s`if [ "X$os" != "XLinux" ]; then  exit_osfi# check architectureTEMPARCH=`uname -m`case $TEMPARCH in  i[3456]86)    ARCH=i386    ;;  *)    exit_cpu $TEMPARCH    ;;esac# check for iconv and version of glibcGLIBCSTATUS=`check_glibc`case $GLIBCSTATUS in  invalid-glibc)    exit_glibc    ;;esac################### Welcome user##################echo ""echo "Copyright(C) 2002-2003 Macromedia, Inc.  All rights reserved."echo ""echo "$PRODUCT $VERSION for $PLATFORM"echo ""echo "$PRODUCT $VERSION will be installed on this machine."echo ""if [ $ROOTINSTALL -eq 1 ]; thenecho "You are running the $PRODUCT installer as the \"root\" user."echo "$PRODUCT $VERSION will be installed system-wide."elseecho "You are running the $PRODUCT installer as a non-root user."echo "$PRODUCT $VERSION will be installed in your home directory."fiecho ""echo "Support is available at http://www.macromedia.com/support/flashplayer/"echo ""echo "To install $PRODUCT $VERSION now, press ENTER."echo ""echo "To cancel the installation at any time, press Control-C."echo ""read cont < /dev/ttyecho ""echo "NOTE: $PRODUCT requires two font packages"if [ -e /etc/debian_version ]; thenecho "      to be installed, gsfonts and gsfonts-x11."elseecho "      to be installed, ttfonts and urw-fonts."fiecho ""echo "Press ENTER to continue..."echo ""read cont < /dev/ttyecho ""echo "NOTE: Please exit any browsers you may have running."echo ""echo "Press ENTER to continue..."echo ""read cont < /dev/tty# Loop until user is done installing one or more timesokToRepeat=0while [ $okToRepeat -eq 0 ]; do# Loop until user is comfortable with their choicesokToProceed=0while [ $okToProceed -eq 0 ]; do  # default variables  BROWSERDIR=""  DIRSTATUS=""  HOMEDIR=""  MOZILLA=0  MOZILLADIR=""  MOZILLA_NOT_W=0  MOZILLAPLUGIN_NOT_W=0  MOZILLASTATUS="valid"  NETSCAPE=0  NETSCAPEDIR=""  NETSCAPE_NOT_W=0  NETSCAPEPLUGIN_NOT_W=0  NETSCAPESTATUS="valid"  OPERA=0  OPERADIR=""  OPERA_NOT_W=0  OPERAPLUGIN_NOT_W=0  OPERASTATUS="valid"  SYMBOLIC_LINK=0  VERSIONSTATUS=0  ############################  # Get destination directory  ############################  echo ""  get_browser_dir () {    echo "Please enter the installation path of the Mozilla, Netscape,"    printf "or Opera browser (i.e., /usr/lib/mozilla): "    read dir    # fix the entered dir if necessary    FIXED_DIR=`fix_dir "$dir"`    dir="$FIXED_DIR"    # check given dir if valid    DIRSTATUS=`check_browser_dir "$dir"`    case $DIRSTATUS in      blank)        echo ""        echo "WARNING: Please do not enter a blank installation path."        echo ""        get_browser_dir        ;;      invalid)        echo ""        echo "WARNING: Please enter a valid installation path."        echo ""        get_browser_dir        ;;      invalid-not-writable)        echo ""        echo "WARNING: $dir is not writable."        echo ""        get_browser_dir        ;;      invalid-plugins-not-writable)        echo ""        echo "WARNING: $dir/plugins is not writable."        echo ""        get_browser_dir        ;;      invalid-not-directory)        echo ""        echo "WARNING: $dir is not a directory."        echo ""        get_browser_dir        ;;      valid)        BROWSERDIR="$dir"        check_plugins_dir "$dir/plugins"        ;;      valid-opera)        OPERA=1        BROWSERDIR="$dir"        check_plugins_dir "$dir/plugins"        ;;      valid-communicator)        echo ""        echo "WARNING: You have entered the installation path to Netscape Communicator."        echo "         Netscape Communicator is not officially supported."        echo ""        NETSCAPE=1        BROWSERDIR="$dir"        check_plugins_dir "$dir/plugins"        ;;      invalid-opera)        echo ""        echo "ERROR: The version of the Opera browser is invalid."        echo ""        exit 1        ;;    esac  }  if [ $ROOTINSTALL -eq 1 ]; then    get_browser_dir  else    HOMEDIR=`(cd ; pwd)`    COUNT=0    STATUSCOUNT=0    ERRORCOUNT=0    # Mozilla user directory    if [ -d "$HOMEDIR/.mozilla" ]; then      MOZILLA=1

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -