Getting Lazarus/pt

From Free Pascal wiki
Revision as of 01:29, 17 November 2005 by Fbaqui (talk | contribs) (→‎Via SVN)
Jump to navigationJump to search

Template:Pegando o Lazarus

Via SVN

Pegando o SVN

Você precisa baixar o cliente SVN para Windows em http://tortoisesvn.tigris.org/ Um cliente de linha de comando do SVN está disponível para várias plataformas incluindo Linux e Windows em website.

Usando o SVN

Usando a linha de comando

Para pegar o Lazarus pela primeira vez:

Abra um terminal/prompt de comando, mude para o diretório onde você quer que a pasta do Lazarus seja criada e digite:

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

Para atualizar os fontes do Lazarus:

Abra um terminal/prompt de comando, mude para o diretório do Lazarus e digite:

 svn update

Usando o TortoiseSVN para Windows

O TortoiseSVN se integra ao Windows Explorer. Depois da instalação, todos os comandos estão disponíveis no Windows Explorer através do menu de contexto (clicar com o botão direito do mouse sobre) da pasta ou arquivo.

Para pegar o Lazarus pela primeira vez:

  • Abra o Windows Explorer
  • Crie um diretório onde você quaer colocar os arquivos vindos do servidor SVN
  • Clique com o botão direito do mouse no diretório criado
  • Selecione SVN Checkout... no menu de contexto

TortoiseSVN Main Menu.png

  • In the next dialog you enter the URL for Lazarus server source:
http://svn.freepascal.org/svn/lazarus/trunk
  • 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

TortoiseSVN Main Menu Update.png

Tip: There seems to be a resource hog bug somewhere in TortoiseSVN (1.24). After you've finished with TortoiseSVN and closed Windows Explorer, it may help to kill process TSVNCache.exe from Task Manager. --Prognatus 18:28, 26 Sep 2005 (CEST)

Scripts

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: In Linux I use a script (it is not very sophisticated, but does the trick) to download the latest SVN-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 SVN I make a backup, just in case the current svn 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

# before you can use this script you have to checkout all files
# so first do a
# svn checkout http://svn.freepascal.org/svn/lazarus/trunk lazarus

#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 -fr
else
  date +"%T %tNo backup to remove"
fi

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

#Getting stuff from svn
date +"%T %tUpdate lazarus"
svn update lazarus > ~/cvs_update.log

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