Recent

Author Topic: Article(trying a translation): Installing Lazarus on Lucid by SVN  (Read 4624 times)

Silvio Clécio

  • Guest
Original article in Pt-BR: http://blog.silvioprog.com.br/2010/05/instalando-o-lazarus-no-lucid-pelo-svn.html

More elaborated: http://www.silvioprog.com.br/documentos/InstalandooLazarusnoLucidpeloSVN.pdf?attredirects=0&d=1

---------------------------------------------------------------------------------------------------
In this article we will install in Lucid the Free Pascal 2.4.0-2, and the SVN
version of Lazarus. Come on, we have much work to do!

---------------------------------------------------------------------------------------------------

Opening Synaptic and installing Free Pascal 2.4.0-2

First, go to the menu System | Administration and open the Synaptic package manager:

http://tinyurl.com/synaptic-package-manager

Done so, search for "fpc" (without quotes):

http://tinyurl.com/marcando-fpc-no-synaptic

Note very carefully the options that I scored, if you forget one, the Lazarus will not work correctly. The marked options were:

    * fpc
    * fp-utils
    * fpc-source
    * fp-units-misc

All relating to Free Pascal, version 2.4.0-2. The installation may take a few minutes, wait until you complete:

http://tinyurl.com/download-do-fpc

Upon completion of the window shown in the figure above, the Free Pascal is installed, to test it, open terminal and type:

Code: [Select]
$ fpc
It will display some information, use Enter to finish.

Installing Subversion, and download sources of Lazarus

If you have not installed Subversion on your Lucid, use the command:

Code: [Select]
$ sudo apt-get install subversion
After that, choose a directory to save the sources of Lazarus, recalling that it should have the appropriate permissions. In my case, I chose "/media/Repository/Development/SVN":

Code: [Select]
$ cd '/media/Repository/Development/SVN'
And soon after:

Code: [Select]
$ svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus
You will receive multiple lines in your terminal, as shown in the image below:

http://tinyurl.com/baixando-fontes-do-lazarus

The download may take some time, meanwhile you can minimize the terminal and access other articles here on the forum  ;)

Exporting the sources and running the Make command

After completing the above step, you will have some folders with multiple files, i.e., the sources of Lazarus. We do not recommend working on your SVN folder, select another directory where it will be compiled and installed Lazarus, in my case I chose "/usr/lib/lazarus". Export sources to that directory using the command below:

Code: [Select]
$ sudo svn export '/media/Repository/Development/SVN/lazarus' /usr/lib/lazarus
It will create the folder lazarus and saves the sources in it. To give permissions to new directory, use:

Code: [Select]
$ sudo chmod 777 -R /usr/lib/lazarus
Enter in the directory:

Code: [Select]
$ cd /usr/lib/lazarus
And run the make command, waiting for its full completion, it will be many rows to be processed:

Code: [Select]
$ make clean all
http://tinyurl.com/make-clean-all-lazarus

See the binaries built on the image below:

http://tinyurl.com/binarios-construidos

Completing this step successfully, your Lazarus will be ready for use.  :)

Creating the menu to open the Lazarus

You will not want to always go to the directory and to double click in the binary to open Lazarus, no? Go to the menu System | Preferences and select Main menu:

http://tinyurl.com/abrindo-riador-de-menus

Choose Development, click New item, and fill the properties:

http://tinyurl.com/criando-o-icone-no-menu

The marked options are:

-------------------------------------
Type: Application
Name: Lazarus
Command: startlazarus %f
Comment: Lazarus IDE
-------------------------------------

Click on the points where the cursor on the image above, and find that icon in "/usr/lib/lazarus/images/ide_icon48x48.png". After click OK and Close, and create the following links:

Code: [Select]
$ sudo ln -s '/usr/lib/lazarus/startlazarus' /usr/bin/startlazarus
$ sudo ln -s '/usr/lib/lazarus/lazarus' /usr/bin/lazarus

Now use the new menu created and open the Lazarus:

http://tinyurl.com/menu-criado

If you opening the Lazarus and he did not display any error messages, and compile the Form open, jump to the conclusion.

Setting the path of Free Pascal sources in Lazarus options

Probably when opening the Lazarus you receive the following message:

http://tinyurl.com/aviso-dos-fontes-do-fpc

Do not be 'alarmed', it was Lazarus who just could not find the sources from the Free Pascal. To solve this, go to Lazarus, Environment | Options ..., and set as the image below:

http://tinyurl.com/informando-o-caminho-dos-fonte

In FPC source directory report:

Code: [Select]
/usr/share/fpcsrc/$(FPCVer)/
Click OK, and finally to his Lazarus is ready to slaughter!

Conclusion

Some people has "fear" to follow projects by SVN, due to the constant changing in the source codes. But in the case of Lazarus, you can track new features in real time, and the more important - You can contribute to the development reporting bugs[¹].

I follow and recommend, because I'm using the new features that it has not in previous versions, such as the OpenURL function of LCLIntf Unit[²], which serves to open a local HTML or web page in the current browser.

That's it, hugs, and until next time! (and excuse for my 'strange' english) :D

Silvio Clécio - http://silvioprog.com.br

[¹] http://bugs.freepascal.org/
[²] http://wiki.lazarus.freepascal.org/Lazarus_0.9.30_release_notes#LCL_Changes

 

TinyPortal © 2005-2018