Difference between revisions of "Build for Windows"

From X-Moto
Jump to: navigation, search
(Install libs headers and objects)
Line 32: Line 32:
  
 
  unzip ~/mingw_dev.zip
 
  unzip ~/mingw_dev.zip
 +
mkdir -p include libs bin
 
  mv mingw_dev/include/* include
 
  mv mingw_dev/include/* include
 
  mv mingw_dev/libs/* libs
 
  mv mingw_dev/libs/* libs
 +
mv mingw_dev/bin/* bin
 
  rm ~/mingw_dev.zip
 
  rm ~/mingw_dev.zip
 
  rmdir mingw_dev
 
  rmdir mingw_dev
 +
 +
Under windows:
 +
cp /usr/mingw/include/SDL/* /usr/mingw/include
  
 
=Build from GNU/Linux=
 
=Build from GNU/Linux=
Line 43: Line 48:
 
  make
 
  make
 
  i586-mingw32msvc-strip src/xmoto.exe
 
  i586-mingw32msvc-strip src/xmoto.exe
 +
 +
=Build from Windows=
 +
tar jxf xmoto-x.y.z.tar.bz2
 +
cd xmoto-x.y.z
 +
./configure
 +
make
 +
strip src/xmoto.exe
  
 
You can found xmoto.exe into the src dir.
 
You can found xmoto.exe into the src dir.
 
To get the dll required to play xmoto :
 
To get the dll required to play xmoto :
 
  cvs -z3 -d:pserver:anonymous@xmoto.cvs.sourceforge.net:/cvsroot/xmoto export -r HEAD xmoto/mingw_lib.zip
 
  cvs -z3 -d:pserver:anonymous@xmoto.cvs.sourceforge.net:/cvsroot/xmoto export -r HEAD xmoto/mingw_lib.zip
 
=Build from Windows=
 

Revision as of 18:42, 5 February 2007

Since xmoto 0.2.5, Visual Studio c++ is no more required. You can build X-Moto from free software. You can build xmoto.exe from windows or even from GNU/Linux with cross-compilation.

This howto has been made under Ubuntu, but it's easy to adapt it to your distribution.

Prerequites

Install mingw

Under linux

sudo apt-get install mingw32 mingw32-binutils mingw32-runtime

Under windows

  • go to http://www.mingw.org/download.shtml
  • get MSYS-1.0.10.exe and MinGW-5.0.0.exe or newer
  • install MSYS (for this tutorial, i let the default path, c:\msys\1.0) - answer to the questions
Do you wish to continue with the post install ? y
Do you have MinGW installed ? n
  • install MinGW
Let the default mirror and the default options (mingw package = current)
Check g++ compiler and MingGW Make
Destination folder : c:\msys\1.0\mingw (the folder alreay exists)

Install libs headers and objects

The required files to compile are available on internet on the website of each library. However, to make it easier, a pack is available on the xmoto cvs.

cvs -z3 -d:pserver:anonymous@xmoto.cvs.sourceforge.net:/cvsroot/xmoto export -r HEAD xmoto/mingw_dev.zip
mv xmoto/mingw_dev.zip ~

Under linux:

cd /usr/i586-mingw32msvc

Under windows:

cd /usr/mingw
unzip ~/mingw_dev.zip
mkdir -p include libs bin
mv mingw_dev/include/* include
mv mingw_dev/libs/* libs
mv mingw_dev/bin/* bin
rm ~/mingw_dev.zip
rmdir mingw_dev

Under windows:

cp /usr/mingw/include/SDL/* /usr/mingw/include

Build from GNU/Linux

tar jxf xmoto-x.y.z.tar.bz2
cd xmoto-x.y.z
./configure_mingw_from_linux.sh
make
i586-mingw32msvc-strip src/xmoto.exe

Build from Windows

tar jxf xmoto-x.y.z.tar.bz2
cd xmoto-x.y.z
./configure
make
strip src/xmoto.exe

You can found xmoto.exe into the src dir. To get the dll required to play xmoto :

cvs -z3 -d:pserver:anonymous@xmoto.cvs.sourceforge.net:/cvsroot/xmoto export -r HEAD xmoto/mingw_lib.zip