Sign in Join

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

Mailing lists / lazarus / 2011-12

Run-time packages create a register unit

7 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

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

Sven Barth
to ik
ik wrote 6 lines
Hello, I'm creating a run-time package, but it seems that Lazarus also create a register unit with the package itself. Why is that, if I do not wish to register components, but only add units to path, and how can I avoid it ?

This "package unit" is always created, because with that unit all units used by the package can be compiled, so that they don't need to be compiled for each and every project/package which uses them. To avoid that this base unit is included in your project if you use the package you need to uncheck the "include in uses-clause" (or similar) option in the package's options (in trunk version of Lazarus this is already the default).

Regards,
Sven

Reply by email

Mattias Gaertner
to ik: I'm creating a run-time package, but it seems that Lazarus also create a register unit…

ik hat am 22. Dezember 2011 um 11:04 geschrieben:

Show quoted text 7 lines
Hello, I'm creating a run-time package, but it seems that Lazarus also create a register unit with the package itself. Why is that, if I do not wish to register components, but only add units to path, and how can I avoid it ?

?
A package has a main source file, which is used to compile all units of a package.
Since 0.9.31 you can change the name of the main source.? ?
?
Mattias
?

?

?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20111222/2baf4b16/attachment.html>

Reply by email

Unknown author
to Mattias Gaertner
Mattias Gaertner wrote 18 lines
ik hat am 22. Dezember 2011 um 11:04 geschrieben: > > Hello, > > I'm creating a run-time package, but it seems that Lazarus also create a > register unit with the package itself. > Why is that, if I do not wish to register components, but only add units to > path, and how can I avoid it ? ? A package has a main source file, which is used to compile all units of a package. Since 0.9.31 you can change the name of the main source.?

Out of curiosity:

Does the package system check that for a run-time package, none of the units is flagged as a 'Has register procedure' ?

Michael.

Reply by email

ik
to Unknown author

2011/12/22

Show quoted text 32 lines
On Thu, 22 Dec 2011, Mattias Gaertner wrote: > > > > ik hat am 22. Dezember 2011 um 11:04 geschrieben: > > > >> Hello, >> >> I'm creating a run-time package, but it seems that Lazarus also create a >> register unit with the package itself. >> Why is that, if I do not wish to register components, but only add units >> to >> path, and how can I avoid it ? >> > > A package has a main source file, which is used to compile all units of a > package. > Since 0.9.31 you can change the name of the main source. > Out of curiosity: Does the package system check that for a run-time package, none of the units is flagged as a 'Has register procedure' ?

Nop:
https://github.com/ik5/libnotify-fpc/blob/master/packages/libnotify_pkg.lpk

Show quoted text 9 lines
Michael. -- _______________________________________________ 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/20111222/9eeb37a1/attachment.html>

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 10 lines
On Thu, 22 Dec 2011 15:10:47 +0100 (CET) wrote: > [...] > Out of curiosity: > > Does the package system check that for a run-time package, none of the units > is flagged as a 'Has register procedure' ? No.

That's one for the wish-list, then :)

Michael.

Reply by email