Commit Graph

10 Commits

Author SHA1 Message Date
Lucas Cavalcante de Sousa 4de94638a6 efl-mono: Correctly load dynamic libs for OSX
Summary:
OSX libs end with `.dylib`, so it made failed to load libs, for instance
dl name is `dl.dylib` making it unable to load as it was before
(`libdl.so`).

Test Plan:
Compare with master and note that this diff is able to fail on tests, and
not about importing libs.
- Configure as especified by Enlightenment man page + `-Dbindigns=mono -Ddotnet=true`:
```
meson -Dsystemd=false -Dv4l2=false -Davahi=false -Deeze=false -Dx11=false -Dopengl=full -Dcocoa=true -Dnls=false -Demotion-loaders-disabler=gstreamer1,libvlc,xine -Decore-imf-loaders-disabler=scim,ibus -Dbindigns=cxx,mono -Ddotnet=true --prefix=$PWD/prefix build
```
- Build normally
- Test `efl-mono-suite`

Reviewers: felipealmeida

Reviewed By: felipealmeida

Subscribers: stefan_schmidt, cedric, #reviewers, #committers, woohyun

Tags: #efl, #expertise_solutions

Differential Revision: https://phab.enlightenment.org/D12156
2020-11-25 10:43:47 -03:00
Lauro Moura 81b94b3e35 csharp: Fix passing acessor with ownership
Summary:
When passing an owned acessor from a converted collection we need a way
to unpin the passed data when the accessor is freed.

This commits adds a thin wrapper around the CArray accessor that unpins
the data when freed.

Depends on D10900

Reviewers: YOhoho, felipealmeida

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers, jptiz, brunobelo

Tags: #efl

Maniphest Tasks: T8486

Differential Revision: https://phab.enlightenment.org/D10901
2019-12-18 10:40:53 -03:00
Lauro Moura 77207f9b58 csharp: Fix running headless tests in dotnet
Summary:
CoreCLR, the runtime of dotnet, has some issues regarding storing
environment variables (see dotnet/coreclr issue #15812), keeping them in
a local cache instead of flushing to the native `setenv`.

This commit replaces the usage of
`System.Environment.SetEnvironmentVariable` with a `setenv` wrapper.

Test Plan: Run without DISPLAY set and with dotnet.

Reviewers: felipealmeida, brunobelo, segfaultxavi, YOhoho

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10619
2019-11-07 22:46:15 -03:00
Lauro Moura 17a81bee4a csharp: Revamp dotnet support
Summary:
Instead of building with a patched meson version, make use of custom
targets and generated csproj files so we can used upstream meson
normally.

This avoids digging into "non official" dotnet stuff like calling
the CSC.dll directly that the patched meson tried to do.

To enable, run meson with `-Ddotnet=true`.

Regarding source file dependencies, Meson has a limitation[1]
about generated artifacts being placed in subdirectories.

In order to correctly track these generated artifacts for dotnet, we
generated them in the same folder as the csproj file through
`dotnet build -o`.

Instead of installing the dll like we do for mono, a nupkg is generated
and installed in the same folder as the dll would be
(<prefix>/lib/x86_64-linux-gnu/efl-mono-1)

To avoid messing around with Nupkg caches, we reference the source
project for the library directly instead of the nupkg when building the
test suite.

[1] https://github.com/mesonbuild/meson/issues/2320

Fixes T8168

Reviewers: bu5hm4n, woohyun, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, brunobelo, felipealmeida, segfaultxavi

Tags: #efl, #do_not_merge

Maniphest Tasks: T8168

Differential Revision: https://phab.enlightenment.org/D9717
2019-11-06 11:20:19 -03:00
Yeongjong Lee e6fafe4e61 mono: introduce friend assembly
Summary:
Friend assemblies can access efl_mono assembly's internal types and members.
If `build-tests` option is true, `efl-mono-suite.exe` and `efl_mono_test.dll`
will become friend assemblies.

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: felipealmeida, cedric, #reviewers, woohyun, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10337
2019-10-28 17:46:15 -03:00
Jaehyun Cho 50d318ab13 csharp: rename Factory.cs to ItemFactory.cs
Summary:
Since current Factory.cs contains class ItemFactory, Factory.cs is
renamed to ItemFactory.cs.

Reviewers: lauromoura, YOhoho, SanghyeonLee

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10424
2019-10-16 10:38:01 -03:00
Lauro Moura 40def3eac9 efl-mono: Add Model manual implementation to C# and MVVM factories
Summary: Depends on D9273, D9270

Test Plan: Run added testcases.

Reviewers: cedric, bu5hm4n, zmike, SanghyeonLee, felipealmeida, segfaultxavi

Reviewed By: cedric

Subscribers: cedric

Tags: #expertise_solutions, #efl_language_bindings

Differential Revision: https://phab.enlightenment.org/D8080
2019-08-05 10:18:18 -04:00
Vitor Sousa 1c22a3d819 efl-csharp: fix resource deallocation causing errors everywhere
Summary:
This commit mainly fixes errors caused by deallocating resources in the garbage
collector thread. Using `ecore_main_loop_thread_safe_call_async` to queue
resource deallocation in the main thread seems to solve it.

Also, some `efl_ref` calls are added in places they were missing, mainly
objects that unref in the destructor thus taking ownership if efl_ref is not
called.

Also fix improper resource deallocation in tests that were causing it to crash,
enabling it to call Efl.All.Shutdown again. This allocation and the deallocation
process was moved from the Eo class constructor to static class methods that are
called in the test 'set up' and 'tear down' methods.

Queuing resource deallocation in the main thread make it mandatory that tests
call `Efl.App.AppMain.Iterate()` if they want to check proper resource
deallocation (like TestFunctionPointers.set_callback_inherited_called_from_c).

Extras:
Remove duplicated declaration of 'eflcustomexportsmono' in meson in order to fix
some linking problems.

Remove some unused code around deallocation functions that had to be reworked.

Object allocation is now supplied with the call site information it expects
(file name and line for _efl_add_start).

Depends on D8550

Test Plan: meson test

Reviewers: felipealmeida, lauromoura, cedric, segfaultxavi

Reviewed By: lauromoura

Subscribers: segfaultxavi

Tags: #efl_language_bindings, #do_not_merge

Differential Revision: https://phab.enlightenment.org/D8431
2019-04-05 19:58:19 -03:00
Marcel Hollerbach 6a7c273ec7 csharp: add a interface to start apps
Summary:
until to today you had to call init functions and a run function which
were static function in a class called Efl.Ui.Config.

However, calling those init functions there is not really OOP style.
Right now things have changed into a manner where you are defining you
application class with inheriting from the Application /
SimpleApplication abstract.

This enables you to call launch() on your application class, calling
launch there leads to a call to the args function, you can call and use
the Efl classes in there, everything is booted up.
Option parsing and dependency start can still be done in the main method
or application constructor, just ensure that you never call any efl
class / function outside the launch function.

A commit that demonstrates the usage can be found at

ref T7204

https://git.enlightenment.org/tools/examples.git/log/?h=devs/bu5hm4n/POC

Reviewers: felipealmeida, segfaultxavi, Jaehyun_Cho, cedric

Reviewed By: segfaultxavi

Subscribers: zmike, woohyun, akanad, lauromoura, #reviewers, #committers

Tags: #efl_language_bindings

Maniphest Tasks: T7204

Differential Revision: https://phab.enlightenment.org/D7495
2019-01-16 12:49:47 +01:00
Marcel Hollerbach 6f9761ff54 meson: time for the c-sharp build
The tests are added and build. For running C# code please see the wiki.

you can enable -Dmono=true

Differential Revision: https://phab.enlightenment.org/D7203
2018-10-24 12:05:58 +02:00