[Gambas-user] "User components" replaced by "Libraries" in Gambas 3

Benoît Minisini gambas at ...1...
Sun Apr 25 21:38:19 CEST 2010


> On Sunday 25 April 2010 20:50:38 Benoît Minisini wrote:
> > You have a new tab named "libraries" in the IDE project property dialog.
> > In that tab, you can define a list of gambas executables (*.gambas
> > files) that will be used as libraries.
> > 
> > When adding a library to a project, the IDE will extract from it all the
> > information needed for the automatic completion, as for the normal
> > components.
> > 
> > These libraries will be loaded at program startup by the interpreter
> > exactly like any component written in Gambas.
> 
> This is very good.
> The *.info and *.list files will be included in the library files?

Yes. As soon as some of the project classes are exported, a .info and a .list 
file are generated by the compiler, and these files are included in the 
executable.

The "gba3" command, which creates executable, can now extract file from an 
archive, if you want to check.

For example, do:

$ gba3 -x <executable> .list

to get the .list file.

> 
> > But when running the project normally, the library is searched in the
> > following directory only:
> > - The same directory as the project.
> > - /usr/bin
> > - /bin
> > 
> > So, a Gambas executable that must act as a library for another program
> > must be installed in /bin, /usr/bin, or in the same directory as the
> > program using it.
> 
> I think it is better to look for libraries in the directories listed in
> GB3_LIBRARY_PATH, and if this variable is not defined
> then "/usr/lib/gambas3:/usr/local/lib/gambas3":~/.local/lib/gambas3
> 

I don't want to multiply the directories where libraries must be searched for. 

But I agree that /usr/bin and /bin are not necessarily a good solution. 

As they are libraries, looking inside <gambas installation prefix>/lib/gambas3 
may be a good solution, but Gambas executables are architecture-independant, 
so maybe they should go into <gambas installation prefix>/share?

Something to thing about...

-- 
Benoît Minisini




More information about the User mailing list