lispgames / cl-sdl2

Common Lisp bindings for SDL2 using C2FFI.
MIT License
304 stars 82 forks source link

Suggestion: Shipping lib binaries as fallbacks with cl-sdl2 #88

Closed cbaggers closed 6 years ago

cbaggers commented 7 years ago

I'd love to see binaries of the libs for macOS, Windows and perhaps linux[0] shipping with cl-sdl2.

There would be at least: 64bit macOS, 32 & 64bit Windows

They would be set in library.lisp as the last options so libs on the system would take precedence.

The goal is to ease more users into the lisp game making world. People who are coming to lisp are often excited about the kinds of cools things folks people have seen in clinch, xelf and other live systems and are taking a leap into lisp, which for many also means taking a leap into emacs, when they hit the 'some c lib not found' error I've seen people give up.

This addition would be a nice way to ease the process.

[0] linux is a slightly different case as getting libs is so simple & so well understood. However given that the default will be to use the system library I guess this change wouldn't hurt that

rpav commented 7 years ago

Yeah this is a good idea .. and I think photex's original "gamekit" concept with a fully-built batteries-included SBCL+SDL2 and some other stuff might still be an ultimate goal, basically grab the build and go.

I'm not sure how setting up the binary paths works on all platforms, though. In Linux, it more-or-less requires a shell script, Windows really likes the .exe directory, and no idea about OSX. Note this would also want/need to tie into binary builds, since those dll/so would need distributed.

I'm not sure sticking the binaries in the repository is the best idea, but there's nothing stopping e.g. a submodule plus some fancy glue or whatnot for builds. I don't have time to work on this myself, but everyone has commit access ...

cbaggers commented 7 years ago

Cool :) Seems like borodust, I and a few others have some experience with packing these up. The only platform I remember being fiddly was OSX but we already have some code for dealing with that.

Borodust has turned me around to the idea of having the libs as a separate project and using asdf to make sure they get loaded first. I'll do some experiments with this tonight. Maybe this is possible without having to touch cl-sdl2.

Cheers mate

[edit] Did a test with putting the libs for classimp as a separate library and that went well. I'll have a go with SDL2 soon

mfiano commented 6 years ago

Is this still wanted?