felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=be06c277625da6618382fec8bcff07f9bf68a303
commit be06c277625da6618382fec8bcff07f9bf68a303 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Tue Apr 3 13:46:45 2018 -0300 efl-mono: Fix compile flags, .config files and class_name in description --- src/Makefile_Efl_Mono.am | 25 ++++++++++++++++++------- src/bin/eolian_mono/eolian/mono/klass.hh | 4 ++-- src/bindings/mono/eo_mono/iwrapper.cs | 7 ++++--- src/examples/efl_mono/Makefile.am | 12 ++++++------ src/examples/eina/Makefile.am | 8 ++++---- src/examples/elementary/Makefile.am | 8 ++++---- src/examples/evas/Makefile.am | 12 ++++++------ 7 files changed, 44 insertions(+), 32 deletions(-) diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am index f608676fa9..ffd55a42e6 100644 --- a/src/Makefile_Efl_Mono.am +++ b/src/Makefile_Efl_Mono.am @@ -201,8 +201,8 @@ CLEANFILES += $(efl_mono_files_gen) $(efl_mono_blacklisted_files) \ if HAVE_WIN32 -MCS_FLAGS := $(MCS_FLAGS) -MCS_FLAGS += -define:WIN32 +MCSFLAGS ?= +MCSFLAGS += -define:WIN32 endif @@ -224,11 +224,11 @@ lib_efl_mono_libeflcustomexportsmono_la_DEPENDENCIES = @EFL_CUSTOM_EXPORTS_MONO_ #Efl Mono - C Sharp binding library -libefl_mono_dll_MCS_FLAGS = -doc:lib/efl_mono/libefl_mono.xml +libefl_mono_dll_MCSFLAGS = -doc:lib/efl_mono/libefl_mono.xml lib/efl_mono/libefl_mono.dll: $(efl_mono_files_dist) lib/efl_mono/$(am__dirstamp) $(lib_efl_mono_libefl_mono_dll_sources) $(efl_mono_files_gen) lib/efl_mono/libefl_mono.dll.config @rm -f lib/efl_mono/libefl_mono.dll - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) $(libefl_mono_dll_MCS_FLAGS) -out:$@ -t:library $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) $(libefl_mono_dll_MCSFLAGS) -out:$@ -t:library $(filter %.cs, $(^)) lib/efl_mono/libefl_mono.dll.config: echo "<configuration>" > $@ @@ -387,9 +387,9 @@ tests/efl_mono/libefl_mono_native_test.c: tests/efl_mono/test_testing.eo.h tests efl_mono_test_eolian_mono_files = tests/efl_mono/test_testing.eo.cs \ tests/efl_mono/test_numberwrapper.eo.cs -tests/efl_mono/libefl_mono_test.dll: $(efl_mono_test_eolian_mono_files) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll tests/efl_mono/libefl_mono_native_test.la +tests/efl_mono/libefl_mono_test.dll: $(efl_mono_test_eolian_mono_files) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll tests/efl_mono/libefl_mono_native_test.la tests/efl_mono/libefl_mono_test.dll.config @rm -f tests/efl_mono/libefl_mono_test.dll - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_builddir)/lib/efl_mono/libefl_mono.dll -out:$@ -t:library $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_builddir)/lib/efl_mono/libefl_mono.dll -out:$@ -t:library $(filter %.cs, $(^)) tests/efl_mono/efl_mono$(EXEEXT).config: echo "<configuration>" > $@ @@ -402,6 +402,17 @@ tests/efl_mono/efl_mono$(EXEEXT).config: echo " <dllmap dll=\"elementary\" target=\"$(abs_top_builddir)/src/lib/elementary/.libs/libelementary.so\"/>" >> $@ echo "</configuration>" >> $@ +tests/efl_mono/libefl_mono_test.dll.config: + echo "<configuration>" > $@ + echo " <dllmap dll=\"eina\" target=\"$(abs_top_builddir)/src/lib/eina/.libs/libeina.so\"/>" >> $@ + echo " <dllmap dll=\"ecore\" target=\"$(abs_top_builddir)/src/lib/ecore/.libs/libecore.so\"/>" >> $@ + echo " <dllmap dll=\"eo\" target=\"$(abs_top_builddir)/src/lib/eo/.libs/libeo.so\"/>" >> $@ + echo " <dllmap dll=\"efl\" target=\"$(abs_top_builddir)/src/lib/efl/.libs/libefl.so\"/>" >> $@ + echo " <dllmap dll=\"evas\" target=\"$(abs_top_builddir)/src/lib/evas/.libs/libevas.so\"/>" >> $@ + echo " <dllmap dll=\"eldbus\" target=\"$(abs_top_builddir)/src/lib/eldbus/.libs/libeldbus.so\"/>" >> $@ + echo " <dllmap dll=\"elementary\" target=\"$(abs_top_builddir)/src/lib/elementary/.libs/libelementary.so\"/>" >> $@ + echo "</configuration>" >> $@ + # C Sharp test executable AM_TESTS_ENVIRONMENT += MONO='mono' AM_TESTS_ENVIRONMENT += MONO_BUILDPATH='$(abs_top_builddir)' @@ -434,7 +445,7 @@ tests_efl_mono_efl_mono_SOURCES = \ tests/efl_mono/efl_mono$(EXEEXT): $(tests_efl_mono_efl_mono_SOURCES) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll tests/efl_mono/libefl_mono_test.dll tests/efl_mono/efl_mono$(EXEEXT).config @rm -f $@ - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -r:$(abs_top_builddir)/src/tests/efl_mono/libefl_mono_test.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -r:$(abs_top_builddir)/src/tests/efl_mono/libefl_mono_test.dll -out:$@ $(filter %.cs, $(^)) # Rule for generating the .cs files tests/efl_mono/%.eo.cs: tests/efl_mono/%.eo $(_EOLIAN_MONO_DEP) diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh index 7de2f2b47b..039485fe39 100644 --- a/src/bin/eolian_mono/eolian/mono/klass.hh +++ b/src/bin/eolian_mono/eolian/mono/klass.hh @@ -384,7 +384,7 @@ struct klass << scope_tab << scope_tab << "if (klass == System.IntPtr.Zero) {\n" << scope_tab << scope_tab << scope_tab << "lock (klassAllocLock) {\n" << scope_tab << scope_tab << scope_tab << scope_tab << "if (klass == System.IntPtr.Zero) {\n" - << scope_tab << scope_tab << scope_tab << scope_tab << scope_tab << "klass = efl.eo.Globals.register_class(new efl.eo.Globals.class_initializer(" << string << "NativeInherit.class_initializer), " << class_get_name << "());\n" + << scope_tab << scope_tab << scope_tab << scope_tab << scope_tab << "klass = efl.eo.Globals.register_class(new efl.eo.Globals.class_initializer(" << string << "NativeInherit.class_initializer), \"" << string << "\", " << class_get_name << "());\n" //<< scope_tab << scope_tab << "klass = efl.eo.Globals.register_class(null/*new efl.eo.Globals.class_initializer(" << string << "NativeInherit.class_initializer)*/, " << class_get_name << "());\n" << scope_tab << scope_tab << scope_tab << scope_tab << "}\n" << scope_tab << scope_tab << scope_tab << "}\n" @@ -423,7 +423,7 @@ struct klass .generate(sink , std::make_tuple( cls, cls.cxx_name, cls.cxx_name, cls.cxx_name, cls.namespaces, cls.eolian_name - , cls.cxx_name, cls.cxx_name, cls.namespaces, cls.eolian_name, cls.cxx_name + , cls.cxx_name, cls.cxx_name, cls.cxx_name, cls.namespaces, cls.eolian_name, cls.cxx_name , cls.cxx_name) , inherit_cxt)) return false; diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs index 7812e06367..986e8a0258 100644 --- a/src/bindings/mono/eo_mono/iwrapper.cs +++ b/src/bindings/mono/eo_mono/iwrapper.cs @@ -3,6 +3,7 @@ using System; using System.Runtime.InteropServices; using System.Collections.Generic; +using System.Diagnostics; using static eina.NativeCustomExportFunctions; @@ -70,11 +71,11 @@ public class Globals { public delegate byte class_initializer(IntPtr klass); - public static IntPtr register_class(class_initializer initializer, IntPtr base_klass) + public static IntPtr register_class(class_initializer initializer, String class_name, IntPtr base_klass) { ClassDescription description; description.version = 2; // EO_VERSION - description.name = "BoxInherit"; + description.name = class_name; description.class_type = 0; // REGULAR description.data_size = (UIntPtr)8; description.class_initializer = IntPtr.Zero; @@ -101,7 +102,7 @@ public class Globals { if(parent != null) parent_ptr = parent.raw_handle; - System.IntPtr eo = efl.eo.Globals._efl_add_internal_start("file", 0, klass, parent_ptr, 0, 0); + System.IntPtr eo = efl.eo.Globals._efl_add_internal_start("file", 0, klass, parent_ptr, 1, 0); return eo; } diff --git a/src/examples/efl_mono/Makefile.am b/src/examples/efl_mono/Makefile.am index 84d93bc6f9..3bd53085c4 100644 --- a/src/examples/efl_mono/Makefile.am +++ b/src/examples/efl_mono/Makefile.am @@ -39,11 +39,11 @@ COMMON_FLAGS += \ endif -%.eo.c: %.eo - $(AM_V_EOL)$(EOLIAN_GEN) $(EOLIAN_FLAGS) -gc -o c:$@ $< +# %.eo.c: %.eo +# $(AM_V_EOL)$(EOLIAN_GEN) $(EOLIAN_FLAGS) -gc -o c:$@ $< -%.eo.h: %.eo - $(AM_V_EOL)$(EOLIAN_GEN) $(EOLIAN_FLAGS) -gh -o h:$@ $< +# %.eo.h: %.eo +# $(AM_V_EOL)$(EOLIAN_GEN) $(EOLIAN_FLAGS) -gh -o h:$@ $< example_numberwrapper.c: example_numberwrapper.eo.h example_numberwrapper.eo.c @@ -70,7 +70,7 @@ EoInherit01_SOURCES = EoInherit01.cs #EoInherit01_files = $(EoInherit01_exe_srcs) example_numberwrapper.eo.cs EoInherit01$(EXEEXT): $(EoInherit01_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll libexample_numberwrapper.la EoInherit01$(EXEEXT).config example_numberwrapper.eo.cs @rm -f $@ - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) EoInherit01.csproj: $(EoInherit01_SOURCES) $(am_dirstamp) libexample_numberwrapper.la @rm -f $@ @@ -90,7 +90,7 @@ EoInherit01$(EXEEXT).config: FunctionPointer01_SOURCES = FunctionPointer01.cs FunctionPointer01$(EXEEXT): $(FunctionPointer01_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll libexample_numberwrapper.la example_numberwrapper.eo.cs @rm -f $@ - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) FunctionPointer01.csproj: $(FunctionPointer01_SOURCES) $(am_dirstamp) libexample_numberwrapper.la @rm -f $@ diff --git a/src/examples/eina/Makefile.am b/src/examples/eina/Makefile.am index 4ecd814672..652a9e0485 100644 --- a/src/examples/eina/Makefile.am +++ b/src/examples/eina/Makefile.am @@ -153,7 +153,7 @@ EinaHash01Mono_SOURCES = EinaHash01.cs EinaArray01Mono$(EXEEXT): $(EinaArray01Mono_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll @rm -f $@ - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) EinaArray01.csproj: $(EinaArray01Mono_SOURCES) $(am_dirstamp) @rm -f $@ @@ -161,7 +161,7 @@ EinaArray01.csproj: $(EinaArray01Mono_SOURCES) $(am_dirstamp) EinaBinbuf01Mono$(EXEEXT): $(EinaBinbuf01Mono_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll @rm -f $@ - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) EinaBinbuf01.csproj: $(EinaBinbuf01Mono_SOURCES) $(am_dirstamp) @rm -f $@ @@ -169,7 +169,7 @@ EinaBinbuf01.csproj: $(EinaBinbuf01Mono_SOURCES) $(am_dirstamp) EinaError01Mono$(EXEEXT): $(EinaError01Mono_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll @rm -f $@ - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) EinaError01.csproj: $(EinaError01Mono_SOURCES) $(am_dirstamp) @rm -f $@ @@ -177,7 +177,7 @@ EinaError01.csproj: $(EinaError01Mono_SOURCES) $(am_dirstamp) EinaHash01Mono$(EXEEXT): $(EinaHash01Mono_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll @rm -f $@ - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) EinaHash01.csproj: $(EinaHash01Mono_SOURCES) $(am_dirstamp) @rm -f $@ diff --git a/src/examples/elementary/Makefile.am b/src/examples/elementary/Makefile.am index a2cddefb31..1e076c5fac 100644 --- a/src/examples/elementary/Makefile.am +++ b/src/examples/elementary/Makefile.am @@ -264,8 +264,8 @@ codegen_example_generated.h if HAVE_CSHARP if HAVE_WIN32 -MCS_FLAGS := $(MCS_FLAGS) -MCS_FLAGS += -define:WIN32 +MCSFLAGS ?= +MCSFLAGS += -define:WIN32 endif efl_ui_slider_mono_SOURCES = \ @@ -273,14 +273,14 @@ efl_ui_slider_mono_SOURCES = \ efl_ui_slider_mono$(EXEEXT): $(efl_ui_slider_mono_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll @rm -f efl_ui_slider_mono$(EXEEXT) - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) efl_ui_unit_converter_SOURCES = \ efl_ui_unit_converter.cs efl_ui_unit_converter$(EXEEXT): $(efl_ui_unit_converter_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll @rm -f efl_ui_unit_converter$(EXEEXT) - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) endif diff --git a/src/examples/evas/Makefile.am b/src/examples/evas/Makefile.am index dd9b7964fe..03414501dd 100644 --- a/src/examples/evas/Makefile.am +++ b/src/examples/evas/Makefile.am @@ -383,42 +383,42 @@ evas_mono_box_csharp_SOURCES = \ evas_mono_box_csharp$(EXEEXT): $(evas_mono_box_csharp_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll @rm -f $@ - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) evas_mono_image_csharp_SOURCES = \ evas_mono_image.cs evas_mono_image_csharp$(EXEEXT): $(evas_mono_image_csharp_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll @rm -f $@ - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) evas_mono_image2_csharp_SOURCES = \ evas_mono_image2.cs evas_mono_image2_csharp$(EXEEXT): $(evas_mono_image2_csharp_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll @rm -f $@ - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) evas_mono_rectangle_csharp_SOURCES = \ evas_mono_rectangle.cs evas_mono_rectangle_csharp$(EXEEXT): $(evas_mono_rectangle_csharp_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll @rm -f $@ - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) evas_mono_table_csharp_SOURCES = \ evas_mono_table.cs evas_mono_table_csharp$(EXEEXT): $(evas_mono_table_csharp_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll @rm -f $@ - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) evas_mono_text_csharp_SOURCES = \ evas_mono_text.cs evas_mono_text_csharp$(EXEEXT): $(evas_mono_text_csharp_SOURCES) $(am_dirstamp) $(top_builddir)/src/lib/efl_mono/libefl_mono.dll @rm -f $@ - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -out:$@ $(filter %.cs, $(^)) endif --