Zaher Dirkey <parm...@gmail.com> hat am 30. März 2011 um 14:26 geschrieben:
>
>
>
> On Wed, Mar 30, 2011 at 12:00 PM, Hans-Peter Diettrich <drdiettri...@aol.com
> [mailto:drdiettri...@aol.com] >wrote:
>
> > I just encountered a nasty problem:
> >
> > When I have multiple Lazarus installations (trunk, branches, snapshot...),
> > the common Lazarus configuration is used by default (when no --pcp is
> > specified). Actually I wondered about many error messages on an IDE rebuild,
> > until I noticed that the (default) configuration referred to a different
> > Lazarus directory :-(
Related:
Last week I add a check to test if the given Lazarus directory has the same main
version as the IDE. It checks 0.9.31. It does not check the svn revision. If the
version does not fit it shows a setup dialog. This should help to spot some of
such errors.
>
>
>
> >
> > This leads me to the question, how a user should configure and start Lazarus
> > at all?
When you only have one: just start.
When having multiple: use --pcp.
>
>
>
> >
> > What exactly happens when the IDE is invoked, from a desktop item or command
> > prompt?
The installers sets the icon/menu entry to start "startlazarus". You can give it
the command line parameter --pcp.
startlazarus reads the config and starts either the default installed Lazarus
executable or the custom built Lazarus executable (the one with your installed
packages). Under Windows it also renames the newly created IDE executable.
>
>
>
> > Where does the IDE look for the configuration?
If no --pcp is given it uses
Under windows:
PrimaryConfigPath:=
ExtractFilePath(ChompPathDelim(SysToUTF8(GetAppConfigDir(False)))) + 'lazarus';
all other:
~/.lazarus
If no --lazarus-dir option is given the Lazarus source directory is taken from
the environmentoptions.xml.
If there is no environmentoptions.xml it is copied from the secondary config
directory.
The default for the Lazarus directory is under windows:
DefaultDrive + '\lazarus';
all other:
The IDE searches in a list of common directories.
Each distribution/installer adds some gory details. For example to explain all
the paths of the debian packages would require at least one wiki page on its
own.
The basic Lazarus setup is pretty simple, but you can do it arbitrarily
complicated.
>
>
>
> > Is it sufficient to have a MyLazarus\cfg\ directory, to make the
> > MyLazarus\Lazarus.exe use the configuration in that directory?
I'm not an expert for the windows installer, but the IDE sources do not mention
'cfg'. I guess "cfg" is not used.
>
>
>
> > IMO the IDE should look for a configuration in the current (EXE) directory
> > first,
... which might be read only and therefore only contains the defaults, not the
user settings.
>
>
>
> > and only into the common directory when no config can be found there. The
> > config naming instead suggests that the IDE looks into the *primary*
> > (common) config directory first, and into its own directory only next
> > (*secondary* config path).
Yes.
>
>
>
> >
> > What exactly happens when the IDE rebuilds itself?
It uses "make" with some parameters to compile. If the output directory is read
only it passes a parameter to redirect the output to a sub directory (bin) of
the pcp. And because Windows locks the running exe the IDE redirects the exe
name, which is then later renamed to the final name by startlazarus.
>
>
>
> > Which directory is used for the sources,
The Lazarus directory.
>
>
>
> > and for storing the new (compiled) IDE?
It the Lazarus directory is writable the output is created there, just as if you
use "make" yourself.
If not, it redirects it. See above.
>
>
>
> > Does it make any sense to rebuild the IDE from sources in a different
> > directory, and where is the new IDE stored?
> > Can somebody please clarify the intended procedure for configuring multiple
> > parallel Lazarus installations?
Vincents already answered that.
Mattias
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus