[Lazarus] Creating config files in primary config path for bootstrap installer

Reinier Olislagers reinierolislagers at gmail.com
Sat Feb 4 18:19:14 CET 2012


On 4-2-2012 17:59, Mattias Gaertner wrote:
> On Sat, 04 Feb 2012 12:03:28 +0100
> If you need a tool to set some config variables, then please write one.
Ok.

> The configs are plain xml files, so this is simple enough. In fact for a
> start config you don't even need TXMLConfig, a TStringList would be
> sufficient. I can put it into the Lazarus "tools" folder.
Ok.

> Maybe you overrate the config files and/or underestimate the
> IDE/lazbuild.

I think I did ;)

> A simple environmentoptions.xml looks like this:
> 
> <?xml version="1.0"?>
> <CONFIG>
>   <EnvironmentOptions>
>     <Version Value="106"/>
>     <LazarusDirectory Value="/usr/share/lazarus"/>
>     <CompilerFilename Value="/usr/bin/fpc"/>
>     <FPCSourceDirectory Value="/usr/share/fpcsrc/$(FPCVer)/fpc/"/>
>     <MakeFilename Value="make"/>
>     <TestBuildDirectory Value="/tmp"/>
>     <DebuggerFilename Value="/usr/bin/gdb"/>
>   </EnvironmentOptions>
> </CONFIG>
> 
> See the wiki page for more details.

Thanks, yes, that doesn't seem too difficult ;)

<snip>
> The IDE saves all file names relative (except for history lists and
> some minors). So stop the IDE, change the value in the xml and start
> the IDE and that's it. The IDE will automatically load the new lpk
> files, the new fpdoc files, etc.

Thanks a lot, Mattias, that's very clear.

I'll report back when I have something usable...

Thanks for the help,
Reinier




More information about the Lazarus mailing list