Sign in Join

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

Mailing lists / lazarus / 2013-07

Package main source on project lpr

8 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Fabio Luis Girardi

Hi to everybody!

A friend are working in redesigning all PascalSCADA packages, with the main target to remove all graphical dependencies, to make it usable on console applications and service applications. Talking with he, we have a question:

Why Lazarus includes on the project LPR the main source of each package used instead of only add the package path to the project unit path and the unit of the used component to the uses clause of respective form/datamodule?

E.g: If I include any component of the package pascalscada_hmi.lpk, the source pascalscada_hmi.pas will be included on project LPR. Why?

The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com

Reply by email

Juha Manninen
to Fabio Luis Girardi
Fabio Luis Girardi wrote 7 lines
Why Lazarus includes on the project LPR the main source of each package used instead of only add the package path to the project unit path and the unit of the used component to the uses clause of respective form/datamodule? E.g: If I include any component of the package pascalscada_hmi.lpk, the source pascalscada_hmi.pas will be included on project LPR. Why?

It should not. You are doing something wrong.
Did you add the package dependency to the project correctly?

Juha

Reply by email

Fabio Luis Girardi
to Juha Manninen

First, package is configured as Design+Runtime, I don't know if this can affect the project.

Second, I'm doing a Drag-and-drop to insert a component in my application. Can I do something wrong doing this process?

2013/7/2 Juha Manninen :

Show quoted text 14 lines
On Tue, Jul 2, 2013 at 5:14 PM, Fabio Luis Girardi wrote: > Why Lazarus includes on the project LPR the main source of each > package used instead of only add the package path to the project unit > path and the unit of the used component to the uses clause of > respective form/datamodule? > > E.g: If I include any component of the package pascalscada_hmi.lpk, > the source pascalscada_hmi.pas will be included on project LPR. Why? It should not. You are doing something wrong. Did you add the package dependency to the project correctly? Juha
The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com

Reply by email

Mattias Gaertner
to Fabio Luis Girardi: Hi to everybody! A friend are working in redesigning all PascalSCADA packages, with the…
Show quoted text 15 lines
Hi to everybody! A friend are working in redesigning all PascalSCADA packages, with the main target to remove all graphical dependencies, to make it usable on console applications and service applications. Talking with he, we have a question: Why Lazarus includes on the project LPR the main source of each package used instead of only add the package path to the project unit path and the unit of the used component to the uses clause of respective form/datamodule? E.g: If I include any component of the package pascalscada_hmi.lpk, the source pascalscada_hmi.pas will be included on project LPR. Why?

This is controlled via the package option / Usage / Add package to uses section.
For example if a package implements a graphic format the package has initialization sections, but the project does not use any package unit directly. In that case the option can be enabled and the IDE adds the package unit to the lpr automatically.

Mattias

Reply by email

Fabio Luis Girardi
to Mattias Gaertner

This looks good!

Thanks for reply Mattias

2013/7/2 Mattias Gaertner :

Show quoted text 33 lines
On Tue, 2 Jul 2013 11:14:04 -0300 Fabio Luis Girardi wrote: > Hi to everybody! > > > A friend are working in redesigning all PascalSCADA packages, with the > main target to remove all graphical dependencies, to make it usable on > console applications and service applications. Talking with he, we > have a question: > > Why Lazarus includes on the project LPR the main source of each > package used instead of only add the package path to the project unit > path and the unit of the used component to the uses clause of > respective form/datamodule? > > E.g: If I include any component of the package pascalscada_hmi.lpk, > the source pascalscada_hmi.pas will be included on project LPR. Why? This is controlled via the package option / Usage / Add package to uses section. For example if a package implements a graphic format the package has initialization sections, but the project does not use any package unit directly. In that case the option can be enabled and the IDE adds the package unit to the lpr automatically. Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com

Reply by email

Michael Schnell
to Fabio Luis Girardi: Hi to everybody! A friend are working in redesigning all PascalSCADA packages, with the…
Fabio Luis Girardi wrote 6 lines
Hi to everybody! A friend are working in redesigning all PascalSCADA packages, with the main target to remove all graphical dependencies, to make it usable on console applications and service applications.

To stay compatible with the existing stuff you need to create a new dedicated value for the "LCLWidgetType" macro that is selectable in the Project Options (using then new "Additions and Overrides" menu.

I once tried to do that (and failed, because the infrastructure is not done appropriately). Right now

- the LCL provides the normal event queue that is necessary for the normal Object pascal "event driven programming" paradigm
- this is not done in a centralized way, but each "LCLWidgetType" has it's own code to implement this
- on top of this, there is another event queue done in the RTL that needs to be synchronized with the GUI event queue

The things that need to get working in a decent non-GUI LCLWidgetType include:
- TTimer
- TThread.Synchronize
- TThread.Queue
- Application.QueuAsyncCall
- Postmessage -> Procedure .... message

I have a testing program that checks if those decently work.

-Michael

Reply by email

Mattias Gaertner
to Michael Schnell
Show quoted text 15 lines
On 07/02/2013 04:14 PM, Fabio Luis Girardi wrote: > Hi to everybody! > > > A friend are working in redesigning all PascalSCADA packages, with the > main target to remove all graphical dependencies, to make it usable on > console applications and service applications. To stay compatible with the existing stuff you need to create a new dedicated value for the "LCLWidgetType" macro that is selectable in the Project Options (using then new "Additions and Overrides" menu. I once tried to do that (and failed, because the infrastructure is not done appropriately). Right now [...] The things that need to get working in a decent non-GUI LCLWidgetType

I think you misunderstood him. He wants to do it properly and redesigns all packages. So, he does not need the NoGUI workaround.

Mattias

Reply by email

Michael Schnell
to Mattias Gaertner
Mattias Gaertner wrote
I think you misunderstood him.

I did understand that he asked about packages. But in fact if he intends to port a GUI base project of any kind to be a program that does not force GUI binding, he should know about the implications.

-Michael

Reply by email