Difference between revisions of "Getting Lazarus"

From Lazarus wiki
Jump to navigationJump to search
(→‎Getting Lazarus: removed CVS info)
Line 1: Line 1:
=Getting Lazarus=
 
 
== Via SVN ==
 
== Via SVN ==
Write Me :)
 
SVN Home page: http://subversion.tigris.org/
 
 
 
=== Getting SVN ===
 
=== Getting SVN ===
 
You may download a SVN Client for Windows in http://tortoisesvn.tigris.org/
 
You may download a SVN Client for Windows in http://tortoisesvn.tigris.org/
Line 18: Line 14:
 
Open a terminal/command prompt, change to the lazarus directory and type:
 
Open a terminal/command prompt, change to the lazarus directory and type:
 
   svn update
 
   svn update
 
== 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 has also switched, so the information below is not current. It is still possible to get lazarus via CVS, however the CVS version will not be updated as it is locked at version 0.9.8. Please use SVN to get the development version. [[Getting_Lazarus#Via_SVN|Getting Lazarus Via SVN]].
 
=== 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 <br>
 
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]]:
 
[[user:Matthijs]]:
 +
'''WARNING: This script is still assuming lazarus has its source in a CVS repository'''
 
In Linux I use a script (it is not very sophisticated, but does the trick) to download the latest CVS-version for Lazarus. Before I copy it here I'll explain my system.
 
In Linux I use a script (it is not very sophisticated, 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 a 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 unstable. This is done by moving the /usr/share/lazarus directory to /usr/share/lazarus.bu
 
In my home-directory I have a special cvsroot-directory. In this directory I have a 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 unstable. This is done by moving the /usr/share/lazarus directory to /usr/share/lazarus.bu
Line 84: Line 63:
 
  make idepkg > /dev/null
 
  make idepkg > /dev/null
 
  date +"%T %tFinished"
 
  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<br>
 
'''Server:''' cvs.freepascal.org<br>
 
'''Repository Folder:''' /FPC/CVS<br>
 
'''User name:''' cvs<br>
 
'''Module:''' lazarus<br>
 
 
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 ==
 
== Daily Snapshot method ==

Revision as of 11:30, 15 September 2005

Via SVN

Getting SVN

You may download a SVN Client for Windows in http://tortoisesvn.tigris.org/ A SVN command line client is available from the official SVN website for many platforms including Linux and Windows.

Using SVN

To get Lazarus for the first time:

Open a terminal/command prompt, change to the directory you wish the Lazarus folder to be created in and type:

 svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus

To update Lazarus sources:

Open a terminal/command prompt, change to the lazarus directory and type:

 svn update

user:Matthijs: WARNING: This script is still assuming lazarus has its source in a CVS repository In Linux I use a script (it is not very sophisticated, 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 a 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 unstable. 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 guarantee. :) 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"

Daily Snapshot method

If you don't want to use svn directly, a daily snapshot of the current cvs is available from the lazarus snapshot site or one of its mirrors.

Downloading releases

Binary releases for various platforms are also available via the Lazarus Sourceforge download area.

Original contributors and changes

This page has been converted from the epikwiki version.