[Gambas-user] Sharing libraries across projects : initial implementation
Tobias Boege
taboege at ...626...
Mon Feb 1 16:59:33 CET 2016
On Mon, 01 Feb 2016, Beno??t Minisini wrote:
> Hi,
>
> In revision #7593 you get a new implementation of the library management:
>
> 1) When you create an executable from a library project, a symbolic link
> is created in '~/.local/share/gambas3/lib/<vendor>', where <vendor> is
> the vendor name now defined in the project property dialog, and in the
> packager wizard.
>
> 2) When you want to add a library to a project, the contents of
> '~/.local/share/gambas3/lib' is searched first, and then the contents of
> '<gambas installation root>/lib/gambas3'.
>
> 3) You can define an extra search path for the library in the library
> tab of the project property dialog. At the moment, it is not finished,
> as it overrides '~/.local/share/gambas3/lib/', which it should not.
>
> 4) A project run from its executable never look in
> '~/.local/share/gambas3/lib/'.
>
> 5) You can install different versions of the same library. The library
> executable base name is suffixed with ':' followed by the version
> (without the release number).
>
> 6) The packager is not yet updated. It will follow the scheme defined in 5).
>
> Tell me if it fits your needs again. You have 48 hours, as I leave Paris
> for a week soon.
>
To get it running required me a bit of thinking. My library naturally did
not have a vendor name, so it was created as
Desktop.DataDir &/ "" &/ "lib.gambas"
^-- Vendor
and could not be found by the IDE because it looks only for the vendor
directories under Desktop.DataDir. After I entered a vendor, everything
worked.
No objections to the general structure. It is nice that there is this
standard path in ~/.local/share.
There is one point, however: These automatically created symlinks are a
bit scary. I can imagine moving my whole source tree into another directory
and depending on where I put the real executable archive, the symlink may
be broken. I would like to have a new button on the toolbar which saves the
real library executable archive under
~/.local/share/gambas3/<vendor>/<title>:<version>.gambas
instead of making this a symlink. Also I think I would at some point want
to run my project from an executable. Will there be a way that I can
explicitely tell the interpreter to look in ~/.local/share for libraries?
You see, none of these need the current implementation to be revised but
just a little extended. I'm pretty content already with how it is. Thank
you.
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
More information about the User
mailing list