Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2011
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.80 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. echo "********************************************************"
  6. echo "*                                                      *"
  7. echo "*              Automated installation v1.0             *"
  8. echo "*         for install Lazarus/FPC (SVN version)        *"
  9. echo "*                                                      *"
  10. echo "*         Script by silvioprog and Lazarus team        *"
  11. echo "*                http://silvioprog.com.br              *"
  12. echo "*           http://www.lazarus.freepascal.org/         *"
  13. echo "*                                                      *"
  14. echo "*   This script is designed for Ubuntu x86 (32 Bit)    *"
  15. echo "*                                                      *"
  16. echo "********************************************************"
  17. echo ""
  18. echo "WARNING: The installation will take a while, please wait!"
  19.  
  20. echo ""
  21. echo "Step 1: Installing dependencies..."
  22. echo ""
  23. sudo apt-get update
  24. sudo apt-get upgrade -y
  25. sudo apt-get install --force-yes -y subversion fpc fp-utils fpc-source fp-units-misc
  26.  
  27. echo ""
  28. echo "Step 2: Downloading files..."
  29. echo ""
  30. cd ~
  31. svn co http://svn.freepascal.org/svn/fpc/trunk fpc
  32. svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus
  33. wget -c ftp://ftp.freepascal.org/fpc/snapshot/v25/i386-linux/fpc-2.5.1.i386-linux.tar.gz
  34.  
  35. echo ""
  36. echo "Step 3: Unzipping FPC..."
  37. echo ""
  38. mv fpc-2.5.1.i386-linux.tar.gz fpc/
  39. cd fpc/
  40. tar -vzxf fpc-2.5.1.i386-linux.tar.gz
  41. rm -f fpc-2.5.1.i386-linux.tar.gz
  42.  
  43. echo ""
  44. echo "Step 4: Updatting FPC SVN..."
  45. echo ""
  46. svn update
  47.  
  48. echo ""
  49. echo "Step 5: Compiling new FPC..."
  50. echo ""
  51. make clean all
  52.  
  53. echo ""
  54. echo "Step 6: Removing old FPC..."
  55. echo ""
  56. sudo apt-get remove -y fpc fp-utils fpc-source fp-units-misc fp-*
  57. sudo rm -f /etc/fpc.cfg
  58.  
  59. echo ""
  60. echo "Step 7: Installing new FPC..."
  61. echo ""
  62. sudo make install PREFIX=/usr
  63. sudo rm -Rf /usr/share/doc/fpc-2.5.1
  64. sudo ln -sf /home/$USER/fpc/share/doc/fpc-2.5.1 /usr/share/doc
  65. sudo rm -Rf /usr/share/fpcsrc
  66. sudo ln -sf /home/$USER/fpc /usr/share/fpcsrc
  67. sudo rm -Rf /usr/lib/fpc
  68. sudo ln -sf /home/$USER/fpc/lib/fpc /usr/lib
  69. sudo ln -sf /usr/lib/fpc/2.5.1/ppc386 /usr/bin/ppc386
  70. sudo ln -sf /home/$USER/fpc/bin/bin2obj /home/$USER/fpc/bin/chmcmd /home/$USER/fpc/bin/chmls /home/$USER/fpc/bin/data2inc /home/$USER/fpc/bin/delp /home/$USER/fpc/bin/fd2pascal /home/$USER/fpc/bin/fp /home/$USER/fpc/bin/fpc /home/$USER/fpc/bin/fpclasschart /home/$USER/fpc/bin/fpcmake /home/$USER/fpc/bin/fpcmkcfg /home/$USER/fpc/bin/fpcres /home/$USER/fpc/bin/fpcsubst /home/$USER/fpc/bin/fpdoc /home/$USER/fpc/bin/fppkg /home/$USER/fpc/bin/fprcp /home/$USER/fpc/bin/grab_vcsa /home/$USER/fpc/bin/h2pas /home/$USER/fpc/bin/h2paspp /home/$USER/fpc/bin/instantfpc /home/$USER/fpc/bin/makeskel /home/$USER/fpc/bin/mkarmins /home/$USER/fpc/bin/mkx86ins /home/$USER/fpc/bin/plex /home/$USER/fpc/bin/postw32 /home/$USER/fpc/bin/ppdep /home/$USER/fpc/bin/ppudump /home/$USER/fpc/bin/ppufiles /home/$USER/fpc/bin/ppumove /home/$USER/fpc/bin/ptop /home/$USER/fpc/bin/pyacc /home/$USER/fpc/bin/rmcvsdir /home/$USER/fpc/bin/rstconv /home/$USER/fpc/bin/unitdiff /bin
  71. sudo /usr/lib/fpc/2.5.1/samplecfg /usr/lib/fpc/2.5.1/ /etc
  72.  
  73. echo ""
  74. echo "Step 8: Updatting Lazarus SVN..."
  75. echo ""
  76. cd ../lazarus
  77. svn update
  78.  
  79. echo ""
  80. echo "Step 9: Compiling Lazarus..."
  81. echo ""
  82. make clean all
  83. ./lazbuild --build-ide=
  84.  
  85. echo ""
  86. echo "Step 10: Creating links and menu item of Lazarus..."
  87. echo ""
  88. sudo ln -sf /home/$USER/lazarus/startlazarus /bin
  89. sudo ln -sf /home/$USER/lazarus/lazarus /bin
  90. echo "[Desktop Entry]
  91. Encoding=UTF-8
  92. Categories=Application;IDE;Development;GTK;GUIDesigner;
  93. Type=Application
  94. Terminal=false
  95. Icon[pt_BR]=/home/silvioprog/lazarus/images/ide_icon48x48.png
  96. Name[pt_BR]=Lazarus
  97. Exec=startlazarus %f
  98. Name=Lazarus
  99. Comment=Lazarus IDE
  100. StartupWMClass=Lazarus
  101. 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;
  102. Patterns=*.pas;*.pp;*.p;*.inc;*.lpi;*.lpk;*.lpr;*.lfm;*.lrs;*.lpl;*.dci
  103. Icon=/home/silvioprog/lazarus/images/mimetypes/text-lazarus-project-information.png" > /tmp/lazarus.desktop
  104. sudo mv /tmp/lazarus.desktop /usr/share/applications/
  105.  
  106. echo "***********************************************"
  107. echo "*         The automated installation          *"
  108. echo "*                     is                      *"
  109. echo "*                 finished! :)                *"
  110. echo "*                                             *"
  111. echo "*     Open Lazarus in menu of your system.    *"
  112. echo "*                                             *"
  113. echo "*     Please, now follow see this thread:     *"
  114. echo "***********************************************"
  115. echo "http://lists.lazarus.freepascal.org/pipermail/lazarus/2011-May/063321.html"
  116. echo ""
  117. echo "Enjoy!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement