Compiling TMW dependencies with mingw32/msys

This article will explain how to setup a building environment to compile dependencies required by The Mana World.

Setting up building environment

First of all we need to install a working version of mingw (port of the GNU compiler collection) and msys (a unix-like command line interpreter).

Installing MinGW

Download “Automated MinGW Installer” from http://mingw.org/

Get latest version: 5.1.14 at the time of writing

Start the installer and select “Candidate”, then the packages: “MinGW base tools, g++ compiler, MinGW Make”

Installing MSYS

Download MSYS from http://mingw.org/

Get latest version: 1.0.11 at the time of writing

Execute the package and let the post install script run

Note for windows Vista users:

Source: http://sourceforge.net/tracker/index.php?func=detail&aid=1711379&group_id=2435&atid=102435

To make msys install properly on Vista create the following 2 files with the following contents and place them in msys/1.0/bin

install-info.exe.manifest

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <v3:trustInfo xmlns:v3="urn:schemas-microsoft-com:asm.v3">
  <v3:security>
  <v3:requestedPrivileges>
  <v3:requestedExecutionLevel level="asInvoker" />
  </v3:requestedPrivileges>
  </v3:security>
  </v3:trustInfo>
</assembly>

install.exe.manifest

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <v3:trustInfo xmlns:v3="urn:schemas-microsoft-com:asm.v3">
  <v3:security>
  <v3:requestedPrivileges>
  <v3:requestedExecutionLevel level="asInvoker" />
  </v3:requestedPrivileges>
  </v3:security>
  </v3:trustInfo>
</assembly>

Start MSYS and execute:

touch /bin/install.exe /bin/install-info.exe

Installing msysDTK

Download msysDTK from http://mingw.org/

Get latest version: 1.0.1 at the time of writing

Execute the package

Compiling dependencies

Replace everything between % signs with the right information accordingly

Download all the packages in your msys user folder (i.e. C:/msys/1.0/home/%username%).

Run msys

Then for each package (if not else specified):

  • download the source .tar.gz package.
  • execute “tar -xzvf %package_name%” to extract the package
  • execute “cd %package%” to go into extracted folder
  • execute “./configure –prefix=/mingw”
  • execute “make”
  • execute “make install”

Dependencies

SDL 1.2.13

Download latest package from http://www.libsdl.org/

libogg 1.1.4

Download latest package from http://xiph.org/downloads/

libvorbis 1.2.3

Download latest package from http://xiph.org/downloads/

SDL_mixer 1.2.8

Download latest package from http://www.libsdl.org/projects/SDL_mixer/

zlib 1.2.3

Download latest package from http://www.zlib.net/

execute “make -fwin32/Makefile.gcc”

Then manually install .h files in mingw/include .a files in mingw/lib and .dll files in mingw/bin

libpng 1.2.40

Download latest package from http://www.libpng.org/pub/png/libpng.html

Rename mingw/bin/zlib1.dll to libz-1.dll (source: http://osdir.com/ml/gnu.cegcc.devel/2008-08/msg00063.html)

SDL_image 1.2.7

Download latest package from http://www.libsdl.org/projects/SDL_image/

guichan 0.8.1

Download latest package from http://guichan.sourceforge.net/

Edit configure and change the line (20927)

LIBS=”-lGL $LIBS”

to be like

LIBS=”-lopengl32 $LIBS”

execute “./configure –prefix=/mingw –disable-sdl –disable-sdlimage –disable-opengl CPPFLAGS=-I/mingw/include/SDL && make && make install”

execute “./configure –prefix=/mingw –disable-opengl CPPFLAGS=-I/mingw/include/SDL LIBS=”-lguichan -lSDL -lSDL_image” && make && make install”

execute “./configure –prefix=/mingw –enable-force-opengl CPPFLAGS=-I/mingw/include/SDL LIBS=”-lguichan -lSDL -lSDL_image -lopengl32″ && make && make install”

Todo: check if the latest step is enough or if all of them are required
Todo: check if it’s possible to link directly to shared libs (i.e. -lSDL.dll etc)

physfs 1.0.2

Download latest package from http://icculus.org/physfs/

SDL_net 1.2.7

Download latest package from http://www.libsdl.org/projects/SDL_net/

libcurl 7.19.6

Download latest package from http://curl.haxx.se/

libxml 2.7.4

Download latest package from http://xmlsoft.org/

enet 1.2

Download latest package from http://enet.bespin.org

libiconv 1.13.1

Download latest package from http://www.gnu.org/software/libiconv/

FreeType 2.3.9

Download latest package from http://www.freetype.org/

SDL_ttf 2.0.9

Download latest package from http://www.libsdl.org/projects/SDL_ttf/

Leave a Reply

Your email address will not be published. Required fields are marked *