TOC?

Introduction

This document provides some help to build the EFL on Windows using  MSYS/MinGW or on Linux using the MinGW cross-compilation toolchain. The differences are only the installation and configuration of the tools. The current EFL that are ported are evil, eina, eet, evas, ecore, embryo, edje, efreet, e_dbus and elementary. The ports are not complete, nor without bugs. So any help is welcome.

To compile the EFL with Visual Studio, see this page.

Installation and configuration of MSYS/MinGW

 MSYS provides a set of tools to make life easier when porting programs or libraries from Unix to Windows. It includes a terminal, a shell (bash) and the autotools. Contrary to  Cygwin, MSYS builds native Win32 applications or libraries.  MinGW provides mainly  gcc.

MSYS/MinGW can be downloaded on  Sourceforge, but the links will be given below.

You will need a file archiver. I like  7-zip.

Installation

The total size of the installation of MSYS/MinGW is around 230 MB. Be sure to have enough space on your hard disk.

Warning: gcc can not work if it is installed in a path containing spaces. So do not install it in c:\Program Files for example. We will install MSYS/MinGW in c:\MinGW.

  • Grab the lastest MinGW installer from this  location.
  • Execute it and use the default values, except:
    • When it asks you to choose the repository catalogue, choose "Download the latest repository catalogue".
    • When it asks you to select components, select the "C++ compiler", "MSYS basic system" and "MinGW developper toolkit".
  • When the installation finishes, you can open a shell window with Start-->Programs-->MinGW-->MinGW Shell. You can create a shortcut on the desktop for faster launch of the MinGW Shell.
  • When you want to upgrade the system, open a MinGW Shell, launch "mingw-get upgrade" and mingw-get install <the package>
  • If you want to install anything that is not provided by the MinGW team, I highly suggest that you install it in /usr/local/
  • All the EFL dependencies and the EFL themselves will be installed in /opt/efl.

Now close the terminal and relaunch it.

Configuration

As all the libraries will be installed in /opt/efl, PATH, CPPFLAGS, LDFLAGS and PKG_CONFIG_PATH must be set.

Open the file /etc/profile (C:\MinGW\msys\1.0\etc\profile) with your favorite editor (that is NOT Notepad. Unix, Linux background, use Emacs or Vi. They exist on Windows. Windows background, use Notepad++, see  Notepad++.) and add:

PATH="/opt/efl/bin:$PATH"
CPPFLAGS="-I/opt/efl/include -I/opt/efl/include/evil-1"
LDFLAGS="-L/opt/efl/lib"
PKG_CONFIG_PATH="/opt/efl/lib/pkgconfig"
ACLOCAL_FLAGS="-I /opt/efl/share/aclocal"

for example just before

export HOME LOGNAME MSYSTEM HISTFILE

and modify that line by adding the five variables:

export HOME LOGNAME MSYSTEM HISTFILE PATH CPPFLAGS LDFLAGS PKG_CONFIG_PATH ACLOCAL_FLAGS

If you don't want to do development with MinGW (that is, just create the dll), you might also want to set CFLAGS and LDFLAGS for optimized results. Good options for MinGW are:

CFLAGS="-O3 -mms-bitfields -march=`uname -m`"
LDFLAGS="-L/usr/local/lib -Wl,-s -Wl,-subsystem,windows"

Finally, we will use mingw-get to install the dependencies. Edit the file c:\MinGW\var\lib\mingw-get\data\profile.xml.

  • Add
      <repository uri="http://dev.enlightenment.fr/~doursse/mingw-w64-x86_32/%F.xml.lzma">
    	<package-list catalogue="mingw-w64-x86_32-efl-package-list" />
      </repository>
    

just after

  <repository uri="http://prdownloads.sourceforge.net/mingw/%F.xml.lzma?download">
  </repository>
  • Add
    <sysroot subsystem="efl" path="%R/msys/1.0/opt/efl" />
    

just after

<sysroot subsystem="MSYS" path="%R/msys/1.0" />

Then, in the MSYS terminal, launch:

mingw-get update

You will see a list of packages scrolling. At the end, mingw-w64-x86_32-* files must appear.

Install the dependencies:

mingw-get install libfontconfig-dev libpng-dev libtiff-dev libcurl-dev lua-dev

Installation and configuration of MinGW on Linux

Most of the tools are already installed on Linux. You almost just have to install the MinGW packages.

Installation

The needed packages are, on Ubuntu, mingw32, mingw32-runtime and mingw32-binutils. The name of the packages could change on another linux distribution. You should not need to install glib or pkg-config for Eina (as they should already be installed).

Configuration

All the programs and libraries will be installed in $HOME/local/mingw

Write the following script (name it mingw.sh):

#!/bin/sh

export MINGW_PREFIX="$HOME/local/mingw"

export CPPFLAGS="-I$MINGW_PREFIX/include -I$MINGW_PREFIX/include/evil-1"
export LDFLAGS="-L$MINGW_PREFIX/lib"
export PATH="$MINGW_PREFIX/bin:$PATH"
export LD_LIBRARY_PATH="$MINGW_PREFIX/lib"
export PKG_CONFIG_PATH="$MINGW_PREFIX/lib/pkgconfig"
export PKG_CONFIG_LIBDIR="$MINGW_PREFIX/lib/pkgconfig"

modify its permissions so that it can be executed, put in in your PATH and source it:

source mingw.sh

Important: Now, the only modifications with respect to the MSYS/MinGW build on Windows XP is the for each call of autogen.sh or configure, --prefix=$MINGW_PREFIX --host=i586-mingw32msvc must be added so that the cross-compilation toolchain is used, instead of the Linux GCC compiler. Also, the dependencies must be installed in $HOME/local/mingw.

Build of Evil

Evil is a library that tries to implement for Windows some Unix function that do not exist on the evil Microsoft platform. In addition to Windows XP, it also supports Windows CE platform with the CeGCC framework. There is no dependency. Just download it from svn (trunk/PROTO/evil) and go to the evil subdir. Then,

./autogen.sh --prefix=/opt/efl
make -j 3
make install

You should now have evil libraries and binaries installed in /opt/efl.

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. It depends on Evil (on Windows). For Evil, you just need pkg-config.

Dependencies

Eina needs iconv and pkg-config. On linux go this  repository to download them and untar them in /opt/efl.

Build Eina

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

./autogen.sh --prefix=/opt/efl --enable-win32-threads
make -j 3
make install

You should now have eina libraries and binaries installed in /opt/efl.

Build of Eet

Eet needs Evil (only on Windows, of course), Eina, zlib and libjpeg.

Dependencies

On linux go this  repository to download them and untar them in /opt/efl.

Build Eet

It is better to get Eet from svn. Open an MSYS terminal and follow the instructions on that page.

Like on Unix : go to the eet/ subdir, then

./autogen.sh --prefix=/opt/efl --disable-gnutls --disable-openssl
make -j 3
make install

You should now have eet installed in /opt/efl.

Build of Evas

Evas has some required dependencies, as well as optional dependencies (for loaders and engines).

Dependencies

On linux go this  repository to download Freetype, Expat, Fontconfig, libpng and libtiff, and untar them in /opt/efl.

  • The available engines are based on DirectDraw, Direct3d, SDL and OpenGL (and of course the buffer one, which is always built).
    • For SDL, just compile the source code that you can find  here.
    • For OpenGL, the Glew library is needed. Get the  sources and untar them in your home directory. Then edit the Makefile , add /local to the value of GLEW_DEST (to install Glew in /usr/local) and add -Wl,-s to LIB.LDFLAGS. Then make and make install.
    • For DirectDraw and Direct3D, you will need the Microsoft DirectX SDK. Install it. It will put the latest dll in c:\windows\system32. Then just copy the necessary headers (ddraw.h, d3dx9*.h and d3dx9math.inl) in /usr/local/include, copy d3dx9.lib to /mingw/lib and rename it as libd3dx9.a. The static lib of DirectDraw? is already provided by MinGW.

Build Evas

It is better to get Evas from svn. Open an MSYS terminal and follow the instructions on that page.

Like on Unix : go to the evas/ subdir, then:

./autogen.sh --prefix=/opt/efl --disable-async-preload --disable-async-render
make
make install

You should now have evas and its built modules installed in /opt/efl.

Build of Ecore

The only dependency of Ecore for Windows is  libcurl and libibtl for internationalisation.

Dependencies

libcurl needs libssh2, c-ares and gnutls. gnutls and libssh2 need libgpg-error and libgcrypt. On linux, download them from this  repository, as well as gettext and untar them in /opt/efl.

Build Ecore

It is better to get Ecore from svn. Open an MSYS terminal and follow the instructions on that page.

Like on Unix : go to the ecore/ subdir, then

./autogen.sh --prefix=/opt/efl --disable-glib --enable-win32-threads --enable-cares
make
make install

You should now have ecore and all its modules installed in /opt/efl.

Build of Embryo

No dependency for Embryo. Just download it from svn and go to the embryo subdir. Then,

./autogen.sh --prefix=/opt/efl
make
make install

You should now have embryo library and binaries installed in /opt/efl.

Build of Edje

Recently added in Edje, Lua scripting is now possible. Hence Lua must be installed as it it now required.

Dependencies

On linux, download lua from this  repository and untar it in /opt/efl.

Build Edje

Download it from svn and go to the edje subdir. Then,

./autogen.sh --prefix=/opt/efl --disable-edje-recc
make
make install

You should now have edje library and binaries installed in /opt/efl.

Build of Elementary

Download it from svn and go to the elementary subdir. Then,

./autogen.sh --prefix=/opt/efl --enable-win32-threads
make
make install

Note: If you cross-compile from Linux, then the cross-compiled eet.exe and edje_cc.exe binaries should not be used. Instead, use the ones which have been compiled on Linux. If they are located in /usr/bin, add to autogen.sh the options --with-edje-cc=/usr/bin/edje_cc --with-eet-eet=/usr/bin/eet.

You should now have elementary library and binaries installed in /opt/efl. To test it:

export ELM_ENGINE=gdi
elementary_test.exe

Attachments

  • Makefile Download (5.5 KB) - added by vtorri 11 months ago. Makefile to compile lua 5.1.4 for Windows