Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- set -e
- echo "********************************************************"
- echo "* *"
- echo "* Automated installation v1.0 *"
- echo "* for install Lazarus(SVN)/FPC(2.6.0) *"
- echo "* *"
- echo "* Script by silvioprog and Lazarus team *"
- echo "* http://silvioprog.com.br *"
- echo "* http://www.lazarus.freepascal.org/ *"
- echo "* *"
- echo "* This script is designed for Ubuntu x86 (32 Bit) *"
- echo "* *"
- echo "* See the source of inspiration for this script: *"
- echo "* http://wiki.lazarus.freepascal.org/Lazarus_Manager *"
- echo "* *"
- echo "********************************************************"
- echo ""
- echo "WARNING: The installation will take a while, please wait!"
- echo ""
- echo "Step 1: Installing dependencies..."
- echo ""
- sudo apt-get install --force-yes -y subversion fpc fp-utils fpc-source fp-units-misc
- echo ""
- echo "Step 2: Downloading files..."
- echo ""
- cd ~
- svn co http://svn.freepascal.org/svn/fpc/branches/fixes_2_6 fpc
- svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus
- cd fpc/
- wget -c ftp://ftp.freepascal.org/fpc/snapshot/v25/i386-linux/fpc-2.5.1.i386-linux.tar.gz
- echo ""
- echo "Step 3: Unzipping FPC..."
- echo ""
- tar -vzxf fpc-2.5.1.i386-linux.tar.gz
- echo ""
- echo "Step 4: Updating FPC SVN..."
- echo ""
- svn update
- echo ""
- echo "Step 5: Compiling new FPC..."
- echo ""
- make clean all
- sudo make install PREFIX=/usr
- echo ""
- echo "Step 6: Removing old FPC..."
- echo ""
- sudo apt-get remove -y fpc fp-utils fpc-source fp-units-misc fp-*
- sudo rm -f /etc/fpc.cfg
- echo ""
- echo "Step 7: Installing new FPC..."
- echo ""
- sudo rm -Rf /usr/share/doc/fpc-2.5.1
- sudo ln -sf $HOME/fpc/share/doc/fpc-2.5.1 /usr/share/doc/fpc-2.6.0
- sudo rm -Rf /usr/share/fpcsrc
- sudo ln -sf $HOME/fpc /usr/share/fpcsrc
- sudo rm -Rf /usr/lib/fpc
- sudo ln -sf $HOME/fpc/lib/fpc /usr/lib
- sudo mv /usr/lib/fpc/2.5.1 /usr/lib/fpc/2.6.0
- sudo ln -sf /usr/lib/fpc/2.6.0/ppc386 /usr/bin/ppc386
- sudo ln -sf $HOME/fpc/bin/bin2obj $HOME/fpc/bin/chmcmd $HOME/fpc/bin/chmls $HOME/fpc/bin/data2inc $HOME/fpc/bin/delp $HOME/fpc/bin/fd2pascal $HOME/fpc/bin/fp $HOME/fpc/bin/fpc $HOME/fpc/bin/fpclasschart $HOME/fpc/bin/fpcmake $HOME/fpc/bin/fpcmkcfg $HOME/fpc/bin/fpcres $HOME/fpc/bin/fpcsubst $HOME/fpc/bin/fpdoc $HOME/fpc/bin/fppkg $HOME/fpc/bin/fprcp $HOME/fpc/bin/grab_vcsa $HOME/fpc/bin/h2pas $HOME/fpc/bin/h2paspp $HOME/fpc/bin/instantfpc $HOME/fpc/bin/makeskel $HOME/fpc/bin/mkarmins $HOME/fpc/bin/mkx86ins $HOME/fpc/bin/plex $HOME/fpc/bin/postw32 $HOME/fpc/bin/ppdep $HOME/fpc/bin/ppudump $HOME/fpc/bin/ppufiles $HOME/fpc/bin/ppumove $HOME/fpc/bin/ptop $HOME/fpc/bin/pyacc $HOME/fpc/bin/rmcvsdir $HOME/fpc/bin/rstconv $HOME/fpc/bin/unitdiff /bin
- sudo /usr/lib/fpc/2.6.0/samplecfg /usr/lib/fpc/2.6.0/ /etc
- echo ""
- echo "Step 8: Updatting Lazarus SVN..."
- echo ""
- cd ../lazarus
- svn update
- echo ""
- echo "Step 9: Compiling Lazarus..."
- echo ""
- make clean all OPT='-glw2'
- echo ""
- echo "Step 10: Creating links and menu item of Lazarus..."
- echo ""
- sudo ln -sf $HOME/lazarus/startlazarus /bin
- sudo ln -sf $HOME/lazarus/lazarus /bin
- echo "[Desktop Entry]
- Encoding=UTF-8
- Categories=Application;IDE;Development;GTK;GUIDesigner;
- Type=Application
- Terminal=false
- Exec=startlazarus %f
- Name=Lazarus
- Comment=Lazarus IDE
- MimeType=text/x-pascal;text/lazarus-project-source;text/lazarus-project-information;text/lazarus-form;text/lazarus-resource;text/lazarus-package;text/lazarus-package-link;text/lazarus-code-inlay;
- Patterns=*.pas;*.pp;*.p;*.inc;*.lpi;*.lpk;*.lpr;*.lfm;*.lrs;*.lpl;*.dci
- Icon="$HOME"/lazarus/images/mimetypes/text-lazarus-project-information.png" > /tmp/lazarus.desktop
- sudo mv /tmp/lazarus.desktop /usr/share/applications/
- echo "***********************************************"
- echo "* The automated installation *"
- echo "* is *"
- echo "* finished! :) *"
- echo "* *"
- echo "* Open Lazarus in menu of your system. *"
- echo "* *"
- echo "* Please, now follow see this thread: *"
- echo "***********************************************"
- echo "http://lists.lazarus.freepascal.org/pipermail/lazarus/2011-May/063321.html"
- echo ""
- echo "Enjoy!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement