Getting Lazarus/pt

From Free Pascal wiki
Jump to navigationJump to search

Deutsch (de) English (en) español (es) français (fr) 日本語 (ja) polski (pl) português (pt) русский (ru) slovenčina (sk)

Através do Subversion

Pegando o Subversion

Você pode baixar um bom cliente Subversion (SVN) para Windows aqui [1].

Um cliente de linha de comando do SVN está disponível para várias plataformas incluindo Linux e Windows nesta página.

Usando o Subversion

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

  • No próximo diálogo você entra a URL do servidor de fontes do Lazarus:
http://svn.freepascal.org/svn/lazarus/trunk
  • Aguarde o TortoiseSVN importar a árvore de arquivos do servidor. Isso leva um certo tempo para ser concluído.


Para atualizar os fontes do Lazarus:

  • Abra o Windows Explorer
  • Clique com o botão direito do mouse no diretório dos fontes
  • Selecione SVN Update... no menu de contexto

TortoiseSVN Main Menu Update.png

PS: Parece haver um bug de um recurso do TortoiseSVN (1.24) em algum ponto. Após ter terminado com ele e fechado o Windows Explorer, pode ser necessário matar o processo TSVNCache.exe pelo Task Manager (CTRL+ALT+DEL). --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"

Método Cópia Instantânea

Se você não quiser utilizar o svn diretamente, uma cópia instantânea do svn corrente está disponível em lazarus snapshot site ou um dos seus espelhos.

Baixando releases

Releases binários para várias plataformas estão disponíveis via Lazarus Sourceforge, área de download.

Colaboradores originais e Mudanças

Essa página foi convertida da versão epikwiki.