diff --git a/configure.bat b/configure.bat index 57eef43029..2736fc8463 100644 --- a/configure.bat +++ b/configure.bat @@ -122,6 +122,7 @@ exit /B 0 -Dsystemd=false^ -Dgstreamer=false^ -Ddbus=false^ + -Ddotnet=true^ -Daudio=false^ -Davahi=false^ -Dv4l2=false^ @@ -140,7 +141,8 @@ exit /B 0 "-Devas-loaders-disabler=gst,pdf,ps,raw,svg,rsvg,xcf,bmp,dds,generic,gif,ico,jp2k,pmaps,psd,tga,tgv,tiff,wbmp,webp,xpm,json"^ -Dopengl=none^ "-Demotion-loaders-disabler=gstreamer1,libvlc,xine"^ - -Dbindings=^ + --prefix=%cd%\_install^ + -Dbindings=mono^ --buildtype=debug^ --native-file native-file-windows.txt diff --git a/src/bin/efl_mono_msbuild_gen/main.cc b/src/bin/efl_mono_msbuild_gen/main.cc index d7ab599b4b..5b78e4dc60 100644 --- a/src/bin/efl_mono_msbuild_gen/main.cc +++ b/src/bin/efl_mono_msbuild_gen/main.cc @@ -18,9 +18,13 @@ #include #include -#include +#ifndef _MSC_VER +# include +# include +#else +# include +#endif #include -#include #include #include diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc index a625627d50..fcbf890355 100644 --- a/src/bin/eolian_cxx/eolian_cxx.cc +++ b/src/bin/eolian_cxx/eolian_cxx.cc @@ -18,9 +18,13 @@ #include #include -#include +#ifndef _MSC_VER +# include +# include +#else +# include +#endif #include -#include #include #include diff --git a/src/bin/eolian_mono/eolian/mono/type_impl.hh b/src/bin/eolian_mono/eolian/mono/type_impl.hh index 4475844e2d..bbf789063a 100644 --- a/src/bin/eolian_mono/eolian/mono/type_impl.hh +++ b/src/bin/eolian_mono/eolian/mono/type_impl.hh @@ -125,7 +125,11 @@ struct visitor_generate , {"bool", nullptr, [&] { return replace_base_type(regular, "bool?"); }} , {"short", nullptr, [&] { return replace_base_opt_integer(regular); }} , {"int", nullptr, [&] { return replace_base_opt_integer(regular); }} +#ifdef _MSC_VER + //, {"long", nullptr, [&] { return replace_base_type(regular, "long?"); }} +#else , {"long", nullptr, [&] { return replace_base_opt_integer(regular); }} +#endif , {"llong", nullptr, [&] { return replace_base_opt_integer(regular); }} , {"int8", nullptr, [&] { return replace_base_type(regular, "sbyte?"); }} , {"int16", nullptr, [&] { return replace_base_type(regular, "short?"); }} @@ -136,7 +140,11 @@ struct visitor_generate , {"ubyte", nullptr, [&] { return replace_base_type(regular, "byte?"); }} , {"ushort", nullptr, [&] { return replace_base_opt_integer(regular); }} , {"uint", nullptr, [&] { return replace_base_opt_integer(regular); }} +#ifdef _MSC_VER + //, {"ulong", nullptr, [&] { return replace_base_type(regular, "ulong?"); }} +#else , {"ulong", nullptr, [&] { return replace_base_opt_integer(regular); }} +#endif , {"ullong", nullptr, [&] { return replace_base_opt_integer(regular); }} , {"uint8", nullptr, [&] { return replace_base_type(regular, "byte?"); }} , {"uint16", nullptr, [&] { return replace_base_type(regular, "ushort?"); }} @@ -156,7 +164,11 @@ struct visitor_generate {"byte", nullptr, [&] { return replace_base_type(regular, "sbyte"); }} , {"short", nullptr, [&] { return replace_base_integer(regular); }} , {"int", nullptr, [&] { return replace_base_integer(regular); }} +#ifdef _MSC_VER + //, {"long", nullptr, [&] { return replace_base_type(regular, "long"); }} +#else , {"long", nullptr, [&] { return replace_base_integer(regular); }} +#endif , {"llong", nullptr, [&] { return replace_base_integer(regular); }} , {"int8", nullptr, [&] { return replace_base_type(regular, "sbyte"); }} , {"int16", nullptr, [&] { return replace_base_type(regular, "short"); }} @@ -167,7 +179,11 @@ struct visitor_generate , {"ubyte", nullptr, [&] { return replace_base_type(regular, "byte"); }} , {"ushort", nullptr, [&] { return replace_base_integer(regular); }} , {"uint", nullptr, [&] { return replace_base_integer(regular); }} +#ifdef _MSC_VER + //, {"ulong", nullptr, [&] { return replace_base_type(regular, "ulong"); }} +#else , {"ulong", nullptr, [&] { return replace_base_integer(regular); }} +#endif , {"ullong", nullptr, [&] { return replace_base_integer(regular); }} , {"uint8", nullptr, [&] { return replace_base_type(regular, "byte"); }} , {"uint16", nullptr, [&] { return replace_base_type(regular, "ushort"); }} diff --git a/src/bin/eolian_mono/eolian_mono.cc b/src/bin/eolian_mono/eolian_mono.cc index 1a96aaa826..52c89ec54b 100644 --- a/src/bin/eolian_mono/eolian_mono.cc +++ b/src/bin/eolian_mono/eolian_mono.cc @@ -18,9 +18,13 @@ #include #include -#include +#ifndef _MSC_VER +# include +# include +#else +# include +#endif #include -#include #include #include diff --git a/src/bin/ethumb_client/meson.build b/src/bin/ethumb_client/meson.build index 243e5699af..fc724715db 100644 --- a/src/bin/ethumb_client/meson.build +++ b/src/bin/ethumb_client/meson.build @@ -1,7 +1,12 @@ +ethumbd_deps = [ecore, ethumb, ethumb_client, ecore] +if not sys_windows + ethumbd_deps += eldbus +endif + ethumbd = executable('ethumbd', 'ethumbd.c', install: true, - dependencies : [ecore, ethumb, ethumb_client, ecore, eldbus], + dependencies : ethumbd_deps, include_directories : config_dir, c_args : package_c_args, ) diff --git a/src/bindings/mono/efl_mono/efl_all.cs b/src/bindings/mono/efl_mono/efl_all.cs index c49ec4dfd4..385ce06cba 100644 --- a/src/bindings/mono/efl_mono/efl_all.cs +++ b/src/bindings/mono/efl_mono/efl_all.cs @@ -94,7 +94,9 @@ public static void Init(Efl.Csharp.Components components = Efl.Csharp.Components ecore_init(); ecore_init_ex(0, IntPtr.Zero); evas_init(); +#if ELDBUS_ENABLED eldbus.Config.Init(); +#endif } if ((initComponents & Efl.Csharp.Components.Ui) @@ -140,8 +142,10 @@ public static void Shutdown() if ((initComponents & Efl.Csharp.Components.Basic) == Efl.Csharp.Components.Basic) { +#if ELDBUS_ENABLED Eina.Log.Debug("Shutting down Eldbus"); eldbus.Config.Shutdown(); +#endif Eina.Log.Debug("Shutting down Evas"); evas_shutdown(); Eina.Log.Debug("Shutting down Ecore"); diff --git a/src/bindings/mono/efl_mono/efl_csharp_application.cs b/src/bindings/mono/efl_mono/efl_csharp_application.cs index 1cf5d0d07b..feb8449500 100644 --- a/src/bindings/mono/efl_mono/efl_csharp_application.cs +++ b/src/bindings/mono/efl_mono/efl_csharp_application.cs @@ -97,7 +97,9 @@ private static void Init(Efl.Csharp.Components components = Components.All) ecore_init(); ecore_init_ex(0, IntPtr.Zero); evas_init(); +#if ELDBUS_ENABLED eldbus.Config.Init(); +#endif } if ((initComponents & Components.Ui) == Components.Ui) @@ -136,7 +138,9 @@ private static void Shutdown() if ((initComponents & Components.Basic) == Components.Basic) { +#if ELDBUS_ENABLED eldbus.Config.Shutdown(); +#endif evas_shutdown(); ecore_shutdown(); Efl.Eo.Config.Shutdown(); diff --git a/src/bindings/mono/efl_mono/efl_libs.cs.in b/src/bindings/mono/efl_mono/efl_libs.cs.in index fcf5b18183..534d443bd7 100644 --- a/src/bindings/mono/efl_mono/efl_libs.cs.in +++ b/src/bindings/mono/efl_mono/efl_libs.cs.in @@ -33,8 +33,11 @@ internal class Libs { internal const string CustomExports = "@CUSTOM_EXPORTS_MONO_DL_MONO@"; - internal const string Libdl = "libdl.so"; - internal const string Kernel32 = "kernel32.dll"; +#if sys_windows + internal const string Kernel32 = "@KERNEL32_DL_MONO@"; +#else + internal const string Libdl = "@LIBDL_DL_MONO@"; +#endif internal static readonly Efl.Eo.NativeModule EflModule = new Efl.Eo.NativeModule(Efl); internal static readonly Efl.Eo.NativeModule CoreModule = new Efl.Eo.NativeModule(Ecore); @@ -46,8 +49,11 @@ internal class Libs { internal static readonly Efl.Eo.NativeModule ElementaryModule = new Efl.Eo.NativeModule(Elementary); internal static readonly Efl.Eo.NativeModule EldbusModule = new Efl.Eo.NativeModule(Eldbus); internal static readonly Efl.Eo.NativeModule CustomExportsModule = new Efl.Eo.NativeModule(CustomExports); - internal static readonly Efl.Eo.NativeModule LibdlModule = new Efl.Eo.NativeModule(Libdl); +#if sys_windows internal static readonly Efl.Eo.NativeModule Kernel32Module = new Efl.Eo.NativeModule(Kernel32); +#else + internal static readonly Efl.Eo.NativeModule LibdlModule = new Efl.Eo.NativeModule(Libdl); +#endif } } diff --git a/src/bindings/mono/efl_mono/meson.build b/src/bindings/mono/efl_mono/meson.build index 23c7b7ea70..e1578cfbe5 100644 --- a/src/bindings/mono/efl_mono/meson.build +++ b/src/bindings/mono/efl_mono/meson.build @@ -9,17 +9,38 @@ mono_files += files( bash = find_program('bash') -map = run_command('map_generate.sh').stdout() +if not sys_windows + map = run_command('map_generate.sh').stdout() +else + map = '' +endif efl_libs = configuration_data() efl_libs.set('EFL_MONO_LIBRARY_MAP', map) -efl_libs.set('CUSTOM_EXPORTS_MONO_DL_MONO', 'eflcustomexportsmono') + +if sys_windows + eflcustomexportsmono_name = 'eflcustomexportsmono-1' +else + eflcustomexportsmono_name = 'eflcustomexportsmono' +endif +efl_libs.set('CUSTOM_EXPORTS_MONO_DL_MONO', eflcustomexportsmono_name) efl_libs.set('EVIL_DL_MONO', 'dl') +if sys_osx + efl_libs.set('LIBDL_DL_MONO', 'dl.dylib') +elif sys_windows + efl_libs.set('KERNEL32_DL_MONO', 'kernel32.dll') +else + efl_libs.set('LIBDL_DL_MONO', 'libdl.so') +endif foreach mono_libs : mono_sublibs key = mono_libs[0].to_upper()+'_DL_MONO' - efl_libs.set(key, mono_libs[0].to_lower()) + if sys_windows + efl_libs.set(key, mono_libs[0].to_lower() + '-1') + else + efl_libs.set(key, mono_libs[0].to_lower()) + endif endforeach configure_file( @@ -97,13 +118,17 @@ efl_mono_lib = library('eflcustomexportsmono', foreach eo_file : mono_eo_files if not blacklisted_files.contains(eo_file) + examples_param = [] + if get_option('mono-examples-dir') != '' + examples_param = ['-e', get_option('mono-examples-dir')] + endif mono_generator_target += custom_target('eolian_mono_gen_'+eo_file.underscorify()+'', input : join_paths('..', '..', '..', 'lib', 'efl_mono', eo_file), output : [eo_file + '.cs'], command : [eolian_mono_gen, beta_option, '-I', meson.current_source_dir(), eolian_include_directories, - '--dllimport', 'eflcustomexportsmono', + '--dllimport', eflcustomexportsmono_name, '-o', join_paths(meson.current_build_dir(), eo_file + '.cs'), - '-e', get_option('mono-examples-dir'), + examples_param, '@INPUT@']) endif diff --git a/src/bindings/mono/efl_sharp.csproj.in b/src/bindings/mono/efl_sharp.csproj.in index e03be33950..2ca2ce033a 100644 --- a/src/bindings/mono/efl_sharp.csproj.in +++ b/src/bindings/mono/efl_sharp.csproj.in @@ -19,13 +19,22 @@ @EFL_BETA@ + + ELDBUS_ENABLED;$(DefineConstants) + + + sys_windows;$(DefineConstants) + + - + + + - +