and3rson / foreigner

FFI library for Godot, built with GDNative
MIT License
25 stars 4 forks source link

Improve cross platform build support #9

Open follower opened 4 years ago

follower commented 4 years ago

Refactors & extends Makefile to enable building on Mac.

Not yet re-tested on Linux. Still need/plan to do that.

I've got the Foreigner test running successfully on a Mac but it requires 3.1 godot-cpp & some small SConstruct file edits due to a Ref<> bug in godot-cpp 3.2 (Edit: See https://github.com/and3rson/foreigner/issues/10) & older SConstruct file in the 3.1 branch. I hope to document this further later.

I considered moving from Makefile to SConstruct but figured (a) this would be less effort & (b) it would be better to discuss with you first. I suspect scons might make additional platform support easier in future though--given it's used to build godot-cpp itself.

follower commented 4 years ago

Gave this a quick test on Linux and it still seems to work, so going to un-WIP it now.

and3rson commented 4 years ago

Those PRs are totally awesome! Thank you for all the hard work you've been doing!

Would you mind if I added you as a collaborator to this repo? This way you could merge everything in the correct order on your behalf without waiting for my slow-ass reaction :)

follower commented 4 years ago

Yeah, I wouldn't want to have to work out how to merge my tangled web of branches either. ;D

More seriously, I appreciate your positive feedback, thanks! :)

Thanks for the offer to add me as a collaborator, I'm open to you doing that.

I haven't been too concerned about things not being merged yet 'cos I've been off in my own world a bit but certainly the cross-platform build functionality seems to be in a place where it seems beneficial to merge it.

The struct-related stuff I've been doing is still in a bit more of an experimental state and would probably benefit from a second pair of eyes when it's ready anyway but we can cross that bridge when I get to it.

Thanks again for your work for getting Foreigner to the stage where I could build on it--it's been a good base to work on. :)

I'm still really optimistic about what FFI can bring to Godot for integrating with external libraries and without requiring people to write C++ to do it. :)

The struct/buffer functionality has enabled some pretty exciting stuff I'm looking forward to sharing... :)

Thanks for being open to collaborating!

and3rson commented 4 years ago

Hey @follower, sorry for taking sooo much for me to finally remember about giving you permissions. It's been a rough few months. But I've finally did it!

There's been some interest around this library in Godot Discord recently. If you are still interested in maintaining this library, feel free to go ahead! It's my pleasure to give back to the community.

follower commented 4 years ago

finally remember about giving you permissions.

Guess I should go check my email then. :D

And, no worries, I would've pinged you again if necessary. :)

There's been some interest around this library in Godot Discord recently.

Cool! What are people interested in using it with?

still interested in maintaining this library, feel free to go ahead!

I'm definitely still interested in using the library. :D

"Maintenance" seems like a lot of responsibility. ;)

Aside from time, my major hesitation has been that in many places I went for the "hack up something that works" approach, and I'm not sure it's a good idea that anyone else rely on that... :D

But stuff like the build support is probably robust enough.

I'm still/currently using foreigner in a few projects:

The last example is built on top of this (placeholder project):

The major Foreigner-specific addition it has is support for callbacks via a very hacky dynamic library shim. :D Which works but would obviously be better if it was more tightly integrated with Godot.

So, thanks for the update, and, still happy to merge stuff I've done when I have the time/sufficient external motivation. :)