Difference between revisions of "Installing Lazarus/es"

From Free Pascal wiki
Jump to navigationJump to search
m (Remove categories in page template)
 
(101 intermediate revisions by 10 users not shown)
Line 1: Line 1:
 
{{Installing Lazarus}}
 
{{Installing Lazarus}}
  
==Resumen==
+
==Notas sobre el nuevo proceso de instalación==
  
Para aquellos que simplemente quieran instalar Lazarus y empezar a usarlo para programar, la forma más sencilla es descargar e instalar una versión binaria reciente y razonablemente estable (como un paquete ".rpm" en Linux o un paquete ".exe" en Windows). Puede leer las secciones que hay a continuación para Linux o Windows llamadas "binarios de fpc" o los primeros párrafos de las secciones sobre instalación de Lazrus en Linux o Windows; la mayor parte del resto de la información puede ignorarla.
+
Tanto Lazarus como Free Pascal han mejorado muchísimo en la forma de instalarse, en las últimas versiones. Los documentos antiguos ya casi no son válidos, anticuados, y liosos.
  
Quienes deseen participar en el desarrollo del compilador o del IDE, o para quienes deseen las herramientas más actualizadas, necesitarán una instalación de archivos fuente, y la mayor parte del resto de esta información es relevante.
+
Hoy en día, instalar Free Pascal o Lazarus es cualquer sistema es tan sencillo como instalar cualquier otro programa.
  
 +
Para instalar las últimas versiones estables de los paquetes, simplemente diríjase a SourceForge, [http://sourceforge.net/project/showfiles.php?group_id=89339 a la página de descargas de Lazarus], y proceda a la instalación de los paquetes como de costumbre. Hay versiones para Windows, OS X y Linux.
  
 +
Necesitará instalar todos los paquetes para que funcione correctamente. Concretamente, Lazarus no solo necesita el paquete fpc, también necesita el fpc-sources para funcionar correctamente, además de la mayoría de las librerías.
  
Lazarus cuenta con dos elementos principales:
+
Para distribuciones como Debian, ni siquiera precisa de ir a SourceForge. Ya se encuentra en los repositorios '''unstable''' y '''testing''', y solo hay que hacer un '''apt-get install lazarus'''.
  
* LCL - Lazarus Component Library (Librería de componentes de Lazarus)
 
* IDE - la herramienta de RAD (Rapid Application Development=Desarrollo rápido de aplicaciones)
 
 
Éstos a su vez dependen de:
 
 
* FPC - el compilador de FreePascal
 
* FCL - la librería de componentes de FreePascal, que contiene la mayor parte de los componentes no gráficos que usa Lazarus.
 
 
 
 
===Requisitos del sistema para Lazarus===
 
 
# El compilador, los paquetes, y las fuentes de FreePascal (* importante *: de la misma versión y fecha)
 
# Soporte del juego de herramientas Widget
 
#:;Win32:    Se puede utilizar el API nativo de Win32 
 
#:;Linux/xxxBSD:  GTK+ 1.2.x:  La mayoría de las distribuciones de Linux y *BSDs ya instalan las librerías de GTK+ 1.2.x.  Puede también encontrarlos en http://www.gtk.org.  También necesitará el gdk-pixbuf, 0.13 o posterior (preferiblemente 0.18 o posterior), que también se encuentra en la mayoría de las distribuciones recientes desde hace 2 años.  La fuente está disponible de ftp://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/
 
# :;Mac OS X:  GTK+ 1.2.x:  Necesita las herramientas de desarrollador de Apple, X11 y GTK1.2.  Vea debajo Instalación en Mac OS X. 
 
#:;GTK+ 2.x:  ADVERTENCIA:  El interfaz GTK2 no está todavía completo y solamente para pruebas. 
 
Se encuentra en la mayoría de las distribuciones recientes.  Para la fuente vea http://www.gtk.org.
 
 
El FAQ -  El archivo con preguntas realizadas a menudo está disponible en http://www.lazarus.freepascal.org.  Algunas de las preguntas se pueden encontrar en el archivo local ' FAQ '.  Las secciones siguientes describirán cómo conseguir FreePascal y cómo instalar Lazarus correctamente.
 
 
==Instalación del compilador de Free Pascal==
 
 
Hay un amplio debate sobre como instalar y construir compiladores de Free Pascal disponible en http://www.stack.nl/~marcov/buildfaq.pdf - quizá con demasiados detalles para algunos usuarios, pero fácil de comprender.
 
 
Lazarus necesita la versión de  fpc (FreePascal) 1.9.x y tanto los binarios de fpc compilado como las fuentes de fpc, y ambas de la misma versión. La versión de fpc 1.0.6 tiene demasiados errores y la 1.0.10 tiene problemas al abrir formularios creados con la versión 1.9.x. Ha aparecido la versión 2.0.0 y es el compilador preferido (fpc-2.0.0).
 
 
 
===Instalación de Free Pascal en Linux===
 
 
====Binarios de FPC====
 
 
La última versión de FreePascal, la 2.0.1, se puede obtener desde el sitio web de FreePascal  (http://www.freepascal.org/download.html, elija lugar desde donde descargar) o desde sourceforge (http://sourceforge.net/projects/lazarus).
 
 
En la sección de descargas de lazarus (http://www.lazarus.freepascal.org ) puede obtener los archivos RPM del compilador de Free Pascal (compilador / Linux) y sus paquetes. Si no tiene una distribución con sistema de archivos RPM, puede descargar e instalar los archivos tar desde http://www.freepascal.org. Si desea compilar los binarios usted mismo, vea la sección sobre BSD.
 
 
Instrucciones:
 
 
Descargue los últimos archivos desde http://sourceforge.net/project/showfiles.php?group_id=89339.
 
Por ejemplo:
 
:* fpc-2.0.1-050923.i386.rpm
 
:* fpcsrc-2.0.1-050923.i386.rpm
 
:* lazarus-0.9.10-0.i386.rpm<br>
 
e instálelos con:
 
:* rpm -Uvh fpc-2.0.1-050923.i386.rpm
 
:* rpm -Uvh fpcsrc-2.0.1-050923.i386.rpm
 
:* rpm -Uvh lazarus-0.9.10-0.i386.rpm<br>
 
 
A diario se pueden descargar paquetes actualizados para Debian desde http://cYcnus.de/deb/. En la actualidad, contiene solamente los componentes de fpc compilados, pero no sus fuentes, lo que necesitarían la mayoría de los programadores de Lazarus.
 
  
 
====Fuentes de FPC====
 
====Fuentes de FPC====
  
Desde la versión 2.0, FPC no usa ya CVS, sino que ha migrado a Subversion (SVN). Por ahora, no hay mirror CVS, así que tiene que usar SVN para obtener las fuentes de FPC.
+
Puede instalar el paquete fpc-sources, o utilizar SVN para obetener versiones más actualizadas:
  
===== Descarga diaria de la instantánea de fuentes del árbol de desarrollo (version 2.1.x) =====
+
===== Instantáneas del desarrollo =====
Puede descargar el desarrollo de las fuentes de hoy (v 2.1.x) en forma de una imagen empaquetada del repositorio de fuentes de SVN: estas instantáneas se actualizan a diario, y reflejan el estado del repositorio de fuentes. Los ficheros se mantienen en el sitio web que tiene el archivo SVN.
+
¿Cómo se hace esto?
Archivo de fuentes públicas completo de v2.1.x: [ftp://ftp.freepascal.org/pub/fpc/snapshot/v21/source/fpc.zip fpc.zip] (24 MB)
+
(Necesita tener instalado SVN, claro. Busque [http://subversion.tigris.org/ aquí] las instrucciones sobre cómo se hace.)
  
===== Download Daily Source Snapshot of Release Tree (version 2.0.x) =====
+
Cambie de carpeta (cd) a la carpeta superior de su zona de desarrollo, por ejemplo
You can download today's development (v 2.0.x) sources that will lead to the next stable release in form of a packed snapshot from the SVN source repository: these snapshots are updated on a daily basis, and reflect the state of the source repository. The files are kept at the site which has the SVN archive.
 
Entire public sources archive of v2.0.x: [ftp://ftp.freepascal.org/pub/fpc/snapshot/v20/source/fpc.zip fpc.zip] (24 MB)
 
 
 
 
===== Connect to Source Repository with SVN (replaces section on connection to CVS) =====
 
As an alternative to the daily zip files of the SVN sources, the SVN repository has been made accessible for everyone, with read-only access. This means that you can directly access the code, and you will have really the last-minute sources available. It is also a method which requires less bandwidth once you have done the first download (checkout in SVN lingo).
 
===== Development snapshots =====
 
How to do this?
 
(You need to have SVN installed, of course. Look  [http://subversion.tigris.org/ here] for instructions on how to do that.)
 
 
 
Change Directory (cd) to the parent directory of your development area, eg
 
  
 
  []$ cd /home/username/FreePascal
 
  []$ cd /home/username/FreePascal
  
To retrieve the full source repository, all publicly available modules, type
+
Para recibir el repositorio de fuentes completo, todos los módulos disponibles públicamente, teclee
  
 
  []$ svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc
 
  []$ svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc
  
Normally, you should perform this step just once.
+
Normalmente, ejecutara este paso sólo una vez.
  
To update the sources which were downloaded (checkout) above
+
Para actualizar unas fuentes descargadas (checkout) con anterioridad
  
  []$svn update fpc
+
  [] $svn update fpc
  
 +
=== Via Repositorios para instalar en Ubuntu ===
 +
==== Instalando Lazarus desde repositorios Ubuntu ====
 +
En www.hu.freepascal.org están los repositorios con los ficheros deb de Lazarus y FPC para Ubuntu
  
===== Fixes to 2.0.x =====
+
==== Forma rápida ====
 +
En el párrafo siguiente, hay una serie de comando que debería teclear en una consola para descargar e instalar Lazarus en un sistema Ubuntu.
  
The fixes need a separate directory, create a separate directory 'fixes', enter it, and repeat the above checkout command with the URL http://svn.freepascal.org/svn/fpc/branches/fixes_2_0:
+
Puede seleccionar, copiar y pegar en su editor favorito el siguiente script y guardarlo en su carpeta /home con un nombre como '''getlaz''':
 +
  #!/bin/sh
 +
  gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys 6A11800F
 +
  gpg --export 6A11800F | sudo apt-key add -
 +
  echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe" \
 +
      >/etc/apt/sources.list.d/lazarus.list
 +
  apt-get update
 +
  apt-get install lazarus
  
[]$ cd mysvn/fixes
+
Una vez guardado el script, vamos a darle premisos de ejecución y ponerlo en marcha (puede copiar estas lineas y pegarlas en una terminal, simplemente pulse la combinación de teclas Shift+Insert):
[]$ svn checkout http://svn.freepascal.org/svn/fpc/branches/fixes_2_0 fpc
+
  chmod +x getlaz
 +
  sudo ./getlaz          # Esta orden se ejecuta con premisos de administrador, deberá escribir la contraseña de root
  
and to update:
+
Este proceso descargará alrededor de 100 Mb de datos desde el repositorio de Lazarus. Debería tardar unos 5 minutos con una conexión rápida. Si en algún momento se detiene para pedir confirmación solo deberá contestar "y" para yes.
  
[]$ svn update fpc
+
Cuando termine y vuelva al shell de consola, estará listo. Busque en el menú "Programación", debería tener un Lazarus instalado y plenamente funcional.
  
The sources of docs are in a separate repository called fpcdocs, so the command to get them is
+
Ahora, aquí tenemos las instrucciones para instalar pasa a paso. Ignórelas si el proceso anterior se ha resuelto de forma favorable.
 +
Por favor, vuelva y anote aquí cualquier prueba y cambios que ayuden a aclarar esta sección.
  
[]$ svn checkout http://svn.freepascal.org/svn/fpcdocs/trunk fpcdocs
+
==== Agregando la clave ====
 +
Descargue la clave desde el servidor público:
 +
  gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys 6A11800F
  
If you want to learn more about subversion, read this excellent [http://svnbook.red-bean.com/ Subversion book] which is also available online in different formats for free.
+
Agrégela al sistema apt:
 +
  gpg --export 6A11800F | sudo apt-key add -
  
For the curious: You have only read-only access, so don't try to commit anything :-)
+
Puede ver si está en la lista de claves con el siguiente comando:
 +
  sudo apt-key list
  
For more information, see the [http://www.freepascal.org/develop.html FreePascal] website
+
==== Agregar el repositorio ====
 +
Puede usar Synaptic directamente o editar a mano, con su editor favorito, el fichero /etc/apt/sources.list.
  
===Instalación de Free Pascal en Windows===
+
Para agregar el repositorio '''estable''' a synaptic, utilice la siguiente línea:
 +
  deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe
  
====Binarios de FPC para Windows====
+
O usa una consola, escribiendo:
 +
  sudo echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe">/etc/apt/sources.list.d/lazarus.list
  
By far the easiest way to get a working installation of Free Pascal is to download the current binary Windows release of Lazarus from the SourceForge repository - the release contains the current versions of the FreePascal compiler and the FreePascal libraries as well as the lazarus IDE. If you want to install from sources, read on!
+
Para usar el repositorio de '''pruebas''':
 +
  deb http://www.hu.freepascal.org/lazarus/ lazarus-testing universe
  
You can get the installer zip for fpc 2.0.0 at Free Pascal's download section http://www.freepascal.org/download.html, then choose a mirror).  
+
O igualmente, escribiendo en una consola:
Installing from the sources -- see the next section to know how to get them -- is not for novices, since you need a starting compiler as well.
+
  sudo echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-testing universe">/etc/apt/sources.list.d/lazarus.list
  
====Fuentes de FPC para Windows====
+
==== Instalar Lazarus ====
<<<< See section above under [[#FPC Sources|FPC Sources]] for Linux, where the use of SVN is described >>>>
+
Ahora ya puede instalar Lazarus a través de apt con las siguientes ordenes:
 +
  apt-get update; apt-get install lazarus
  
The easiest way to get the Free Pascal sources is via CVS; see the next section for more on that. You can also download the package as a whole -- see http://www.freepascal.org/develop.html for the daily snapshot of the 2.1.x release tree.
+
===Instalación de Free Pascal en macOS===
  
Windows FPC Sources via CVS ()
+
Descargue los paquetes disponibles para macOS, e instale como de costumbre.
  
You will need to have a CVS client such as TortoiseCVS or WinCVS installed in order to perform the steps below. The exact commands vary between CVS clients; the ones given below are to be used under CVS home's client, which is available for download here.
+
Necesita las herramientas de desarrollo de Apple.
  
First create a directory in which you'd like to put the sources. Any normal user can do this. Create a directory for fpc (e.g. C:\Source), then do the following at the command prompt:
 
  C:\Source> set CVSROOT=:pserver:cvs@cvs.freepascal.org:/FPC/CVS
 
  C:\Source> cvs login      // password is 'cvs' without the commas
 
  C:\source> cvs -z3 co fpc // This will create a directory fpc, which can be later used in the IDE.
 
Hint: To download/update the latest changes you can simply do
 
  C:\> cd Source\FPC
 
  C:\Source\FPC> cvs -z3 update -dP
 
''ToDo: Write me.''
 
  
See: http://www.freepascal.org/down-win32.html . You can find a list of mirrors at http://www.freepascal.org/sdown.html. Download FPC as one big file, unzip it and run the install.exe.
+
=====Descarga de Lazarus mediante SVN=====
  
Extending your PATH variable to the fpc directory:
+
  [] $ svn checkout http://svn.freepascal.org/svn/lazarus/trunk/ lazarus
 +
(o cualquier otra carpeta donde desee poner sus fuentes)
  
* Win98: Edit autoexec.bat and add the line: PATH=%PATH%;C:\pp\bin\bin\win32
+
En sucesivas ocasiones, para actualizar simplemente teclee
* WinXP/2k: My Computer (Right Click) ->  Properties -> Advanced (Page) -> Enviroment Variables -> System Variables -> Edit "PATH", Add "C:\pp\bin\bin\win32" there.
+
   []$ svn update lazarus
 
 
Then restart windows.
 
 
 
''ToDo: Explain how to download fpc sources and build the compiler''
 
 
 
===Instalación de Free Pascal en BSD/manualmente===
 
 
 
Effectively, you need
 
 
 
A file with all sources, or two (fpc and lazarus)
 
 
 
1. e.g. for fpc ftp://ftp.freepascal.org/fpc/dist/Linux/separate/sources.tar preferably an export (no CVS/ dirs). The above file misses this.
 
2. Lazarus source snapshot.
 
* _any_ starting compiler from the 1.9 branch) You can do a check by parsing the output of ppc386 -i if it is 1.9.3 .. 2.0.x it is ok.
 
* - dependant packages. (for FreeBSD that is gtk12, glib12 and gdk_pixbuf and GNU make, iconv and gettext)
 
 
 
FPC build:
 
 
 
1. (fetch) necessary files (FPC source, starting compiler)
 
2. (extract) Then de-tgz in work directory,
 
3. (build) enter work/fpc/ and run
 
 
 
   $MAKE all OPT='-gl -O3p3'  PP=/path/to/startingcompiler-name-ppc386
 
(/path/to/ can be omitted when ppc386 is in the path)
 
($MAKE is make on linux and gmake on BSD)
 
 
 
4. (install) then, again in work/fpc, run
 
 
 
$MAKE install PP=compiler/ppc386 PREFIX=$THEPREFIX
 
(THEPREFIX= usually is /usr/lcoal, but e.g. on NetBSD it is /usr/pkg for ports)
 
Create a symlink:
 
  ln -s $THEPREFIX/lib/fpc/2.0.1/ppc386 $THEPREFIX/bin/ppc386
 
      install sourceinstall PREFIX=$THEPREFIX
 
 
 
5. (configure) run compiler/utils/samplecfg $THEPREFIX/lib/fpc/2.0.1 $ETCDIR
 
6. (optional, test), see if ppc386 -i gives output, else give a warning that user need to add $PREFIX/bin to his current path. Try to compiler a program with -viwn, and see if that gives errors.
 
Notes:
 
 
 
* If you need fpcmake package lists, you need to generate or supply them yourself, (in the port, or in an extra archive) either way, do a dummy install to /tmp/pack and determine the files installed with find . >ll
 
 
 
* $THEPREFIX and $ETCDIR should be user configurable. Otherwise local installs aren't possible.
 
 
 
* BSDHIER=1 on all make commands forces BSD hierarchy conventions.
 
 
 
===Instalación de Free Pascal en Mac OS X===
 
 
 
You need the Apple Developer-tools, X11, gtk1.2:
 
 
 
Downloading packages and installing them properly can be a time consuming task. Therefore there are various package managers. One of them is fink:
 
: Download fink from http://fink.sourceforge.net/download/index.php?phpLang=en; follow the install instructions.
 
 
 
Developer-tools: Are included on the original OSX installation-CDs, or download at ADC (free registration required)
 
: http://developer.apple.com/.
 
 
 
Apple X11: On a fresh system: choose "Customize" in the install-dialogue, check "X11".
 
 
 
On an already installed system: download at
 
: http://www.apple.com/downloads/macosx/apple/x11formacosx.html
 
 
 
In the Terminal, run
 
        sudo fink install gdk-pixbuf gtk+ gtk+-data gtk+-shlibs gtk-doc gtkglarea gtk-engines
 
The X11-Application is in /Applications/Utilities/X11.
 
 
 
Hint: Most X11 programs, including lazarus expect to receive focus, when the users clicks on a window. Under MacOSX this is deactivated. You can activate it for all X11 applications by typing in the terminal:
 
        defaults write com.apple.x11 wm_click_through -bool true
 
 
 
;Free Pascal Compiler:
 
Then download and install the Free Pascal Compiler (at least 1.9.5 from 16th August 2004) from
 
: https://sourceforge.net/project/showfiles.php?group_id=89339
 
 
 
When compiling gtk-related software, you need to add two lines to the fpc.cfg file, to enable use of libraries
 
-Fl/sw/lib
 
-Fl/usr/X11R6/lib
 
 
 
 
 
For lazarus you need the fpc sources as well (obsolete: use svn):
 
Create a directory, where you would like to put the sources. You don't need to be root to do this. Any normal user can do this.
 
First create a directory for fpc
 
: (e.g. /Users/username/freepascal)
 
then open a terminal and do the following:
 
[]$ bash
 
[]$ export CVSROOT=:pserver:cvs@cvs.freepascal.org:/FPC/CVS
 
[]$ cvs login
 
password is 'cvs' without the 'quotes'
 
[]$ cvs -z3 co fpc
 
This will create a directory called 'fpc', which can be later used in the IDE.
 
Hint: To download/update the latest changes you can simply do
 
[]$ cd /Users/username/freepascal/fpc
 
[]$ cvs -z3 update -dP
 
 
 
==Instalación de Lazarus==
 
 
 
===Instalación de Lazarus en Linux===
 
====Instalación usando rpms====
 
The easiest way to get a current working installation of Lazarus is to download the RPMs for FreePascal and Lazarus from the SourceForge repository.
 
 
 
You need to download the selected version of
 
* the compiler (eg fpc-1.9.5-041207.i386.rpm)
 
* the pascal source library (eg fpcsrc-1.9.5-041207.i386.rpm)
 
* the Lazarus package (eg lazarus-0.9.2.4-fpc_1.9.5_041207.i386.rpm).
 
  
You then issue the following commands (you need to have root privileges - use su or sudo)
+
Para ampliar información sobre Subversion, vea: http://subversion.tigris.org/
  rpm -Uvh fpc-1.9.5-041207.i386.rpm
 
rpm -Uvh fpcsrc-1.9.5-041207.i386.rpm
 
rpm -Uvh lazarus-0.9.2.4-fpc_1.9.5_041207.i386.rpm
 
  
====Instalación desde archivo fuente====
+
=====Compilar y ejecutar=====
If you prefer to install from source and compile the files yourself, follow these instructions. Because the whole lazarus stuff is installed into one directory, uninstall is very easy and you don't need to be root to install lazarus. You can get tgz files for fpc, fpcsrc and lazarus from the downloads section or you can download it directly via svn.
+
Si ha hecho checkout desde cvs o svn, el paso siguiente es: 
  
=====Downloading Lazarus SVN=====
+
;Compilar Lazarus
 +
  []$ cd lazarus
 +
  []$ make clean all (gmake en BSD)
  
The lazarus repository has moved from cvs to svn (Subversion). SVN provides an easy way to update your sources by only downloading the changes. This is the recommended way and saves you a lot of time. A connection to the internet is needed for this: you don't need to be root. Lazarus does not need any special permissions, neither during installation nor at runtime.
+
Si fpc está instalado correctamente, la compilación debería funcionar sin problemas. Si no, vea el FAQ.
  
With the move we also changed the directory layout of the lazarus sources. The main difference
+
;Arrancar lazarus
is that all ide sources are moved from the root to a separate ide subdir. As anybody might understand, this has an impact on the Makefiles, the searchpaths etc. We are in progress of fixing things, so if something doesn't work, please let us know.
+
  []$ ./lazarus
  
;Now the most important thing.... getting the sources:
+
El IDE debería inicarse. Si arrancó Lazarus en un terminal, puede ver algunas notas sobre ajustes que falta realizar. Esto es normal la primera vez. El IDE intenta automáticamente localizar dónde están instalados el compilador de Free Pascal y sus fuentes  buscando en las carpetas más comunes.  
  
  []$ svn checkout http://svn.freepascal.org/svn/lazarus/trunk/ lazarus
+
;Compruebe las rutas de acceso:  
(or any other dir where you want to place your sources)
+
: Utilice el menú del IDE para ir a
 +
:: Entorno:: - > Opciones de entorno - > Archivos
  
On subsequent occasions, to update simply type
+
La 'Carpeta de fuentes de FPC ' debe apuntar a su carpeta de fuentes de fpc.  Esta carpeta habitualmente termina con /fpc/ o /fpcsrc/ (por ejemplo usr/src/fpcsrc o /home/usuario/freepascal/fpc) y contiene normalmente carpetas como 'compiler', 'docs', 'fcl', 'rtl' y 'packages'. 
  
 +
'' Pendiente:  definir las otras rutas de acceso
 +
;Nota:
 +
Para actualizar Lazarus puede utilizar
 
   []$ svn update lazarus
 
   []$ svn update lazarus
 +
después para cualquier ruta de la actualización: 
 +
  []$ make clean all  (gmake on BSD)
 +
esto reconstruirá Lazarus y creará un IDE sin paquetes de Lazarus.  Para enlazar los paquetes instalados  '''después''' de lo anterior haga: 
 +
  []$ make idepkg
  
For more information on Subversion, see:
+
== Colaboradores iniciales y cambios ==
http://subversion.tigris.org/
+
Esta página ha sido convertida desde epikwiki [versión http://lazarus-ccr.sourceforge.net/index.php?wiki=InstallingLazarus].
 
+
* Importado y formato inicial. [[ User:Tom|VlxAdmin ]] 9/22/2003
Note: the CVS is still accessable, but it frozen. This means
+
* Parte de Joe cambiada para Windows por requerir fpc 1.0.10.  [[ User:Vincent|Vincent ]] 9/25/2003
that no new updates are comitted.
+
* Actualizado "¿Qué se requiere para Lazarus". AndrewJohnson 10/1/2003
 
+
* Terminado ajuste del formato de la página InstallingLazarus [[ User:Tom|VlxAdmin ]] 2/22/2004
=====Compilando y ejecuntado=====
+
* Envió algunas notas sobre Installing FPC and Lazarussobre todo experiencias al intentar conseguir las RUTAS correctas en Linux. 3/11/2004 [[ User:Kirkpatc ]]  
Whether you checkout from cvs or svn, the next step is:
+
* Copió el contenido de mi nota en la sección principal de InstallingLazarus, corregiéndola ligeramente. No sé quitar la nota original. 3/12/2004 [[ User:Kirkpatc ]]
 
+
* Quitó la nota original. Puso en orden el wiki y ajustó un poco el formato. [[ User:Tom|VlxAdmin ]]
;compile lazarus:
+
* Corrigió un par de errores mecanográficos - 3/12/2004 [[ User:Kirkpatc ]]
  []$ cd lazarus
+
* Añadió el enlace para la copia diaria de los paquetes DEB - 3/27/2004 [[ User:Vincent|Vincent ]]
[]$ make  (gmake on BSD)
+
* Arregló enlaces en GettingLazarus (descarga de binarios) y otras páginas22 de julio de 2004 [[ User:Kirkpatc ]]  
 
+
* Añadió el enlace para los paquetes deb de Lazarus - 19 de agosto de 2004 VincentSnijders
 
+
* Agregó una breve nota sobre la instalación en Debian - 23 de noviembre de 2004 [[ User:Kirkpatc ]]
If fpc is installed correctly, the compilation should work without problems. If not, see FAQ.
+
* Considerables reescritura y reorganización de la sección sobre instalación - 11 de Diciembre de 2004 [[ User:Kirkpatc ]]
 
+
* Arregló enlace roto - el 9 de oct de 2005 [[ User:Avantman42 ]]
;Start lazarus
+
* Remodelación total. Estaba todo anticuado. --[[User:Javuchi|Javuchi]] 05:37, 22 November 2008 (CET)
  []$ ./lazarus
+
* Añadió las ordenes necesarias para instalar Lazarus desde repositorios de Ubuntu - [[User:Arturom|Arturom]] 10:07, 3 December 2008 (CET)
 
 
The IDE should start. If you started lazarus in a terminal, you can see some notes about missing settings. This is normal at first start. The IDE automatically tries to find out where the freepascal compiler and its sources are installed by searching in the most common directories.
 
 
 
;Check the paths:
 
: Use the IDE menu to go to
 
:: Environment -> Environment Options -> Files
 
 
 
The 'FPC Source directory' should point to your fpc source directory. This directory normally ends with /fpc/ or /fpcsrc/ (e.g. /usr/src/fpcsrc or /home/username/freepascal/fpc) and contains directories like 'compiler', 'docs', 'fcl', 'rtl' and 'packages'.
 
 
''ToDo: explain the other paths''
 
 
 
;Hint:
 
To update lazarus you can use
 
[]$ svn update lazarus
 
then for either update pathway:
 
[]$ make clean all  (gmake on BSD)
 
This will rebuild lazarus and create an IDE without lazarus packages. To link your installed packages do '''after''' the above:
 
  []$ make idepkg
 
 
 
====Instalando Lazarus en Debian GNU/Linux====
 
 
 
There are preliminary Debian packages for lazarus available for download. Make sure you read /usr/share/doc/lazarus/README.Debian carefully before you start using it. Feedback is needed and appreciated; please send your comments to Carlos Laviola <claviola@debian.org>.
 
 
 
====Another (?easier) way to install Lazarus under Debian====
 
Added by [[User:Kirkpatc]].
 
 
 
;Simple Lazarus Installation in Debian
 
(assume new Debian installation, without development libraries loaded)
 
 
 
From sourceforge repository, download latest fpc, fpclib and lazarus releases; follow links from http://lazarus.freepascal.org, click the "downloads" button on the left, then click on "binaries" then "linux" then "Current Lazarus RPM". This will bring you to
 
: http://sourceforge.net/project/showfiles.php?group_id=89339
 
then download the following files (or more recent, if available)
 
* fpc-2.0.0-0.i586.rpm
 
* fpcsrc-2.0.0-0.i386.rpm
 
* lazarus-0.9.8-fpc_2.0.0_0.i386.rpm
 
cd to the directory where these files are stored, then become root (su) and type:
 
 
 
alien fpc*    //this will convert both the fpc and fpcsrc files to debian format
 
alien laz*
 
then install the generated Debian (.deb) packages by (as root):
 
 
 
dpkg -i fpc*.deb laz*.deb
 
or use kpackage or a similar utility to install the generated fpc, fpcsrc and lazarus .deb files.
 
 
 
Note, if you do not have alien type:
 
 
 
apt-get install alien
 
 
 
You need to produce a configuration file, which will reside in /etc/fpc.cfg. Still as root, cd to the main fpc directory /usr/lib/fpc/2.0.0 and then type
 
  sh ./samplecfg /usr/lib/fpc/2.0.0 /etc
 
Check the contents of your new configuration file (cat /etc/fpc.cfg) and make any changes you want using vi or another text editor. Also make sure that there are no old configuration files in for example your home directory (~/.fpc.cfg).
 
 
 
You need to install the development packages of the GTK and pixbuf libraries, so
 
  apt-get install libgtk2.0-dev
 
apt-get install libgdk-pixbuf-dev
 
Then you should be ready to start programming!
 
 
 
===Installing Lazarus under Mac OS X===
 
 
 
Works pretty much the same as under Linux. But you need to install first the apple developer tools and X11.
 
 
 
Snapshots are available at http://www.de.freepascal.org/lazarus/.
 
 
 
If you want to experiment and develop the carbon widgetset interface, look at [[Installing Carbon on OSX]].
 
 
 
===Installing Lazarus under Windows===
 
 
 
The current releases of the Windows Lazarus binary packages install very easily, and should work 'out-of-the-box'.
 
 
 
It is even possible to install the whole Lazarus/FPC package on a portable USB drive (capacity at least 256 MB), for use in environments where you are not allowed to install software on your Windows workstation or where you haven't got administrator privileges. You do have to be a little careful about adjusting the paths in the compiler and environment options and the fpc.cfg file. It may also be necessary to keep the directory for test compilation on your portable drive. << DOES ANYONE KNOW HOW TO SET UP RELATIVE PATHS IN THESE TAGS AND FILES, SO THAT THE ADDRESSING WORKS WHEN YOU MOVE THE USB DEVICE TO ANOTHER MACHINE WHERE IT HAS A DIFFERENT DRIVE LETTER? >>
 
 
 
The binary package is available for Linux and Windows from
 
 
 
http://sourceforge.net/project/showfiles.php?group_id=89339
 
 
 
Download the latest release (currently Lazarus-0.9.6-20050225-win32.exe) and launch the application. You will be taken through a typical Windows installation, in which the FPC compiler and source libraries are installed within the same directory structure as Lazarus, and the IDE should launch and operate without significant problems, provided you have uninstalled any previous version of Lazarus and/or FPC (often found in the C:\pp directory).
 
 
 
You can also get a Lazarus Snapshot for Windows at: http://www.de.freepascal.org/lazarus/
 
 
 
====Installing from source====
 
If you prefer to install from sources, then follow these instructions (Thanks to Joe for the initial Step-by-step description)
 
 
 
You have to download the lazarus source:
 
: http://www.de.freepascal.org/lazarus/
 
 
 
Then unzip it to c:\lazarus for example. You have to install at least fpc-2.0.0, but a fpc-2.0.1 or fpc 2.1.1 snapshot is also possible. It compiles for me, and lazarus.exe works. The path to my fpc is: c:\pp\bin\win32. In this directory you can find a lot of exe (make, grep, ppc386, and so on).
 
 
 
Open a command line. Start->Run...>command or choose MS-DOS icon.
 
 
 
Type:
 
cd c:\lazarus
 
set path=c:\pp\bin\win32;c:\lazarus  //of course change the first to
 
                                      //the path of yours
 
windres -i lazarus.rc -o lazarus.res
 
make
 
 
 
If you are lucky then you can type: lazarus.exe. The source editor, dialogs and the property editor work, but not perfectly... Look and you will see.
 
 
 
You can compile examples also:
 
 
 
cd examples
 
make
 
 
 
If you extracted lazarus to another drive, eg.: d:\lazarus. It can happen that you need the gnu utility to make it. If you have it, you can take its path to set path=...;<gmakepath> but it is simpler not to choose drive d:\
 
 
 
That's all.
 
 
 
=== Additional experiences and advice on installing FPC and Lazarus ===
 
On linux, getting Lazarus to work can be complicated. If you have already installed earlier versions of FPC and/or Lazarus, you have to take great care that the PATHS are adjusted so that only your new versions are called.
 
 
 
Pitfalls that I have experienced in various attempts with SuSE linux include:
 
 
 
The rpm versions often install FPC in /bin or /usr/bin, with the libraries in /lib or /usr/lib.
 
 
 
If you perform a make install on a source version or use a .tar.gz, the compiler is usually installed in /usr/local/bin with the libraries in /usr/local/lib.
 
 
 
So if earlier versions have been installed from rpm, make sure all links are changed to reflect the directory structure of your new compiler. The place to make the changes is in /etc/fpc.cfg ; make sure there are no remnant configuration files in your home directory or in your FPC download directory. Typically they are found in ~/.fpc.cfg
 
 
 
Make sure the links in /etc/fpc.cfg point to the correct versions of the libraries (particularly if you have older versions still lurking around).
 
 
 
In /usr/local/bin or /usr/bin there is a file called fpc ; this is the executable that is called when you invoke the compiler. One of the first things it does is to open ppc386 in the same directory. This has to be the same version as the fpc file, or can be a link pointing to the true ppc386 in some other directory (such as a library directory, or the fpc directory in your own development space); be sure to update your link if you install a newer version of the compiler.
 
 
 
Try running the compiler from the command line using one of the simple example programs or one which you wrote yourself.
 
 
 
Turning to Lazarus:
 
 
 
If you use a downloaded snapshot (.tar.gz) or get the source from CVS, enter your lazarus directory and type
 
 
 
make
 
./lazarus
 
 
 
and hopefully the IDE should load. There may be a message saying it can't find the sources; if so, go to the menu at the top and select Environment -> Environment options and insert the name of the directory where you expect to find your lazarus files (eg ~/FreePascal/lazarus), your compiler (eg /usr/local/bin/ppc386), the FreePascal source directory (eg /usr/local/lib/fpc/$version/fpc or a directory in your own space eg ~/FreePascal/fpc). Then close the dialog and start programming.
 
 
 
You may find further problems when you start programming or compiling; most of these will be related to PATH selection.
 
 
 
Many of the difficulties are dealt with in the Lazarus FAQ, found either on this WiKi site, or a more complete list on the main Lazarus site
 
 
 
http://www.lazarus.freepascal.org/modules.php?op=modload&name=FAQ&file=index
 
 
 
From the top menu select Run -> Compiler Options (or Project -> Compiler Options in more recent releases of Lazarus) and select the Paths tab on the resulting dialog. There are several boxes for entry of paths for Unit files, Include files, Other source files, Libraries etc. For each of these, it is worth pressing the ... (ellipsis) button on the right, and you will be given a blank window for inserting path information, and a lower window giving some suggestions. Select as many as you like (or ALL!) and press the ADD button to transfer the selections to the upper window. When your selection is complete, press OK and move on to the next box. If you know of other paths which need to be followed, press the Browse button associated with each box, and insert the additional paths.
 
 
 
When you think you have got your paths right, try to compile your application. If there are further path-related errors ('can't find unit .......') then go back and check your paths, both in /etc/fpc.cfg and in your Run -> Compiler Options dialog (or Project -> Compiler Options depending on your version).
 
 
 
Once you have got the environment and PATHS correct, it is worth saving the settings to a file, otherwise you will have to go through this process for each new project. In the Run -> Compiler options dialog there is a Load/Save button; select this and then save the setings to the filename of your choice: mine is ~/FreePascal/default.cfg. Then each time I start a new project, I can go to the Run -> Compiler Options dialog (or Project -> Compiler Options), select Load/Save, and load my default.cfg file to the new project. You can, of course, modify the options for each new project if you so desire.
 
 
 
===Installing Lazarus under BSD===
 
  
  Please write me!
 
  
==Original contributors and changes==
+
* Traducido por [[ User: Mgsalvador ]]
This page has been converted from the epikwiki [http://lazarus-ccr.sourceforge.net/index.php?wiki=InstallingLazarus version].
 
* Initially imported and formatted. [[User:Tom | VlxAdmin]] 9/22/2003
 
* Changed Joe's part for Windows to require fpc 1.0.10. [[User:Vincent | Vincent]] 9/25/2003
 
* Updated "What is required for lazarus". AndrewJohnson 10/1/2003
 
* Finished formatted the InstallingLazarus page [[User:Tom | VlxAdmin]] 2/22/2004
 
* Posted some notes about Installing FPC and Lazarus: mostly reflecting experiences in trying to get the PATHS right in Linux. 3/11/2004 [[User:Kirkpatc]]
 
* Copied the contents of my note into the main InstallingLazarus section, edited it slightly. I don't know how to remove the original note. 3/12/2004 [[User:Kirkpatc]]
 
* Removed the original note. Tidied the wiki and formatting a bit. [[User:Tom | VlxAdmin]]
 
* Corrected a couple of typos - 3/12/2004 [[User:Kirkpatc]]
 
* Added link for daily snapshot deb packages - 3/27/2004 [[User:Vincent | Vincent]]
 
* Fixed links in GettingLazarus (downloading binaries) and several other pages. 22 July 2004 [[User:Kirkpatc]]
 
* Added link for lazarus deb packages - 19 August 2004 VincentSnijders
 
* Added a short note on installing in Debian - 23 Nov 2004 [[User:Kirkpatc]]
 
* Considerable re-write and re-organization of installation section - 11 Dec 2004 [[User:Kirkpatc]]
 
* Fixed broken link - 9 Oct 2005 [[User:Avantman42]]
 

Latest revision as of 03:15, 12 November 2021

Deutsch (de) English (en) español (es) suomi (fi) français (fr) magyar (hu) 日本語 (ja) 한국어 (ko) polski (pl) português (pt) русский (ru) slovenčina (sk) Tiếng Việt (vi) 中文(中国大陆)‎ (zh_CN)

Notas sobre el nuevo proceso de instalación

Tanto Lazarus como Free Pascal han mejorado muchísimo en la forma de instalarse, en las últimas versiones. Los documentos antiguos ya casi no son válidos, anticuados, y liosos.

Hoy en día, instalar Free Pascal o Lazarus es cualquer sistema es tan sencillo como instalar cualquier otro programa.

Para instalar las últimas versiones estables de los paquetes, simplemente diríjase a SourceForge, a la página de descargas de Lazarus, y proceda a la instalación de los paquetes como de costumbre. Hay versiones para Windows, OS X y Linux.

Necesitará instalar todos los paquetes para que funcione correctamente. Concretamente, Lazarus no solo necesita el paquete fpc, también necesita el fpc-sources para funcionar correctamente, además de la mayoría de las librerías.

Para distribuciones como Debian, ni siquiera precisa de ir a SourceForge. Ya se encuentra en los repositorios unstable y testing, y solo hay que hacer un apt-get install lazarus.


Fuentes de FPC

Puede instalar el paquete fpc-sources, o utilizar SVN para obetener versiones más actualizadas:

Instantáneas del desarrollo

¿Cómo se hace esto? (Necesita tener instalado SVN, claro. Busque aquí las instrucciones sobre cómo se hace.)

Cambie de carpeta (cd) a la carpeta superior de su zona de desarrollo, por ejemplo

[]$ cd /home/username/FreePascal

Para recibir el repositorio de fuentes completo, todos los módulos disponibles públicamente, teclee

[]$ svn checkout http://svn.freepascal.org/svn/fpc/trunk fpc

Normalmente, ejecutara este paso sólo una vez.

Para actualizar unas fuentes descargadas (checkout) con anterioridad

[] $svn update fpc

Via Repositorios para instalar en Ubuntu

Instalando Lazarus desde repositorios Ubuntu

En www.hu.freepascal.org están los repositorios con los ficheros deb de Lazarus y FPC para Ubuntu

Forma rápida

En el párrafo siguiente, hay una serie de comando que debería teclear en una consola para descargar e instalar Lazarus en un sistema Ubuntu.

Puede seleccionar, copiar y pegar en su editor favorito el siguiente script y guardarlo en su carpeta /home con un nombre como getlaz:

 #!/bin/sh
 gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys 6A11800F
 gpg --export 6A11800F | sudo apt-key add -
 echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe" \
     >/etc/apt/sources.list.d/lazarus.list
 apt-get update
 apt-get install lazarus

Una vez guardado el script, vamos a darle premisos de ejecución y ponerlo en marcha (puede copiar estas lineas y pegarlas en una terminal, simplemente pulse la combinación de teclas Shift+Insert):

 chmod +x getlaz
 sudo ./getlaz          # Esta orden se ejecuta con premisos de administrador, deberá escribir la contraseña de root

Este proceso descargará alrededor de 100 Mb de datos desde el repositorio de Lazarus. Debería tardar unos 5 minutos con una conexión rápida. Si en algún momento se detiene para pedir confirmación solo deberá contestar "y" para yes.

Cuando termine y vuelva al shell de consola, estará listo. Busque en el menú "Programación", debería tener un Lazarus instalado y plenamente funcional.

Ahora, aquí tenemos las instrucciones para instalar pasa a paso. Ignórelas si el proceso anterior se ha resuelto de forma favorable. Por favor, vuelva y anote aquí cualquier prueba y cambios que ayuden a aclarar esta sección.

Agregando la clave

Descargue la clave desde el servidor público:

 gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys 6A11800F

Agrégela al sistema apt:

 gpg --export 6A11800F | sudo apt-key add -

Puede ver si está en la lista de claves con el siguiente comando:

 sudo apt-key list

Agregar el repositorio

Puede usar Synaptic directamente o editar a mano, con su editor favorito, el fichero /etc/apt/sources.list.

Para agregar el repositorio estable a synaptic, utilice la siguiente línea:

 deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe

O usa una consola, escribiendo:

 sudo echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe">/etc/apt/sources.list.d/lazarus.list

Para usar el repositorio de pruebas:

 deb http://www.hu.freepascal.org/lazarus/ lazarus-testing universe

O igualmente, escribiendo en una consola:

 sudo echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-testing universe">/etc/apt/sources.list.d/lazarus.list

Instalar Lazarus

Ahora ya puede instalar Lazarus a través de apt con las siguientes ordenes:

 apt-get update; apt-get install lazarus

Instalación de Free Pascal en macOS

Descargue los paquetes disponibles para macOS, e instale como de costumbre.

Necesita las herramientas de desarrollo de Apple.


Descarga de Lazarus mediante SVN
 [] $ svn checkout http://svn.freepascal.org/svn/lazarus/trunk/ lazarus 

(o cualquier otra carpeta donde desee poner sus fuentes)

En sucesivas ocasiones, para actualizar simplemente teclee

 []$ svn update lazarus

Para ampliar información sobre Subversion, vea: http://subversion.tigris.org/

Compilar y ejecutar

Si ha hecho checkout desde cvs o svn, el paso siguiente es:

Compilar Lazarus
 []$ cd lazarus
 []$ make clean all (gmake en BSD)

Si fpc está instalado correctamente, la compilación debería funcionar sin problemas. Si no, vea el FAQ.

Arrancar lazarus
 []$ ./lazarus

El IDE debería inicarse. Si arrancó Lazarus en un terminal, puede ver algunas notas sobre ajustes que falta realizar. Esto es normal la primera vez. El IDE intenta automáticamente localizar dónde están instalados el compilador de Free Pascal y sus fuentes buscando en las carpetas más comunes.

Compruebe las rutas de acceso
Utilice el menú del IDE para ir a
Entorno:: - > Opciones de entorno - > Archivos

La 'Carpeta de fuentes de FPC ' debe apuntar a su carpeta de fuentes de fpc. Esta carpeta habitualmente termina con /fpc/ o /fpcsrc/ (por ejemplo usr/src/fpcsrc o /home/usuario/freepascal/fpc) y contiene normalmente carpetas como 'compiler', 'docs', 'fcl', 'rtl' y 'packages'.

Pendiente: definir las otras rutas de acceso

Nota

Para actualizar Lazarus puede utilizar

 []$ svn update lazarus

después para cualquier ruta de la actualización:

 []$ make clean all   (gmake on BSD)

esto reconstruirá Lazarus y creará un IDE sin paquetes de Lazarus. Para enlazar los paquetes instalados después de lo anterior haga:

 []$ make idepkg

Colaboradores iniciales y cambios

Esta página ha sido convertida desde epikwiki [versión http://lazarus-ccr.sourceforge.net/index.php?wiki=InstallingLazarus].

  • Importado y formato inicial. VlxAdmin 9/22/2003
  • Parte de Joe cambiada para Windows por requerir fpc 1.0.10. Vincent 9/25/2003
  • Actualizado "¿Qué se requiere para Lazarus". AndrewJohnson 10/1/2003
  • Terminado ajuste del formato de la página InstallingLazarus VlxAdmin 2/22/2004
  • Envió algunas notas sobre Installing FPC and Lazarus: sobre todo experiencias al intentar conseguir las RUTAS correctas en Linux. 3/11/2004 User:Kirkpatc
  • Copió el contenido de mi nota en la sección principal de InstallingLazarus, corregiéndola ligeramente. No sé quitar la nota original. 3/12/2004 User:Kirkpatc
  • Quitó la nota original. Puso en orden el wiki y ajustó un poco el formato. VlxAdmin
  • Corrigió un par de errores mecanográficos - 3/12/2004 User:Kirkpatc
  • Añadió el enlace para la copia diaria de los paquetes DEB - 3/27/2004 Vincent
  • Arregló enlaces en GettingLazarus (descarga de binarios) y otras páginas. 22 de julio de 2004 User:Kirkpatc
  • Añadió el enlace para los paquetes deb de Lazarus - 19 de agosto de 2004 VincentSnijders
  • Agregó una breve nota sobre la instalación en Debian - 23 de noviembre de 2004 User:Kirkpatc
  • Considerables reescritura y reorganización de la sección sobre instalación - 11 de Diciembre de 2004 User:Kirkpatc
  • Arregló enlace roto - el 9 de oct de 2005 User:Avantman42
  • Remodelación total. Estaba todo anticuado. --Javuchi 05:37, 22 November 2008 (CET)
  • Añadió las ordenes necesarias para instalar Lazarus desde repositorios de Ubuntu - Arturom 10:07, 3 December 2008 (CET)