foreigner icon indicating copy to clipboard operation
foreigner copied to clipboard

Additional documentation examples & example export project

Open follower opened this issue 5 years ago • 3 comments

I'm currently working on:

  • Some additional examples with various shared libraries.

  • An example project to show how to configure export presets & show what additional code is (currently) required for exported Godot+Foreigner applications to work when exported (in order to find included shared libraries).

    The example project also includes the pre-compiled Foreigner shared libraries for Linux, Mac & Win64 so it can also serve as a template project without any compilation necessary.

Currently the main repository for the example project is here:

  • https://gitlab.com/RancidBacon/godot-foreigner-export-demo/

However it turns out the files are too large to be accepted by the GitLab Release pages so...I needed to mirror the project to GitHub in order to attach the exported binaries. :D

The first release--with attached binaries for Linux, Mac & Win64--can be found here:

  • https://github.com/follower/godot-foreigner-export-demo/releases/tag/RELEASE_0_1_0

The v0.1.0 release only includes & tests loading of the Foreigner shared library (with statically linked libffi & other dependencies) which means it serves as a test of correct functionality without the added complication of trying to load additional shared libraries.

follower avatar Jun 15 '20 14:06 follower

New release includes pre-compiled testlib binaries for 3 platforms and includes configuration & helper function to ensure correct paths to shared libraries are found on export:

  • https://github.com/follower/godot-foreigner-export-demo/releases/tag/RELEASE_0_1_2

Thus it now serves as a complete example of how to export a Godot project using Foreigner & third-party libraries successfully.

Also includes a tool script to export binaries automatically.

follower avatar Jun 18 '20 07:06 follower

New release:

  • https://github.com/follower/godot-foreigner-export-demo/releases/tag/RELEASE_0_1_4

Features:

  • No memory leaks! :)

  • Updated to 3.2-ish godot-cpp.

follower avatar Jul 01 '20 00:07 follower

New release:

  • https://github.com/follower/godot-foreigner-export-demo/releases/tag/RELEASE_0_1_5

Features:

  • Updated build & demo of Foreigner with WIP raw pointer manipulation methods: offset(), deref(), memcpy() & string_at().

    This is a first iteration of struct support.

    (Based on: https://github.com/follower/foreigner/tree/wip-poc-feature-buffer-struct)

follower avatar Jul 08 '20 00:07 follower