backend: add default engine support for Windows and Mac OS X

This commit is contained in:
Vincent Torri 2014-06-11 22:35:25 +02:00 committed by Cedric BAIL
parent 0d6cacb743
commit 44b2c2bbb9
9 changed files with 29 additions and 17 deletions

View File

@ -5,13 +5,13 @@ EET_EET = @eet_eet@
EXTRA_DIST = \ EXTRA_DIST = \
profile.desktop \ profile.desktop \
icon.png \ icon.png \
base.src base.src.in
filesdir = $(datadir)/elementary/config/default filesdir = $(datadir)/elementary/config/default
files_DATA = \ files_DATA = \
profile.desktop \ profile.desktop \
icon.png \ icon.png \
base.cfg base.cfg
%.cfg: %.src %.cfg: %.src
$(EET_EET) -e \ $(EET_EET) -e \

View File

@ -1,6 +1,6 @@
group "Elm_Config" struct { group "Elm_Config" struct {
value "config_version" int: 65539; value "config_version" int: 65539;
value "engine" string: "software_x11"; value "engine" string: "@default_engine@";
value "vsync" uchar: 0; value "vsync" uchar: 0;
value "thumbscroll_enable" uchar: 1; value "thumbscroll_enable" uchar: 1;
value "thumbscroll_threshold" int: 24; value "thumbscroll_threshold" int: 24;

View File

@ -5,13 +5,13 @@ EET_EET = @eet_eet@
EXTRA_DIST = \ EXTRA_DIST = \
profile.desktop \ profile.desktop \
icon.png \ icon.png \
base.src base.src.in
filesdir = $(datadir)/elementary/config/mobile filesdir = $(datadir)/elementary/config/mobile
files_DATA = \ files_DATA = \
profile.desktop \ profile.desktop \
icon.png \ icon.png \
base.cfg base.cfg
%.cfg: %.src %.cfg: %.src
$(EET_EET) -e \ $(EET_EET) -e \

View File

@ -1,6 +1,6 @@
group "Elm_Config" struct { group "Elm_Config" struct {
value "config_version" int: 65539; value "config_version" int: 65539;
value "engine" string: "software_x11"; value "engine" string: "@default_engine@";
value "vsync" uchar: 0; value "vsync" uchar: 0;
value "thumbscroll_enable" uchar: 1; value "thumbscroll_enable" uchar: 1;
value "thumbscroll_threshold" int: 24; value "thumbscroll_threshold" int: 24;

View File

@ -5,7 +5,7 @@ EET_EET = @eet_eet@
EXTRA_DIST = \ EXTRA_DIST = \
profile.desktop \ profile.desktop \
icon.png \ icon.png \
base.src base.src.in
filesdir = $(datadir)/elementary/config/standard filesdir = $(datadir)/elementary/config/standard
files_DATA = \ files_DATA = \

View File

@ -1,6 +1,6 @@
group "Elm_Config" struct { group "Elm_Config" struct {
value "config_version" int: 65539; value "config_version" int: 65539;
value "engine" string: "software_x11"; value "engine" string: "@default_engine@";
value "vsync" uchar: 0; value "vsync" uchar: 0;
value "thumbscroll_enable" uchar: 0; value "thumbscroll_enable" uchar: 0;
value "thumbscroll_threshold" int: 4; value "thumbscroll_threshold" int: 4;

View File

@ -49,12 +49,14 @@ dnl managed by evil
dlopen_libs=-ldl dlopen_libs=-ldl
requirement_elm="evil" requirement_elm="evil"
have_socket="no" have_socket="no"
default_engine=software_gdi
;; ;;
*solaris*) *solaris*)
ELM_UNIX_DEF="#define" ELM_UNIX_DEF="#define"
have_socket="yes" have_socket="yes"
have_dlopen="yes" have_dlopen="yes"
AC_CHECK_LIB([socket], [connect], [], [have_socket="no"]) AC_CHECK_LIB([socket], [connect], [], [have_socket="no"])
default_engine=software_x11
;; ;;
darwin*) darwin*)
ELM_UNIX_DEF="#define" ELM_UNIX_DEF="#define"
@ -62,6 +64,7 @@ dnl managed by evil
have_dlopen="yes" have_dlopen="yes"
AC_CHECK_HEADERS([crt_externs.h]) AC_CHECK_HEADERS([crt_externs.h])
AC_DEFINE([environ], [(*_NSGetEnviron())], ["apple doesn't follow POSIX in this case."]) AC_DEFINE([environ], [(*_NSGetEnviron())], ["apple doesn't follow POSIX in this case."])
default_engine=opengl_cocoa
;; ;;
*) *)
ELM_UNIX_DEF="#define" ELM_UNIX_DEF="#define"
@ -79,11 +82,16 @@ dnl managed by evil
fi fi
fi fi
have_socket="yes" have_socket="yes"
default_engine=software_x11
;; ;;
esac esac
AM_CONDITIONAL([BUILD_RUN], [test "x$have_socket" = "xyes"]) AM_CONDITIONAL([BUILD_RUN], [test "x$have_socket" = "xyes"])
AM_CONDITIONAL([BUILD_MODULES], [test "x$have_dlopen" = "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], m4_ifdef([v_mic],
[ [
EFL_COMPILER_FLAG([-Wshadow]) EFL_COMPILER_FLAG([-Wshadow])
@ -91,13 +99,9 @@ m4_ifdef([v_mic],
EFL_COMPILER_FLAG([-W]) 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]) m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
LT_INIT([win32-dll disable-static pic-only]) LT_INIT([win32-dll disable-static pic-only])
EFL_INIT EFL_INIT
#AC_PROG_LIBTOOL
AC_GNU_SOURCE AC_GNU_SOURCE
@ -681,8 +685,11 @@ data/desktop/Makefile
data/edje_externals/Makefile data/edje_externals/Makefile
config/Makefile config/Makefile
config/default/Makefile config/default/Makefile
config/default/base.src
config/standard/Makefile config/standard/Makefile
config/standard/base.src
config/mobile/Makefile config/mobile/Makefile
config/mobile/base.src
$po_makefile_in $po_makefile_in
cmakeconfig/ElementaryConfig.cmake cmakeconfig/ElementaryConfig.cmake
cmakeconfig/ElementaryConfigVersion.cmake cmakeconfig/ElementaryConfigVersion.cmake

View File

@ -1499,7 +1499,7 @@ _config_load(void)
// config recovery app i guess... // config recovery app i guess...
_elm_config = ELM_NEW(Elm_Config); _elm_config = ELM_NEW(Elm_Config);
_elm_config->config_version = ELM_CONFIG_VERSION; _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->vsync = 0;
_elm_config->thumbscroll_enable = EINA_TRUE; _elm_config->thumbscroll_enable = EINA_TRUE;
_elm_config->thumbscroll_threshold = 24; _elm_config->thumbscroll_threshold = 24;
@ -3211,7 +3211,8 @@ _elm_config_sub_shutdown(void)
ENGINE_COMPARE(ELM_SOFTWARE_16_X11) || ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
ENGINE_COMPARE(ELM_XRENDER_X11) || ENGINE_COMPARE(ELM_XRENDER_X11) ||
ENGINE_COMPARE(ELM_OPENGL_X11) || ENGINE_COMPARE(ELM_OPENGL_X11) ||
ENGINE_COMPARE(ELM_OPENGL_COCOA)) ENGINE_COMPARE(ELM_OPENGL_COCOA) ||
ENGINE_COMPARE(ELM_SOFTWARE_WIN32))
#undef ENGINE_COMPARE #undef ENGINE_COMPARE
{ {
#ifdef HAVE_ELEMENTARY_X #ifdef HAVE_ELEMENTARY_X
@ -3228,7 +3229,8 @@ _elm_config_sub_init(void)
ENGINE_COMPARE(ELM_SOFTWARE_16_X11) || ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
ENGINE_COMPARE(ELM_XRENDER_X11) || ENGINE_COMPARE(ELM_XRENDER_X11) ||
ENGINE_COMPARE(ELM_OPENGL_X11) || ENGINE_COMPARE(ELM_OPENGL_X11) ||
ENGINE_COMPARE(ELM_OPENGL_COCOA)) ENGINE_COMPARE(ELM_OPENGL_COCOA) ||
ENGINE_COMPARE(ELM_SOFTWARE_WIN32))
#undef ENGINE_COMPARE #undef ENGINE_COMPARE
{ {
#ifdef HAVE_ELEMENTARY_X #ifdef HAVE_ELEMENTARY_X
@ -3400,7 +3402,9 @@ _elm_config_shutdown(void)
if (ENGINE_COMPARE(ELM_SOFTWARE_X11) || if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
ENGINE_COMPARE(ELM_SOFTWARE_16_X11) || ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
ENGINE_COMPARE(ELM_XRENDER_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 #undef ENGINE_COMPARE
{ {
#ifdef HAVE_ELEMENTARY_X #ifdef HAVE_ELEMENTARY_X

View File

@ -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[ 8] = ELM_WAYLAND_EGL;
enginelist[ 9] = ELM_DRM; enginelist[ 9] = ELM_DRM;
enginelist[10] = ELM_OPENGL_SDL; enginelist[10] = ELM_OPENGL_SDL;
enginelist[11] = NULL; enginelist[11] = ELM_SOFTWARE_WIN32;
enginelist[12] = NULL;
} }
} }
for (i = 0; i < 30; i++) for (i = 0; i < 30; i++)