Table of Contents
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_dnus, ewl and elementary. The ports are not complete, nor without bugs (especially ewl). 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 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 110 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 in d:\msys\1.0 and MinGW in d:\msys\1.0\mingw.
- Install MSYS 1.0.11. I usually install it in d:\msys\1.0, but you can use any directory that you prefer.
- Install MSYS DTK 1.0.1 in d:\msys\1.0.
- Install MinGW 5.1.6 in d:\msys\1.0\mingw. It is better to not install it in the same directory than MSYS, though there should be no problem since MSYS 1.0.11. In the installer, choose "Download and install", then "Candidate".
- Download the w32api_3.14 and untar its contents to d:\msys\1.0\mingw.
Now you should have a cyan "M" link on the Desktop. When you double-click on it, a terminal should be launched.
The autotools that are installed by MSYS DTK do not work well and can't build DLL. Newer versions of autoconf, automake and libtool are needed. Like all the programs that will be installed, you MUST NOT install them in /usr, nor in /mingw. Install them in /usr/local. The PATH already includes that directory.
We will install autoconf 2.65, automake 1.11.1, libtool 2.2.8 and gettext 0.18 and DBus. They are sufficient and are working perfectly. gettext is needed for Ecore and Ewl. DBus is required by e_dbus.
- Open the MSYS terminal. You are in your HOME. create a 'tmp' subdir and download and untar in it autoconf 2.65, automake 1.11.1, libtool 2.2.8, gettext 0.18, libxml2 2.7.6 and GNU libiconv 1.9.1 (which are both dependencies of gettext), DBus 1.2.4.
- Go to tmp/autoconf-2.65 and run:
CFLAGS="-O3" LDFLAGS="-Wl,-s" ./configure make install
- Go to tmp/automake-1.11.1 and run:
CFLAGS="-O3" LDFLAGS="-Wl,-s" ./configure make install
- Go to tmp/libtool-2.2.8 and run:
CFLAGS="-O3" CXXFLAGS="-O3" LDFLAGS="-Wl,-s" ./configure make install
- Untar libiconv-1.9.1.bin.woe32.zip in /usr/local.
- Go to tmp/libxml2-2.7.6 and run:
CFLAGS="-O3" CXXFLAGS="-O3" LDFLAGS="-Wl,-s" ./configure make install
- Go to tmp/gettext-0.18 and run:
CFLAGS="-O3" CXXFLAGS="-O3" LDFLAGS="-Wl,-s" ./configure --enable-threads=win32 --enable-relocatable make install
It will take a LOT of time to configure and install gettext.
- Untar dbus-0.62-win.01.zip in /usr/local. The package do not provide a pkgconfig configuration file, create the file /usr/local/lib/pkgconfig/dbus-1.pc :
prefix=/usr/local exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include system_bus_default_address=unix:path=/var/run/dbus/system_bus_socket sysconfdir=/etc session_bus_services_dir=/usr/share/dbus-1/services daemondir=${exec_prefix}/bin Name: dbus Description: Free desktop message bus Version: 1.2.4 Libs: -L${libdir} -ldbus-1 Cflags: -I${includedir}/dbus-1.0 -I${libdir}/dbus-1.0/include
Now close the terminal and relaunch it.
Configuration
As all the libraries will be installed in /usr/local, CPPFLAGS, LDFLAGS and PKG_CONFIG_PATH must be set.
Open the file /etc/profile (d:\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:
CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
for example just before
export HOME LOGNAME MSYSTEM HISTFILE
and modify that line by adding the three variables:
export HOME LOGNAME MSYSTEM HISTFILE CPPFLAGS LDFLAGS PKG_CONFIG_PATH
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"
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" 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"
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 not dependency. Just download it from svn (trunk/PROTO/evil) and go to the evil subdir. Then,
./autogen.sh make make install
You should now have evil libraries and binaries installed in /usr/local.
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
Untar glib 2.22.2, pkg-config 0.23 and pkg-config 0.23 dev (for pkg.m4) in /usr/local.
Note that unlike on Unix like systems, the "shared library" files (the DLL files) are installed in the bin/ sub directory.
Build Eina
Download it from svn (trunk/eina) and go to the eina subdir. Then,
./autogen.sh make make install
You should now have eina libraries and binaries installed in /usr/local.
Build of Eet
Eet needs Evil (only on Windows, of course), Eina, zlib and libjpeg. Win32 ports of these two last libraries exist. They must be installed first.
Dependencies
- Unzip zlib 1.2.4 binaries and development files in /usr/local.
- From the GnuWin32 libjpeg page, download and unzip the binary and development files in /usr/local.
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 make make install
You should now have eet installed in /usr/local.
Build of Evas
Evas has some required dependencies, as well as optional dependencies (for loaders and engines).
Dependencies
- Unzip Freetype 2.3.12 binaries and development files, Fontconfig 2.8.0 binaries and development files, Expat 2.0 binaries in /usr/local.
- Edit the file /usr/local/lib/pkgconfig/freetype2.pc and set the value of prefix to /usr/local.
- Edit the file /usr/local/lib/pkgconfig/fontconfig.pc and set the value of prefix to /usr/local.
- Edit the file /usr/local/etc/fonts/fonts.conf and be sure that <dir>~/.fonts</dir> is there (it should).
- For the loaders, you can support PNG, GIF and TIFF files.
- For the PNG module, unzip libpng 1.4.0 binaries and development files in /usr/local.
- Edit the files /usr/local/lib/pkgconfig/libpng.pc and /usr/local/lib/pkgconfig/libpng14.pc, and set the value of prefix to /usr/local in both files.
- For the GIF module, unzip libungif 4.1.4 binaries and development files in /usr/local.
- For the TIFF module, unzip libtiff 3.9.1 binaries and development files in /usr/local.
- 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 make make install
You should now have evas and its built modules installed in /usr/local.
Build of Ecore
The only dependencies of Ecore for Windows are Curl and libiconv, which has already been installed (for gettext).
Dependencies
- Libcurl: untar libcurl 7.19.2. Copy the bin/, lib/ and include/ sub directories to /usr/local and copy libcurl.pc to /usr/local/lib/pkgconfig. Do not forget to edit the prefix value in libcurl.pc.
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 make make install
You should now have ecore and all its modules installed in /usr/local.
Build of Embryo
No dependency for Embryo. Just download it from svn and go to the embryo subdir. Then,
./autogen.sh make make install
You should now have embryo library and binaries installed in /usr/local.
Build of Edje
Recently added in Edje, Lua scripting is now possible. Hence Lua must be installed as it it now required.
Dependencies
Untar Lua 5.1.4 in your home directory. Replace the content of lua-5.1.4/src/Makefile by that code:
# Makefile for Lua 5.1.4 using MinGW. # Copyright (C) 2009 V. Torri. # To compile, type: # # make # # To install, type: # # make install TARGET = prefix = /usr/local BIN_PATH = $(prefix)/bin INCLUDE_PATH = $(prefix)/include LIBRARY_PATH = $(prefix)/lib PKGCONFIG_PATH = $(prefix)/lib/pkgconfig STATICLIB = liblua.a SHAREDLIB = lua51.dll IMPLIB = liblua.dll.a CC = $(TARGET)gcc CPPFLAGS = -DLUA_BUILD_AS_DLL CFLAGS = -O2 -Wall AR = $(TARGET)ar ARFLAGS = rcs INSTALL = install -p RM = rm -f MKDIR = mkdir -p # lua objects for the library. CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ lundump.o lvm.o lzio.o LIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \ lstrlib.o loadlib.o linit.o all: clean $(STATICLIB) $(SHAREDLIB) $(IMPLIB) .c.o: $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< $(STATICLIB): $(CORE_O) $(LIB_O) $(AR) $(ARFLAGS) $@ $(CORE_O) $(LIB_O) $(IMPLIB): $(SHAREDLIB) $(SHAREDLIB): $(CORE_O) $(LIB_O) $(CC) -shared -o $@ \ -Wl,-s \ -Wl,--out-implib=$(IMPLIB) \ -Wl,--export-all-symbols \ -Wl,--enable-auto-import \ $(CORE_O) $(LIB_O) .PHONY: install uninstall clean install: $(STATICLIB) $(IMPLIB) $(SHAREDLIB) -@$(MKDIR) $(INCLUDE_PATH) $(PKGCONFIG_PATH) -$(INSTALL) lua.h $(INCLUDE_PATH) -$(INSTALL) luaconf.h $(INCLUDE_PATH) -$(INSTALL) lualib.h $(INCLUDE_PATH) -$(INSTALL) lauxlib.h $(INCLUDE_PATH) -$(INSTALL) ../etc/lua.hpp $(INCLUDE_PATH) -$(INSTALL) ../etc/lua.pc $(PKGCONFIG_PATH) -$(INSTALL) $(STATICLIB) $(LIBRARY_PATH) -$(INSTALL) $(IMPLIB) $(LIBRARY_PATH) -$(INSTALL) $(SHAREDLIB) $(BIN_PATH) uninstall: -$(RM) $(INCLUDE_PATH)/lua.h -$(RM) $(INCLUDE_PATH)/luaconf.h -$(RM) $(INCLUDE_PATH)/lualib.h -$(RM) $(INCLUDE_PATH)/lauxlib.h -$(RM) $(INCLUDE_PATH)/lua.hpp -$(RM) $(PKGCONFIG_PATH)/lua.pc -$(RM) $(LIBRARY_PATH)/$(STATICLIB) -$(RM) $(LIBRARY_PATH)/$(IMPLIB) -$(RM) $(BIN_PATH)/$(SHAREDLIB) clean: -$(RM) $(STATICLIB) -$(RM) $(SHAREDLIB) -$(RM) $(IMPLIB) -$(RM) *.o # DO NOT DELETE lapi.o: lapi.c lua.h luaconf.h lapi.h lobject.h llimits.h ldebug.h \ lstate.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h \ lundump.h lvm.h lauxlib.o: lauxlib.c lua.h luaconf.h lauxlib.h lbaselib.o: lbaselib.c lua.h luaconf.h lauxlib.h lualib.h lcode.o: lcode.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \ lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h lgc.h \ ltable.h ldblib.o: ldblib.c lua.h luaconf.h lauxlib.h lualib.h ldebug.o: ldebug.c lua.h luaconf.h lapi.h lobject.h llimits.h lcode.h \ llex.h lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h \ lfunc.h lstring.h lgc.h ltable.h lvm.h ldo.o: ldo.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lparser.h lstring.h \ ltable.h lundump.h lvm.h ldump.o: ldump.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h \ lzio.h lmem.h lundump.h lfunc.o: lfunc.c lua.h luaconf.h lfunc.h lobject.h llimits.h lgc.h lmem.h \ lstate.h ltm.h lzio.h lgc.o: lgc.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h linit.o: linit.c lua.h luaconf.h lualib.h lauxlib.h liolib.o: liolib.c lua.h luaconf.h lauxlib.h lualib.h llex.o: llex.c lua.h luaconf.h ldo.h lobject.h llimits.h lstate.h ltm.h \ lzio.h lmem.h llex.h lparser.h lstring.h lgc.h ltable.h lmathlib.o: lmathlib.c lua.h luaconf.h lauxlib.h lualib.h lmem.o: lmem.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \ ltm.h lzio.h lmem.h ldo.h loadlib.o: loadlib.c lua.h luaconf.h lauxlib.h lualib.h lobject.o: lobject.c lua.h luaconf.h ldo.h lobject.h llimits.h lstate.h \ ltm.h lzio.h lmem.h lstring.h lgc.h lvm.h lopcodes.o: lopcodes.c lopcodes.h llimits.h lua.h luaconf.h loslib.o: loslib.c lua.h luaconf.h lauxlib.h lualib.h lparser.o: lparser.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \ lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h \ lfunc.h lstring.h lgc.h ltable.h lstate.o: lstate.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \ ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h llex.h lstring.h ltable.h lstring.o: lstring.c lua.h luaconf.h lmem.h llimits.h lobject.h lstate.h \ ltm.h lzio.h lstring.h lgc.h lstrlib.o: lstrlib.c lua.h luaconf.h lauxlib.h lualib.h ltable.o: ltable.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \ ltm.h lzio.h lmem.h ldo.h lgc.h ltable.h ltablib.o: ltablib.c lua.h luaconf.h lauxlib.h lualib.h ltm.o: ltm.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h lzio.h \ lmem.h lstring.h lgc.h ltable.h lua.o: lua.c lua.h luaconf.h lauxlib.h lualib.h luac.o: luac.c lua.h luaconf.h lauxlib.h ldo.h lobject.h llimits.h \ lstate.h ltm.h lzio.h lmem.h lfunc.h lopcodes.h lstring.h lgc.h \ lundump.h lundump.o: lundump.c lua.h luaconf.h ldebug.h lstate.h lobject.h \ llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lstring.h lgc.h lundump.h lvm.o: lvm.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h ltable.h lvm.h lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \ lzio.h print.o: print.c ldebug.h lstate.h lua.h luaconf.h lobject.h llimits.h \ ltm.h lzio.h lmem.h lopcodes.h lundump.h # (end of Makefile)
then, in lua-5.1.4/src/,
make make install
The Lua library is now installed in /usr/local.
Build Edje
Download it from svn and go to the edje subdir. Then,
./autogen.sh --disable-edje-recc make make install
You should now have edje library and binaries installed in /usr/local.
Build of Elementary
Download it from svn and go to the elementary subdir. Then,
./autogen.sh make make install
You should now have elementary library and binaries installed in /usr/local. To test it:
export ELM_ENGINE=gdi
elementary_test.exeAttachments
-
Anjuta_attach.2.jpg
(45.6 KB) - added by buergi
5 months ago.
Image by Audifahrer from old wiki
-
Anjuta_main.2.jpg
(125.8 KB) - added by buergi
5 months ago.
Image by Audifahrer from old wiki
-
e_screen_snap.jpg
(353.7 KB) - added by daveray
3 months ago.
-
e_screencast.mov
(77.4 MB) - added by daveray
3 months ago.
-
evry.jpg
(178.8 KB) - added by jeffdameth
2 months ago.
-
evry2.jpg
(74.9 KB) - added by jeffdameth
2 months ago.
-
Shelve1SimplyWhite.3.png
(28.5 KB) - added by jt_a
7 weeks ago.
-
Shelve1SimplyWhite.4.png
(28.5 KB) - added by jt_a
7 weeks ago.
