[lazarus] Lazarus how-to 0.2

Sergio A. Kessler sak at perio.unlp.edu.ar
Thu May 13 15:03:24 EDT 1999


Thanks to all the comments, I think I've simplyfied this
beast a little, of course, more comments, the better.


Lazarus-developer-HowTo-0.2

Linux instructions:

Well, this is how I configured my system, this approach is
intended for developers and those that want to stay up to 
date with the code in CVS.

You will need the cvs program installed, type "cvs --help" 
to see if it's installed, if not try to install it from a
.rpm, .deb or .pkg (up to you :)

Also, if you have the mc (Midnigth commander), a clone of
the Norton Commander, it will make very easy the tasks of
copying and moving files, type "mc" and see if you have it
installed (it come with most distros).

This text assume that you are running the bash shell, if you
don't know what the hell is this, don't worry  :)


One time actions (First day only):
----------------

Make a directory called /opt (if you don't have it, of course)
The /opt is always used by self contained apps that doesn't
come in packages, so it's easy to administer it in a isolated
directory.

Enter to the /opt directory and create one inside called "fpc",
enter to the fpc directory.

Connect to the internet (up to you :) (if you are using RedHat,
try LinuxConf or Gnome-PPP).

Now (inside /opt/fpc ) you have to type the following on the 
command line: 

$ export CVSROOT=':pserver:cvs at tflily.fys.kuleuven.ac.be:/usr/local/CVS'

$ cvs login

You will be prompted for a password: 

(Logging in to cvs at tflily.fus.kuleuven.ac.be)
CVS password:

The password is 'cvs' (don't type the quotes). 
This step needs to be performed only once. 
Your CVS client will remember the password.

Now you need to checkout (download) the modules:

cvs -z3 checkout <module1> <module2>

example:

$ cvs -z3 checkout base compiler rtl fcl docs gtk lazarus

This will download the current cvs source code (the bleeding
edge) to your computer and create a directory structure.
ok, this will be a big download, BUT you have to do this only
_one_ time, the first time.
The -z3 parameter means compression for saving bandwidht.
if you are not interested in docs, for example, do not
checkout it (docs is large :)

you will end up with this tree:

/opt
   /fpc
       /CVS        (internal cvs use, do not touch)
       /base
       /compiler
       /rtl
       /gtk
       /lazarus
       ...

Now make a directory /opt/fpc/units/linux in where we'll put
the compiled units.

But the first time we need a binary compiler, because we have
all the source but we don't have a compiler, so download a
snapshot for linux from
ftp://tflily.fys.kuleuven.ac.be/pub/fpc/snapshot/snapshot.tar.gz
and put the binarys in /opt/fpc and the units in 
/opt/fpc/units/linux

Now edit your ~/.bash_profile to include /opt/fpc in your 
path and declare environment variable FPCDIR=/opt/fpc and 
export it.
Logout and login again so this take effect.


Repeated actions (every day or so):
----------------

1) Copy the content of /opt/fpc/base to /opt/fpc, but *don't*
   delete the base directory.

2) Is a good idea to recompile the compiler every time you
   update your sources (and copy the binary to /opt/fpc)
   For this do a "make" in /opt/fpc/compiler and copy
   the new binary in /opt/fpc

3) Also, it's good to recompile the rtl and copy the .o 
   and .ppu files to /opt/fpc/units/linux every time you
   update your sources.

4) The next time you want to update your source code from
   the fpc repository, just sit inside the /opt/fpc 
   directory and do:

cvs -z3 update -dP <module1> <module2> ... <moduleN>

   this will download _only_ what is changed in the central
   repository and your sources get updated (the -dP means 
   create any new directory that appears in the repository
   and prune any empty directory).

5) Go to 1)


Reasons for use CVS:

- MUCH more bandwidth friendly than download .zip or.gz
  every day.
- Easy, very, very easy to use once you checkout the
  modules.
- You will stay in the bleeding edge state of the source


What I do is update the cvs in the work (we have a dedicated
line to the Internet), but because I can't investigate further
in the work, I gzipped all the tree and take it to my house.
For compress the whole tree, I do:

tar -czvf fpc.tar.gz /opt/fpc

Sergio






More information about the Lazarus mailing list