summaryrefslogtreecommitdiff
path: root/src/bindings/mono/meson.build (follow)
AgeCommit message (Collapse)Author
2019-12-30csharp: Add StyleCop support to dotnet buildLauro Moura
This patch adds support to run the StyleCop rules. To enable, -Ddotnet=true is needed, You can pass -Ddotnet-stylecop=CAXXXX,CAXXYY where X and Y are digits for CAs or SAs. You can also ask that the CAs and SAs cause errors instead of warnings. Differential Revision: https://phab.enlightenment.org/D10969
2019-12-12csharp: Implement Deconstruct for structs.João Paulo Taylor Ienczak Zanette
Summary: Usage example: ``` var (x, y) = somePos2D; ``` Not available on Mono environment due to [`mcs` not implementing it](https://github.com/mono/mono/blob/a3de0304a190c54124df3486ce9c34b6262787a8/mcs/mcs/tuples.cs#L590). To keep tests from breaking because of it, a `MONO` preprocessor variable is defined and checked during test compilation. Ref T8489. Reviewers: brunobelo, lauromoura, segfaultxavi Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8489 Differential Revision: https://phab.enlightenment.org/D10809
2019-11-06csharp: Revamp dotnet supportLauro Moura
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-01mono: blacklist efl_threadYeongjong Lee
Summary: C# developers are already familar with C# Thread`System.Threading.Thread`, We don't need to provide Wrapped `Efl.Thread` class. Also, we can't ensure compatibility between C# Thread and EFL Thread. Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura, Jaehyun_Cho Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10586
2019-10-31mono: blacklist elm_general.eotYeongjong Lee
Summary: Prevent generating legacy eot.cs Depends on D10580 Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura, Jaehyun_Cho Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10581
2019-08-23csharp: add legacy eo in mono blacklistYeongjong Lee
Summary: It is unnecessary to generate cs file of legacy class. Test Plan: meson setup -Dbindings=mono,cxx Reviewers: felipealmeida, lauromoura Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers, woohyun Tags: #efl Differential Revision: https://phab.enlightenment.org/D9638
2019-08-23eolian-mono: Add support for partial classesFelipe Magno de Almeida
Summary: Add the -p command to eolian to create a class as a partial class. Create a list in meson build of Eolian files that should be built with partial classes. This allows creating more specific method overloads for C#, manually, by generating the class as partial and adding in manual binding the partial class with the new methods and properties. T8034 Reviewers: segfaultxavi, lauromoura, woohyun, Jaehyun_Cho Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9690
2019-08-05efl-mono: Add Model manual implementation to C# and MVVM factoriesLauro Moura
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-07-09efl-mono: Treat Warnings as ErrorsXavi Artigas
Now that there are 0 documentation warnings, let's make sure we stay this way.
2019-05-17efl_mono: generate efl_canvas_text.eo.csJaehyun Cho
To use canvas text in efl csharp bindings, it is permitted to generate efl_canvas_text.eo.cs.
2019-05-13efl_mono: generate efl_canvas_vg_object.eo.cs by mesonJaehyun Cho
This commit is the same as 0e8f289d7dfb4c5877559917a57a3ac08545fb86 but this commit is for meson. To use vector graphics in efl csharp bindings, it is permitted to generate efl_canvas_vg_object.eo.cs. Other efl_canvas_vg .eo.cs files have already been generated because the file names were changed from efl_vg to efl_canvas_vg.
2019-05-13efl_mono: move libeflcustomexportsmono.so to lib with versions by mesonJaehyun Cho
meson generates libeflcustomexportsmono.so to lib/efl-mono-1/ directory unlike other so files. Moreover, the so file does not have versions in the file name unlike other so files. Like other so files, libeflcustomexportsmono.so is moved to lib directory with versions in the file name.
2019-04-11mono-docs: Allow embedding external examplesXavi Artigas
Summary: New option added to eolian_gen: -e <dir> This specifies a directory to search for examples. If a file is found with the same name as an EFL C# class (e.g. Efl.Ui.Button.cs) or as an EFL C# method or property (e.g. Efl.IText.Text.cs, Efl.IText.SetText.cs) its full contents will be embedded in the documentation for that class or method within <example> and <code> tags. This is, in turn, is parsed by DocFX and shown in Example boxes in the generated pages. If an example file is not found, no examples are embedded for that object. If -e is not used, no examples are embedded for any object. New option added to meson: mono-examples-dir to point to the examples directory. This directory is then passed to eolian_mono through -e. Do not use it (or define it to nothing) to disable example embedding. No performance drop has been observed because of these extra tests. Right now examples can only be given for base classes, not for derived ones (i.e. Efl.IText.Text but not Efl.Ui.Button.Text). This will be addressed in a later commit. Feature Depends on D8587 Test Plan: Create an examples folder and put some files in it: ``` mkdir /tmp/examples echo 'var button = new Efl.Ui.Button();' > /tmp/examples/Efl.Ui.Button.cs echo 'button.AutoRepeatEnabled = true;' > /tmp/examples/Efl.Ui.IAutorepeat.AutorepeatEnabled.cs echo 'button.SetAutoRepeatEnabled(true);' > /tmp/examples/Efl.Ui.IAutorepeat.SetAutorepeatEnabled.cs ``` Configure meson to embed examples and build: ``` meson configure -Dmono-examples-dir=/tmp/examples ninja ``` Examine the generated efl_ui_button.eo.cs file to see embedded <example> tags, or run DocFX and bask in the glory of documentation pages with examples: ``` cd doc/docfx ./gendoc.sh ``` Reviewers: lauromoura, felipealmeida, vitor.sousa, zmike, bu5hm4n Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8592
2019-04-05efl-csharp: fix resource deallocation causing errors everywhereVitor Sousa
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-03-20csharp: Remove missing doc warning by filling them.Lauro Moura
Summary: Added basic documentation for things that were missing. Some other files are silent due to a pragma disabling CS1591. They should be handled later. Also, removed `Efl.Io.Positioner` from the blacklist as it is referenced from the `Efl.Io.Reader.eos` event documentation. Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: felipealmeida, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8370
2019-03-15meson: Enable generation of C# docs.Lauro Moura
Summary: In order to correctly install the xml file alongside the dll, a install script is used to work around meson's limitation of tracking files generated by library() other than the dll. Fixes T7722 Reviewers: segfaultxavi, bu5hm4n Reviewed By: segfaultxavi, bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7722 Differential Revision: https://phab.enlightenment.org/D8331
2019-03-11efl-csharp: Respect beta for classes and other stuff.Lauro Moura
Summary: In order to work around an issue with Efl.App, which is stable but inherits from Efl.Core.Command_Line, @beta interfaces/mixins in the inheritance chain are simply skipped. Also changed the class used int test for inheritance from C# Efl.Loop is stable but internally it uses a @beta class as argument to its Register() method in the constructor. When instantiating a user-defined C# subclass, the binding calls the C# override in the NativeInherit class and the marshalling fails as no code is generated for the beta class. Also moved Efl.Part test to a beta class. Efl.Part is still beta. Regarding parts, they are skipped if its class is @beta too. Also rejected all elm_* files in elm public eo files. They should get back in as they are converted to Efl.Ui.* api. An exception is elm_interface_scrollable.eo, as efl_ui_panel depends on it. Fixes T7730 Test Plan: Run tests Reviewers: vitor.sousa, segfaultxavi, felipealmeida, cedric, bu5hm4n, zmike Reviewed By: vitor.sousa Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7730 Differential Revision: https://phab.enlightenment.org/D8268
2019-03-07elm_glview: remove all legacy usage from eo filesMike Blumenkrantz
this takes the current generated output from eolian for legacy code in efl and adds it to the tree, then removes legacy references from the corresponding eo files. in the case where the entire eo file was for a legacy object, that eo file has been removed from the tree ref T7724 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8173
2019-03-07efl-csharp: Respect beta in constructor parameters.Lauro Moura
Summary: Fixes compilation after Efl.Ui.Win parameter changes. Also removed an unused var and now we pass the beta option to the eolian mono invocation for the tests. Fixes T7723 Reviewers: segfaultxavi, felipealmeida, vitor.sousa Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7723 Differential Revision: https://phab.enlightenment.org/D8150
2019-03-06efl_csharp: Use cs_args instead of runtime_AssembliesLauro Moura
This will erase the need of the `runtime_assemblies` kw_arg, allowing ot use a single invocation without warnings about unsupported parameters. Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de> Differential Revision: https://phab.enlightenment.org/D8092
2019-03-01efl-mono: Add support for dotnet coreFelipe Magno de Almeida
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
2019-03-01efl-mono: Add support for Efl.ClassLauro Moura
Efl.Class (in practice, the return from the *_class_get() functions) can be used as argument to functions, like in Efl.Object.provider_find and Efl.Ui.Widget_Factory.item_class(get/set). This commits adds support by representing Efl.Class instances as System.Type in the C# API, allowing someone to do things like: `factory.ItemClass == typeof(MyFramework.MyButton)` It also supports user-defined classes that inherit from efl classes.
2019-02-25efl-csharp: Remove legacy Evas bindings.Lauro Moura
Summary: Pave the way to correct beta classes handling. Reviewers: vitor.sousa, segfaultxavi, bu5hm4n Reviewed By: vitor.sousa, bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8004
2019-01-17elementary: internalize elm_combobox, expose legacy onlyDaniel Kolesa
This is bad eo API, and won't remain like that, so completely remove it from being managed by Eolian.
2019-01-17efl-mono: Enable selecting to build @beta itemsLauro Moura
Summary: For autotools, use --enable-csharp-beta to enable the generation of beta methods and properties, for meson use -Dmono-beta=true. By default, no beta method or property is generated. Reviewers: woohyun, segfaultxavi, bu5hm4n, lauromoura Reviewed By: woohyun Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7637
2019-01-04efl-mono: Add efl_mono.dll.config file to run tests from within treeFelipe Magno de Almeida
Required by some distros like Arch. Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de> Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br> Differential Revision: https://phab.enlightenment.org/D7527
2018-12-27meson - fix pc file versions that were missing mirco versionCarsten Haitzler (Rasterman)
2018-10-25meson: do not add cs as required compilerMarcel Hollerbach
Summary: its only required when having mono Reviewers: q66, netstar, jeyzu Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7213
2018-10-24meson: time for the c-sharp buildMarcel Hollerbach
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