PageRenderTime 35ms CodeModel.GetById 21ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 1ms

/docs/INSTALL.txt

http://github.com/graemeg/lazarus
Plain Text | 325 lines | 222 code | 103 blank | 0 comment | 0 complexity | 7a85f2f4bbd1add34b4a2c5f5af9a971 MD5 | raw file
  1Installation hints for lazarus
  2==============================
  3
  4Lazarus provides two main parts:
  5- LCL - the Lazarus Component Library
  6- IDE - the RAD tool (editor, form designer, GUI for debugger and compiler, ...)
  7
  8What is required for Lazarus:
  9- FreePascal - the FreePascal Compiler plus packages plus FPC sources.
 10  IMPORTANT: try to get the same version of the compiler sources
 11             as the installed compiler.
 12- Under Linux/xxxBSD: gtk2 libaries - Most distributions already install them.
 13  See www.gtk.org.
 14
 15
 16The FAQ - Frequently Asked Question is available at www.lazarus.freepascal.org
 17  and some can be found in the file 'FAQ'.
 18
 19
 20The following will describe how to get FreePascal and how to install Lazarus
 21properly:
 22
 23================================================================================
 241. Quick installation guide
 25
 26--------------------------------------------------------------------------------
 271.1 This is the short version. For more details, see the following sections.
 28
 29  Lazarus is intended to be a development tool. Therefore it is designed, that
 30  any normal user can easily install his local copy. This means Lazarus does
 31  not need to be installed as root and it does not create any symlinks or 
 32	configuration entries. You can literally just unpack it into a directory of 
 33	your choice and compile it.
 34
 35
 361.2 Under Linux/BSD:
 37
 38  Make sure that you have installed X, gtk2 and gtk2-devel.
 39
 40  Fedora:
 41    yum install gtk2 gtk2-devel
 42
 43  Debian/Ubuntu:
 44    apt-get install lazarus #will pull in required gtk dependencies
 45
 46  Download and install FreePascal. Either the rpm, tgz or the daily snapshot.
 47  You need at least FPC 2.6.4 (3.0.0 is the stable version of FPC; uneven
 48	versions like 3.1.1 are development versions).
 49
 50  To compile Lazarus (LCL + IDE) go to your unpacked Lazarus source and do:
 51  []$ make clean all
 52
 53  You don't need "./configure" and you don't need "make install". You now 
 54	already have a complete Lazarus. You can start the IDE with "./lazarus".
 55  The "make install" as root will just copy the files and set some nice symlinks
 56  and desktop entries.
 57
 58
 591.3 Under Mac OS X:
 60
 61  What you need: Apple Developer tools
 62  The Developer tools are included on the original OSX installation CDs, or
 63  can be downloaded at ADC (free registration required)
 64  http://developer.apple.com/.
 65
 66  Download and install FreePascal. Either the dmg or the daily snapshot.
 67  You need at least FPC 2.6.4 (2.6.4 is the stable version of FPC; uneven
 68	versions like 3.1.1 are development versions).
 69
 70  To compile Lazarus (LCL + IDE) go to your unpacked Lazarus source and do:
 71  []$ make clean all
 72
 73  You don't need "./configure" and you don't need "make install". You now have
 74  already a complete lazarus. You can start the IDE with "./lazarus".
 75  The "make install" as root will just copy the files and set some nice symlinks
 76  and desktop entries.
 77
 78================================================================================
 792. Installing FreePascal
 80
 81--------------------------------------------------------------------------------
 822.1 Installing FreePascal under Linux:
 83
 84  Lazarus requires FPC (Free Pascal) version 2.6.4 (or newer) and it requires
 85  both the compiled FPC libs (binaries) and the FPC sources. Most of the Linux
 86  distributions contain packages for FreePascal (look for FPC). Use your package
 87  manager to install them.
 88
 89  The FPC binaries:
 90  At the Lazarus downloads section (www.lazarus.freepascal.org
 91  or http://sourceforge.net/project/showfiles.php?group_id=89339) you can get
 92  the rpm/deb of the Free Pascal compiler(compiler / linux) and its packages.
 93  Alternatively, if you don't have a rpm system, you can download and install 
 94	the tars from www.freepascal.org.
 95  If you want to compile the binaries for yourself see the BSD section.
 96
 97  The FPC sources:
 98  The easiest way to get the Free Pascal sources is via svn. Of course you can
 99  also download it as whole, see http://www.freepascal.org/develop.html
100  for the daily snapshot of the release tree (3.1.x).
101
102  The FPC sources via svn:
103  Create a directory where you would like to put the sources. You don't need
104  to be root to do this.
105  First create a directory for fpc (e.g. /home/username/freepascal) then do
106  the following:
107
108  []$ bash
109  []$ svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc
110
111  This will create a directory fpc, which can later be used in the IDE.
112
113  Hint:
114  To download/update the latest changes you can simply do
115
116  []$ cd /home/username/freepascal/fpc
117  []$ svn up
118
119
120
121--------------------------------------------------------------------------------
1222.2 Installing FreePascal under Windows:
123
124  If you use the Windows installer for lazarus, then you don't need to install 
125  Free Pascal separately, because the installer already contains the necessary
126  files.
127    
128  See http://www.freepascal.org/down-win32.html. You can find a list of mirrors
129  at http://www.freepascal.org/sdown.html. Download for example FPC as one big
130  file, unzip it and run install.exe. Then extend your PATH variable to the
131  FPC directory. For example under Windows 98: 
132	Edit autoexec.bat and add the line
133  PATH=%PATH%;C:\pp\bin\bin\win32
134  Then restart Windows.
135
136  ToDo: explain how to download fpc sources and build the compiler
137
138
139--------------------------------------------------------------------------------
1402.3 Installing FreePascal under BSD/manually:
141
142 Read 1.2 first.
143 
144 Effectively, you need:
145
146 - a file with all sources, or two (FPC and Lazarus)
147    (1) e.g. for FPC ftp://ftp.freepascal.org/fpc/dist/Linux/separate/sources.tar
148     preferably an export (no SVN/ dirs). The above file misses this
149    (2) Lazarus source snapshot.
150  - _any_ starting compiler from the 2.6.4 branch) You can do a check by parsing
151 	  the output of 'fpc -v'  if it is 2.6.4, it is ok.
152  - dependant packages. (for FreeBSD that is gtk2, and
153    GNU make, iconv and gettext)
154
155
156  FPC build:
157
158  (1) (fetch)   necessary files (FPC source, starting compiler)
159  (2) (extract) Then de-tgz in work directory,
160  (3  (build)   enter work/fpc/  and run
161
162  	$MAKE all OPT='-gl -O3p3'  PP=/path/to/startingcompiler-name-ppc386
163
164  	(/path/to/ can be omitted when ppc386 is in the path)
165        ($MAKE is make on linux and gmake on BSD)
166
167  (4) (install) then, again in work/fpc, run
168  	$MAKE install PP=compiler/ppc386 PREFIX=$THEPREFIX
169
170  	(THEPREFIX= usually is /usr/lcoal, but e.g. on NetBSD it is /usr/pkg
171  	            for ports)
172
173       Create a symlink
174         ln -s $THEPREFIX/lib/fpc/2.6.4/ppc386 $THEPREFIX/bin/ppc386
175
176       install sourceinstall PREFIX=$THEPREFIX
177
178  (5) (configure) run compiler/utils/samplecfg  $THEPREFIX/lib/fpc/2.6.4 $ETCDIR
179  (6) (optional, test), see if ppc386 -i gives output, else give a warning
180                        that user need to add $PREFIX/bin to his current path.
181      Try to compiler a program with -viwn, and see if that gives errors.
182
183
184  Notes:
185  - If you need fpcmake package lists, you need to generate or supply them
186    yourself, (in the port, or in an extra archive)
187    either way, do a dummy install to /tmp/pack and determine the files
188    installed with find . >ll
189
190  - $THEPREFIX and $ETCDIR should be user configurable. Otherwise local installs
191  	aren't possible.
192
193  - BSDHIER=1 on all make commands forces BSD hierarchy conventions.
194
195
196--------------------------------------------------------------------------------
1972.4 Installing FPC on Mac OSX
198
199  Read 1.3 first.
200
201  Information:
202  http://www.freepascal.org/fpcmac.html#TargetDarwin
203
204  Download the latest Mac OSX dmg package.
205  Since FPC for Mac OSX is under heavy development, it s recommended to use
206  the latest FPC from svn.
207
208  Open a terminal and type (without the []$)
209  
210  []$ svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc
211
212  This will create a directory fpc, which can also be later used by the IDE.
213  
214  Compile fpc:
215  
216  []$ make clean all
217  
218  Install fpc
219  
220  []$ sudo make install
221  
222  This will install fpc in /usr/local/bin. The compiler is for example
223  /usr/local/bin/fpc. You can add the path to your /Users/username/.profile.
224
225
226  Hint:
227  To download/update the latest changes you can simply do
228
229  []$ cd /Users/username/fpc
230  []$ svn up
231
232
233================================================================================
2343. Installing Lazarus
235
236--------------------------------------------------------------------------------
2373.1 Installing Lazarus under Linux/BSD/Mac OSX:
238
239  Because the whole Lazarus stuff is installed into one directory, uninstall
240  is very easy and you don't need to be root to install Lazarus.
241  You can get tgz/zip files from the downloads section or you can download it
242  directly via svn.
243  
244  Hint: Most Linux distributions contain a Lazarus package. Go to your package
245        manager and install it.
246
247  Downloading Lazarus svn: svn provides an easy way to update your sources by
248  only downloading the changes. This is the recommended way and saves you a lot
249  of time. A connection to the internet is needed for this.
250  You don't to be root. Lazarus does not need any special permissions, neither
251  during installation nor at runtime.
252  First create a directory for Lazarus (e.g. /home/username/freepascal) then do
253  the following:
254  
255  connect to the svn server (note: Lazarus and Free Pascal use the same server)
256  
257  []$ svn checkout http://svn.freepascal.org/svn/lazarus/trunk lazarus
258
259  compile Lazarus:
260
261  []$ cd lazarus
262  []$ make          (gmake on BSD)
263
264  If FPC is installed correctly, the compilation should work without problems.
265	If not, see the FAQ.
266  Start Lazarus:
267
268  []$ ./lazarus
269
270  The IDE should start. If you started Lazarus in a terminal, you can see some
271  notes about missing settings. This is normal at first start.
272  The IDE automatically tries to find out where the Free Pascal compiler and its
273  sources are installed by searching in the most common directories.
274  Check the paths:
275    Use the IDE menu to go to
276      Environment -> Environment Options -> Files
277
278    The 'FPC Source directory' should point to your FPC source directory. This
279    directory normally ends with /fpc/ or /fpcsrc/ (e.g. /usr/share/fpcsrc or
280    /home/username/freepascal/fpc) and
281    contains directories like 'compiler', 'docs', 'fcl', 'rtl' and 'packages'.
282
283    ToDo: explain the other paths
284
285
286  Hint:
287  To update Lazarus you can use
288
289  []$ cd /home/username/freepascal/lazarus
290  []$ svn up
291  []$ make clean all   (gmake on BSD)
292  
293  This will rebuild Lazarus and create a minimal IDE with only the basic 
294	packages.
295  
296  []$ make idepkg
297
298
299--------------------------------------------------------------------------------
3003.1 Installing Lazarus under Windows:
301
302  Just download and install the .exe file. You can get the files from:
303  http://sourceforge.net/project/showfiles.php?group_id=89339 (stable release)
304	or
305  http://snapshots.lazarus.shikami.org/lazarus/ (snapshots)
306
307
308  Thanks to Joe for this Step-by-step description:
309
310  You have to download the Lazarus source:
311  ftp://ftp.freepascal.org/pub/fpc/source/lazarus.zip
312
313  Then unzip it to c:\lazarus for example.
314  You have to install at least FPC 2.6.4, e.g. in
315	c:\pp\bin\win32. 
316	In this directory you can find a lot of exes (make, grep, ppc386, and so on).
317
318  Open a command line. Start->Run...>command or choose MS-DOS icon.
319  Type:
320  cd c:\lazarus
321	rem of course adjust to your path:
322  set path=c:\pp\bin\win32;c:\lazarus  
323  make
324
325  If you are lucky then you can type: lazarus.exe