Getting Lazarus

From Lazarus wiki
Jump to navigationJump to search

Getting Lazarus

Via CVS

Be aware that the FreePascal Compiler development team have migrated to Subversion (SVN) instead of CVS, so if you want the latest version of the compiler you will have to use SVN. The lazarus repository is still on CVS, so the information below is still current.

Getting CVS

You may download a CVS Client for Windows in: http://tortoisecvs.sourceforge.net/

Using CVS

Open a command or cmd prompt and while in the directory where you want to place the lazarus source dir issue the following commands:

export CVSROOT=:pserver:cvs@cvs.freepascal.org:/FPC/CVS
cvs login // (type "cvs" for the password)

Hint: To do a fresh download of all files enter: cvs -z3 checkout lazarus

Hint: To do an update on an existing directory do: cvs -z3 update lazarus

user:Matthijs: In Linux I use a script (it is not very sofisticated, but does the trick) to download the latest CVS-version for Lazarus. Before I copy it here I'll explain my system. In my home-directory I have a special cvsroot-directory. In this directory I have script for downloading Lazarus and other interesting projects. Lazarus is installed in /usr/share/lazarus. Before building a new version from CVS I make a backup, just in case the current cvs is instable. This is done by moving the /usr/share/lazarus directory to /usr/share/lazarus.bu To adapt the script to your system you only need to alter the constants defined at the start of the script. But without further ado, here is the script. But (big but) it is given without any garantee. :) If things break you are on your own.

#!/bin/bash

#Define some directories
BASEDIR=/usr/share/
LAZCVSDIR=~/cvsroot/lazarus/
LAZDIR=/usr/share/lazarus/
LAZBACKUP=/usr/share/lazarus.bu

#Remove old backup if it exists
date +"%T %tStart"
if [ -d $LAZBACKUP ]
then 
  date +"%T %tRemoving old backup"
  rm $LAZBACKUP -r
else
  date +"%T %tNo backup to remove"
fi

date +"%T %tCreating copy of lazarus dir"
cp -R $LAZDIR $LAZBACKUP

#Getting stuff from cvs
export CVSROOT=:pserver:cvs:cvs@cvs.freepascal.org:/FPC/CVS
date +"%T %tLogin to cvs server"
cvs login > /dev/null
date +"%T %tUpdate lazarus"
cvs -z3 update -dP lazarus > ~/cvs_update.log
date +"%T %tLogout of cvs-server"
cvs logout > /dev/null

#Copying cvs-files to our laz dir.
date +"%T %tcopying files"
cp -Rf $LAZCVSDIR $BASEDIR --reply=yes

#Make and building of lazarus
date +"%T %tmake lazarus" 
cd $LAZDIR
make > /dev/null
date +"%T %tmake the packages"
make idepkg > /dev/null
date +"%T %tFinished"

Using Tortoise CVS

After installing Tortoise, create a new directory to hold the Lazarus CVS.

From Windows Explorer, right click on this new directory, and select CVS Checkout.

In the Tortoise CVS Checkout Module Dialog that follows, enter the following options:

Protocol: Password Server
Server: cvs.freepascal.org
Repository Folder: /FPC/CVS
User name: cvs
Module: lazarus

As you add the above options, you will see the CVS Root field change. If you have added all the options,this should read :pserver:cvs@cvs.freepascal.org:/FPC/CVS

Note: Be sure to add the module name. If you don't, you will get the whole Free Pascal CVS (~200MB) rather than only the Lazarus CVS (~40MB).

Click OK to start the CVS Checkout. If prompted for a password, enter cvs.

The Lazarus CVS will be downloaded into a sub-directory (lazarus) of your chosen directory. Right clicking this sub-directory will give you various CVS options, including an option for Update.

Daily Snapshot method

If you don't want to use cvs directly, a daily snapshot of the current cvs is available from the FPC ftp server. This snapshot is not updated anymore, but you can download a source snapshot from the lazarus snapshot site or one of its mirrors.

Downloading binaries

Binaries for various platforms are also available via the Lazarus Sourceforge download area and via the main Lazarus homepage.

Original contributors and changes

This page has been converted from the epikwiki version.