[Lazarus] run-time vs desgin-time packages
Martin
lazarus at mfriebe.de
Sat Nov 14 18:31:07 CET 2009
Mattias Gaertner wrote:
> On Sat, 14 Nov 2009 17:27:07 +0200
> ik <idokan at gmail.com> wrote:
>
>
>> Hello,
>>
>> I'm trying to explain desgin-time vs run-time packages, and it seems
>> that I don't really fully understand them myself.
>> Desgin time are packages that changes the IDE or adds components
>> etc... Run-time are used only when compiling the program itself.
>>
>> That much I understand (I hope). However, I can't install run-time
>> packages, so how does Lazarus knows about them ?
>>
>
> See
> http://wiki.lazarus.freepascal.org/Lazarus_Packages#Design_Time_vs_Run_Time_package
>
This link seems to assume that a package is always either design, or
runtime or both?
AFAIK: in delphi you can have the same package as onr runtime, and one
design time package.
That is you have TMyComponent. Instead of having any "if csDesigning in
ComponetFlags" you have a designtime package (containing your
component,with all tghe cdesign code, and maybe prop-editors or the
like) and you have your runtime package, that has the same component,
but without csdesign code.
Now yes: the ide only needs to know about the design package, in order
for you to put the component on your page. => but in this case the IDE
would add the design time package as package/unit requirements to your
project. And it should not. It should add the runtime package instead.
Maybe that is something that can be archive with build-modes? While
compilng the IDE, you use the design-time build mode. While compiling an
application you use the run-time build-mode. (The packages must have the
ppu for both build-modes in it's unit directory).
Martin
More information about the Lazarus
mailing list