more checks at runtime if e is ok - ie evas and ecore_evas supoprt is all
authorCarsten Haitzler <raster@rasterman.com>
Mon, 23 Jan 2006 15:52:47 +0000 (15:52 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Mon, 23 Jan 2006 15:52:47 +0000 (15:52 +0000)
there.

SVN revision: 19990

data/images/Makefile.am
data/images/test.edj [new file with mode: 0644]
data/images/test.jpg [new file with mode: 0644]
data/images/test.png [new file with mode: 0644]
enlightenment.spec.in
src/bin/e_main.c

index e236130..2466fe8 100644 (file)
@@ -4,6 +4,9 @@ files_DATA = \
 button_in.png \
 button_out.png \
 e.png \
-error_bg.png
+error_bg.png \
+test.png \
+test.jpg \
+test.edj
 
 EXTRA_DIST = $(files_DATA)
diff --git a/data/images/test.edj b/data/images/test.edj
new file mode 100644 (file)
index 0000000..0ed35f9
Binary files /dev/null and b/data/images/test.edj differ
diff --git a/data/images/test.jpg b/data/images/test.jpg
new file mode 100644 (file)
index 0000000..edbae97
Binary files /dev/null and b/data/images/test.jpg differ
diff --git a/data/images/test.png b/data/images/test.png
new file mode 100644 (file)
index 0000000..9f7ee70
Binary files /dev/null and b/data/images/test.png differ
index 0f98df5..6ac4be6 100644 (file)
@@ -11,8 +11,9 @@ Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:The Enlightenment Project
 Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
 Prefix: %{_prefix}
 #BuildSuggests: xorg-x11-devel
-BuildRequires: libjpeg-devel XFree86-devel eet-devel embryo-devel
-BuildRequires: evas-devel edb-devel edje-devel imlib2-devel ecore-devel
+BuildRequires: XFree86-devel
+BuildRequires: evas-devel edje-devel ecore-devel eet-devel
+Requires: evas edje ecore eet evas-module_loader_eet evas-module_saver_eet evas-module_loader_png evas-module_saver_png evas-module_loader_jpeg evas-module_saver_jpeg evas-module_engine_software_x11 evas-module_engine_buffer
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 
 %description
@@ -22,8 +23,8 @@ Enlightenment is a window manager.
 Summary: Development headers for Enlightenment. 
 Group: User Interface/Desktops
 Requires: %{name} = %{version}
-Requires: libjpeg-devel XFree86-devel eet-devel embryo-devel
-Requires: evas-devel edb-devel edje-devel imlib2-devel ecore-devel
+Requires: XFree86-devel eet-devel
+Requires: evas-devel edje-devel ecore-devel
 
 %description devel
 Development headers for Enlightenment.
index 4877f35..7deaeec 100644 (file)
@@ -354,11 +354,61 @@ main(int argc, char **argv)
     }
    if (!ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_SOFTWARE_X11))
      {
-       e_error_message_show(_("Enlightenment found ecore_evas doesnt support Software X11\n"
+       e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Software X11\n"
                               "rendering in Evas. Please check your installation of Evas and\n"
-                              "Ecore and check they support Software X11 rendering."));
+                              "Ecore and check they support the Software X11 rendering engine."));
        _e_main_shutdown(-1);
      }
+   if (!ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_SOFTWARE_BUFFER))
+     {
+       e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Software Buffer\n"
+                              "rendering in Evas. Please check your installation of Evas and\n"
+                              "Ecore and check they support the Software Buffer rendering engine."));
+       _e_main_shutdown(-1);
+     }
+     {
+       Ecore_Evas *ee;
+       Evas_Object *im;
+       char buf[4096];
+       
+       ee = ecore_evas_buffer_new(1, 1);
+       if (!ee)
+         {
+            e_error_message_show(_("Enlightenment found evas can't create a buffer canvas. Please check\n"
+                                   "Evas has Software Buffer engine support.\n"));
+            _e_main_shutdown(-1);
+         }
+       im = evas_object_image_add(ecore_evas_get(ee));
+
+       snprintf(buf, sizeof(buf), "%s/data/images/test.png", e_prefix_data_get());
+       evas_object_image_file_set(im, buf, NULL);
+       if (evas_object_image_load_error_get(im) != EVAS_LOAD_ERROR_NONE)
+         {
+            e_error_message_show(_("Enlightenment found evas can't load PNG files. Check Evas has PNG\n"
+                                   "loader support.\n"));
+            _e_main_shutdown(-1);
+         }
+       
+       snprintf(buf, sizeof(buf), "%s/data/images/test.jpg", e_prefix_data_get());
+       evas_object_image_file_set(im, buf, NULL);
+       if (evas_object_image_load_error_get(im) != EVAS_LOAD_ERROR_NONE)
+         {
+            e_error_message_show(_("Enlightenment found evas can't load JPEG files. Check Evas has JPEG\n"
+                                   "loader support.\n"));
+            _e_main_shutdown(-1);
+         }
+
+       snprintf(buf, sizeof(buf), "%s/data/images/test.edj", e_prefix_data_get());
+       evas_object_image_file_set(im, buf, "images/0");
+       if (evas_object_image_load_error_get(im) != EVAS_LOAD_ERROR_NONE)
+         {
+            e_error_message_show(_("Enlightenment found evas can't load EET files. Check Evas has EET\n"
+                                   "loader support.\n"));
+            _e_main_shutdown(-1);
+         }
+       evas_object_del(im);
+       ecore_evas_free(ee);
+     }
    _e_main_shutdown_push(ecore_evas_shutdown);        
    
    /* init the enlightenment thumbnailing system */