Difference between revisions of "Getting Lazarus"
Line 29: | Line 29: | ||
[[Image:TortoiseSVN_Main_Menu_Update.png]] | [[Image:TortoiseSVN_Main_Menu_Update.png]] | ||
+ | |||
==== Using the command line ==== | ==== Using the command line ==== |
Revision as of 05:23, 25 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
Using TortoiseSVN for Windows
TortoiseSVN integrates itself with Windows Explorer. After installation, all commands are available from inside Windows Explorer through right-clicking on a directory or file.
To get Lazarus for the first time:
- Open Windows Explorer
- Create a directory where you want to put the files from the SVN server
- Right click on the newly created directory
- Select SVN Checkout... on the popup menu
- watch how TortoiseSVN imports the file tree from the server. This can take some time to complete.
To update Lazarus sources:
- Open Windows Explorer
- Right click on the source directory
- Select SVN Update on the popup menu
Using the command line
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
Lightning: Here is a windows batch script that takes care of checking out and updating Lazarus from SVN to a subdirectory and even basic error fixing, because i have no way of knowing where Lazarus is installed it cannot compile or copy the files to your working Lazarus instalation. Please save the script as getlaz.bat or some other name, however there is no warranty of any kind, use at your own risk, put it in a test directory first and make sure there is no subdirectory already called lazarus.
@REM Script for checkout and update Lazarus from SVN @echo. @REM Check if lazarus directory exists to update or checkout first @if not exist lazarus goto CheckoutLaz @echo Updating Lazarus, please wait ... @cd lazarus svn update @if not %errorlevel% == 0 goto CleanupLaz @cd.. @goto Exit :CheckoutLaz @echo Checking out Lazarus for the first time, this might take a while ... svn checkout http://svn.freepascal.org/svn/lazarus/trunk lazarus @goto Exit :CleanupLaz @echo. @echo Something went wrong, trying to fix any problems if possible ... svn cleanup @if not %errorlevel% == 0 goto CleanupFailedLaz @cd.. @echo. @echo Cleanup complete please run the script again. goto Exit :CleanupFailedLaz @cd.. @echo. @echo Cleanup Failed ! Please check or delete/move/rename the lazarus subdirectory ... :Exit
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.