[Lazarus] Multiple installations of Lazarus

Sven Barth pascaldragon at googlemail.com
Thu Mar 8 09:59:32 CET 2012

Am 07.03.2012 19:11, schrieb Mark Morgan Lloyd:
> Sven Barth wrote:
>>> A further question Mattias, if I just run the individual lazarus.exe
>>> file in it's corresponding directory, I presume that would also be fine.
>>> Although, I appreciate that I would have 2 completely seperate sets of
>>> settings.
>> Without any parameters the settings are saved in %APPDATA%, so any
>> Lazarus would use/overwrite the settings of the other Lazarus. You
>> MUST pass the pcp parameter to all installations if you want different
>> configurations (Note: You can leave out the parameter for one
>> installation which will then use the default location).
> When Lazarus reads the config file, what is the current directory (i.e.
> . in unix and Windows)? Could this be used to specify the same location
> as the binary?

I don't know whether Lazarus does a "SetCurrentDir", but in Unix it will 
be the directory you started it from (if from the shell) or some other 
directory if started through the desktop manager (I don't know which 
methods are used there, I'd even need to check what wmii - which is the 
WM I use - does there ^^). On Windows it will be the directory specified 
in the shortcut (if started from a shortcut) or the current directory 
(if started through cmd or by clicking the exe).

My opinion: don't rely on the current directory if you want to locate 
configuration. In theory the approach "ExtractFilePath(ParamStr(0))" 
could be used, but there can be problems on Unix systems with that.


More information about the Lazarus mailing list