Adventures of a Newbie

From Lazarus wiki
Revision as of 18:02, 25 March 2006 by Jfabiani (talk | contribs) (How I was able to install Lazarus)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

I'm writing this because like you I'm a newbie (as of today only five days under my belt). As a newbie I ran into many issues that I believe would have stopped others dead in their tracks. Not that I'm some sort genius or better than others – just hard headed. To make matters worse I'm coming from the MS windows world and I'm learning Lazarus on a Linux system. Worse of all I have no Delphi experience.

Installation:

I am using SUSE 10.0. That is important because Novell SUSE installs without the Gnome support development libraries installed. In fact I think most of the the Linux distributions by default do not install the development libraries. To make matters worse SUSE's default window manager is KDE. Again that matters because the KDE uses the QT graphic libraries. Now that I have said that I need to tell you that Lazarus uses the GTK graphic libraries in the default installation. Although, as of today 03/19/06 there are a few developers that are trying to setup the QT (KDE uses the QT) libraries for Lazarus.

So before downloading the FPC (Free Pascal Compiler) and Lazarus IDE files you should install the development graphic libraries. In my case that was very easy. SUSE 10.0 has a utility called 'YAST'. Open YAST click on the software management icon. It opens a search window - type 'GTK' for the search string. The search screen returns a list of all the GTK items available. I checked everything because I really did not know what was required. YAST suggest other software packages to install. I just agreed to everything. I'm sure that someone out in the GTK world knows exactly what was needed but I sort of shotgun the process. It was simple.

As of today there is two versions of FPC. I could just use the version that is available from SUSE 10. But I was told that it was better to use the latest version from the Lazarus web site.

So , I downloaded the latest binaries of FPC and Lazarus. That means I did not have to compile the source code. It comes in a install package – 'RPM'. Again I used YAST to install both packages. The FPC website suggested that I also download the FPC source. So I installed both the FPC compiler and FPC source packages using the YAST. Next I installed the Lazarus package. Yast complained. Yast suggestion that something was wrong. It was trying to find a GTK+ library. It was installed with a slightly different spelling. So I took a chance and installed the package (YAST offers a way to over ride the errors). It worked for me.

The first thing to figure out was how to start Lazarus. Well, I found two ways. I found 'startlazarus' and 'lazarus'. Both work well. Although I think the 'startlazarus' seems to open faster. I have no idea why there is two programs. You can then open a terminal window and type either of the names. Or you can create a application icon. Try right clicking on the desktop.

Starting the IDE: Lazarus opened! I was very excited. But after my first excitement I realized that the default display was butt ugly. Of course I was comparing Lazarus with other KDE programs I had been playing with – like kmail. I worked with Lazarus that way for four days. I'll explain later how to change the look of the IDE.

Next question. How do I use this IDE. Clicking on the help puts you on a website. So if you don't have a good connection it might take a while to come up and in my case the website was down for two days. So what was I to do. I turned to web and starting reading how to do things from a Delphi tutorial. Why because Lazarus is patterned after Delphi. It sort of worked but I have to say in a big way Lazarus is NOT Delphi. Next I joined the Lazarus forum and the FPC forum. But I noticed immediately that not much is happening on the either of the forums. Most important there was not a FAQ section. Next I joined the Lazarus CCR mailing list. Turns out that few if anyone was using the mail list. For I while, I thought I might have picked a dying Open Source project. I then tried the the IRC Lazarus-ide on the Freenode server. I found a number of people using the IRC. That was at least encouraging.

Finding the right mail-list

Someone with a kind heart was able to direct me to the right mailing list “lazarus@miraclec.com”. There was a lot more traffic on that mail list. Normally, I try to sit back and read a mailing list to get the feel of what is discussed. But since I was already running into trouble with Lazarus I jumped right in with questions. The responses were very helpful. At this point I would like to point that although the mail list is there to help it is expected that you will at least make some effort to google your questions for answers. But I bet you will run into trouble because Lazarus does not equal Delphi. Also be very careful with the IRC. The IRC has mostly the developers of FPC and Lazarus. In general they are a friendly group but I noticed they have little patience with newbies.

Changing the display:

So how to fix the display of the IDE (or configure it to use gtk2). First how did I discover how to do this. I read a forum message that described the way to install a Lazarus package (in this case the report writer reportlivre). The message suggested that to install packages required that the user be 'root' due to a permission issue. So I logged in as root and clicked on tools->configure Lazarus. A dialog will pop up and I noticed I could configure Lazarus to use several graphic libraries. Currently, only gtk1 and gtk2 have everything required (almost everything). I chose gtk2 and saved. Then tools-> Build Lazarus. After the build completes – restart Lazarus and you should see a completely different look. I immediately ran into a problem. Recall Novel SUSE 10.0 uses KDE as the default. Many of the buttons and menu items captions were being cut off at the bottom. After some google searches I discovered that I can open the Utilities->Desktop->Gnome configuration tool->fonts->details and change the resolution to 93 (actually changing it to anything will restart the gtk-qt-engine). Then save (close). That fixed the issue of cutting off the bottoms of the captions but after each reboot I have to reset it. I currently have no solutions. It's not much trouble because I don't shut off my computer very often. I have noticed that Lazarus is not as stable using the GTK2 interface. Features appear to be missing – like the help hints for the tool bar. So in the end I returned to the GTK1 interface.

My next article will be more informative with respect to programming.

John Fabiani