Marco van de Voort wrote:
Darius Blaszijk wrote:
[...]
2) Lazarus only supports static packages. So installing a package would always require to recompile Lazarus. I have no idea what the progress on this topic is. Perhaps the wiki has something on it, or someone from core can comment.
See
http://wiki.lazarus.freepascal.org/Lazarus/FPC_Libraries

When the ToDos are solved the IDE can be extended.

I added a few links to FPC wiki sites there.
Well, I have had a think about this library issue a bit further.

What I think we should devise or adapt is something a bit similar to the python/perl library model.

This is what imho we should provide. The ideas are not so new I know:

- provide the ability to package up a directory containing all the
  necessary files, source, docs, tests, examples data etc (ie akin to
  the .deb or .rpm or .zip

- use/extend the existing fpc tools to load the package. They get
  installed into a predefined directory like the /perl/site/lib directory
  in perl.

- within fpc/lazarus, keep either an xml file or a database
  holding names of all the installed packages.

- the tricky bit, is that within the package registration information
  , there is a platform string and a version number somewhere.

- the package name, version and platform, go into the database.

- the compilable source files get compiled at package load time
  and "integrated" into the system for use in the "uses" clause.

- it doesn't matter if the platform is different. The packages
  can be compiled and installed on any platform. (Providing
  they are marked as platform independant in their config
  file)

- at run time, the libraries are kept within a specific directory
  (/site/lib ?) as .dll or .so whatever files. All together with
  all the other libraries. But away from the source files.

- fpc/lazarus uses these library files just as it would
  internal functions...

Summary...

Maybe we already have some of the parts of this already.

It would be good to have something that works as simply as this.

Yes, I might be able to help with making it work if people want to go this way.

David






Reply via email to