Sign in Join

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

Mailing lists / lazarus / 2011-09

Automatic handling of multiple Lazarus installation - user configuration folder (Was: Re: Search paths per platform)

10 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

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

Flávio Etrusco
Hans-Peter Diettrich wrote 12 lines
Sven Barth schrieb: > 2. Delphi uses the Windows Registry to store its known packages, true, but > Lazarus basically does the same for its installed packages in its XML files > that are stored in e.g. %APPDATA%\lazarus or ~/.lazarus. The difference becomes obvious with multiple Lazarus installations. Where multiple Delphi versions share packages (causing trouble), every Lazarus installation must be configured explicitly. DoDi

I believe this has been discussed recently, but can't find it right now. I'm willing to write patch, which of these features would be desirable/accepted?
1) Create user the configuration to include Lazarus version (just major&minor) in the folder name? (at least NetBeans does this, I find it nice :) )
2) Store what's the "default" Lazarus installation path in a setting for that configuration and warn in case it's running the "wrong" one;
3) In the "warning" above, the allow user to chose to create a new configuration, automatically create (and later search) based on project folder name (if different), parent folder name and/or arch/targetos.

Best regards,
Fl?vio

Reply by email

Martin
to Flávio Etrusco
Fl?vio Etrusco wrote 14 lines
On Wed, Sep 14, 2011 at 12:10 AM, Hans-Peter Diettrich wrote: > Sven Barth schrieb: >> 2. Delphi uses the Windows Registry to store its known packages, true, but >> Lazarus basically does the same for its installed packages in its XML files >> that are stored in e.g. %APPDATA%\lazarus or ~/.lazarus. > The difference becomes obvious with multiple Lazarus installations. Where > multiple Delphi versions share packages (causing trouble), every Lazarus > installation must be configured explicitly. I believe this has been discussed recently, but can't find it right now. I'm willing to write patch, which of these features would be desirable/accepted? 1) Create user the configuration to include Lazarus version (just major&minor) in the folder name? (at least NetBeans does this, I find it nice :) )

Storing config in the app dir IMHO is not a good idea (btw older Lazarus did do that.)
Most modern OS have guidelines t say otherwise.

On linux users can not write to that Windows it would currently work, because lazarus is nt in "Program Files" folder => once it will be, windows will apply "workarounds" by moving the files to "Program Data" or similar (newer windows only).

Backup solutions may not find the data in the prg folder, multi user systems will not work...

------
Improving the installer to detct the 2nd install, and allow choosing a diff folder (including subfolder of current), and to create the correct shortcuts may help. (for snapshot users)

Users with svn install would still have the warning.

2) Store what's the "default" Lazarus installation path in a setting for that configuration and warn in case it's running the "wrong" one;

IMHO +1

Note that the lazarus.exe changes location on linux. If you recompile it will be in the users home, as the install folder is not writable

Show quoted text 6 lines
3) In the "warning" above, the allow user to chose to create a new configuration, automatically create (and later search) based on project folder name (if different), parent folder name and/or arch/targetos.

Reply by email

Sven Barth
to Martin
Martin wrote 30 lines
On 14/09/2011 04:31, Fl?vio Etrusco wrote: > On Wed, Sep 14, 2011 at 12:10 AM, Hans-Peter Diettrich > wrote: >> Sven Barth schrieb: >>> 2. Delphi uses the Windows Registry to store its known packages, >>> true, but >>> Lazarus basically does the same for its installed packages in its >>> XML files >>> that are stored in e.g. %APPDATA%\lazarus or ~/.lazarus. >> The difference becomes obvious with multiple Lazarus installations. >> Where >> multiple Delphi versions share packages (causing trouble), every Lazarus >> installation must be configured explicitly. > I believe this has been discussed recently, but can't find it right now. > I'm willing to write patch, which of these features would be > desirable/accepted? > 1) Create user the configuration to include Lazarus version (just > major&minor) in the folder name? (at least NetBeans does this, I find > it nice :) ) Storing config in the app dir IMHO is not a good idea (btw older Lazarus did do that.) Most modern OS have guidelines t say otherwise. On linux users can not write to that Windows it would currently work, because lazarus is nt in "Program Files" folder => once it will be, windows will apply "workarounds" by moving the files to "Program Data" or similar (newer windows only). Backup solutions may not find the data in the prg folder, multi user systems will not work...

I believe he meant extending the name where the configuration is stored... e.g. "lazarus0.9" instead of just "lazarus".

Regards,
Sven

Reply by email

Flávio Etrusco
to Sven Barth
Sven Barth wrote 45 lines
On 14.09.2011 10:54, Martin wrote: > > On 14/09/2011 04:31, Fl?vio Etrusco wrote: >> >> On Wed, Sep 14, 2011 at 12:10 AM, Hans-Peter Diettrich >> wrote: >>> >>> Sven Barth schrieb: >>>> >>>> 2. Delphi uses the Windows Registry to store its known packages, >>>> true, but >>>> Lazarus basically does the same for its installed packages in its >>>> XML files >>>> that are stored in e.g. %APPDATA%\lazarus or ~/.lazarus. >>> >>> The difference becomes obvious with multiple Lazarus installations. >>> Where >>> multiple Delphi versions share packages (causing trouble), every Lazarus >>> installation must be configured explicitly. >> >> I believe this has been discussed recently, but can't find it right now. >> I'm willing to write patch, which of these features would be >> desirable/accepted? >> 1) Create user the configuration to include Lazarus version (just >> major&minor) in the folder name? (at least NetBeans does this, I find >> it nice :) ) > > Storing config in the app dir IMHO is not a good idea (btw older Lazarus > did do that.) > Most modern OS have guidelines t say otherwise. > > On linux users can not write to that Windows it would > currently work, because lazarus is nt in "Program Files" folder => once > it will be, windows will apply "workarounds" by moving the files to > "Program Data" or similar (newer windows only). > > Backup solutions may not find the data in the prg folder, multi user > systems will not work... I believe he meant extending the name where the configuration is stored... e.g. "lazarus0.9" instead of just "lazarus". Regards, Sven

Exactly ;-)

-Fl?vio

Reply by email

Martin
to Sven Barth: I believe he meant extending the name where the configuration is stored... e.g.…
Sven Barth wrote 15 lines
On 14.09.2011 10:54, Martin wrote: > Storing config in the app dir IMHO is not a good idea (btw older Lazarus > did do that.) > Most modern OS have guidelines t say otherwise. > > On linux users can not write to that Windows it would > currently work, because lazarus is nt in "Program Files" folder => once > it will be, windows will apply "workarounds" by moving the files to > "Program Data" or similar (newer windows only). > > Backup solutions may not find the data in the prg folder, multi user > systems will not work... I believe he meant extending the name where the configuration is stored... e.g. "lazarus0.9" instead of just "lazarus".

What happens if you upgrade?

Reply by email

Flávio Etrusco
to Martin
Martin wrote 21 lines
On 14/09/2011 10:05, Sven Barth wrote: > > On 14.09.2011 10:54, Martin wrote: >> >> Storing config in the app dir IMHO is not a good idea (btw older Lazarus >> did do that.) >> Most modern OS have guidelines t say otherwise. >> >> On linux users can not write to that Windows it would >> currently work, because lazarus is nt in "Program Files" folder => once >> it will be, windows will apply "workarounds" by moving the files to >> "Program Data" or similar (newer windows only). >> >> Backup solutions may not find the data in the prg folder, multi user >> systems will not work... > > I believe he meant extending the name where the configuration is stored... > e.g. "lazarus0.9" instead of just "lazarus". What happens if you upgrade?

Lazarus could search for a suitable configuration (one pointing to its installation directory) and ask the user whether they want to migrate, delete or leave as is the configuration.

Reply by email

Marcos Douglas
to Flávio Etrusco: Exactly ;-) -Fl?vio

2011/9/14 Fl?vio Etrusco :

Show quoted text 48 lines
On Wed, Sep 14, 2011 at 6:05 AM, Sven Barth wrote: > On 14.09.2011 10:54, Martin wrote: >> >> On 14/09/2011 04:31, Fl?vio Etrusco wrote: >>> >>> On Wed, Sep 14, 2011 at 12:10 AM, Hans-Peter Diettrich >>> wrote: >>>> >>>> Sven Barth schrieb: >>>>> >>>>> 2. Delphi uses the Windows Registry to store its known packages, >>>>> true, but >>>>> Lazarus basically does the same for its installed packages in its >>>>> XML files >>>>> that are stored in e.g. %APPDATA%\lazarus or ~/.lazarus. >>>> >>>> The difference becomes obvious with multiple Lazarus installations. >>>> Where >>>> multiple Delphi versions share packages (causing trouble), every Lazarus >>>> installation must be configured explicitly. >>> >>> I believe this has been discussed recently, but can't find it right now. >>> I'm willing to write patch, which of these features would be >>> desirable/accepted? >>> 1) Create user the configuration to include Lazarus version (just >>> major&minor) in the folder name? (at least NetBeans does this, I find >>> it nice :) ) >> >> Storing config in the app dir IMHO is not a good idea (btw older Lazarus >> did do that.) >> Most modern OS have guidelines t say otherwise. >> >> On linux users can not write to that Windows it would >> currently work, because lazarus is nt in "Program Files" folder => once >> it will be, windows will apply "workarounds" by moving the files to >> "Program Data" or similar (newer windows only). >> >> Backup solutions may not find the data in the prg folder, multi user >> systems will not work... > > I believe he meant extending the name where the configuration is stored... > e.g. "lazarus0.9" instead of just "lazarus". > > Regards, > Sven > Exactly ;-)

+1

Marcos Douglas

Reply by email

Marcos Douglas
to Flávio Etrusco: Lazarus could search for a suitable configuration (one pointing to its installation…

2011/9/14 Fl?vio Etrusco :

Show quoted text 26 lines
On Wed, Sep 14, 2011 at 6:33 AM, Martin wrote: > On 14/09/2011 10:05, Sven Barth wrote: >> >> On 14.09.2011 10:54, Martin wrote: >>> >>> Storing config in the app dir IMHO is not a good idea (btw older Lazarus >>> did do that.) >>> Most modern OS have guidelines t say otherwise. >>> >>> On linux users can not write to that Windows it would >>> currently work, because lazarus is nt in "Program Files" folder => once >>> it will be, windows will apply "workarounds" by moving the files to >>> "Program Data" or similar (newer windows only). >>> >>> Backup solutions may not find the data in the prg folder, multi user >>> systems will not work... >> >> I believe he meant extending the name where the configuration is stored... >> e.g. "lazarus0.9" instead of just "lazarus". > > What happens if you upgrade? > Lazarus could search for a suitable configuration (one pointing to its installation directory) and ask the user whether they want to migrate, delete or leave as is the configuration.

x2

Marcos Douglas

Reply by email

Hans-Peter Diettrich
to Flávio Etrusco: On Wed, Sep 14, 2011 at 12:10 AM, Hans-Peter Diettrich I believe this has been discussed…
Show quoted text 16 lines
On Wed, Sep 14, 2011 at 12:10 AM, Hans-Peter Diettrich wrote: > Sven Barth schrieb: > >> 2. Delphi uses the Windows Registry to store its known packages, true, but >> Lazarus basically does the same for its installed packages in its XML files >> that are stored in e.g. %APPDATA%\lazarus or ~/.lazarus. > The difference becomes obvious with multiple Lazarus installations. Where > multiple Delphi versions share packages (causing trouble), every Lazarus > installation must be configured explicitly. > > DoDi > I believe this has been discussed recently, but can't find it right now. I'm willing to write patch, which of these features would be desirable/accepted?

I can't find my preferred solution anywhere :-(

I'd store all configuration data together with the Lazarus binary, i.e. in the Lazarus folder(s), what reduces the need for --pcp to almost zero. Another (common) config only can contain user preferences, nothing about Lazarus installations. Then *commonly usable* packages also can go into that common config, while their binaries still are installation specific - this could become a new Lazarus option.

But I know that I'm quite lost with this model, at least from the core team VP...

DoDi

Reply by email

Hans-Peter Diettrich
to Martin: Storing config in the app dir IMHO is not a good idea (btw older Lazarus did do that.)…
Show quoted text 11 lines
Storing config in the app dir IMHO is not a good idea (btw older Lazarus did do that.) Most modern OS have guidelines t say otherwise. On linux users can not write to that Windows it would currently work, because lazarus is nt in "Program Files" folder => once it will be, windows will apply "workarounds" by moving the files to "Program Data" or similar (newer windows only). Backup solutions may not find the data in the prg folder, multi user systems will not work...

No guideline forbids to have a link to the executable in the user accessible folders.

DoDi

Reply by email