[Gambas-user] Distribution of custom shared libraries

Tobias Boege taboege at gmail.com
Sun Feb 24 22:42:25 CET 2019


On Sat, 23 Feb 2019, Cedron Dawg wrote:
> I think having a gp.GamePad (or gp.GameDevice, or gp.JoystickDevice, or whatever) would make programming a lot more attractive to the young gamer crowd.  The game I wrote (still thinking of a good name for it) is meant to be a good starter template for beginning programmers to develop their own games.  I'm not a gamer at all, but I thought it was a good project for me to evaluate Gambas' capabilities.  The ease of interfacing to C code is a huge plus for me.
> 

I called it gb.joystick for two reasons: (1) that's what it was already
called on my computer and (2) it uses the Linux Joystick API.

For games, the gb.sdl2 component is probably better suited, it just has
to be developed more. I wrote my joystick component to be able to use a
gamepad for operating an image viewer I wrote, instead of keyboard and
mouse. I didn't want to load gb.sdl(2) just to get input via a gamepad
and otherwise write the application in QT. But SDL has many more things
if you actually want to develop a game, so you're more likely to just
want to use SDL for everything in that case.

> As to the original question, it would be really nice if there were a built in method through the IDE for .c shared libraries.  I would suggest that they get their own category and every library would have to be submitted with a Gambas demo program which shows how the functions are to be used.  Seeing as I only have a vague understanding of the whole packaging process, I haven't a clue how it should be done properly.

I don't know about that. Bundling shared libraries sounds out of scope
for the Gambas packager. The IDE handles Gambas projects, not C source
files. Shipping a custom native library together with a component wrapper
that makes it available to Gambas is not something I have seen someone
doing, but it may be worth looking into.

Regards,
Tobi

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


More information about the User mailing list