View difference between Paste ID: 2qun0krG and fx3x3Zn3
SHOW: | | - or go back to the newest paste.
1
#!/bin/sh
2
3
set -e
4
5
echo "********************************************************"
6
echo "*                                                      *"
7
echo "*             Automated installation v1.1 for          *"
8-
echo "*         install Lazarus and FPC (2.6.0) via GIT      *"
8+
echo "*             install Lazarus and FPC via GIT          *"
9
echo "*                                                      *"
10
echo "*         Script by silvioprog and Lazarus team        *"
11
echo "*                                                      *"
12
echo "*  This script is designed for Linux Mint 14 - 64bit   *"
13
echo "*                                                      *"
14
echo "********************************************************"
15
echo ""
16
echo "WARNING: The installation will take a while, please wait!"
17
18
echo ""
19
echo "Step 1: Updating your system ..."
20
echo ""
21
sudo apt-get update
22
23
echo ""
24
echo "Step 2: Installing dependencies ..."
25
echo ""
26
sudo apt-get install --force-yes -y fpc fp-utils fpc-source fp-units-misc
27
28
echo ""
29
echo "Step 3: Downloading sources from Github ..."
30
echo ""
31
cd ~
32
git clone git://github.com/graemeg/freepascal.git
33
git clone git://github.com/graemeg/lazarus.git
34
cd freepascal/
35
36
echo ""
37
echo "Step 4: Compiling new FPC ..."
38
echo ""
39
make clean all
40
sudo make install PREFIX=/usr
41
42
echo ""
43
echo "Step 5: Removing old FPC ..."
44
echo ""
45
sudo apt-get remove -y fpc fp-utils fpc-source fp-units-misc fp-*
46
sudo apt-get install --force-yes -y gimp libgegl-0.2-0 libumfpack5.4.0
47
sudo rm -f /etc/fpc.cfg
48
49
echo ""
50
echo "Step 6: Installing new FPC ..."
51
echo ""
52
sudo ln -sf /usr/lib/fpc/2.7.1/ppcx64 /usr/bin/ppcx64
53
sudo ln -sf $HOME/freepascal/compiler/utils/fpc /bin/
54
sudo ln -sf $HOME/freepascal/utils/fpcmkcfg/fpcmkcfg /bin/
55
sudo /usr/lib/fpc/2.7.1/samplecfg /usr/lib/fpc/2.7.1/ /etc
56
sudo ln -sf $HOME/freepascal/utils/fpcres/fpcres /bin/
57
58
echo ""
59
echo "Step 7: Updatting Lazarus GIT ..."
60
echo ""
61
cd ../lazarus
62
git checkout upstream
63
git pull
64
65
echo ""
66
echo "Step 8: Compiling Lazarus..."
67
echo ""
68
make clean all OPT='-glw2'
69
70
echo ""
71
echo "Step 9: Creating links of Lazarus..."
72
echo ""
73
sudo ln -sf $HOME/lazarus/startlazarus /bin
74
sudo ln -sf $HOME/lazarus/lazarus /bin
75
sudo ln -sf $HOME/lazarus/lazbuild /bin
76
77
echo ""
78
echo "Step 10: Creating menu of Lazarus..."
79
echo ""
80
echo "[Desktop Entry]
81
Encoding=UTF-8
82
Categories=Application;IDE;Development;GTK;GUIDesigner;
83
Type=Application
84
Terminal=false
85
Exec=startlazarus %f
86
Name=Lazarus
87
Comment=Lazarus IDE
88
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;
89
Patterns=*.pas;*.pp;*.p;*.inc;*.lpi;*.lpk;*.lpr;*.lfm;*.lrs;*.lpl;*.dci
90
Icon="$HOME"/lazarus/images/mimetypes/text-lazarus-project-information.png" > /tmp/lazarus.desktop
91
sudo mv /tmp/lazarus.desktop /usr/share/applications/
92
93
echo "***********************************************"
94
echo "*         The automated installation          *"
95
echo "*                     is                      *"
96
echo "*                 finished! :)                *"
97
echo "*                                             *"
98
echo "*     Open Lazarus in menu of your system.    *"
99
echo "***********************************************"
100
echo ""
101
echo "Enjoy!"