this section describes the installation of the dependencies using EWPI. After this section, another way to build the EFL is by using win-builds, but that way is discouraged (too old compiler and dependencies). To install EWPI, you need the dependencies :
- mingw-w64 toolchain
- Install MSYS2 (steps 1 to 6)
- run "pacman -S git autoconf automake libtool gettext-devel make cmake nasm wget gperf python bison mingw-w64-x86_64-toolchain mingw-w64-x86_64-ninja mingw-w64-x86_64-python3-pip mingw-w64-i686-toolchain mingw-w64-i686-ninja mingw-w64-i686-python3-pip"
- run "pip3 install meson"
- rename ar, ranlib, strip and windres with host :
- for 32bits toolchain, open MSYS2 MinGW 32bits, then :
- cp /mingw32/bin/ar.exe /mingw32/bin/i686-w64-mingw32-ar.exe
- cp /mingw32/bin/dlltool.exe /mingw32/bin/i686-w64-mingw32-dlltool.exe
- cp /mingw32/bin/ranlib.exe /mingw32/bin/i686-w64-mingw32-ranlib.exe
- cp /mingw32/bin/strip.exe /mingw32/bin/i686-w64-mingw32-strip.exe
- cp /mingw32/bin/windres.exe /mingw32/bin/i686-w64-mingw32-windres.exe
- for 64bits toolchain, open MSYS2 MinGW 64bits, then :
- cp /mingw64/bin/ar.exe /mingw64/bin/x86_64-w64-mingw32-ar.exe
- cp /mingw64/bin/dlltool.exe /mingw64/bin/x86_64-w64-mingw32-dlltool.exe
- cp /mingw64/bin/ranlib.exe /mingw64/bin/x86_64-w64-mingw32-ranlib.exe
- cp /mingw64/bin/strip.exe /mingw64/bin/x86_64-w64-mingw32-strip.exe
- cp /mingw64/bin/windres.exe /mingw64/bin/x86_64-w64-mingw32-windres.exe
- for 32bits toolchain, open MSYS2 MinGW 32bits, then :
Use your package manager to install the dependencies above
- clone EWPI : git clone https://github.com/vtorri/ewpi.git
- cd ewpi
- compile ewpi : gcc -std=c99 -o ewpi ewpi.c ewpi_map.c
- To install 32 bits dependencies, open MSYS2 MinGW 32bits and : ./ewpi /opt/ewpi_32 i686-w64-mingw32
- To install 64 bits dependencies, open MSYS2 MinGW 64bits and : ./ewpi /opt/ewpi_64 x86_64-w64-mingw32
Change the installation directory /opt/ewpi_** with anything you want
The win-builds project provides a package manager and packages for the EFL along with dependencies (from the toolchain to elementary). All libraries are provided as shared objects.
It is the easiest and advised way to get things installed and working.
The best way to get EFL for Windows is to cross compile them on Linux using win-builds. Install the packages from there and get the EFL and Elementary sources either:
- from git at git://git.enlightenment.org/core/efl.git and git://git.enlightenment.org/core/elementary.git
- from the Enlightenment download page
Then get the Makefile with all the pre-set configuration options for efl:.
Some distros package x86_64-w64-mingw32-gcc, such as ArchLinux. There, instead of installing win-build's package manager (which requires to be compiled using ocaml), one can download files manually or use the following automation script: https://github.com/barbieri/barbieri-playground/tree/master/efl-win-build
It assumes you have a cross compiler x86_64-w64-mingw32-gcc and a native eolian_gen in $PATH, then will install stuff to ~/efl-windows_64, as well as generate a helper script ~/efl-windows_64/compile-efl.sh
In this section, we will install MSYS2 and Win-Builds 1.5 in D:\MSYS2.
- Download MSYS2 here, choosing the target you want (either i686 or x86_64). The x86_64 target will be installed in that tutorial, but the i686 one is exactly the same (notes will be added for its installation). Do not launch MSYS2 when installation is finished. Launch instead in the Start menu "MSYS2 MinGW 64-bit".
- Follow instructions 1. to 7 on the MSYS2 website. (Instruction 8. is useless) with the 3 following modifications:
- Instructions 3.: The installation directory is D:\MSYS2.
- Instruction 6.: The command will be pacman -Syu (remove catgets and libcatgets).
- Instruction 7.: The command will be pacman -S cvs git make autoconf automake libtool gettext-devel.
We use Win-Builds 1.5 package manager to install necessary packages to build EFL.
- Download Win-Builds here.
- In the GUI window, select:
- Cygwin or MSYS
- x86_64 (if you want i686, let the selection as is)
- Use the mirror that is proposed: http://win-builds.org/1.5.0
- The installation directory is the one chosen for MSYS2 in the previous paragraph, instruction 3. of the MSYS2 instructions (for this tutorial, D:\MSYS2). By default, MinGW-64 will be installed in D:\MSYS2\opt\windows_64 (or D:\MSYS2\opt\windows_32 for i686) and the binaries in D:\MSYS2\opt\windows_64\bin.
- Click on OK.
- In the new UI window, instead of Install for the EFL and Elementary, select with the mouse As is. The EFL and Elementary will not be installed and will not confict with other EFL and Elementary installations -Click on Process
- Post installation for 64 bits: in MSYS2 terminal, open /etc/profile with your favorite editor, and at the end:
export PKG_CONFIG_PATH=/opt/efl_64/lib/pkgconfig:/opt/windows_64/lib64/pkgconfig export PATH=/opt/efl_64/bin:/opt/windows_64/bin:$PATH export ACLOCAL_PATH="/opt/windows_64/share/aclocal/"
- Post installation for 32 bits: in MSYS2 terminal, open /etc/profile with your favorite editor, and at the end:
export PKG_CONFIG_PATH=/opt/efl_32/lib/pkgconfig:/opt/windows_32/lib/pkgconfig export PATH=/opt/efl_32/bin:/opt/windows_32/bin:$PATH export ACLOCAL_PATH="/opt/windows_32/share/aclocal/"
- Close the terminal and launch a new one.
- Open msys2 terminal and download EFL on http://enlightenment.org
git clone https://git.enlightenment.org/core/efl.git
- Load win-builds environment for x86_64 architecture
. /opt/windows_64/bin/win-builds-switch 64
- Define the following environment variables for 64 bits:
PREFIX=/opt/efl_64 HOST=x86_64-w64-mingw32 DISABLE_STATIC="--disable-static"
- Define the following environment variables for 32 bits:
PREFIX=/opt/efl_32 HOST=i686-w64-mingw32 DISABLE_STATIC="--disable-static"
- Run 'autoreconf -vif', then 'configure' with the following options:
CFLAGS="-g3 -ggdb3 -Og" CXXFLAGS="-g3 -ggdb3 -Og" CPPFLAGS=-DECORE_WIN32_WIP_POZEFLKSD ./configure --prefix=/opt/efl_x86_64 --host=x86_64-w64-mingw32 --disable-static --with-tests=regular --with-crypto=openssl --disable-harfbuzz --disable-gstreamer1 --disable-gstreamer --disable-physics --disable-libmount --disable-valgrind --enable-lua-old --disable-avahi --disable-spectre --disable-libraw --disable-librsvg --disable-pulseaudio --disable-cxx-bindings
- Run 'make -j4' then 'make install'