Sign in Join

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

Mailing lists / lazarus / 2013-09

Project Group support in the IDE

38 messages · 12 people · –

Reply by email Subscribe to this list Your subscription

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

Graeme Geldenhuys

Hi,

This is probably the single biggest lacking feature of the Lazarus IDE. Is anybody working on implementing Project Groups (like Delphi has had a lifetime ago)?

ps #1:
If this is already in Trunk, then sorry for the noise. My Lazarus is a Trunk checkout from about 2-3 months ago, and it doesn't contain Project Groups support.

ps #2:
I haven't looked at the IDE source recently... If Project Groups are not implement yet, does anybody with the IDE know-how venture to guess how a large or complex task this would be? Off the bat I can't think it is a huge task, so I might try and implement it myself - unless I am missing some non-obvious stumbling block - and hence the reason it has not been implemented to date.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 8 lines
?Graeme?Geldenhuys??hat?am?13.?September?2013?um?12:33?geschrieben: ? ? ?Hi, ? ?This?is?probably?the?single?biggest?lacking?feature?of?the?Lazarus?IDE. ?Is?anybody?working?on?implementing?Project?Groups?(like?Delphi?has?had?a ?lifetime?ago)?

Other "single biggest lacking features" are: docking, android, dyn packages, pkg repository, installer, offline help, ...

?

?ps?#1: ?If?this?is?already?in?Trunk,?then?sorry?for?the?noise.?My?Lazarus?is?a ?Trunk?checkout?from?about?2-3?months?ago,?and?it?doesn't?contain?Project ?Groups?support.

No, it is not implemented yet.

?

Show quoted text 7 lines
?ps?#2: ?I?haven't?looked?at?the?IDE?source?recently...?If?Project?Groups?are?not ?implement?yet,?does?anybody?with?the?IDE?know-how?venture?to?guess?how?a ?large?or?complex?task?this?would?be??Off?the?bat?I?can't?think?it?is?a ?huge?task,?so?I?might?try?and?implement?it?myself?-?unless?I?am?missing ?some?non-obvious?stumbling?block?-?and?hence?the?reason?it?has?not?been ?implemented?to?date.

If you only want one window to easily switch the active project and using that to compile a bunch of projects, then yes, it is easy. If you want to have several projects open at the same time (e.g. for debugging), then it will be a big task.

Mattias

Reply by email

Juha Manninen
to Graeme Geldenhuys: This is probably the single biggest lacking feature of the Lazarus IDE. Is anybody…
Graeme Geldenhuys wrote
This is probably the single biggest lacking feature of the Lazarus IDE. Is anybody working on implementing Project Groups (like Delphi has had a lifetime ago)?

Not actively. Mattias has added references to current project to some places so the code can use them instead of Project1 directly. This is very preliminary though.
Soon a branch for Lazarus 1.2 will be forked. After that trunk would be open for such new big feature.

Show quoted text 5 lines
does anybody with the IDE know-how venture to guess how a large or complex task this would be? Off the bat I can't think it is a huge task, so I might try and implement it myself - unless I am missing some non-obvious stumbling block - and hence the reason it has not been implemented to date.

Unfortunately it is quite a complex task. The biggest challenge is to refactor the code so that Project1 is not referred to directly. A project holds lots of data including session info. A quick search for "Project1" in Lazarus sources gives 846 matches.

Juha

Reply by email

Reinier Olislagers
to Mattias Gaertner: Other "single biggest lacking features" are: docking, android, dyn packages, pkg…
Mattias Gaertner wrote 6 lines
> Graeme Geldenhuys hat am 13. September 2013 um 12:33 geschrieben: > This is probably the single biggest lacking feature of the Lazarus IDE. > Is anybody working on implementing Project Groups (like Delphi has had a > lifetime ago)? Other "single biggest lacking features" are:

;)

offline help, ...

??? Offline help is available+enabled in trunk; chm help is installed by the installer.
See e.g. menu about/help

Different story if you mean other issues such as:
1. the contents themselves which are far from complete
2. some issues such as
2.1 lack of context-sensitive help
2.2 help/about not showing the help files (a patch of mine in bug 24743 that implements part of that was implemented but more is needed) 2.3 no context-sensitive help for controls on forms in the designer

Hint: I could still use help with bug 24743.....

Reply by email

Graeme Geldenhuys
to Mattias Gaertner: Other "single biggest lacking features" are: docking, android, dyn packages, pkg…
Mattias Gaertner wrote
Other "single biggest lacking features" are: docking, android, dyn packages, pkg repository, installer, offline help, ...

:) the every growing to-do list. Sometimes one has to ask why we decided to become programmers. :)

No, it is not implemented yet.

Thanks for the info.

If you only want one window to easily switch the active project and using that to compile a bunch of projects, then yes, it is easy.

Yup, that's all I want for Project Groups. Being able to quickly switch between related projects, do a "build all projects in group" [great for release day], re-order projects in the group, and do a "build projects from here".

All my projects tend to consist of 4+ executables, and the project I work the most on consists of 10+ executables. Doing manual building of projects one-by-one is so labour intensive - hence I have many build scripts. Maintaining those build scripts is a pain too.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Sven Barth
to Mattias Gaertner: Other "single biggest lacking features" are: docking, android, dyn packages, pkg…
Mattias Gaertner wrote 10 lines
> Graeme Geldenhuys hat am 13. September 2013 um 12:33 geschrieben: > > > Hi, > > This is probably the single biggest lacking feature of the Lazarus IDE. > Is anybody working on implementing Project Groups (like Delphi has had a > lifetime ago)? Other "single biggest lacking features" are: (...) dyn packages, (...)

Which requires compiler support first. :)

Regards,
Sven

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys: :) the every growing to-do list. Sometimes one has to ask why we decided to become…
Graeme Geldenhuys wrote 27 lines
On 2013-09-13 11:56, Mattias Gaertner wrote: > > Other "single biggest lacking features" are: docking, android, dyn packages, pkg > repository, installer, offline help, ... :) the every growing to-do list. Sometimes one has to ask why we decided to become programmers. :) > No, it is not implemented yet. Thanks for the info. > If you only want one window to easily switch the active project and using that > to compile a bunch of projects, then yes, it is easy. Yup, that's all I want for Project Groups. Being able to quickly switch between related projects, do a "build all projects in group" [great for release day], re-order projects in the group, and do a "build projects from here". All my projects tend to consist of 4+ executables, and the project I work the most on consists of 10+ executables. Doing manual building of projects one-by-one is so labour intensive - hence I have many build scripts. Maintaining those build scripts is a pain too.

Same here.

At least, having this window would be a very good start. The advanced features could follow later.

But then, Mattias knows this already. I bugged him enough about it :(

Michael.

Reply by email

Graeme Geldenhuys
to Juha Manninen: On Fri, Sep 13, 2013 at 1:33 PM, Graeme Geldenhuys Not actively. Mattias has added…
Juha Manninen wrote
Unfortunately it is quite a complex task. The biggest challenge is to refactor the code so that Project1 is not referred to directly. A project holds lots of data including session info.

Thinking about it a bit more... It might not be as complex - if you only want to be able to switch between grouped projects (exclude Mattias's debugging requirement for now).

For example... Currently only one "active" project is allowed [the reference to Project1]. Well, with grouped projects that would still be true. The Project Group window will simply allow you to switch the active project much easier - a simple double-click.

The other Project Group functionality like compiling all grouped projects would simply mean that the IDE switches the active project by iterating the group list, and then at the end set the active project back to what it was before the "compile all projects" task was run. Loading of each project would do exactly what "Project -> Open Project.." does now.

With this in mind, Project Group functionality could probably be implemented as a Lazarus Add-on - without affecting the lazarus project release cycle.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Mattias Gaertner
to Michael Van Canneyt: Same here. At least, having this window would be a very good start. The advanced features…
?Michael?Van?Canneyt??hat?am?13.?September?2013?um?14:11?geschrieben: [...] ?>>?If?you?only?want?one?window?to?easily?switch?the?active?project?and?using?that ?>>?to?compile?a?bunch?of?projects,?then?yes,?it?is?easy.

Create a new designtime package.
Invent some GUI to load/save/edit groups.

Use LazarusIDE.DoOpenProjectFile to switch project. Use LazarusIDE.DoBuildProject to compile project.

If you need some hooks just ask.

Mattias

Reply by email

Hans-Peter Diettrich
to Graeme Geldenhuys: :) the every growing to-do list. Sometimes one has to ask why we decided to become…
All my projects tend to consist of 4+ executables, and the project I work the most on consists of 10+ executables. Doing manual building of projects one-by-one is so labour intensive - hence I have many build scripts. Maintaining those build scripts is a pain too.

What improvement of that situation do you expect, when the IDE manages the build scripts/projects for you? The IDE has no idea of your problems, causing your intensive labour.

As I see it, it won't be much work to add a project group pane/form to the IDE, and to invoke the build process for all projects listed there. The builds are done by external tools (FPC...) anyway. The really tricky part IMO would be the handling of the messages, returned from the various build processes.

In the simplest case a click on such a message then should make the IDE load the related project, before proceeding with the usual handling of such an click. The same handling already were required when a different project is selected from a project group (treeview...).

So IMO all this boils down to a *persistent* list of projects and related messages, that has to be added to the IDE. Where "persistent" means that this list is not affected by loading projects, in detail the project build messages should survive. Eventually the messages display has to be updated (splitted?) into multiple sections, each related to one project in the build group, and updated individually on a compile/build of that related project.

DoDi

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt: Same here. At least, having this window would be a very good start. The advanced features…
Michael Van Canneyt wrote
At least, having this window would be a very good start. The advanced features could follow later.

Exactly. If my theory is correct [see my last post] then it really shouldn't be hard. I'll try and create a Project Groups add-on over the weekend.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Sven Barth
to Graeme Geldenhuys: Thinking about it a bit more... It might not be as complex - if you only want to be able…
Graeme Geldenhuys wrote 24 lines
On 2013-09-13 12:03, Juha Manninen wrote: > Unfortunately it is quite a complex task. The biggest challenge is to > refactor the code so that Project1 is not referred to directly. > A project holds lots of data including session info. Thinking about it a bit more... It might not be as complex - if you only want to be able to switch between grouped projects (exclude Mattias's debugging requirement for now). For example... Currently only one "active" project is allowed [the reference to Project1]. Well, with grouped projects that would still be true. The Project Group window will simply allow you to switch the active project much easier - a simple double-click. The other Project Group functionality like compiling all grouped projects would simply mean that the IDE switches the active project by iterating the group list, and then at the end set the active project back to what it was before the "compile all projects" task was run. Loading of each project would do exactly what "Project -> Open Project.." does now. With this in mind, Project Group functionality could probably be implemented as a Lazarus Add-on - without affecting the lazarus project release cycle.

Each project has its own session information => the source editor tabs would switch each time the project switches during a group compilation.

In that case group project needs to be a project as well (with session information which "overrides" the single project's session information) and during group compilation the changing of source editor tabs needs to be blocked (don't know whether that is currently possible).

Regards,
Sven

Reply by email

Mattias Gaertner
to Sven Barth
Show quoted text 9 lines
?Sven?Barth??hat?am?13.?September?2013?um?14:43?geschrieben: [...] ?Each?project?has?its?own?session?information?=>?the?source?editor?tabs? ?would?switch?each?time?the?project?switches?during?a?group?compilation. ? ?In?that?case?group?project?needs?to?be?a?project?as?well?(with?session? ?information?which?"overrides"?the?single?project's?session?information)? ?and?during?group?compilation?the?changing?of?source?editor?tabs?needs?to? ?be?blocked?(don't?know?whether?that?is?currently?possible).

Yes, the I in IDE is the big task.

Mattias

Reply by email

Marc Santhoff
to Michael Van Canneyt: Same here. At least, having this window would be a very good start. The advanced features…
Michael Van Canneyt wrote 27 lines
On Fri, 13 Sep 2013, Graeme Geldenhuys wrote: > On 2013-09-13 11:56, Mattias Gaertner wrote: >> No, it is not implemented yet. > > Thanks for the info. > > >> If you only want one window to easily switch the active project and using that >> to compile a bunch of projects, then yes, it is easy. > > Yup, that's all I want for Project Groups. Being able to quickly switch > between related projects, do a "build all projects in group" [great for > release day], re-order projects in the group, and do a "build projects > from here". > > All my projects tend to consist of 4+ executables, and the project I > work the most on consists of 10+ executables. Doing manual building of > projects one-by-one is so labour intensive - hence I have many build > scripts. Maintaining those build scripts is a pain too. Same here. At least, having this window would be a very good start. The advanced features could follow later.

Curiously asked: could a package and lazbuild be used for this task?

I don't know if packages can handle bulding executables. Maybe it would be easy to extend it doing a lot less work than having to write a GUI and lazarus extension for it.

If I'm doing releases having to start lazarus, finding and opening the project, setting some config values, would all be far to many actions. I really prefer using makefiles or something similar. Using lazbuild would have the advnatage of being able to have the makefiles holding anything needed (compiler switches, etc.) generated.

Marc

Marc Santhoff

Reply by email

Mattias Gaertner
to Marc Santhoff
Show quoted text 30 lines
On Fr, 2013-09-13 at 14:11 +0200, Michael Van Canneyt wrote: > > On Fri, 13 Sep 2013, Graeme Geldenhuys wrote: > > > On 2013-09-13 11:56, Mattias Gaertner wrote: > >> No, it is not implemented yet. > > > > Thanks for the info. > > > > > >> If you only want one window to easily switch the active project and using that > >> to compile a bunch of projects, then yes, it is easy. > > > > Yup, that's all I want for Project Groups. Being able to quickly switch > > between related projects, do a "build all projects in group" [great for > > release day], re-order projects in the group, and do a "build projects > > from here". > > > > All my projects tend to consist of 4+ executables, and the project I > > work the most on consists of 10+ executables. Doing manual building of > > projects one-by-one is so labour intensive - hence I have many build > > scripts. Maintaining those build scripts is a pain too. > > Same here. > > At least, having this window would be a very good start. > The advanced features could follow later. Curiously asked: could a package and lazbuild be used for this task?

lazbuild can compile a project, but error messages might be misunderstood by the IDE.

I don't know if packages can handle bulding executables.

Yes.
But packages lack some features, so you have to do more manual work.

Maybe it would be easy to extend it doing a lot less work than having to write a GUI and lazarus extension for it.

That would only work if all projects use the same settings for all packages.

Show quoted text 5 lines
If I'm doing releases having to start lazarus, finding and opening the project, setting some config values, would all be far to many actions. I really prefer using makefiles or something similar. Using lazbuild would have the advnatage of being able to have the makefiles holding anything needed (compiler switches, etc.) generated.

AFAIK project groups is mostly a GUI feature. Compiling a bunch of projects with lazbuild works since years.

Mattias

Reply by email

Graeme Geldenhuys
to Marc Santhoff: Curiously asked: could a package and lazbuild be used for this task? I don't know if…
Marc Santhoff wrote
If I'm doing releases having to start lazarus, finding and opening the project, setting some config values, would all be far to many actions. I really prefer using makefiles or something similar.

To be honest... I find the Lazarus way of doing things - especially for switching between debug and release builds pretty horrific. What I do is use Lazarus for development (mostly) - thus debug builds. I then switch to MSEide to do release builds. MSEide allows switching build modes much easier, and guarantees that ALL units (including external frameworks, components etc) involved in the project share the same compiler settings.

At the moment I'm not so concerned about release builds, but rather to speed up the way I work with parts of a large project.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 11 lines
On 2013-09-14 04:24, Marc Santhoff wrote: > If I'm doing releases having to start lazarus, finding and opening the > project, setting some config values, would all be far to many actions. I > really prefer using makefiles or something similar. To be honest... I find the Lazarus way of doing things - especially for switching between debug and release builds pretty horrific. What I do is use Lazarus for development (mostly) - thus debug builds. I then switch to MSEide to do release builds. MSEide allows switching build modes much easier, and guarantees that ALL units (including external frameworks, components etc) involved in the project share the same compiler settings.

At Pascon 2013, I've seen the latest addition to building in Lazarus, and it is more easy to switch modes now than in Delphi. Just select a dropdown next to the Run toolbutton...

Michael.

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote
At Pascon 2013, I've seen the latest addition to building in Lazarus, and it is more easy to switch modes now than in Delphi. Just select a dropdown next to the Run toolbutton...

Good to know... I'll recompile Lazarus IDE and take a look. My current IDE build is 3 months old.

Does the latest changes also adjust the compiler settings for Packages used by your project?

This is a major issue for me with Lazarus Packages. What's the point in having debug build units for tiOPF, fpGUI, Synapse, Onguard etc... and only the Project units are release build. Compiling *all* source code involved in a project with optimised settings make a big difference to executable size, speed optimisation, debugging etc.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 18 lines
On 2013-09-14 13:32, Michael Van Canneyt wrote: > > At Pascon 2013, I've seen the latest addition to building in Lazarus, > and it is more easy to switch modes now than in Delphi. > Just select a dropdown next to the Run toolbutton... Good to know... I'll recompile Lazarus IDE and take a look. My current IDE build is 3 months old. Does the latest changes also adjust the compiler settings for Packages used by your project? This is a major issue for me with Lazarus Packages. What's the point in having debug build units for tiOPF, fpGUI, Synapse, Onguard etc... and only the Project units are release build. Compiling *all* source code involved in a project with optimised settings make a big difference to executable size, speed optimisation, debugging etc.

The same is true in Delphi, I wouldn't have it any other way. Each package should have its own settings, mixing them makes no sense.

Michael.

Reply by email

Mattias Gaertner
to Graeme Geldenhuys: Good to know... I'll recompile Lazarus IDE and take a look. My current IDE build is 3…
[...] Does the latest changes also adjust the compiler settings for Packages used by your project?

Yes, via 'additions and overrides'.

Show quoted text 5 lines
This is a major issue for me with Lazarus Packages. What's the point in having debug build units for tiOPF, fpGUI, Synapse, Onguard etc... and only the Project units are release build. Compiling *all* source code involved in a project with optimised settings make a big difference to executable size, speed optimisation, debugging etc.

What is difference between "major issue" and "single biggest lacking feature"? ;)

Mattias

Reply by email

Marc Santhoff
to Mattias Gaertner: On Sat, 14 Sep 2013 05:24:21 +0200 lazbuild can compile a project, but error messages…
Mattias Gaertner wrote 36 lines
On Sat, 14 Sep 2013 05:24:21 +0200 Marc Santhoff wrote: > On Fr, 2013-09-13 at 14:11 +0200, Michael Van Canneyt wrote: > > > > On Fri, 13 Sep 2013, Graeme Geldenhuys wrote: > > > > > On 2013-09-13 11:56, Mattias Gaertner wrote: > > > >> No, it is not implemented yet. > > > > > > Thanks for the info. > > > > > > > > >> If you only want one window to easily switch the active project and using that > > >> to compile a bunch of projects, then yes, it is easy. > > > > > > Yup, that's all I want for Project Groups. Being able to quickly switch > > > between related projects, do a "build all projects in group" [great for > > > release day], re-order projects in the group, and do a "build projects > > > from here". > > > > > > All my projects tend to consist of 4+ executables, and the project I > > > work the most on consists of 10+ executables. Doing manual building of > > > projects one-by-one is so labour intensive - hence I have many build > > > scripts. Maintaining those build scripts is a pain too. > > > > Same here. > > > > At least, having this window would be a very good start. > > The advanced features could follow later. > > Curiously asked: could a package and lazbuild be used for this task? lazbuild can compile a project, but error messages might be misunderstood by the IDE.

OK, as I wrote, for releases and similar I prefer console or xterm. And having things scriptable allows for including configuration files (e.g. serial number).

> I don't know if packages can handle bulding executables. Yes. But packages lack some features, so you have to do more manual work.

Can you name those missing features or give an example?

Show quoted text 6 lines
> Maybe it would > be easy to extend it doing a lot less work than having to write a GUI > and lazarus extension for it. That would only work if all projects use the same settings for all packages.

Would it be possible to use "makefile chaining"?

What I want to say is:
If a subdirectory has it's own makefile[.fpc], use that one instead of doing a normal build?

The chained makefiles would have to be named explicitely or detected while generating a makefile using lazbuild, though.

Show quoted text 8 lines
> If I'm doing releases having to start lazarus, finding and opening the > project, setting some config values, would all be far to many actions. I > really prefer using makefiles or something similar. Using lazbuild would > have the advnatage of being able to have the makefiles holding anything > needed (compiler switches, etc.) generated. AFAIK project groups is mostly a GUI feature. Compiling a bunch of projects with lazbuild works since years.

I think my idea of project groups is far away from reality,. ;)

From reading Graeme's mail it looked like he wanted to simplify the

build process in the scope of one project having multiple exe files, where all of those exe files can have different compiler options on the depencies and he wants to build with -B.

The idea was to let lazbuild or lazarus generate the makefile for each exe or subproject (e.g. database framework) and at maximum have to write one master makefile chaining them together.

That's why I'm thinking about it, as said I often have to compile in serial number and other items indvidually per customer. So I'm doing a lot of scripting and a lot of scritpting documention. Optimizing this process by wrtiting less extra scripts and stuff is very attractive.

Marc Santhoff

Reply by email

Marc Santhoff
to Graeme Geldenhuys: To be honest... I find the Lazarus way of doing things - especially for switching between…
Graeme Geldenhuys wrote 14 lines
On 2013-09-14 04:24, Marc Santhoff wrote: > If I'm doing releases having to start lazarus, finding and opening the > project, setting some config values, would all be far to many actions. I > really prefer using makefiles or something similar. To be honest... I find the Lazarus way of doing things - especially for switching between debug and release builds pretty horrific. What I do is use Lazarus for development (mostly) - thus debug builds. I then switch to MSEide to do release builds. MSEide allows switching build modes much easier, and guarantees that ALL units (including external frameworks, components etc) involved in the project share the same compiler settings. At the moment I'm not so concerned about release builds, but rather to speed up the way I work with parts of a large project.

Can you please explain to a person never having used any Delphi with version numbers above 3 what exactly those project groups are doing? Meanwhile I think I totally misunderstood your target.

Can project groups build multiple projects all having their own compiler settings?

And why would you want to recompile all project when not doing a release, do you want to force the dependency packages to be rebuilt or what else?

Marc Santhoff

Reply by email

Sven Barth
to Marc Santhoff
Marc Santhoff wrote 19 lines
On Sa, 2013-09-14 at 13:19 +0100, Graeme Geldenhuys wrote: > On 2013-09-14 04:24, Marc Santhoff wrote: >> If I'm doing releases having to start lazarus, finding and opening the >> project, setting some config values, would all be far to many actions. I >> really prefer using makefiles or something similar. > > To be honest... I find the Lazarus way of doing things - especially for > switching between debug and release builds pretty horrific. What I do is > use Lazarus for development (mostly) - thus debug builds. I then switch > to MSEide to do release builds. MSEide allows switching build modes much > easier, and guarantees that ALL units (including external frameworks, > components etc) involved in the project share the same compiler settings. > > At the moment I'm not so concerned about release builds, but rather to > speed up the way I work with parts of a large project. Can you please explain to a person never having used any Delphi with version numbers above 3 what exactly those project groups are doing? Meanwhile I think I totally misunderstood your target.

A project groups allow you to have multiple projects (packages, libraries, executables) inside one project. The IDE shows you a flat tree of your projects whereby one project is the active one (that one will be used by "run", "compile", etc. shortcuts. You can compile inactive projects by selecting the approbiate menu item ("compile" or "build") from the context menu of the project. Switching the project simply involves double clicking another project whereby the open source editor files are not changed(!).

Can project groups build multiple projects all having their own compiler settings?

Yes. They are all basically independant projects that happen to be grouped together (but see below for an addendum).

And why would you want to recompile all project when not doing a release, do you want to force the dependency packages to be rebuilt or what else?

Using group projects you can define dependencies between projects. E.g. you could have a package which contains shared units and one library and two executables. The latter three all need the first one and one of the two executables also needs the library to run. So you can set up the dependencies accordingly and the IDE will ensure that each needed project is recompiled if you compile one.

Note: The package dependency case is already solved by Lazarus in a different way.

Regards,
Sven

Reply by email

Marc Santhoff
to Sven Barth
Sven Barth wrote 29 lines
On 14.09.2013 18:54, Marc Santhoff wrote: > On Sa, 2013-09-14 at 13:19 +0100, Graeme Geldenhuys wrote: >> On 2013-09-14 04:24, Marc Santhoff wrote: >>> If I'm doing releases having to start lazarus, finding and opening the >>> project, setting some config values, would all be far to many actions. I >>> really prefer using makefiles or something similar. >> >> To be honest... I find the Lazarus way of doing things - especially for >> switching between debug and release builds pretty horrific. What I do is >> use Lazarus for development (mostly) - thus debug builds. I then switch >> to MSEide to do release builds. MSEide allows switching build modes much >> easier, and guarantees that ALL units (including external frameworks, >> components etc) involved in the project share the same compiler settings. >> >> At the moment I'm not so concerned about release builds, but rather to >> speed up the way I work with parts of a large project. > > Can you please explain to a person never having used any Delphi with > version numbers above 3 what exactly those project groups are doing? > Meanwhile I think I totally misunderstood your target. A project groups allow you to have multiple projects (packages, libraries, executables) inside one project. The IDE shows you a flat tree of your projects whereby one project is the active one (that one will be used by "run", "compile", etc. shortcuts. You can compile inactive projects by selecting the approbiate menu item ("compile" or "build") from the context menu of the project. Switching the project simply involves double clicking another project whereby the open source editor files are not changed(!).

I see. So it is possible to change a basic file that is a dependency of the active project, compile and test and additionally have a quick check if the other dependent projects compile ok without having to run a set of unit tests or switch projects. Or prepare a freshly compiled tool programm from another project needed for work anyhow. And more use cases ...

Show quoted text 16 lines
> Can project groups build multiple projects all having their own compiler > settings? Yes. They are all basically independant projects that happen to be grouped together (but see below for an addendum). > And why would you want to recompile all project when not doing a > release, do you want to force the dependency packages to be rebuilt or > what else? Using group projects you can define dependencies between projects. E.g. you could have a package which contains shared units and one library and two executables. The latter three all need the first one and one of the two executables also needs the library to run. So you can set up the dependencies accordingly and the IDE will ensure that each needed project is recompiled if you compile one.

OK very clear explanation, thank you.

Marc Santhoff

Reply by email

Martin
to Sven Barth: A project groups allow you to have multiple projects (packages, libraries, executables)…
Sven Barth wrote 15 lines
A project groups allow you to have multiple projects (packages, libraries, executables) inside one project. The IDE shows you a flat tree of your projects whereby one project is the active one (that one will be used by "run", "compile", etc. shortcuts. You can compile inactive projects by selecting the approbiate menu item ("compile" or "build") from the context menu of the project. Switching the project simply involves double clicking another project whereby the open source editor files are not changed(!). > Can project groups build multiple projects all having their own compiler > settings? Yes. They are all basically independant projects that happen to be grouped together (but see below for an addendum).

If there are independent, then I would expect each one to have a session of which units are open in the editor(s).
I would also expect to be able to open then outside the group, which would require the session info.

If they have that info, what happens to it, when you open a project, as you described, without changing the files open in the editor?

And: Can ONE project be in more than one group?

Reply by email

Graeme Geldenhuys
to Mattias Gaertner: On Sat, 14 Sep 2013 13:40:53 +0100 Yes, via 'additions and overrides'. What is difference…
Mattias Gaertner wrote
Yes, via 'additions and overrides'.

Fantastic, thanks for letting me know. I'll give the latest Lazarus a try.

What is difference between "major issue" and "single biggest lacking feature"? ;)

For one I have a usable work-around, the other one I don't. :)

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Graeme Geldenhuys
to Marc Santhoff: Can you please explain to a person never having used any Delphi with version numbers…
Marc Santhoff wrote
Can you please explain to a person never having used any Delphi with version numbers above 3 what exactly those project groups are doing?

Sven pretty much answered all you asked.

Project Groups are very useful and very often used in the Delphi IDE environment. eg: Say you are building a simple 3-tier application. You will at least need a Client project and the Application Server project. You will often switch between these two... eg: You need some functionality in your client, but before you can code it, the Application Server project needs to be extended so you can query and retrieve the correct data.

Another example... more in line with the project I am currently working on. I would like a project group for my client, because the single project consists of about 8 sub-projects. A Admin program, Setup Program, Custom Installer, Application Server, Thin Client program and 4 CGI applications. Together they make up the one project - switching between them is currently a real pain, and time consuming with Lazarus IDE.

The "Project Group" window in Delphi has many context sensitive popup menu options. Things like "Build All Projects in Group", Re-order projects, "Build All From Here", "Add existing project to group", "Add new project to group" etc etc.

Can project groups build multiple projects all having their own compiler settings?

Yes.

And why would you want to recompile all project when not doing a release,

One common reason is: You could have had shared units between all projects in the group. The shared unit changed, so you need to rebuild all the projects to use the latest code.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Graeme Geldenhuys
to Marc Santhoff: Can you please explain to a person never having used any Delphi with version numbers…
Marc Santhoff wrote
Can you please explain to a person never having used any Delphi with version numbers above 3 what exactly those project groups are doing?

A picture is worth a thousand words. Here is a screenshot of a project group in one of tiOPF's demos. The demo consists of 8 individual projects, but the are all related to a single demo. In this case a n-tier project.

See attached screenshot.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -------------- next part -------------- A non-text attachment was scrubbed... Name: project_manager_delphi7.png Type: image/png Size: 8538 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130914/2b1caa5b/attachment.png>

Reply by email

Sven Barth
to Martin: If there are independent, then I would expect each one to have a session of which units…
Martin wrote 24 lines
On 14/09/2013 18:01, Sven Barth wrote: > > A project groups allow you to have multiple projects (packages, > libraries, executables) inside one project. The IDE shows you a flat > tree of your projects whereby one project is the active one (that one > will be used by "run", "compile", etc. shortcuts. You can compile > inactive projects by selecting the approbiate menu item ("compile" or > "build") from the context menu of the project. Switching the project > simply involves double clicking another project whereby the open > source editor files are not changed(!). > >> Can project groups build multiple projects all having their own compiler >> settings? > > Yes. They are all basically independant projects that happen to be > grouped together (but see below for an addendum). If there are independent, then I would expect each one to have a session of which units are open in the editor(s). I would also expect to be able to open then outside the group, which would require the session info. If they have that info, what happens to it, when you open a project, as you described, without changing the files open in the editor?

In the Delphi IDE the session info is coupled to the "main project" which can either be a single project or a project group. In the latter case the session info of the project group as a whole is used instead of the session info of the single projects if it has any.

And: Can ONE project be in more than one group?

Yes.

Regards,
Sven

Reply by email

Mattias Gaertner
to Marc Santhoff: OK, as I wrote, for releases and similar I prefer console or xterm. And having things…
Show quoted text 10 lines
?Marc?Santhoff??hat?am?14.?September?2013?um?18:48?geschrieben: [...] ?>?>?Curiously?asked:?could?a?package?and?lazbuild?be?used?for?this?task? ?>? ?>?lazbuild?can?compile?a?project,?but?error?messages?might?be ?>?misunderstood?by?the?IDE. ? ?OK,?as?I?wrote,?for?releases?and?similar?I?prefer?console?or?xterm.?And ?having?things?scriptable?allows?for?including?configuration?files?(e.g. ?serial?number).

Maybe I was not clear:
You can perfectly compile projects with lazbuild in terminal. And it is possible to call lazbuild as an external tool from the IDE to compile a bunch of projects. This would allow to compile projects without switching the active IDE project.
But if there is an error message the IDE interprets the messages using the settings of the active project, which might lead to confusion.

??

Show quoted text 6 lines
?>?>?I?don't?know?if?packages?can?handle?bulding?executables.? ?>? ?>?Yes. ?>?But?packages?lack?some?features,?so?you?have?to?do?more?manual?work. ? ?Can?you?name?those?missing?features?or?give?an?example?

For example linker options, creating the application bundle, the windows manifest file, updating the .res, which contains the version, language, copyright and other information under Windows, the program icon.

?

Show quoted text 12 lines
?>?>?Maybe?it?would ?>?>?be?easy?to?extend?it?doing?a?lot?less?work?than?having?to?write?a?GUI ?>?>?and?lazarus?extension?for?it. ?>? ?>?That?would?only?work?if?all?projects?use?the?same?settings?for?all ?>?packages. ? ?Would?it?be?possible?to?use?"makefile?chaining"? ? ?What?I?want?to?say?is: ?If?a?subdirectory?has?it's?own?makefile[.fpc],?use?that?one?instead?of ?doing?a?normal?build?

Yes, you can call 'make' instead of the compiler. The IDE uses that too. Just put it into the compiler options.

?

Show quoted text 18 lines
?The?chained?makefiles?would?have?to?be?named?explicitely?or?detected ?while?generating?a?makefile?using?lazbuild,?though. ? ?>?>?If?I'm?doing?releases?having?to?start?lazarus,?finding?and?opening?the ?>?>?project,?setting?some?config?values,?would?all?be?far?to?many?actions.?I ?>?>?really?prefer?using?makefiles?or?something?similar.?Using?lazbuild?would ?>?>?have?the?advnatage?of?being?able?to?have?the?makefiles?holding?anything ?>?>?needed?(compiler?switches,?etc.)?generated. ?>? ?>?AFAIK?project?groups?is?mostly?a?GUI?feature.?Compiling?a?bunch?of ?>?projects?with?lazbuild?works?since?years. ? ?I?think?my?idea?of?project?groups?is?far?away?from?reality,.?;) ? ?>From?reading?Graeme's?mail?it?looked?like?he?wanted?to?simplify?the ?build?process?in?the?scope?of?one?project?having?multiple?exe?files, ?where?all?of?those?exe?files?can?have?different?compiler?options?on?the ?depencies?and?he?wants?to?build?with?-B.

The -B is automatically done by the IDE and lazbuild. Compiling one project with different compiler settings can be done by switching build modes and compiling via lazbuild or the IDE.

?

?The?idea?was?to?let?lazbuild?or?lazarus?generate?the?makefile?for?each ?exe?or?subproject?(e.g.?database?framework)?and?at?maximum?have?to?write ?one?master?makefile?chaining?them?together.

Yes, that would compile.
But if you call that master makefile from the IDE, the IDE does not know about the different compiler settings and will have trouble understanding the generated error messages.

?

?That's?why?I'm?thinking?about?it,?as?said?I?often?have?to?compile?in ?serial?number?and?other?items?indvidually?per?customer.?So?I'm?doing?a ?lot?of?scripting?and?a?lot?of?scritpting?documention.?Optimizing?this ?process?by?wrtiting?less?extra?scripts?and?stuff?is?very?attractive.

Mattias

Reply by email