From: Vincent Torri Date: Wed, 11 Jun 2014 20:35:25 +0000 (+0200) Subject: backend: add default engine support for Windows and Mac OS X X-Git-Tag: upstream/1.10.0+218+gee3f0b7~161 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4a74b17755dea099166ce9596c0c78a56a4ea0b;p=platform%2Fupstream%2Felementary.git backend: add default engine support for Windows and Mac OS X --- diff --git a/config/default/Makefile.am b/config/default/Makefile.am index 03113bb..76c171c 100644 --- a/config/default/Makefile.am +++ b/config/default/Makefile.am @@ -5,13 +5,13 @@ EET_EET = @eet_eet@ EXTRA_DIST = \ profile.desktop \ icon.png \ - base.src + base.src.in filesdir = $(datadir)/elementary/config/default files_DATA = \ profile.desktop \ icon.png \ - base.cfg + base.cfg %.cfg: %.src $(EET_EET) -e \ diff --git a/config/default/base.src b/config/default/base.src.in similarity index 99% rename from config/default/base.src rename to config/default/base.src.in index cb5791b..db264a0 100644 --- a/config/default/base.src +++ b/config/default/base.src.in @@ -1,6 +1,6 @@ group "Elm_Config" struct { value "config_version" int: 65539; - value "engine" string: "software_x11"; + value "engine" string: "@default_engine@"; value "vsync" uchar: 0; value "thumbscroll_enable" uchar: 1; value "thumbscroll_threshold" int: 24; diff --git a/config/mobile/Makefile.am b/config/mobile/Makefile.am index 095c2fb..0535aa8 100644 --- a/config/mobile/Makefile.am +++ b/config/mobile/Makefile.am @@ -5,13 +5,13 @@ EET_EET = @eet_eet@ EXTRA_DIST = \ profile.desktop \ icon.png \ - base.src + base.src.in filesdir = $(datadir)/elementary/config/mobile files_DATA = \ profile.desktop \ icon.png \ - base.cfg + base.cfg %.cfg: %.src $(EET_EET) -e \ diff --git a/config/mobile/base.src b/config/mobile/base.src.in similarity index 99% rename from config/mobile/base.src rename to config/mobile/base.src.in index 590ffbf..58da35d 100644 --- a/config/mobile/base.src +++ b/config/mobile/base.src.in @@ -1,6 +1,6 @@ group "Elm_Config" struct { value "config_version" int: 65539; - value "engine" string: "software_x11"; + value "engine" string: "@default_engine@"; value "vsync" uchar: 0; value "thumbscroll_enable" uchar: 1; value "thumbscroll_threshold" int: 24; diff --git a/config/standard/Makefile.am b/config/standard/Makefile.am index b84899d..5c7038f 100644 --- a/config/standard/Makefile.am +++ b/config/standard/Makefile.am @@ -5,7 +5,7 @@ EET_EET = @eet_eet@ EXTRA_DIST = \ profile.desktop \ icon.png \ - base.src + base.src.in filesdir = $(datadir)/elementary/config/standard files_DATA = \ diff --git a/config/standard/base.src b/config/standard/base.src.in similarity index 99% rename from config/standard/base.src rename to config/standard/base.src.in index 6d2da5b..1f7594d 100644 --- a/config/standard/base.src +++ b/config/standard/base.src.in @@ -1,6 +1,6 @@ group "Elm_Config" struct { value "config_version" int: 65539; - value "engine" string: "software_x11"; + value "engine" string: "@default_engine@"; value "vsync" uchar: 0; value "thumbscroll_enable" uchar: 0; value "thumbscroll_threshold" int: 4; diff --git a/configure.ac b/configure.ac index 5693e9f..046ec88 100644 --- a/configure.ac +++ b/configure.ac @@ -49,12 +49,14 @@ dnl managed by evil dlopen_libs=-ldl requirement_elm="evil" have_socket="no" + default_engine=software_gdi ;; *solaris*) ELM_UNIX_DEF="#define" have_socket="yes" have_dlopen="yes" AC_CHECK_LIB([socket], [connect], [], [have_socket="no"]) + default_engine=software_x11 ;; darwin*) ELM_UNIX_DEF="#define" @@ -62,6 +64,7 @@ dnl managed by evil have_dlopen="yes" AC_CHECK_HEADERS([crt_externs.h]) AC_DEFINE([environ], [(*_NSGetEnviron())], ["apple doesn't follow POSIX in this case."]) + default_engine=opengl_cocoa ;; *) ELM_UNIX_DEF="#define" @@ -79,11 +82,16 @@ dnl managed by evil fi fi have_socket="yes" + default_engine=software_x11 ;; esac + AM_CONDITIONAL([BUILD_RUN], [test "x$have_socket" = "xyes"]) AM_CONDITIONAL([BUILD_MODULES], [test "x$have_dlopen" = "xyes"]) +AC_SUBST([default_engine]) +AC_DEFINE_UNQUOTED([DEFAULT_ENGINE], ["$default_engine"], ["Default engine according to host"]) + m4_ifdef([v_mic], [ EFL_COMPILER_FLAG([-Wshadow]) @@ -91,13 +99,9 @@ m4_ifdef([v_mic], EFL_COMPILER_FLAG([-W]) ]) -AC_LIBTOOL_WIN32_DLL -define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl -define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) LT_INIT([win32-dll disable-static pic-only]) EFL_INIT -#AC_PROG_LIBTOOL AC_GNU_SOURCE @@ -681,8 +685,11 @@ data/desktop/Makefile data/edje_externals/Makefile config/Makefile config/default/Makefile +config/default/base.src config/standard/Makefile +config/standard/base.src config/mobile/Makefile +config/mobile/base.src $po_makefile_in cmakeconfig/ElementaryConfig.cmake cmakeconfig/ElementaryConfigVersion.cmake diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c index a5e692d..f3bce0d 100644 --- a/src/lib/elm_config.c +++ b/src/lib/elm_config.c @@ -1499,7 +1499,7 @@ _config_load(void) // config recovery app i guess... _elm_config = ELM_NEW(Elm_Config); _elm_config->config_version = ELM_CONFIG_VERSION; - _elm_config->engine = eina_stringshare_add("software_x11"); + _elm_config->engine = eina_stringshare_add(DEFAULT_ENGINE); _elm_config->vsync = 0; _elm_config->thumbscroll_enable = EINA_TRUE; _elm_config->thumbscroll_threshold = 24; @@ -3211,7 +3211,8 @@ _elm_config_sub_shutdown(void) ENGINE_COMPARE(ELM_SOFTWARE_16_X11) || ENGINE_COMPARE(ELM_XRENDER_X11) || ENGINE_COMPARE(ELM_OPENGL_X11) || - ENGINE_COMPARE(ELM_OPENGL_COCOA)) + ENGINE_COMPARE(ELM_OPENGL_COCOA) || + ENGINE_COMPARE(ELM_SOFTWARE_WIN32)) #undef ENGINE_COMPARE { #ifdef HAVE_ELEMENTARY_X @@ -3228,7 +3229,8 @@ _elm_config_sub_init(void) ENGINE_COMPARE(ELM_SOFTWARE_16_X11) || ENGINE_COMPARE(ELM_XRENDER_X11) || ENGINE_COMPARE(ELM_OPENGL_X11) || - ENGINE_COMPARE(ELM_OPENGL_COCOA)) + ENGINE_COMPARE(ELM_OPENGL_COCOA) || + ENGINE_COMPARE(ELM_SOFTWARE_WIN32)) #undef ENGINE_COMPARE { #ifdef HAVE_ELEMENTARY_X @@ -3400,7 +3402,9 @@ _elm_config_shutdown(void) if (ENGINE_COMPARE(ELM_SOFTWARE_X11) || ENGINE_COMPARE(ELM_SOFTWARE_16_X11) || ENGINE_COMPARE(ELM_XRENDER_X11) || - ENGINE_COMPARE(ELM_OPENGL_X11)) + ENGINE_COMPARE(ELM_OPENGL_X11) || + ENGINE_COMPARE(ELM_OPENGL_COCOA) || + ENGINE_COMPARE(ELM_SOFTWARE_WIN32)) #undef ENGINE_COMPARE { #ifdef HAVE_ELEMENTARY_X diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 2e89154..7e3be34 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -3061,7 +3061,8 @@ _elm_win_constructor(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_Type t enginelist[ 8] = ELM_WAYLAND_EGL; enginelist[ 9] = ELM_DRM; enginelist[10] = ELM_OPENGL_SDL; - enginelist[11] = NULL; + enginelist[11] = ELM_SOFTWARE_WIN32; + enginelist[12] = NULL; } } for (i = 0; i < 30; i++)