foreigner icon indicating copy to clipboard operation
foreigner copied to clipboard

Improve cross platform build support

Open follower opened this issue 5 years ago • 5 comments

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 avatar Mar 06 '20 15:03 follower

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

follower avatar Mar 07 '20 02:03 follower

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 :)

and3rson avatar Jun 18 '20 08:06 and3rson

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!

follower avatar Jun 22 '20 05:06 follower

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.

and3rson avatar Sep 29 '20 11:09 and3rson

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:

  • https://gitlab.com/RancidBacon/godot-foreigner-export-demo (clearly :D)

  • https://gitlab.com/RancidBacon/godot-wasm-engine (WebAssembly runtime support)

  • https://gitlab.com/RancidBacon/wasm-exploder (View various .wasm file info (built on top of above).)

  • https://rancidbacon.itch.io/wacc-viewer (View "WebAssembly Calling Cards" as example of "sandboxed" WASM with graphical output.)

  • https://rancidbacon.itch.io/the-endov-society (A "game" that uses Epic Online Services for cross-platform up-to 32-player multi-player lobby support + achievements + stats.)

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

  • https://gitlab.com/RancidBacon/epic-online-services-for-godot

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. :)

follower avatar Oct 19 '20 20:10 follower