WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Acrobat Reader 9.4.0  (Read 23017 times)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Acrobat Reader 9.4.0
« on: April 30, 2011, 08:40:33 PM »
This creates an Acrobat Reader 9.4.0 extension in your tce directory.

Install with the command:

Code: [Select]
tce-load -i `cat /opt/.tce_dir`/acroread-9.4.0.tcz



Code: [Select]
#!/bin/sh
# To fetch and build an Acrobat Reader extension.  It is far
# preferable to change the "$SRCDIR" variable to a mounted storage
# device as this will take gobs of RAM.

# Taken from the Arch Linux pkgbuild.

if [ "$USER" == "root" ]; then
echo "Do not need to run as root.  Exiting.."
exit 1
fi

if [ ! -f /usr/local/tce.installed/glibc_gconv ]; then
echo "Install glibc_gconv.tcz before proceeding."
exit 1
fi

if [ ! -f /usr/local/tce.installed/openssl-0.9.8 ]; then
echo "Install openssl-0.9.8.tcz before proceeding."
exit 1
fi

if [ ! -f /usr/local/tce.installed/gtk2 ]; then
echo "Install gtk2.tcz before proceeding."
exit 1
fi

if [ ! -f /usr/local/tce.installed/libcups ]; then
echo "Install libcups.tcz before proceeding."
exit 1
fi

if [ ! -f /usr/local/tce.installed/squashfs-tools-4.x ]; then
echo "Install squashfs-tools-4.x.tcz before proceeding."
exit 1
fi

NAME=acroread
VERSION=9.4.0
DOWNLOAD=ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/"$VERSION"/enu/
SOURCE=AdbeRdr9.4-1_i486linux_enu.tar.bz2
MD5SUM=dd7a47695fb149c09dcda65c754708cb
SRCDIR=/mnt/sda1/acroread123
TMPDIR="$SRCDIR"/"$NAME"21654
PKG="$TMPDIR"/pkg
TCEDIR="`cat /opt/.tce_dir`/optional"


if [ ! -d "$PKG" ]; then
sudo mkdir -p "$PKG"
sudo chown -R tc:staff "$SRCDIR"
fi



cd "$SRCDIR"
if [ -e "$SOURCE" ]; then
  if [ $(md5sum "$SOURCE" | cut -c1-32) != "$MD5SUM" ]; then
    sudo rm -r "$SOURCE"
  fi
fi
if [ ! -e "$SOURCE" ]; then
  wget -c "$DOWNLOAD"/"$SOURCE"
fi
if [ $(md5sum "$SOURCE" | cut -c1-32) = "$MD5SUM" ]; then
  echo "md5sum passed."
else
  echo "Download failed. aborting"
  exit 1;
fi


tar xjvf "$SOURCE"


  cd "$SRCDIR"/AdobeReader
  tar -xf COMMON.TAR
  tar -xf ILINXR.TAR
  cd Adobe/Reader9

  mkdir -p "$PKG"/usr/local/lib/Acroread
  cp -a * "$PKG"/usr/local/lib/Acroread

  mkdir -p "$PKG"/usr/local/bin
  ln -s /usr/local/lib/Acroread/bin/acroread "$PKG"/usr/local/bin/acroread
 

 
  echo "Installing Broswer Plugin..."
  mkdir -p "$PKG"/usr/local/lib/mozilla/plugins
 
  ln -s /usr/local/lib/Acroread/Browser/intellinux/nppdf.so "$PKG"/usr/local/lib/mozilla/plugins/nppdf.so
 
 
   
  echo "Installing Icon Resource..."
  install -D -m644 Resource/Support/AdobeReader.desktop \
    "$PKG"/usr/local/share/applications/acroread-9.4.0.desktop

  install -D -m644 Resource/Icons/64x64/AdobeReader9.png \
    "$PKG"/usr/local/share/pixmaps/acroread-9.4.0.png

sed -i 's:Icon=AdobeReader9:Icon=acroread-9.4.0:g' "$PKG"/usr/local/share/applications/acroread-9.4.0.desktop
echo "X-FullPathIcon=/usr/local/share/pixmaps/acroread-9.4.0.png" >> "$PKG"/usr/local/share/applications/acroread-9.4.0.desktop
  echo "Installing License..."
  install -D -m644 Reader/Legal/en_US/License.txt \
    "$PKG"/usr/local/share/licenses/acroread/License.txt
 
  cd "$TMPDIR"
  sudo mksquashfs pkg/ "$TCEDIR"/"$NAME"-"$VERSION".tcz -noappend
  sudo rm -rf "$TMPDIR"
  cd ..
  sudo rm -rf "$SRCDIR"/AdobeReader
  echo "gtk2.tcz" > "$TCEDIR"/"$NAME"-"$VERSION".tcz.dep
  echo "glibc_gconv.tcz" >> "$TCEDIR"/"$NAME"-"$VERSION".tcz.dep
  echo "libcups.tcz" >> "$TCEDIR"/"$NAME"-"$VERSION".tcz.dep
  echo "squashfs-tools-4.x.tcz" >> "$TCEDIR"/"$NAME"-"$VERSION".tcz.dep
  echo "openssl-0.9.8.tcz" >> "$TCEDIR"/"$NAME"-"$VERSION".tcz.dep
  echo ""$NAME"-"$VERSION".tcz is now in "$TCEDIR" ready to be installed."

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: Acrobat Reader 9.4.0
« Reply #1 on: May 14, 2011, 10:06:45 PM »
into which folder should I put the script in?

Is the result an extension?

Thank you
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Acrobat Reader 9.4.0
« Reply #2 on: May 14, 2011, 10:09:46 PM »
It can be run from anywhere.  But edit the SRCDIR variable to decide where to download and make the package, it will take up a lot of working space.  The extension will be made in your existing and in use tce/optional directory ready to be loaded with tce-load, or added to onboot or ondemand.

Offline meo

  • Hero Member
  • *****
  • Posts: 651
Re: Acrobat Reader 9.4.0
« Reply #3 on: September 09, 2011, 06:21:30 PM »
Hi Jason!

Didn't find this script until now. I used it and the Acrobat Reader works excellent. Many thanks for all the things you do for the community!

Have fun making TC more polished and useful,
meo
"All that is very well," answered Candide, "but let us cultivate our garden." - Francois-Marie Arouet Voltaire

Offline meo

  • Hero Member
  • *****
  • Posts: 651
Re: Acrobat Reader 9.4.0
« Reply #4 on: September 11, 2011, 02:49:32 PM »
Hi Jason!

Tried the script on the new TC 4.0 rc1 and it worked like a charm. Thanks for making this script!!!

Have fun in all your work for the TC community,
meo
"All that is very well," answered Candide, "but let us cultivate our garden." - Francois-Marie Arouet Voltaire

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: Acrobat Reader 9.4.0
« Reply #5 on: September 11, 2011, 06:42:57 PM »
Jason, you as other users of the forum produce amazing script, I wonder why not put them on the repository rather than rather the use to those who make a careful search on the forum.
You could use the new features in 4.0 and put them with the "script" tag, that'd be great.
I think your products are comparable to any other package in terms of utility (like Flash)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Acrobat Reader 9.4.0
« Reply #6 on: September 11, 2011, 10:50:19 PM »
Thanks, I will consider polishing this one up and putting it in the repo.  A fetch and install script for acrobat, like flash, is reasonable, though in general I like to keep scripts here and not in the repo. 

Offline jpakko

  • Newbie
  • *
  • Posts: 7
Re: Acrobat Reader 9.4.0
« Reply #7 on: December 08, 2011, 01:08:08 AM »
Thanks Jason, this really works well. I encourage you to find a way to put it in the repo. Or, if not that, maybe there should be a place just for Really Useful Scripts.

I've updated it to download the latest version. Here are the things I changed:

Downloads AdbeRdr9.4.6-1_i486linux_enu.tar.bz2
Updated md5sum to match
Changed icon to acroread-9.4.6.png
Changed desktop file to acroread-9.4.6.desktop
changed openssl to version 1.0.0

I think that's about it. I've attached the file.

Offline meo

  • Hero Member
  • *****
  • Posts: 651
Re: Acrobat Reader 9.4.0
« Reply #8 on: December 27, 2011, 03:54:39 PM »
Hi guys!

Tried this script in the new TC 4.2 but with no success. The script might need an update?

Have fun extending the limits of TC,
meo
"All that is very well," answered Candide, "but let us cultivate our garden." - Francois-Marie Arouet Voltaire

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Acrobat Reader 9.4.0
« Reply #9 on: December 29, 2011, 10:06:42 AM »
Yeah, there are a lot of scripts that I am sure need updating due to the change from /opt/.tce_dir to /etc/sysconfig/tcedir.  Something like this would work to keep it compatible with both pre-4.2 and post-4.2 releases:

if readlink /etc/sysconfig/tcedir >/dev/null; then
 TCEDIR=`readlink /etc/sysconfig/tcedir`
elif [ -f /opt/.tce_dir ]; then
 TCEDIR=`cat /opt/.tce_dir`
fi

Offline meo

  • Hero Member
  • *****
  • Posts: 651
Re: Acrobat Reader 9.4.0
« Reply #10 on: December 29, 2011, 05:11:23 PM »
Hi Jason!

Where would those lines be inserted into the script?

Have fun helping out in the TC community,
meo
"All that is very well," answered Candide, "but let us cultivate our garden." - Francois-Marie Arouet Voltaire

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Acrobat Reader 9.4.0
« Reply #11 on: December 29, 2011, 05:46:45 PM »
I attached a hopefully fixed version.
« Last Edit: December 30, 2011, 11:53:19 AM by Jason W »

Offline meo

  • Hero Member
  • *****
  • Posts: 651
Re: Acrobat Reader 9.4.0
« Reply #12 on: December 30, 2011, 11:28:44 AM »
Hi again Jason!

It worked great, thanks! The only snag is that it appeared in the tce directory instead of tce/optional but I just moved it. Thanks again I use it a lot!!!

Have fun widening the functionality of TC,
meo
"All that is very well," answered Candide, "but let us cultivate our garden." - Francois-Marie Arouet Voltaire

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Acrobat Reader 9.4.0
« Reply #13 on: December 30, 2011, 11:53:47 AM »
Ok, I corrected the above attachment, should work.

Offline meo

  • Hero Member
  • *****
  • Posts: 651
Re: Acrobat Reader 9.4.0
« Reply #14 on: December 30, 2011, 06:50:10 PM »
Hi again Jason!

Thanks a lot! I really appreciate your work and willingness to help out. Thanks again!

Have fun keeping up your good work,
meo
"All that is very well," answered Candide, "but let us cultivate our garden." - Francois-Marie Arouet Voltaire