Enlightenment CVS committal
Author : doursse
Project : e17
Module : apps/expedite
Dir : e17/apps/expedite/src/bin
Modified Files:
Makefile.am main.c main.h
Added Files:
engine_software_16_wince.c engine_software_16_wince.h
Log Message:
* add wince engine support
* add -datadir option in command line, so that the data directory can be
specified with command line. Best way to manage data dir with Windows
CE OS, which does not support env variables...
===================================================================
RCS file: /cvs/e/e17/apps/expedite/src/bin/Makefile.am,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- Makefile.am 30 Mar 2008 16:06:21 -0000 1.16
+++ Makefile.am 29 Apr 2008 22:02:30 -0000 1.17
@@ -57,7 +57,9 @@
image_blend_occlude3_very_many.c \
poly_blend.c
-expedite_LDADD = @EVAS_LIBS@ @SDL_LIBS@ @x_libs@ @ddraw_libs@ @ddraw_16_libs@
@d3d_libs@ @glew_libs@ @DIRECTFB_LIBS@ -lm
+expedite_CFLAGS = @WIN32_CFLAGS@
+expedite_LDADD = @EVAS_LIBS@ @SDL_LIBS@ @x_libs@ @ddraw_libs@ @ddraw_16_libs@
@d3d_libs@ @wince_16_libs@ @glew_libs@ @DIRECTFB_LIBS@ -lm
+expedite_LDFLAGS = @lt_enable_auto_import@
if BUILD_SOFTWARE_X11
expedite_SOURCES += \
@@ -97,6 +99,11 @@
if BUILD_DIRECT3D
expedite_SOURCES += \
engine_direct3d.cpp engine_direct3d.h
+endif
+
+if BUILD_SOFTWARE_16_WINCE
+expedite_SOURCES += \
+engine_software_16_wince.c engine_software_16_wince.h
endif
if BUILD_SOFTWARE_SDL
===================================================================
RCS file: /cvs/e/e17/apps/expedite/src/bin/main.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- main.c 25 Feb 2008 06:08:34 -0000 1.19
+++ main.c 29 Apr 2008 22:02:30 -0000 1.20
@@ -3,6 +3,7 @@
Evas *evas = NULL;
int win_w = 720, win_h = 420;
+static char *datadir = NULL;
static int go = 1;
static void (*loop_func) (void) = NULL;
@@ -1087,11 +1088,13 @@
{
char *prefix;
- prefix = getenv("EXPEDITE_DATA_DIR");
+ prefix = datadir;
if (!prefix)
- strcpy(path, PACKAGE_DATA_DIR"/data/");
- else
- snprintf(path, 4096, "%s/", prefix);
+ prefix = getenv("EXPEDITE_DATA_DIR");
+ if (!prefix)
+ prefix = PACKAGE_DATA_DIR"/data/";
+
+ snprintf(path, 4096, "%s/", prefix);
init = 1;
}
@@ -1154,6 +1157,20 @@
return 1;
}
+static char *
+_datadir_parse(int argc, char **argv)
+{
+ int i;
+
+ for (i = 1; i < argc; i++)
+ {
+ if ((!strcmp(argv[i], "-datadir")) && (i < (argc - 1)))
+ return argv[i + 1];
+ }
+
+ return NULL;
+}
+
static void
_engine_args(int argc, char **argv)
{
@@ -1199,6 +1216,10 @@
if (engine_direct3d_args(argc, argv))
loop_func = engine_direct3d_loop;
#endif
+#if HAVE_EVAS_SOFTWARE_16_WINCE
+ if (engine_software_16_wince_args(argc, argv))
+ loop_func = engine_software_16_wince_loop;
+#endif
#if HAVE_EVAS_FB
if (engine_fb_args(argc, argv))
loop_func = engine_fb_loop;
@@ -1213,6 +1234,7 @@
"No engine selected.\n"
"\n"
"Options:\n"
+ " -datadir path/to/data\n"
" -a (autorun all tests)\n"
" -e ENGINE\n"
" -p PROFILE\n"
@@ -1243,6 +1265,11 @@
#if HAVE_EVAS_DIRECT3D
" direct3d"
#endif
+#if HAVE_EVAS_SOFTWARE_16_WINCE
+ " wince"
+ " wince-fb"
+ " wince-gapi"
+#endif
#if HAVE_EVAS_SOFTWARE_SDL
" sdl"
#endif
@@ -1260,11 +1287,15 @@
exit(-1);
}
- prefix = getenv("EXPEDITE_FONTS_DIR");
+ datadir = _datadir_parse(argc, argv);
+
+ prefix = datadir;
if (!prefix)
- strcpy(buf, PACKAGE_DATA_DIR"/data");
- else
- snprintf(buf, 4096, "%s", prefix);
+ prefix = getenv("EXPEDITE_FONTS_DIR");
+ if (!prefix)
+ prefix = PACKAGE_DATA_DIR"/data";
+
+ snprintf(buf, 4096, "%s", prefix);
evas_output_size_set(evas, win_w, win_h);
evas_output_viewport_set(evas, 0, 0, win_w, win_h);
===================================================================
RCS file: /cvs/e/e17/apps/expedite/src/bin/main.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- main.h 25 Feb 2008 06:08:34 -0000 1.11
+++ main.h 29 Apr 2008 22:02:30 -0000 1.12
@@ -38,6 +38,9 @@
#if HAVE_EVAS_DIRECT3D
#include "engine_direct3d.h"
#endif
+#if HAVE_EVAS_SOFTWARE_16_WINCE
+#include "engine_software_16_wince.h"
+#endif
#if HAVE_EVAS_SOFTWARE_SDL
#include "engine_software_sdl.h"
#endif
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs