[Gambas-user] Sharing libraries across projects

Benoît Minisini gambas at ...1...
Tue Jan 26 01:31:57 CET 2016


Here is a proposal, tell me what you think.

1) When you create a project library, you will have to specify a vendor.

2) When creating the library executable of a library project, a symbolic 
link to the executable will be created in 
'~/.local/share/gambas3/lib/<vendor>'.

3) When another project wants to use that library, it stores in its 
project configuration file the relative path '<vendor>/<library>'. 
Through the symbolic link created in 2), the true library executable 
will be found by the IDE and by the project at runtime.

4) When creating a package of a library, the library executable will be 
installed in '/usr/lib/gambas3/<vendor>' ('/usr/lib/gambas3' is for 
components). Maybe '/usr/share/gambas3/lib/<vendor>' should be better, 
to mimic 2). After all, Gambas libraries are not to be run, and are not 
system shared libraries.

5) When running a project using a library outside of the IDE (i.e. not 
in debugging mode), the project will search its libraries in 
'/usr/lib/gambas3' (or maybe '/usr/share/gambas3/lib'). Never in 
'~/.local/share/gambas3/lib' for security reasons. Tell me if I am 
paranoid here.

6) A project can use a library whose only the executable is installed. 
The IDE must present the user everything it finds in 
'~/.local/share/gambas3/lib' and '/usr/lib/gambas3' sub-directories when 
selecting a library. It will search the '<vendor>/<library>' stored in 
the project configuration file first in '~/.local/share/gambas3/lib', 
then in '/usr/lib/gambas3'.

7) Backward-compatibility. If a project library has no vendor, then the 
old behaviour will be retained:
- No symbolic link is created.
- The project using it stores its absolute path.
- When creating a package, the library executable is stored in the same 
place as normal executables.
- When the project runs outside of the IDE, the library is searched in 
'/bin' and '/usr/bin' only.

I'd like all that stuff as simple as possible. If you can simplify it 
and keep all the features we need, just tell me!

-- 
Benoît Minisini




More information about the User mailing list