[lazarus] lazarus howto 0.1 (comments, please)

Sergio A. Kessler sak at perio.unlp.edu.ar
Wed May 12 17:43:59 EDT 1999



Cliff, how about this:

Lazarus-developer-HowTo-0.1

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).


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: 

cvs -d :pserver:cvs at tflily.fys.kuleuven.ac.be:/usr/local/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 checkout <module1> <module2>

(How I do to list availables modules ??)

example:

cvs 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.
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 -z 9 update <module1> <module2> ... <moduleN>

   this will download _only_ what is changed in the central
   repository and your sources get updated (the -z 9 means
   maximum compression for saving bandwidht).

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.
(this is why sometimes I send mails at 2:00 or 3:00 AM :)
For compress the whole tree, I do:

tar -c /opt/fpc | gzip > fpc.tar.gz

Cliff, Shane, Michael, Peter, etc, Comments, corrections ?

Sergio






More information about the Lazarus mailing list