Op 10-05-18 om 14:05 schreef Giuliano Colla via Lazarus:
Il 09/05/2018 12:34, Joost van der Sluis via Lazarus ha scritto:
That's more a hack then a solution

I fail to grasp why startlazarus should be a feature, and fpc.sh should be a hack.

Startlazarus is also a hack, because on Windows you can not overwrite an executable which is open and the design is kept consistent between OS'es.

You can perfectly fine use just 'lazarus' on Linux, I never use 'startlazarus'.

Having multiple fpc.cfg files, as it may be required by multiple fpc installations requires invoking the compiler with the appropriate parameters. A script is just the most comfortable way to achieve this result.

This is not true. And it amazes me that people think that. I've never understood the use of scripts like 'fpcup'. Multiple fpc installations do not need any command-line parameters. Not at all. None.

Believe me. Due to fpc's multi-platform nature the core developers have had multiple versions on their systems from the beginning. And then it is really annoying to have all kind of parameters to start the compiler. So there are several solutions for that build into fpc itself. One such feature is the 'fpc' binary, which calls the proper compiler 'ppcx64', 'ppc386' etc.

Another feature is the system that checks for the proper configuration-files.

But it is even possible to use one fpc.cfg configuration file for multiple fpc-versions. This is even the default-setup!

Don't believe me? Take a look at the default fpc.cfg, it contains lines like: "Fu/usr/lib/fpc/$fpcversion/units/$fpctarget"

Why do you think the $fpcversion and $fpctarget macros are there? Because it is impossible to keep two versions of fpc installed alongside each other?

Launching an executable via another program or a script which sets up the appropriate environment according the user needs is a standard well established practice, since the dawn of Unix.

Oh, you may do so. But it is unnecessary and confusing in the fpc-case. Off-course you can configure Lazarus to use fpc.sh. But what do you do in a terminal? Wouldn't it be easier to just call 'fpc_304' and 'fpc_trunk'? Or /path/to/compiler/versiona/fpc and /path/to/compiler/versionb/fpc?

Believe me when I say that most fpc-developers have really difficult setups, which a lot of different versions of fpc installed. And they do not use scripts like fpcup. They also don't type magically looking command lines. They use just the features already build into the compiler.

Imho the only reason that people are using fpcup is because when they have a problem or question about how to setup fpc, people on the forum and mailinglist always come with the solution: use fpcup. Instead of explaining how they can set it up themselves.

(On linux: Just install both the 3.0.4 and 3.0.2 rpm, and they will run nicely along each other.)

Regards,

Joost.
--
_______________________________________________
Lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to