[Gambas-user] Share code across projects

Tobias Boege taboege at ...626...
Sun Jan 24 17:17:29 CET 2016


Hi everybody,

with the semester break upcoming, I plan to supplement a project of mine
with some other applications in which I want to use classes from the
project. I have not, if memory serves, written any "local" components yet.
By "local" I mean a component which is *not* installed into /usr/lib/gambas3.

>From what I remember from other threads, I could:
  - symlink source files around,
  - copy source files around,
  - install the project to /usr/lib/gambas3, or
  - create a Library.

I don't really want to copy source files as I presume they will change
considerably during development. The symlink solution is kind of dirty and
makes the projects less easy to give to others. I would prefer not to touch
/usr/lib/gambas3 for some private project of very limited scope (i.e. it is
way too specific to lie amongst the general components). As I imagine, using
a library becomes messy, too, if it should be shared by multiple projects.
Also I couldn't really share my project because the library path is absolute
and won't work on somebody else's computer (right?).

How are you others doing this? Did you notice or can you imagine any problems
with your way of doing it? Any arguments in favour of the library approach?

I think a user-specific directory for custom components would be nice. It
would be a standard path relative to a user's home directory which is
taken into account by the IDE (when it lists the installed components) and
the interpreter (when it loads components). Or is that considered a security
risk, Benoit?

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list