The Allegro Wiki is migrating to github at https://github.com/liballeg/allegro_wiki/wiki

Building with msys2

From Allegro Wiki
Revision as of 13:24, May 10, 2014 by Elias (talk | contribs) (Created page with '== Required downloads == * msys2 [http://sourceforge.net/projects/msys2/] * unzip program for .tar.xz, for example [http://7zip.org] == Install == Download msys2, use e.g. 7…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Required downloads

* msys2 [1]
* unzip program for .tar.xz, for example [2]

Install

Download msys2, use e.g. 7zip to unpack the .tar.xz and put the folder somewhere. I put it in C:\msys, ending up with a C:\msys\msys64.

Run msys

Run C:\msys\msys64\mingw64_shell.bat.

Install dependencies

Inside the shell, type these:

pacman -S is the msys2 command to install a package.

pacman -S git
pacman -S mingw-w64-gcc
pacman -S mingw-w64-cmake
pacman -S mingw-w64-freetype
pacman -S mingw-w64-physfs
pacman -S mingw-w64-libvorbis
pacman -S mingw-w64-flac
pacman -S mingw-w64-libpng
pacman -S mingw-w64-openal
pacman -S mingw-w64-dumb
pacman -S mingw-w64-libjpeg-turbo
pacman -S mingw-w64-gcc-libs

Download sources from git

git clone git://git.code.sf.net/p/alleg/allegro

This will create a folder called allegro with the sourcecode inside.

Build

Build like this:

mkdir build
cd build
cmake \
	-G"MSYS Makefiles" \
	-DCMAKE_INCLUDE_PATH=/usr/include/w32api \
	-DCMAKE_LIBRARY_PATH=/usr/lib/w32api \
	-DWANT_X11=off \
	-DWANT_MONOLITH=on \
	-DSHARED=off \
	../allegro
make
make install

Now you should