Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-03

Multiple installations of Lazarus

13 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Richard Mace

Hi All,
Is it possible to have more than one installation of Lazarus, in multiple directories?
I am effectively thinking of having as follows:

c:\lazarus (this will be the latest stable release) c:\lazarus-svn (this will be the latest svn update)

Is it simply ok to have the above, or is there registry issues to worry about?

Thanks in advance.

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120307/e5daad9f/attachment.html>

Reply by email

Mattias Gaertner
to Richard Mace

Richard Mace hat am 7. M?rz 2012 um 16:03
geschrieben:

Show quoted text 10 lines
Hi All, Is it possible to have more than one installation of Lazarus, in multiple directories? I am effectively thinking of having as follows: c:\lazarus (this will be the latest stable release) c:\lazarus-svn (this will be the latest svn update) Is it simply ok to have the above, or is there registry issues to worry about?

Lazarus does not use the registry, it uses a directory where it stores its config files. This is called the "primary config path".

When you start the IDE pass as command line parameter --pcp=. For example

lazarus.exe --pcp=C:\lazarus-svn\config

Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120307/72458121/attachment.html>

Reply by email

Richard Mace
to Mattias Gaertner

2012/3/7 Mattias Gaertner

Show quoted text 31 lines
** Richard Mace hat am 7. M?rz 2012 um 16:03 geschrieben: Hi All, Is it possible to have more than one installation of Lazarus, in multiple directories? I am effectively thinking of having as follows: c:\lazarus (this will be the latest stable release) c:\lazarus-svn (this will be the latest svn update) Is it simply ok to have the above, or is there registry issues to worry about? Lazarus does not use the registry, it uses a directory where it stores its config files. This is called the "primary config path". When you start the IDE pass as command line parameter --pcp=. For example lazarus.exe --pcp=C:\lazarus-svn\config

Thanks Mattias, that's great.

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120307/f53d9c84/attachment.html>

Reply by email

Richard Mace
to Mattias Gaertner: Richard Mace hat am 7. M?rz 2012 um 16:03 geschrieben: Lazarus does not use the…

2012/3/7 Mattias Gaertner

Show quoted text 30 lines
** Richard Mace hat am 7. M?rz 2012 um 16:03 geschrieben: Hi All, Is it possible to have more than one installation of Lazarus, in multiple directories? I am effectively thinking of having as follows: c:\lazarus (this will be the latest stable release) c:\lazarus-svn (this will be the latest svn update) Is it simply ok to have the above, or is there registry issues to worry about? Lazarus does not use the registry, it uses a directory where it stores its config files. This is called the "primary config path". When you start the IDE pass as command line parameter --pcp=. For example lazarus.exe --pcp=C:\lazarus-svn\config

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.

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120307/c717952f/attachment-0001.html>

Reply by email

Sven Barth
to Richard Mace
Richard Mace wrote 34 lines
2012/3/7 Mattias Gaertner < <mailto:>> __ Richard Mace < <mailto:>> hat am 7. M?rz 2012 um 16:03 geschrieben: Hi All, Is it possible to have more than one installation of Lazarus, in multiple directories? I am effectively thinking of having as follows: c:\lazarus (this will be the latest stable release) c:\lazarus-svn (this will be the latest svn update) Is it simply ok to have the above, or is there registry issues to worry about? Lazarus does not use the registry, it uses a directory where it stores its config files. This is called the "primary config path". When you start the IDE pass as command line parameter --pcp=. For example lazarus.exe --pcp=C:\lazarus-svn\config 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).

Regards,
Sven

Reply by email

Mark Morgan Lloyd
to Sven Barth: Without any parameters the settings are saved in %APPDATA%, so any Lazarus would…
Sven Barth wrote 10 lines
> 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?

Have the developers ever considered allowing a macro expansion in the filename?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Sven Barth
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 16 lines
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.

Regards,
Sven

Reply by email

Mattias Gaertner
to Sven Barth
Show quoted text 17 lines
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?

Yes, you can start it with

./lazarus --pcp=config

Or under Windows:
startlazarus --pcp=config

Show quoted text 5 lines
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 ^^).

It depends.
Desktop shortcuts under Linux have an entry for the working directory. Similar as under Windows.

Show quoted text 7 lines
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.

Yes, because of bundles, symlinks and shell extensions. The ParamStr(0) is what the user input (e.g. ~/dir/lazarus), not what file was executed.

Mattias

Reply by email

Mattias Gaertner
to Mark Morgan Lloyd: When Lazarus reads the config file, what is the current directory (i.e. . in unix and…
Show quoted text 19 lines
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? Have the developers ever considered allowing a macro expansion in the filename?

Many values support macros.
The LazarusDirectory not. Maybe some macros can be allowed. The fixed ones like version and env.

Mattias

Reply by email

Mark Morgan Lloyd
to Mattias Gaertner
Mattias Gaertner wrote 24 lines
On Wed, 07 Mar 2012 18:11:40 +0000 Mark Morgan Lloyd wrote: > 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? > > Have the developers ever considered allowing a macro expansion in the > filename? Many values support macros. The LazarusDirectory not. Maybe some macros can be allowed. The fixed ones like version and env.

I think what would be really useful would be a redirect, i.e. the IDE first . ~/.lazarus and if it sees ~/.lazarus/redirect it expands macros in the line it contains to have the same effect as -pcp.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Martin
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 5 lines
I think what would be really useful would be a redirect, i.e. the IDE first . ~/.lazarus and if it sees ~/.lazarus/redirect it expands macros in the line it contains to have the same effect as -pcp.

The version as macro on the path, will break if people update that installation

And it does not help, if you have twice the same version

Reply by email

Mark Morgan Lloyd
to Martin
Martin wrote 9 lines
On 08/03/2012 15:57, Mark Morgan Lloyd wrote: > > I think what would be really useful would be a redirect, i.e. the IDE > first . ~/.lazarus and if it sees ~/.lazarus/redirect it > expands macros in the line it contains to have the same effect as -pcp. > The version as macro on the path, will break if people update that installation

But things already do break if moving between versions- I might be moving over a more extreme span than most (in order to be able to compile for GTK etc.) but I fairly regularly find myself deleting ~/.lazarus.

And it does not help, if you have twice the same version

If the redirect file contains a single line like
~/.lazarus-$LAZVER-$FPCVER the worst that will happen is that the user will have to consent to it being created from a template.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email