Recent

Author Topic: How to configure Lazarus to Server Client programs  (Read 3090 times)

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • Portfolio
How to configure Lazarus to Server Client programs
« on: August 22, 2017, 06:27:27 pm »
Hi, I am writing some simple server client (zmq) examples using stand-alone programs. For example:

Quote
program MyServer;
begin
  // do server stuff
end;

program MyClient;
begin
  // do client stuff
end;

Is there a way to include two programs in a single project? If not, an alternative is to create two projects and configure a specific build for each one, for example:

1- build program 1.
2- build program 2.
3- execute program 1 (server).
4- execute program 2 (client).

Can you confirm if this type of build is possible and how?
Be mindful and excellent with each other.
https://github.com/cpicanco/

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: How to configure Lazarus to Server Client programs
« Reply #1 on: August 22, 2017, 06:34:22 pm »
You have described the project group feature which is not implemented yet. The only thing you can do for now, is to open lazarus twice (or more times) and have different projects for each instance opened. I usually have them in different desktops as well to avoid confusion.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: How to configure Lazarus to Server Client programs
« Reply #2 on: August 22, 2017, 06:38:47 pm »
using a batch application and lazbuild?

http://wiki.freepascal.org/lazbuild

balazsszekely

  • Guest
Re: How to configure Lazarus to Server Client programs
« Reply #3 on: August 22, 2017, 06:48:06 pm »
There is a ProjectGroup package inside the Component folder. It works well, but is still under development AFAIK. You should give it a try.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: How to configure Lazarus to Server Client programs
« Reply #4 on: August 22, 2017, 06:53:12 pm »
You have described the project group feature which is not implemented yet.

It is implemented, and implemented well.
You have to install the ProjectGroups package to get the benefit of it - the Project menu does not have group functionality in the default Lazarus IDE.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: How to configure Lazarus to Server Client programs
« Reply #5 on: August 22, 2017, 06:55:31 pm »
lazarus version?
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: How to configure Lazarus to Server Client programs
« Reply #6 on: August 22, 2017, 07:26:31 pm »
I'm using 1.8 RC4, but I think the package has been available for quite some time in earlier versions. I don't know if it is in 1.6.0.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: How to configure Lazarus to Server Client programs
« Reply #7 on: August 22, 2017, 09:01:33 pm »
I'm using 1.8 RC4, but I think the package has been available for quite some time in earlier versions. I don't know if it is in 1.6.0.
thank you for the info. I'll test it on 1.6.4 later tonight and see how it goes. It might prove the straw that will make me to jump to newer version of lazarus.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • Portfolio
Re: How to configure Lazarus to Server Client programs
« Reply #8 on: August 22, 2017, 10:07:07 pm »
Thank you guys. I think lazbuild is what I am looking for, but I will give lazprojectgroup a try (guessing it is using lazbuild).
Be mindful and excellent with each other.
https://github.com/cpicanco/

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: How to configure Lazarus to Server Client programs
« Reply #9 on: August 22, 2017, 11:34:32 pm »
You have described the project group feature which is not implemented yet.

It is implemented, and implemented well.
You have to install the ProjectGroups package to get the benefit of it - the Project menu does not have group functionality in the default Lazarus IDE.
OK, first impressions.
1) it is badly designed almost unusable.
 A project group is part of the IDE not simple a list of projects. Opening a project it should automatically open the last active project of the group. not a window with a project list that you can double click to open the project you like.
2) the project group window it should be part of the project inspector or replace the object inspector not a 3rd window that when closed you are left with the active project to work.
3) when a project group is closed all projects in that group are closed as well.
4) when a new project group is created all active projects should be closed or ask the user if he wants to add the active project in the new group if it is not part of the project group it replaces.

It looks like a solid implementation so far but it only supports half the functionality of a project group, but hey I can somehow group projects together at least. I'll not be using it much, mostly because it is just an other layer on top of the existing onion, there is no point in selecting "open project group" to double click the project I want to load, instead of selecting open project and save my self a double click (at least).

Good start never the less.

PS.
 It is part of lazarus 1.6.4 I can't speak of earlier versions.
« Last Edit: August 22, 2017, 11:36:25 pm by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018