efl-mono: Add support for dotnet core
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Wed, 16 Jan 2019 07:29:56 +0000 (16:29 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Fri, 8 Mar 2019 11:49:37 +0000 (20:49 +0900)
commit3e91f331403e8075e1be8f62362b889df78fc376
treec51a8c3bd2d6f0706594b4cf3c73b104202f1ad3
parent16785eab85e6deb94fc5cd9dbacdccb5e3d68605
efl-mono: Add support for dotnet core

Summary:
This commits adds dotnet as a supported C# platform for EFL# bindings.

Due to differences between Mono and Dotnet regarding DllImport, the
bindings now are using an imperative approach to load the function
pointers through the NativeModule and FunctionWrapper classes. These
classes handle the dlopen/LoadLibrary and dlsym/GetProcAddress calls.

Also, the previous caching of non-owned strings returned to native code
was removed until further memory checks.

We also had to create workaround for bool and chars in Structs for C#
marshaling. Going through System.Byte instead and Marshaling manually
to their respective types.

In order to actually build efl_mono.dll with dotnet right now,
issue #4782 from Meson should be fixed to make it properly detect and
used the Dotnet compiler. Also use "-Ddotnet=true" when running meson.

Fixes T7394

Reviewers: felipealmeida, vitor.sousa, bu5hm4n

Reviewed By: vitor.sousa

Subscribers: cedric

Tags: #efl

Maniphest Tasks: T7394

Differential Revision: https://phab.enlightenment.org/D8069
36 files changed:
src/Makefile_Efl_Mono.am
src/bin/eolian_mono/eolian/mono/events.hh
src/bin/eolian_mono/eolian/mono/function_definition.hh
src/bin/eolian_mono/eolian/mono/function_pointer.hh
src/bin/eolian_mono/eolian/mono/function_registration.hh
src/bin/eolian_mono/eolian/mono/klass.hh
src/bin/eolian_mono/eolian/mono/marshall_annotation.hh
src/bin/eolian_mono/eolian/mono/marshall_type.hh
src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh
src/bin/eolian_mono/eolian/mono/name_helpers.hh
src/bin/eolian_mono/eolian/mono/parameter.hh
src/bin/eolian_mono/eolian/mono/part_definition.hh
src/bin/eolian_mono/eolian/mono/struct_definition.hh
src/bindings/cxx/eina_cxx/eina_variant.hh
src/bindings/mono/efl_mono/efl_all.cs
src/bindings/mono/efl_mono/efl_libs.cs.in
src/bindings/mono/eina_mono/eina_common.cs
src/bindings/mono/eina_mono/eina_container_common.cs
src/bindings/mono/eina_mono/eina_hash.cs
src/bindings/mono/eina_mono/eina_inarray.cs
src/bindings/mono/eo_mono/FunctionWrapper.cs [new file with mode: 0644]
src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs [new file with mode: 0644]
src/bindings/mono/eo_mono/FunctionWrapper_Windows.cs [new file with mode: 0644]
src/bindings/mono/eo_mono/NativeModule.cs [new file with mode: 0644]
src/bindings/mono/eo_mono/NativeModule_Unix.cs [new file with mode: 0644]
src/bindings/mono/eo_mono/NativeModule_Windows.cs [new file with mode: 0644]
src/bindings/mono/eo_mono/iwrapper.cs
src/bindings/mono/eo_mono/meson.build
src/bindings/mono/eo_mono/workaround.cs
src/bindings/mono/meson.build
src/lib/eolian_cxx/grammar/klass_def.hpp
src/tests/efl_mono/Eo.cs
src/tests/efl_mono/dummy_test_object.eo
src/tests/efl_mono/efl-mono-suite.runtimeconfig.json [new file with mode: 0644]
src/tests/efl_mono/libefl_mono_native_test.c
src/tests/efl_mono/meson.build