Sign in Join

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

Mailing lists / lazarus / 2009-11

run-time vs desgin-time packages

8 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

ik

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 ?

Thanks,

Ido
http://ik.homelinux.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091114/2152355e/attachment.html>

Reply by email

Mattias Gaertner
to ik
Show quoted text 9 lines
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

Mattias

Reply by email

Reimar Grabowski
to ik: I'm trying to explain desgin-time vs run-time packages, and it seems that I don't really…
That much I understand (I hope). However, I can't install run-time packages, so how does Lazarus knows about them ?

Run-time packages do not need to be installed. Just compile the package (Package->Open package file and in the following dialog just click compile). After that you can add your run-time package as a dependency to your project (for example via Project Inspector->add to Project->new requirement).

hih
R.

A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?

Reply by email

Martin
to Mattias Gaertner: On Sat, 14 Nov 2009 17:27:07 +0200 See http://wiki.lazarus.freepascal.org/Lazarus_Packages…
Mattias Gaertner wrote 18 lines
On Sat, 14 Nov 2009 17:27:07 +0200 ik 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

Reply by email

Graeme Geldenhuys
to ik: I'm trying to explain desgin-time vs run-time packages, and it seems that I don't really…

2009/11/14 ik :

That much I understand (I hope). However, I can't install run-time packages, so how does Lazarus knows about them ?

run-time packages do not modify the IDE - no components get install into the IDE's component palette. So you will create a project and simply and that run-time package as a dependency to that project, so that it gets compiled into you project and soon as you open the run-time package and compile it (NOT compile & install, just compile), then Lazarus knows about the package and it will appear as a option in the "dependency list" of other projects.

design-time packages will add a new Property Editor or Component on the component palette of the IDE. It will register components that you can drop on a Form in the Form Designer.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

ik
to Graeme Geldenhuys

?Thanks Graeme, Mattias, Reimar and Martin.

I have wrote about it on my blog:
http://translate.google.com/translate?js=y&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Fidkn.wordpress.com%2F2009%2F11%2F14%2Finstalling-packages%2F&sl=iw&tl=en&history_state0=

Google translate does not translate it properly, but I think you can understand that post more or less :)

Ido
http://ik.homelinux.org/

Graeme Geldenhuys wrote 36 lines
2009/11/14 ik : > > That much I understand (I hope). However, I can't install run-time packages, > so how does Lazarus knows about them ? run-time packages do not modify the IDE - no components get install into the IDE's component palette. So you will create a project and simply and that run-time package as a dependency to that project, so that it gets compiled into you project and used at run-time. As soon as you open the run-time package and compile it (NOT compile & install, just compile), then Lazarus knows about the package and it will appear as a option in the "dependency list" of other projects. design-time packages will add a new Property Editor or Component on the component palette of the IDE. It will register components that you can drop on a Form in the Form Designer. -- Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091115/daec401c/attachment.html>

Reply by email

Mattias Gaertner
to Martin: This link seems to assume that a package is always either design, or runtime or both?…
Show quoted text 21 lines
Mattias Gaertner wrote: > On Sat, 14 Nov 2009 17:27:07 +0200 > ik 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?

Correct.

AFAIK: in delphi you can have the same package as onr runtime, and one design time package.

Same under lazarus. You can duplicate code and write any redundancy you like. But I don't recommend it.

Show quoted text 5 lines
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.

That's possible. But I have hardly seen such duplication.

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.

Then the run time package "provides" the design time package (Package Editor / Options / Provides).

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).

Mattias

Reply by email

Mattias Gaertner
to Graeme Geldenhuys: 2009/11/14 ik : run-time packages do not modify the IDE - no components get install into…
Show quoted text 13 lines
2009/11/14 ik : > > That much I understand (I hope). However, I can't install run-time packages, > so how does Lazarus knows about them ? run-time packages do not modify the IDE - no components get install into the IDE's component palette. So you will create a project and simply and that run-time package as a dependency to that project, so that it gets compiled into you project and used at run-time. As soon as you open the run-time package and compile it (NOT compile & install, just compile), then Lazarus knows about the package and it will appear as a option in the "dependency list" of other projects.

In fact, you don't even need to compile it. Just open the lpk file once.

design-time packages will add a new Property Editor or Component on the component palette of the IDE. It will register components that you can drop on a Form in the Form Designer.

Mattias

Reply by email