[Vala] How to compile Vala using MingW under Windows



Hello,

I think I've successed to compile vala 0.18 under Windows. You could have
a look to my page (tarball available for testing) :
http://linbox.free.fr/vala


Here it is :
----------------------------------
How to compile Vala under Windows
----------------------------------

# First step :
c:\> mkdir vala-build
c:\> cd vala-build
c:\vala-build> mkdir vala
c:\vala-build> mkdir vala-src
c:\vala-build> mkdir mingw
c:\vala-build> mkdir msys
c:\vala-build> mkdir build

c:\vala-build> cd mingw

# MingW installation

# From http://sourceforge.net/projects/mingw/files/, these packages
# binutils-2.22-1-mingw32-bin
# gcc-core-4.6.2-1-mingw32-bin
# libgmp-5.0.1-1-mingw32-dll-10
# libiconv-1.14-2-mingw32-dev
# libiconv-1.14-2-mingw32-dll-2
# libintl-0.18.1.1-1-msys-1.0.17-dll-8
# libmpc-0.8.1-1-mingw32-dll-2
# libmpfr-2.4.1-1-mingw32-dll-1
# pthreads-w32-2.9.0-mingw32-pre-20110507-2-dev
# w32api-3.17-2-mingw32-dev

c:\vala-build\mingw> wget 
http://sourceforge.net/projects/mingw/files/MinGW/Base/binutils/binutils-2.22/binutils-2.22-1-mingw32-bin.tar.lzma/download
c:\vala-build\mingw> wget
http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.6.2-1/gcc-core-4.6.2-1-mingw32-bin.tar.lzma/download
c:\vala-build\mingw> wget
http://sourceforge.net/projects/mingw/files/MinGW/Base/gmp/gmp-5.0.1-1/libgmp-5.0.1-1-mingw32-dll-10.tar.lzma/download
c:\vala-build\mingw> wget 
http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/libiconv-1.14-2/libiconv-1.14-2-mingw32-dev.tar.lzma/download
c:\vala-build\mingw> wget 
http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/libiconv-1.14-2/libiconv-1.14-2-mingw32-dll-2.tar.lzma/download
c:\vala-build\mingw> wget
http://sourceforge.net/projects/mingw/files/MSYS/Base/gettext/gettext-0.18.1.1-1/libintl-0.18.1.1-1-msys-1.0.17-dll-8.tar.lzma/download
c:\vala-build\mingw> wget
http://sourceforge.net/projects/mingw/files/MinGW/Base/mpc/mpc-0.8.1-1/libmpc-0.8.1-1-mingw32-dll-2.tar.lzma/download
c:\vala-build\mingw> wget
http://sourceforge.net/projects/mingw/files/MinGW/Base/mpfr/mpfr-2.4.1-1/libmpfr-2.4.1-1-mingw32-dll-1.tar.lzma/download
c:\vala-build\mingw> wget
http://sourceforge.net/projects/mingw/files/MinGW/Base/pthreads-w32/pthreads-w32-2.9.0-pre-20110507-2/pthreads-w32-2.9.0-mingw32-pre-20110507-2-dev.tar.lzma/download
c:\vala-build\mingw> wget
http://sourceforge.net/projects/mingw/files/MinGW/Base/w32api/w32api-3.17/w32api-3.17-2-mingw32-dev.tar.lzma/download

#Then extract and you should have :
c:\vala-build\mingw> dir
bin
include
lib
libexec

c:\vala-build\mingw> cd ..\msys

# msysCORE-1.0.17-1-msys-1.0.17-bin.tar.lzma
c:\vala-build\msys> wget
http://sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/msys-1.0.17-1/msysCORE-1.0.17-1-msys-1.0.17-bin.tar.lzma/download

# and extract

c:\vala-build\mingw> cd ..\vala-src
c:\vala-build\vala-src>

# download lastest release from https://live.gnome.org/Vala/Release and
extract

# download http://vala-win32.googlecode.com/files/vala-0.12.0.exe and
install in c:\vala-build\vala

----------------------------

Ok now we need to adjust msys configuration.

Edit c:\vala-build\msys\etc\fstab to :
C:/vala-build/mingw             /mingw
C:/vala-build/vala              /vala
C:/vala-build/vala-src /vala-src
C:/vala-build/mingw/lib /usr/lib
C:/vala-build/build /build

Edit c:\vala-build\msys\etc\profile to :

++ export PATH="/usr/bin:/bin:/usr/local/bin:/vala/bin:/mingw/bin:."

-- if [ $MSYSTEM == MINGW32 ]; then
--   export PATH=".:/usr/local/bin:/mingw/bin:/bin:$PATH"
-- else
--   export PATH=".:/usr/local/bin:/bin:/mingw/bin:$PATH"
-- fi

And now, just double click on msys.bat

my_machine# cd /vala-src
my_machine:/vala-src# ./configure --prefix=/build --disable-vapigen
(...)
my_machine:/vala-src# make
(...)
my_machine:/vala-src# make install

And that's all... If you want to test your new fresh install, just change
PATH variable.

tips: --disable-vapigen to avoid sys/wait.h fatal error when compiling




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]