[Lazarus] Align property confusion

Graeme Geldenhuys graemeg.lists at gmail.com
Mon Oct 4 14:34:00 CEST 2010


On Monday 04 October 2010 13:43:06 Frank Church wrote:
> Batch or bash programs are real programs. I'd say use a batch file or some
> other script, and create a GUI interface to it. This GUI business is rather
> over done. You could try Pascal Script, thus have your Pascal cat and eat
> as well
> 
> With my bash script all you simply specify the variables at the top and run
> it. Building a different revision is a simple matter of changing
> $FPC_REVISION or $LAZARUS_REVISION and Bob's your uncle. None of the
> existing stuff gets touched. The only shortcoming as I see it now is I have
> omitted to restore the $SYSTEM_FPC_COMPILER's original fpc.cfg to the home
> directory as .fpc.cfg, when I rebuild the compiler with its self.

Batch or bash programs are real but SMALL and SIMPLE programs. They are not 
suited for bigger programs containing "if...then" structures and loops. They 
become hard to maintain very quickly. A bash script works best as a glue 
between other programs.

For your install script it suits well. However, your script assumes many 
things and is not suitable for a new potential Lazarus user. For example when 
installing FPC, you assume there is already FPC 2.4.0 installed. What if there 
isn't? How does your script react?
It also assumes the sources are already downloaded. What if they are not?
Then you can uncomment the line:
  svn checkout -r ${FPC_REVISION} ${FPC_REPOSITORY}
to download sources. What if Subversion is not installed? What does your 
script do?
What about distro specific differences? And so on...

This script is suited for a "guru" user who knows exactly what must be done.
That is how most bash scripts are.

What I (and I guess Kjow) have in mind is an installation program for a person 
who goes to Lazarus web-page for the first time and wants to try it. He doesn't 
even need to know that FPC needs to be installed before Lazarus. The installer 
should take care of all details.


Juha

P.S.
"Scripting language" term is used loosely for "dynamic languages" like Perl, 
Python and Ruby, although they are suited for structured programming better 
than bash.
My comments were about bash only.




More information about the Lazarus mailing list