[lazarus] lazarus howto 0.1 (comments, please)

michael at tfdec1.fys.kuleuven.ac.be michael at tfdec1.fys.kuleuven.ac.be
Thu May 13 08:16:03 EDT 1999




On Wed, 12 May 1999, Sergio A. Kessler wrote:

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

You can't.

> 
> example:
> 
> cvs checkout base compiler rtl fcl docs gtk lazarus

This supposes that you have a CVSROOT environment variable set:
for Csh:

setenv CVSROOT :pserver:cvs at tflily.fys.kuleuven.ac.be:/usr/local/CVS

for bash:

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

If you don't want to set this, you must ALWAYS provide the option

  -d :pserver:cvs at tflily.fys.kuleuven.ac.be:/usr/local/CVS

To cvs. (noted already by someone)

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

Csh users: edit ~/.login and add

setenv FPCDIR /opt/fpc

to 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>

1) You may need to add the -d option, as I said above.
2) ALWAYS add -dP after the 'update' keyword. if you forget this,
   new directories in the repository will never be created !
   so
   cvs -z9 update -dP lazarus fcl ...



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

This is not always good:
1) Sometimes the sources are in an uncompilable state.
2) consider the following:

   person A changes FileA so it needs a new file, FileB  

       Person A         Person B
   
0:00   check in fileA
0:01	                cvs update 
0:02   cvs add BileB
0:02   check in fileB 

   -> person B has the new file A which needs File B. but he doesn't have file
       fileB -> no compile.

Seems far-fetched, but it HAS happened in the past. 

> 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

or 

  tar -cvf fpc.tar.gz /opt/fpc

Michael.






More information about the Lazarus mailing list