[fpc-pascal] Re: RE : Re: RE : FPCUp FPC/Lazarus installer/updater: first Linux/Windows version released

Reinier Olislagers reinierolislagers at gmail.com
Sat Feb 11 14:11:28 CET 2012


On 11-2-2012 13:15, Mattias Gaertner wrote:
> 
> Reinier Olislagers <reinierolislagers at gmail.com> hat am 11. Februar 2012
> um 08:28 geschrieben:
>> On 10-2-2012 18:23, Ludo Brands wrote:
>> >>> - (I hesitated to put this in the category "bugs") lazarus is
>> >>> configured to use (default on ubuntu) ~/fpc/bin/fpc. I have 2.4.4
>> >>> installed with a /etc/fpc.cfg and ~/fpc/bin/fpc will just launch
>> >>> 2.4.4. Changing the compiler to ~/fpc/compiler/ppc386 and copying
>> >>> fpc.cfg to ~/fpc/compiler/ still fails because the compiler still
>> >>> picks up /etc/fpc.cfg. AFAIK the fpc.cfg in the compiler
>> >> dir will only
>> >>> be picked up when there is no .fpc.cfg in the home directory nor a
>> >>> fpc.cfg in the current directory nor one in the path specified by
>> >>> PPC_CONFIG_PATH nor a /etc/fpc.cfg. Detecting a conflicting fpc.cfg
>> >>> and warning the user would be nice.
>> >> Agreed.
>> >> If I understand the FPC User's Guide correctly, one could use
>> >> the -n option to tell fpc to ignore config files, then
>> >> specify the one we want with @. The question is, can that be
>> >> done with Lazarus
> Project Options / Compiler Options / Other 

Danke, Mattias...

The thing is, we would like to set that by default, and also, if
possible, let lazbuild work with it...

I suppose we could write some default value for Project Options/Compiler
Options/Other but that would lead to problems whenever the user opens
projects from another computer or even his side-by-side Lazarus install...

>> #!/bin/sh
>> ~/wherever/we/installed/fpc -n @~/wherever/we/installed/fpc.cfg $*
>> which should instruct our fpc to ignore any other fpc.cfg, use our own,
>> and get any other arguments passed to the script.
>>
>> Then assign this script as the compiler in Lazarus?!?!
> No need. 
>
>> > (I suppose this might not work as Lazarus might be looking for other
>> files in the compiler path!??!)
> 
> Lazarus does neither read nor search the fpc.cfg. It asks the compiler.

Correct. Calling our newly installed fpc will presumably show the same
problems (e.g. loading /etc/fpc.cfg) if a system-wide fpc was already
installed....

A shell script in e.g. the user's home directory seems like a valid
solution, but I'm open to suggestions...

Regards,
Reinier



More information about the fpc-pascal mailing list