TOC?

Introduction

This document provides some help to build the EFL for the Windows CE platform. The current EFL that are ported are evil, eina, eet, evas, ecore, embryo and edje. The ports are not complete, nor without bugs and is work in progress. So any help is welcome.

To compile the EFL for the Windows CE platform, the  CeGCC project is used. It provides a set of cross-development tools that generate code for Windows CE devices. The document describes how to set properly the cegcc framework and how to compile the supported EFL.

Installation and configuration of CeGCC

The  CeGCC project provides a set of cross-development tools that generate code for Windows CE devices. The installation is quite simple as it is just the decompression of an archive. It can be used on Linux and Windows (with cygwin). It is possible to compile  CeGCC with MSYS/MinGW to have native compilers and tools, with some hacks though. Also, using  CeGCC on 64 bits Linux distributions might not work.

The  CeGCC project provides 2 products:

  • mingw32ce: creates Windows CE native applications.
  • cegcc: ports *nix sources to Windows CE. It is done via a POSIX layer so the compilation is most of the time quite easy. But a DLL is needed for the programs / libraries to be run. Hence the load is a bit slower than with mingw32ce.

mingw32ce will be used to provide native port of the EFL. So the cegcc support is dropped.

Installation

Now, here is how to install  CeGCC from source. Get the source code from  svn, go to trunk/cegcc/src/ directory, create the subdirectory build, go into it and launch ../scripts/build-mingw32ce.sh to compile it. You can modify that shell file to change the prefix directory, by changing the value of PREFIX. By default, /mingw32ce will be installed in /opt/mingw32ce.

Also, in order to have no problem with the compilation with  CeGCC, install autoconf 2.65, automake 1.11.1 and libtool 2.4. Those are known to work.

Libtool is not happy with the c++ compiler of  CeGCC. So you have to modify the file libstdc++.la. The file is in /path/to/mingw32ce/arm-mingw32ce/lib. Remove all the occurences of -lm in that file.

Configuration

Now, some environment variables must be set, so that everything compiles flawlessly:

Create a file named mingw32ce.sh with this content :

#! /bin/sh

export MINGW32CE_PATH=$HOME/local/opt/mingw32ce
export WINCE_PATH=$HOME/local/wince

export PATH=$MINGW32CE_PATH/bin:$PATH
export CPPFLAGS="-I$WINCE_PATH/include"
export LDFLAGS="-L$WINCE_PATH/lib"
export LD_LIBRARY_PATH="$WINCE_PATH/bin"
export PKG_CONFIG_PATH="$WINCE_PATH/lib/pkgconfig"
export PKG_CONFIG_LIBDIR="$WINCE_PATH/lib/pkgconfig"

Every time you want to work with mingw32ce compiler, juste source this file with this command :

source /path/to/mingw32ce.sh

You can add that shell commands to your personal script configuration file. You can also modify the three first variables to suit your needs

With the settings above, all the files will be installed in subdirectories of WINCE_PATH.

Dependencies

Download the file efl_wince_dep.tar.bz2 Download (click on the small down arrow just on the left) and unzip it in the $WINCE_PATH directory.

  • Edit the file $WINCE_PATH/lib/pkgconfig/freetype2.pc and set the value of prefix to the value of $WINCE_PATH.
  • Edit the file $WINCE_PATH/lib/pkgconfig/libpng.pc and set the value of prefix to the value of $WINCE_PATH.

Build of Evil

Evil is a library that tries to implement for Windows some Unix functions that do not exist on the Microsoft platform. In addition to Windows XP, it tries to support Windows CE platform with the  CeGCC framework. There aren't any dependencies. Just download it from  svn (trunk/PROTO/evil) and go to the evil subdir. Then,

CFLAGS="-O3 -pipe" LDFLAGS="$LDFLAGS -Wl,-s" ./autogen.sh --host=arm-mingw32ce --prefix=$WINCE_PATH
make
make install

You should now have the evil libraries and binaries installed in $WINCE_PATH.

Build of Eina

Eina is a library that implement data types in an very optimized way. It includes also a small set of tools that can be used in most of the EFL. Eina supports text conversion with iconv, though it's optional. Right now, that dependency is available as alpha on my server. It may not work at all, but text conversion will be available (it can be used in elementary). That dependency should have already been installed.

Download it from  svn (trunk/eina) and go to the eina subdir. Then,

CFLAGS="-O3 -pipe" LDFLAGS="$LDFLAGS -Wl,-s" ./autogen.sh --host=arm-mingw32ce --prefix=$WINCE_PATH --enable-magic-debug=no
make
make install

You should now have the eina libraries and binaries installed in $WINCE_PATH.

Build of Eet

Eet needs Evil (only on Windows, of course), zlib and libjpeg, which can be found on the CeGCC Sourceforge site. Those dependencies should have already been installed.

It is better to get Eet from svn. Follow the instructions on that  page. Go to the eet/ subdir, then

CFLAGS="-O3 -pipe" LDFLAGS="$LDFLAGS -Wl,-s" ./autogen.sh --host=arm-mingw32ce --prefix=$WINCE_PATH
make
make install

You should now have eet installed in $WINCE_PATH.

Build of Evas

Evas needs some libraries to be compiled: Freetype and libpng (the latter is needed to load most of the images used in the EFL). Here again these dependencies can be downloaded from the CeGCC Sourceforge site. Those dependencies should have already been installed.

It is better to get Evas from svn. Follow the instructions on that  page. Go to the evas/ subdir, then

CFLAGS="-O3 -pipe" LDFLAGS="$LDFLAGS -Wl,-s" ./autogen.sh --host=arm-mingw32ce --prefix=$WINCE_PATH --disable-async-preload --disable-pipe-render --disable-async-render

make
make install

You should now have evas installed in $WINCE_PATH.

Build of Expedite

Now that you have installed evas, you can try the application that is used to benchmark our favorite canvas library.

Follow the instructions on that  page to download the source code of expedite. Go to the expedite/ subdir, then

CFLAGS="-O3 -pipe" LDFLAGS="$LDFLAGS -Wl,-s" ./autogen.sh --host=arm-mingw32ce --prefix=$WINCE_PATH
make
make install

You should now have expedite installed in $WINCE_PATH.

Build of Ecore

Ecore does not need any dependency. It is better to get Ecore from svn. Follow the instructions on that  page. Go to the ecore/ subdir, then

CFLAGS="-O3 -pipe" LDFLAGS="$LDFLAGS -Wl,-s" ./autogen.sh --host=arm-mingw32ce --prefix=$WINCE_PATH --disable-nls --enable-ecore-imf --enable-ecore-imf-evas
make
make install

You should now have ecore installed in $WINCE_PATH.

Build of Embryo

Embryo does not need any dependency. Just get it from svn. Follow the instructions on that  page. Go to the embryo/ subdir, then

CFLAGS="-O3 -pipe" LDFLAGS="$LDFLAGS -Wl,-s" ./autogen.sh --host=arm-mingw32ce --prefix=$WINCE_PATH
make
make install

You should now have embryo installed in $WINCE_PATH.

Build of Edje

Edje needs to be built. That dependency should have already been installed.

Just get it from svn. Follow the instructions on that  page. Go to the edje/ subdir, then

CFLAGS="-O3 -pipe" LDFLAGS="$LDFLAGS -Wl,-s" ./autogen.sh --host=arm-mingw32ce --prefix=$WINCE_PATH --disable-edje-recc --disable-edje-decc --disable-edje-cc --disable-edje-player --disable-edje-inspector --disable-edje-external-inspector
make
make install

You should now have edje installed in $WINCE_PATH.

Build of Elementary

Elementary does not need any dependency but needs a working edje_cc program to compile the theme (we suppose that it is located in /foo/bar). Just get it from svn (TMP/st/elementary). Follow the instructions on that  page. Go to the elementary/ subdir, then

CFLAGS="-O3 -pipe" LDFLAGS="$LDFLAGS -Wl,-s" ./autogen.sh --host=arm-mingw32ce --prefix=$WINCE_PATH --with-edje-cc=/foo/bar/edje_cc
make
make install

You should now have elementary and its theme installed in $WINCE_PATH.

Installation in the device

You can install the files in your device with synce. Install synce and dccm. Execute:

dccm
synce-serial-start (as root)

create the file expedite_wince.lnk (a text file) in $WINCE_PATH/bin, with, in it:

99#"\program files\efl\expedite.exe" -datadir "\program files\efl\expedite\data" -e wince-fb -p qvga-p

Then go to the $WINCE_PATH and create a script file named efl_zip.sh using that code:

#!/bin/sh

rm -rf efl/
rm -f efl.zip

mkdir -p efl/eina/mp
mkdir -p efl/evas/modules/engines/buffer/mingw32ce-arm/
mkdir -p efl/evas/modules/engines/software_16/mingw32ce-arm/
mkdir -p efl/evas/modules/engines/software_16_wince/mingw32ce-arm/
mkdir -p efl/evas/modules/engines/software_generic/mingw32ce-arm/
mkdir -p efl/evas/modules/loaders/eet/mingw32ce-arm/
mkdir -p efl/evas/modules/loaders/jpeg/mingw32ce-arm/
mkdir -p efl/evas/modules/loaders/pmaps/mingw32ce-arm/
mkdir -p efl/evas/modules/loaders/png/mingw32ce-arm/
mkdir -p efl/evas/modules/loaders/xpm/mingw32ce-arm/
mkdir -p efl/evas/modules/savers/eet/mingw32ce-arm/
mkdir -p efl/evas/modules/savers/png/mingw32ce-arm/

cp bin/eet.exe efl/
cp bin/libdl-0.dll efl/
cp bin/libevil-0.dll efl/
cp bin/libeina-0.dll efl/
cp bin/libeet-1.dll efl/
cp bin/libevas-0.dll efl/
cp bin/libecore-0.dll efl/
cp bin/libecore_evas-0.dll efl/
cp bin/libecore_wince-0.dll efl/
cp bin/libembryo-0.dll efl/
cp bin/libedje-0.dll efl/

arm-mingw32ce-strip efl/libdl-0.dll
arm-mingw32ce-strip efl/libevil-0.dll
arm-mingw32ce-strip efl/libeina-0.dll
arm-mingw32ce-strip efl/libeet-1.dll
arm-mingw32ce-strip efl/libevas-0.dll
arm-mingw32ce-strip efl/libecore-0.dll
arm-mingw32ce-strip efl/libecore_evas-0.dll
arm-mingw32ce-strip efl/libecore_wince-0.dll
arm-mingw32ce-strip efl/libembryo-0.dll
arm-mingw32ce-strip efl/libedje-0.dll


cp lib/eina/mp/eina_chained_mempool.dll efl/eina/mp
cp lib/eina/mp/eina_fixed_bitmap.dll efl/eina/mp
cp lib/eina/mp/pass_through.dll efl/eina/mp

arm-mingw32ce-strip efl/eina/mp/eina_chained_mempool.dll
arm-mingw32ce-strip efl/eina/mp/eina_fixed_bitmap.dll
arm-mingw32ce-strip efl/eina/mp/pass_through.dll


cp lib/evas/modules/engines/buffer/mingw32ce-arm/module.dll efl/evas/modules/engines/buffer/mingw32ce-arm/engine_buffer.dll
cp lib/evas/modules/engines/software_16/mingw32ce-arm/module.dll efl/evas/modules/engines/software_16/mingw32ce-arm/engine_software_16.dll
cp lib/evas/modules/engines/software_16_wince/mingw32ce-arm/module.dll efl/evas/modules/engines/software_16_wince/mingw32ce-arm/engine_software_16_wince.dll
cp lib/evas/modules/engines/software_generic/mingw32ce-arm/module.dll efl/evas/modules/engines/software_generic/mingw32ce-arm/engine_software_generic.dll

cp lib/evas/modules/loaders/eet/mingw32ce-arm/module.dll efl/evas/modules/loaders/eet/mingw32ce-arm/loader_eet.dll
cp lib/evas/modules/loaders/jpeg/mingw32ce-arm/module.dll efl/evas/modules/loaders/jpeg/mingw32ce-arm/loader_jpeg.dll
cp lib/evas/modules/loaders/pmaps/mingw32ce-arm/module.dll efl/evas/modules/loaders/pmaps/mingw32ce-arm/loader_pmaps.dll
cp lib/evas/modules/loaders/png/mingw32ce-arm/module.dll efl/evas/modules/loaders/png/mingw32ce-arm/loader_png.dll
cp lib/evas/modules/loaders/xpm/mingw32ce-arm/module.dll efl/evas/modules/loaders/xpm/mingw32ce-arm/loader_xpm.dll

cp lib/evas/modules/savers/eet/mingw32ce-arm/module.dll efl/evas/modules/savers/eet/mingw32ce-arm/saver_eet.dll
cp lib/evas/modules/savers/png/mingw32ce-arm/module.dll efl/evas/modules/savers/png/mingw32ce-arm/saver_png.dll

arm-mingw32ce-strip efl/evas/modules/engines/buffer/mingw32ce-arm/engine_buffer.dll
arm-mingw32ce-strip efl/evas/modules/engines/software_16/mingw32ce-arm/engine_software_16.dll
arm-mingw32ce-strip efl/evas/modules/engines/software_16_wince/mingw32ce-arm/engine_software_16_wince.dll
arm-mingw32ce-strip efl/evas/modules/engines/software_generic/mingw32ce-arm/engine_software_generic.dll

arm-mingw32ce-strip efl/evas/modules/loaders/eet/mingw32ce-arm/loader_eet.dll
arm-mingw32ce-strip efl/evas/modules/loaders/jpeg/mingw32ce-arm/loader_jpeg.dll
arm-mingw32ce-strip efl/evas/modules/loaders/pmaps/mingw32ce-arm/loader_pmaps.dll
arm-mingw32ce-strip efl/evas/modules/loaders/png/mingw32ce-arm/loader_png.dll
arm-mingw32ce-strip efl/evas/modules/loaders/xpm/mingw32ce-arm/loader_xpm.dll

arm-mingw32ce-strip efl/evas/modules/savers/eet/mingw32ce-arm/saver_eet.dll
arm-mingw32ce-strip efl/evas/modules/savers/png/mingw32ce-arm/saver_png.dll

cp bin/libfreetype-6.dll efl/
cp bin/jpeg62.dll efl/
cp bin/libpng12-0.dll efl/
cp bin/libpng-3.dll efl/
cp bin/zlib1.dll efl/

zip -r -9 efl.zip efl/

Go to the $WINCE_PATH and create another script file named expedite_zip.sh using that code:

#!/bin/sh

rm -rf efl/

mkdir -p efl/expedite/data/

cp bin/expedite.exe efl/

cp share/expedite/data/Kochi.ttf efl/expedite/data/Kochi.ttf
cp share/expedite/data/Vera.ttf efl/expedite/data/Vera.ttf
cp share/expedite/data/VeraBI.ttf efl/expedite/data/VeraBI.ttf
cp share/expedite/data/VeraBd.ttf efl/expedite/data/VeraBd.ttf
cp share/expedite/data/VeraIt.ttf efl/expedite/data/VeraIt.ttf
cp share/expedite/data/VeraMoBI.ttf efl/expedite/data/VeraMoBI.ttf
cp share/expedite/data/VeraMoBd.ttf efl/expedite/data/VeraMoBd.ttf
cp share/expedite/data/VeraMoIt.ttf efl/expedite/data/VeraMoIt.ttf
cp share/expedite/data/VeraMono.ttf efl/expedite/data/VeraMono.ttf
cp share/expedite/data/VeraSe.ttf efl/expedite/data/VeraSe.ttf
cp share/expedite/data/VeraSeBd.ttf efl/expedite/data/VeraSeBd.ttf
cp share/expedite/data/fonts.alias efl/expedite/data/fonts.alias
cp share/expedite/data/fonts.dir efl/expedite/data/fonts.dir
cp share/expedite/data/bg.png efl/expedite/data/bg.png
cp share/expedite/data/logo.png efl/expedite/data/logo.png
cp share/expedite/data/e.png efl/expedite/data/e.png
cp share/expedite/data/image.png efl/expedite/data/image.png
cp share/expedite/data/bar.png efl/expedite/data/bar.png
cp share/expedite/data/frame.png efl/expedite/data/frame.png
cp share/expedite/data/pan.png efl/expedite/data/pan.png
cp share/expedite/data/tp.png efl/expedite/data/tp.png
cp share/expedite/data/tp.yuv efl/expedite/data/tp.yuv
cp share/expedite/data/icon_sel.png efl/expedite/data/icon_sel.png
cp share/expedite/data/icon_sel2.png efl/expedite/data/icon_sel2.png
cp share/expedite/data/text_sel.png efl/expedite/data/text_sel.png
cp share/expedite/data/exit.png efl/expedite/data/exit.png
cp share/expedite/data/watch.png efl/expedite/data/watch.png
cp share/expedite/data/bug.png efl/expedite/data/bug.png
cp share/expedite/data/bulb.png efl/expedite/data/bulb.png
cp share/expedite/data/camera.png efl/expedite/data/camera.png
cp share/expedite/data/colorbox.png efl/expedite/data/colorbox.png
cp share/expedite/data/error.png efl/expedite/data/error.png
cp share/expedite/data/flower.png efl/expedite/data/flower.png
cp share/expedite/data/house.png efl/expedite/data/house.png
cp share/expedite/data/mushroom.png efl/expedite/data/mushroom.png
cp share/expedite/data/pulse.png efl/expedite/data/pulse.png
cp share/expedite/data/typewriter.png efl/expedite/data/typewriter.png
cp share/expedite/data/warning.png efl/expedite/data/warning.png
cp share/expedite/data/im1.png efl/expedite/data/im1.png
cp share/expedite/data/im2.png efl/expedite/data/im2.png

zip -r -9 expedite.zip efl/

Put the 2 zip files efl.zip and expedite.zip into your device (using synce, or a SD card, or the wifi), then unzip them in the root directory. It will copy the files to your device in the "\efl" directory.

Then execute the short cut file expedite_wince.lnk. It will execute expedite, using the raw framebuffer backend. Use -e wince-gapi to use the gapi backend (modify the short cut).

Acknowledgment

I would like to thank Raoul Hecky (from the Calaos project), Nicolas Aguirre, Lars Munch and Lance Fetters (ashikase) for their great help.

Attachments