Re: [Lazarus] Multiple installations of Lazarus

2012-03-08 Thread Sven Barth

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.


Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Multiple installations of Lazarus

2012-03-08 Thread Mattias Gaertner
On Thu, 08 Mar 2012 09:59:32 +0100
Sven Barth pascaldra...@googlemail.com wrote:

 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

 
 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.


 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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Multiple installations of Lazarus

2012-03-08 Thread Mattias Gaertner
On Wed, 07 Mar 2012 18:11:40 +
Mark Morgan Lloyd markmll.laza...@telemetry.co.uk 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.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Multiple installations of Lazarus

2012-03-08 Thread Mark Morgan Lloyd

Mattias Gaertner wrote:

On Wed, 07 Mar 2012 18:11:40 +
Mark Morgan Lloyd markmll.laza...@telemetry.co.uk 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 looks at e.g. ~/.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]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Multiple installations of Lazarus

2012-03-08 Thread Martin

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 looks at e.g. ~/.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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Multiple installations of Lazarus

2012-03-08 Thread Mark Morgan Lloyd

Martin wrote:

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 looks at e.g. ~/.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]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Multiple installations of Lazarus

2012-03-07 Thread 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
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Multiple installations of Lazarus

2012-03-07 Thread Mattias Gaertner

Richard Mace richard.m...@gmail.com 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


Mattias
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Multiple installations of Lazarus

2012-03-07 Thread Richard Mace
2012/3/7 Mattias Gaertner nc-gaert...@netcologne.de

 **


 Richard Mace richard.m...@gmail.com 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
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Multiple installations of Lazarus

2012-03-07 Thread Richard Mace
2012/3/7 Mattias Gaertner nc-gaert...@netcologne.de

 **


 Richard Mace richard.m...@gmail.com 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
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Multiple installations of Lazarus

2012-03-07 Thread Sven Barth

Am 07.03.2012 16:48, schrieb Richard Mace:

2012/3/7 Mattias Gaertner nc-gaert...@netcologne.de
mailto:nc-gaert...@netcologne.de

__


Richard Mace richard.m...@gmail.com
mailto:richard.m...@gmail.com 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


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Multiple installations of Lazarus

2012-03-07 Thread Hans-Peter Diettrich

Richard Mace schrieb:

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.


Create a desktop icon for every version, and add the desired -pcp option 
to it.


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Multiple installations of Lazarus

2012-03-07 Thread 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?


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]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus