Sign in Join

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

Mailing lists / lazarus / 2010-09

Optional package dependencies

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Alexander Klenin

I am looking at adding various rendering backends to TAChart, in particular AggPas and OpenGL backends.
To do that, corresponding packages have to be added as requirements for TAChart. However, I'd like those requirements to be optional -- so that TAggPasChartRenderer and TOpenGLChartRenderer components would be
accessible only if AggPas/OpenGL is installed, but the rest of TAChart would be available regardless.
Is there a way to achieve the above?

Alexander S. Klenin
Mattias Gaertner
to Alexander Klenin
Show quoted text 9 lines
I am looking at adding various rendering backends to TAChart, in particular AggPas and OpenGL backends. To do that, corresponding packages have to be added as requirements for TAChart. However, I'd like those requirements to be optional -- so that TAggPasChartRenderer and TOpenGLChartRenderer components would be accessible only if AggPas/OpenGL is installed, but the rest of TAChart would be available regardless. Is there a way to achieve the above?

Not automatically.

BTW, the lazopenglcontext package does not use opengl at designtime.

Mattias

Alexander Klenin
to Mattias Gaertner
Mattias Gaertner wrote 10 lines
On Sat, 4 Sep 2010 21:17:50 +1100 Alexander Klenin wrote: > However, I'd like those requirements > to be optional -- so that TAggPasChartRenderer and > TOpenGLChartRenderer components would be > accessible only if AggPas/OpenGL is installed, but the rest of > TAChart would be available regardless. > Is there a way to achieve the above? Not automatically.

Too bad. The only way I see is to place each renderer in a separate package dependent both on TAChart and a corresponding library.

BTW, the lazopenglcontext package does not use opengl at designtime.

Yes, "OpenGL" above was imprecise word choice on my part.

Alexander S. Klenin
Alexander Klenin
to Alexander Klenin
Alexander Klenin wrote 12 lines
>> However, I'd like those requirements >> to be optional -- so that TAggPasChartRenderer and >> TOpenGLChartRenderer components would be >> accessible only if AggPas/OpenGL is installed, but the rest of >> TAChart would be available regardless. >> Is there a way to achieve the above? > > Not automatically. Too bad. The only way I see is to place each renderer in a separate package dependent both on TAChart and a corresponding library.

I have committed an initial implementation of the AggPas-based drawing backend for TAChart. To avoid TAChart -> AggPas dependency, I did not add TADrawerAggPas unit to the package, which is of course suboptimal. See components/tachart/demo/aggpas for an example.

So, how to proceed? Should I create TAChartAggPasPkg?

Alexander S. Klenin