[Gambas-user] Sharing libraries across projects : new proposal!
Tobias Boege
taboege at ...626...
Sat Jan 30 21:44:43 CET 2016
On Sat, 30 Jan 2016, Beno??t Minisini wrote:
> Hi,
>
> I'm still thinking about that, especially trying to find the simplest
> solution.
>
Good, I still need it :-) ATM I can continue work by having a copy of the
library in each project that uses it. So we should not rush things. (The
new project also had me experiment with gb.web.form. It's pretty cool and
hopefully we can talk about a WebForm_KeyPress event later on gambas-devel.)
> Here is a new proposal, that requires less changes:
>
> 1) Add a new project option that allows to indicate the library search
> directory at runtime. If specified, the libraries are searched in that
> directory first. (Question: are multiple directories needed?)
>
Should this value be project-specific? I would imagine that I'd install
all Gambas libraries in $HOME/bin or so. When I set the library search
path in my project and give that project to someone else, they still have
to adjust the path (every time they receive a new version).
That would be solved if it was a global option for the interpreter. Do you
think a configuration file for the interpreter is a good idea?
> 2) Elsewhere, the libraries are searched in the same directory than the
> components, '<gambas installation prefix>/lib/gambas3'. The difference
> is that a library has no *.component file, and its name cannot starts
> with "gb.", which is reserved for gambas components.
>
> 3) For backward compatibility, the libraries are finally searched in
> '<gambas installation prefix>/bin'.
>
> 4) At debug time, in the IDE, libraries are searched in the same
> directories, and will be listed in the project configuration dialog to
> be checked (the old specific library tab may be removed).
>
OK.
> 5) The packager will install libraries in '<gambas installation
> prefix>/lib/gambas3', and prevent the use of 'gb.' at the beginning of
> project name.
>
Sounds sensible. Aside from the packager, one would be able to install the
library by just putting an executable archive into the search path, right?
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
More information about the User
mailing list