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

Reinier Olislagers reinierolislagers at gmail.com
Sat Feb 4 11:01:47 CET 2012


On 3-2-2012 14:36, Reinier Olislagers wrote:
> Hi list,
> 
> Thanks to help from the FPC list, my FPCUp FPC/Lazarus SVN
> installer/updater seems to take a plain vanilla Windows machine and
<bla>
> I'd also like Lazarus to compile Lazdatadesktop etc and perhaps some
> extra packages, and perhaps offline help.
> 
> For that to happen, I will need valid config files. I'm now creating an
> empty directory for use as primary-config-path.
> 
> How can I best fill it with config files?

Short term solution - is a kludge so not going to do it, I think:
1. call lazarus.exe --primary-config-path=bla which should create config
files. Then kill it.
2. Go through the xml files in the primary config path and replace
compiler path, binutils path

Longer term solution:
Use TEnvironmentOptions:
CreateConfig //to create default config
set properties:
LazarusDirectory property
CompilerFileName
FPCSourceDirectory
MakeFilename
DebuggerFilename
Save to save config

Write a new command line tool, e.g.:
UpdateConfig --primary-config-path=c:\windows\temp\testconfig
--fpc=c:\development\fpc\bin\i386-win32\fpc.exe
--fpcsourcedirectory=c:\development\fpc
--make=c:\development\fpcbootrap\make.exe
--debugger=c:\development\fpcbootstrap\gdb.exe
--lazarusdirectory=c:\development\lazarus

... which will create or update any config in primary-config-path

Am I going in the right direction? Can I just use TEnvironmentOptions or
do I need more units?

Thanks,
Reinier




More information about the Lazarus mailing list