#!/bin/bash #Last edited: Nov 30, 2006 #This is an automated script to add anti-aliasing support to aMSN. This # will compile the latest beta of Tcl and Tk, and recompile aMSN for it. # #A few notes: # # - The beta Tcl and Tk will be compiled and installed into /usr/local; # it will not replace your existing Tcl and Tk installation, so it # should be much safer to use and easier to revert than other methods. # If the script fails for whatever reason, your existing aMSN # installation will not be harmed. # # - If aMSN complains about a missing TLS library when you try to log # in, choose "Don't download TLS, I'll install it myself", then click # Account->Preferences->Advanced, and in the Other section there will # be a box labeled TLS; paste this in it: /usr/lib/tls1.50 # # - A hold will be placed on the amsn package in apt-get so that it # doesn't upgrade automatically. If you want to upgrade when a new # version comes out, you will need to apt-get install the new package, # then download the source code and compile it as in this script. # # - Certain icons will still look ugly in the default skin; this script # will automatically add the Ubuntu and Kubuntu skins by GuS-Arg. You # can activate them via Account -> Preferences -> Appearance -> # Select Skin. # # - If you want to revert to the normal aMSN, simply open a console and # type: # sudo apt-get remove --purge amsn # sudo rm -r /usr/share/amsn # sudo apt-get install amsn # #This script was written for [k/x]Ubuntu Edgy. Use at your own risk. # - Vuen ( #get all user interaction done right away #activate sudo echo "" echo "Please enter your sudo password:" sudo echo -n "" || ! echo "ERROR: Could not activate sudo." || exit 1 # install amsn and hold it so it doesn't update sudo apt-get --assume-yes install amsn || ! echo "ERROR: Could not install build dependencies." || exit 1 sudo aptitude --assume-yes hold amsn # install build dependencies for beta tcl and tk sudo apt-get --assume-yes build-dep tcl8.4 tk8.4 || ! echo "ERROR: Could not install build dependencies." || exit 1 sudo apt-get --assume-yes install libpng12-dev libjpeg-dev libxft-dev || ! echo "ERROR: Could not install build dependencies." || exit 1 sudo apt-get --assume-yes install cvs subversion || ! echo "ERROR: Could not install revision control systems." || exit 1 # get the various source codes we need mkdir fixamsnsources cd fixamsnsources #tcl trunk cvs -d:pserver:anonymous:@tcl.cvs.sourceforge.net:/cvsroot/tcl login || ! echo "ERROR: Could not download Tcl source code." || exit 1 cvs -z3 -d:pserver:anonymous@tcl.cvs.sourceforge.net:/cvsroot/tcl co -P tcl || ! echo "ERROR: Could not download Tcl source code." || exit 1 #tk trunk cvs -d:pserver:anonymous:@tktoolkit.cvs.sourceforge.net:/cvsroot/tktoolkit login || ! echo "ERROR: Could not download Tk source code." || exit 1 cvs -z3 -d:pserver:anonymous@tktoolkit.cvs.sourceforge.net:/cvsroot/tktoolkit co -P tk || ! echo "ERROR: Could not download Tk source code." || exit 1 #amsn 0.96 svn co https://svn.sourceforge.net/svnroot/amsn/tags/Release-0_96/amsn/ amsn || ! echo "ERROR: Could not download aMSN source code." || exit 1 #compile tcl (into /usr/local, to leave tcl 8.4 untouched) cd tcl/unix (./configure --prefix=/usr/local --includedir=/usr/local/include/tcl8.5 --enable-shared --enable-threads --enable-64bit --mandir=/usr/local/share/man --enable-man-symlinks --enable-man-compression=gzip && make CFLAGS="-g -O2 -D_REENTRANT" && sudo make install) || ! echo "ERROR: Could not compile Tcl." || exit 1 cd ../.. #compile tk (into /usr/local, to leave tcl 8.4 untouched) cd tk/unix (./configure --prefix=/usr/local --includedir=/usr/local/include/tcl8.5 --with-tcl=/usr/local/lib --enable-shared --enable-threads --enable-64bit --enable-man-symlinks --enable-man-compression=gzip --enable-xft && make CFLAGS="-g -O2 -D_REENTRANT" && sudo make install) || ! echo "ERROR: Could not compile Tk." || exit 1 cd ../.. #compile amsn cd amsn (./configure --with-tcl=/usr/local/lib --with-tk=/usr/local/lib && make && sudo make install) || ! echo "ERROR: Could not compile aMSN." || exit 1 cd .. #fix tcltls bug sudo cp /usr/lib/tls1.50/pkgIndex.tcl /usr/lib/tls1.50/pkgIndex.tcl.bak #for some reason --in-place doesn't work? #sudo sed --in-place 's/ifneeded tls 1.5 /ifneeded tls 1.50 /' /usr/lib/tls1.50/pkgIndex.tcl sudo sh -c "sed 's/ifneeded tls 1.5 /ifneeded tls 1.50 /' /usr/lib/tls1.50/pkgIndex.tcl > junk" sudo cp junk /usr/lib/tls1.50/pkgIndex.tcl sudo rm junk #modify amsn launcher to call wish8.5 sudo cp /usr/bin/amsn /usr/bin/amsn.bak #for some reason --in-place doesn't work? #sudo sed --in-place 's/wish /wish8.5 /' /usr/bin/amsn sudo sh -c "sed 's/wish /wish8.5 /' /usr/bin/amsn > junk" sudo cp junk /usr/bin/amsn sudo rm junk #add Ubuntu and Kubuntu skins mkdir skins cd skins (wget -c http://easynews.dl.sourceforge.net/sourceforge/amsn/Ubuntu-1.0b.tar.gz && sudo tar -xsf Ubuntu-1.0b.tar.gz --directory /usr/share/amsn/skins && wget -c http://easynews.dl.sourceforge.net/sourceforge/amsn/Kubuntu-1.6.tar.gz && sudo tar -xsf Kubuntu-1.6.tar.gz --directory /usr/share/amsn/skins) || echo "Unable to install Ubuntu and Kubuntu skins." cd .. #we're done! echo "" echo "Done!" exit 0 ) #clean up EXITVAL=$? rm -rf fixamsnsources exit $EXITVAL