Re: [Lazarus] run-time vs desgin-time packages

2009-11-15 Thread Mattias Gaertner
On Sun, 15 Nov 2009 01:17:09 +0200
Graeme Geldenhuys  wrote:

> 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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] run-time vs desgin-time packages

2009-11-15 Thread Mattias Gaertner
On Sat, 14 Nov 2009 17:31:07 +
Martin  wrote:

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

 
> 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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] run-time vs desgin-time packages

2009-11-15 Thread ik
ā€ˇ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/


On Sun, Nov 15, 2009 at 1:17 AM, Graeme Geldenhuys
wrote:

> 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
> Lazarus@lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] run-time vs desgin-time packages

2009-11-14 Thread Graeme Geldenhuys
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
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] run-time vs desgin-time packages

2009-11-14 Thread Martin

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?


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

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] run-time vs desgin-time packages

2009-11-14 Thread Reimar Grabowski
On Sat, 14 Nov 2009 17:27:07 +0200
ik  wrote:

> 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?

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] run-time vs desgin-time packages

2009-11-14 Thread Mattias Gaertner
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

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus