|
From: | Christian Mauduit |
Subject: | [Help-liquidwar6] MinGW port |
Date: | Wed, 23 Apr 2008 00:57:51 +0200 |
User-agent: | Mozilla-Thunderbird 2.0.0.9 (X11/20080110) |
Hi,Just for you to know, I managed to install and/or compile all the LW6 pre-requisite on a MinGW/MSYS environment, that's to say, the hardest part for a Microsoft Windows port has been done. The LW6 code itself needs to be modified now (there are always differences, at least the way to link to OpenGL is different, and sockets are a serious issue) but, since this is not my first port of this type, I'm confident it will work.
Just thought some of you on this least might be interested by this information.
Attached the procedure to set up a working environment, just to give you an idea of how simple and straightforward it is...
Have a nice day, Christian. -- Christian Mauduit <address@hidden> - http://www.ufoot.org/ ___ __/\__ Liquid War 6 - http://www.gnu.org/software/liquidwar6/ / _")\~ \~/ "Les amis de la vérité sont ceux qui la cherchent et non _/ / /_ o_\ ceux qui se vantent de l'avoir trouvée" - Condorcet (__/ \/
Next: Coding guidelines, Previous: About mod-gl, Up: Hacker's guide
Todo...
This section describes how to compile the game from source under Microsoft Windows. Note that players are encouraged to use a free system such as GNU/Linux, which is the platform Liquid War 6 is being hacked on by default. If you encounter problems with this port, you'll probably save time by installing a double-boot with GNU/Linux coexisting with your previous Microsoft Windows install.
Basically, Liquid War 6 requires
MinGW.
More precisely, it requires MSYS.
A standard Cygwin installation won't
work, because it is too UNIXish to allow third party libraries
like SDL to compile natively.
You might argue that SDL is available for Cygwin, but in reality,
the Cygwin port of SDL is a MinGW port. Indeed, Cygwin brings
all standard POSIX functions including the use of main
instead of WinMain
and I suspect this is a problem for
graphical libraries like SDL which do require some sort of direct
access to the OS low-level functions. Therefore, MinGW is more
adapted for it does not define all these functions, and
allows any library to hook on Microsoft Windows internals directly.
Point is then, you also loose the cool effect of Cygwin which
is to have a complete glibc
available,
including network functions like select
defined the
POSIX way, and not the WinSock way. If you ever ported code from
POSIX sockets to WinSock 2, you know what I mean. Using MinGW
is also embarassing for some libraries won't compile easily, and
for instance programs which heavily rely on a real TTY
interface to work are usually hard to port. This includes
ncurses
and
GNU readline.
Liquid War 6 tries to have workarrounds for all this, and in
some cases the workarround is simply that embarassing code
is not compiled on Microsoft Windows. For this reason, some
features are not available on this platform. Period.
Now the reason you need MSYS and not only MinGW is that MSYS
will allow ./configure
scripts to run, and this eases
up the porting process a lot. MinGW and MSYS packages are
downloadable on the
SourceForge MinGW download page.
To compile Liquid War 6, first download and unzip all the
following files in
the same directory, for instance C:\MSYS
.
This file list might contain file which are not absolutely mandatory for Liquid War 6, for instance the Fortran 77 compiler is absolutely useless, but installing it won't harm either. Some packages might unzip things the right way, but some do it in a subfolder. You might need to run commands like:
cp -r coreutils*/* . rm -rf coreutils*
It's also mandatory to move everything that has been installed in
/usr
or /usr/local
to /
since MSYS has some
builtin wizardry which maps /usr
on /
.
You need to do this if you don't unzip files from a MinGW shell,
which is obviously the case when you first install it. Usefull command
can be:
cp -r usr/local/* . rm -rf usr/local
There's also a quirk with Guile
which requires some configuration. You need to modify the following
lines in /include/libguile/scmconfig.h
:
#define SCM_HAVE_SYS_SELECT_H 0 /* 0 or 1 */ #define SCM_HAVE_IEEEFP_H 0 /* 0 or 1 */ #define SCM_HAVE_WINSOCK2_H 1 /* 0 or 1 */
Another step is to edit /etc/profile
and add lines like:
export CFLAGS=-I/usr/local/include export LDFLAGS=-L/usr/local/lib
Finally, your MSYS environment is (hopefully...) working.
Now you need to compile the following programs, from source, like if you were under a POSIX system:
expat-2.0.1.tar.gz
then ./configure && make && make install
sqlite-amalgamation-3.5.8.tar.gz
then ./configure && make && make install
libpng-1.2.26.tar.gz
then ./configure && make && make install
jpegsrc.v6b.tar.gz
then ./configure && make && make install && make install-lib
curl-7.18.1.tar.gz
then ./configure --without-ssl && make && make install
SDL-1.2.13.tar.gz
then ./configure && make && make install
SDL_image-1.2.6.tar.gz
then ./configure && make && make install
freetype-2.3.5.tar.gz
then ./configure && make && make install
SDL_ttf-2.0.9.tar.gz
then ./configure && make && make install
SDL_mixer-1.2.8.tar.gz
then ./configure && make && make install
To be continued...
[Prev in Thread] | Current Thread | [Next in Thread] |