|
|
Line 1: |
Line 1: |
|
|
__TOC__ |
|
This page explains how to compile globulation2 on windows using mingw. |
|
|
|
This page explains how to compile Globulation 2 on windows using [http://www.mingw.org/ mingw]. |
|
|
|
|
|
|
Note: Globulation 2 does not compile with mingw gcc versions 3.2.3, 2.95.3-8 and 3.4.2. But don't worry, gcc version 3.3.1 works and is included in glob2_required_libs_mingw.tar.bz2. |
|
For any problems or suggestions, don't hesitate to contact me. [[User:Ion bidon|Ion bidon]] |
|
|
|
|
|
|
|
==Setting up mingw== |
|
Remark : globulation2 does not compiles with mingw gcc versions 3.2.3, 2.95.3-8 and 3.4.2. But don't worry, gcc version 3.3.1 works and is included in glob2_required_libs_mingw.tar.bz2. |
|
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">(Warning! For the first 3 steps, all install directories must be the exact same. Do not use spaces or capitals for the installation directory. For this guide, we will use the default c:\mingw)</td></tr></table> |
|
|
|
|
|
|
:*Download and install [http://prdownloads.sf.net/mingw/MinGW-3.1.0-1.exe?download MinGW-3.1.0-1.exe] into the directory c:\mingw. |
|
===Compile globulation2 on windows using mingw=== |
|
|
|
|
|
|
|
:*Next, download and install [http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe?download MSYS-1.0.10.exe] in the same directory as MinGW (c:\mingw). At the end of the installation, it will ask you if you want to continue with the post-install. Select yes, and yes again when it ask if you have mingw installed. When it ask you to indicate the directory where it is installed, type in c:/mingw (yes, with a forward slash as the program prefers it that way). |
|
#install MinGW-3.1.0-1.exe in a directory ([http://www.mingw.org/download.shtml Mingw download page])<br />-install it for example in c:\mingw (warning! don't use spaces or capitals for the installation directory) |
|
|
#install MSYS-1.0.10.exe in the same directory ([http://www.mingw.org/download.shtml Mingw download page])<br />-follow the steps of the installer and at the end it will ask you in a console if you have mingw installed. You must say yes and after, indicate the directory where it is installed.<br />-for example if you install MinGW in c:\mingw and MSYS in c:\mingw aswell, then continue with post install, select yes when asking if MinGW is installed, and input c:/mingw |
|
|
#install msysDTK-1.0.1.exe in the same directory that you installed mingw and msys ([http://www.mingw.org/download.shtml Mingw download page]) |
|
|
#download glob2_required_libs_mingw.tar.bz2 from http://globulation2.org/dev/glob2_required_libs_mingw.tar.bz2 and put them in the home directory in mingw (for example c:\mingw\home\XXX\ where XXX is the username) |
|
|
#double click the Msys icon that has been placed on your desktop |
|
|
#Go in the directory where you put the glob2_required_libs_mingw.tar.bz2 (for example cd ~) and untar the libraries like this : |
|
|
#:<pre>tar jxf glob2_required_libs_mingw.tar.bz2 -C /</pre> |
|
|
#download boost c++ precompiled libraries : |
|
|
#:<pre>wget http://viral.media.mit.edu/releases/boost-1.33.1-mingw-bin.tar.gz</pre> |
|
|
#manually install boost c++ with the following commands : |
|
|
#:<pre>tar zxf boost-1.33.1-mingw-bin.tar.gz</pre> |
|
|
#:<pre>mv boost/include/boost-1_33_1/boost /usr/include && mv boost/lib/* /usr/lib</pre> |
|
|
#download glob2 cvs (as anonymous for example) : |
|
|
#:<pre>export CVS_RSH="ssh" && cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/glob2 co glob2</pre> |
|
|
#prerequisites before compiling glob2 : |
|
|
#:<pre>mv /usr/bin/mingw32-make.exe /usr/bin/make.exe && cd glob2</pre> |
|
|
#:<pre>cp /usr/bin/SDL.dll /usr/bin/libvorbis-0.dll /usr/bin/libogg-0.dll /usr/bin/libvorbisenc-2.dll /usr/bin/libfreetype-6.dll .</pre> |
|
|
#:change in configure.in :<br />CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"<br /> with<br />CPPFLAGS="$CPPFLAGS $SDL_CFLAGS -I/usr/include/freetype2"<br /> LDFLAGS="$LDFLAGS `sdl-config --libs` -lSDL_ttf" |
|
|
#compiling glob2 (don't worry about the warnings) : |
|
|
#:<pre>./bootstrap && ./configure && make</pre> |
|
|
#To make the executable smaller : |
|
|
#:<pre>strip ./src/glob2.exe</pre> |
|
|
|
|
|
|
|
:*And lastly, download and install [http://prdownloads.sf.net/mingw/msysDTK-1.0.1.exe?download msysDTK-1.0.1.exe] in the same directory as mingw and msys (c:\mingw) |
|
===Test globulation2 on windows :=== |
|
|
|
|
|
|
|
|
|
#download glob2_windows_runtime.tar.bz2 |
|
|
|
==Compiling Prerequisites== |
|
#:<pre>wget http://globulation2.org/dev/glob2_windows_runtime.tar.bz2</pre> |
|
|
|
:*Download glob2_required_libs_mingw.tar.bz2 from http://globulation2.org/dev/glob2_required_libs_mingw.tar.bz2 and put them in the home directory of mingw (c:\mingw\home\XXX\ where XXX is the username) |
|
#extract it with : |
|
|
|
|
|
#:<pre>tar jxf glob2_windows_runtime.tar.bz2</pre> |
|
|
|
:*Double click the MSYS icon that has been placed on your desktop during MSYS's installation. |
|
#go in the glob2 directory where you have compiled glob2 and type |
|
|
|
|
|
#:<pre>./syncdata</pre> |
|
|
|
:*Go in the directory where you put the glob2_required_libs_mingw.tar.bz2 (for example cd ~) and untar the libraries like this : |
|
#:<pre>./syncmaps</pre> |
|
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">tar jxf glob2_required_libs_mingw.tar.bz2 -C /</td></tr></table> |
|
#copy the content of glob2/data/ to glob2_runtime/data/ |
|
|
|
|
|
#copy the content of glob2/maps/ to glob2_runtime/maps/ |
|
|
|
:*Download boost c++ precompiled libraries : |
|
#copy glob2.exe which is in the src directory (glob2/src/) to glob2_runtime/ |
|
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">wget http://viral.media.mit.edu/releases/boost-1.33.1-mingw-bin.tar.gz</td></tr></table> |
|
#run glob2.exe from the glob2_runtime directory and play :) |
|
|
|
|
|
|
:*Manually install boost c++ with the following commands: |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">tar zxf boost-1.33.1-mingw-bin.tar.gz</td></tr></table> |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">mv boost/include/boost-1_33_1/boost /usr/include && mv boost/lib/* /usr/lib</td></tr></table> |
|
|
|
|
|
:*To allow the important command "make" to run, use the following command: |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">mv /usr/bin/mingw32-make.exe /usr/bin/make.exe</td></tr></table> |
|
|
|
|
|
|
|
|
==Compiling Globulation 2== |
|
|
:*Download Globulation 2 from cvs (as anonymous for example): |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">export CVS_RSH="ssh" && cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/glob2 co glob2</td></tr></table> |
|
|
|
|
|
:*Before compiling glob2, run these commands: |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">cd glob2</td></tr></table> |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">cp /usr/bin/SDL.dll /usr/bin/libvorbis-0.dll /usr/bin/libogg-0.dll /usr/bin/libvorbisenc-2.dll /usr/bin/libfreetype-6.dll .</td></tr></table> |
|
|
|
|
|
:*Open configure.in and find: |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"</td></tr></table> |
|
|
::and replace with: |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">CPPFLAGS="$CPPFLAGS $SDL_CFLAGS -I/usr/include/freetype2"<br />LDFLAGS="$LDFLAGS `sdl-config --libs` -lSDL_ttf"</td></tr></table> |
|
|
|
|
|
:*Now to start compiling globulation 2. Don't worry about the warnings. If something is wrong, it will grind to a halt and it will let you know why: |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">./bootstrap && ./configure && make</td></tr></table> |
|
|
|
|
|
:*To make the executable smaller in size, run the following command: |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">strip ./src/glob2.exe</td></tr></table> |
|
|
|
|
|
|
|
|
==Testing Globulation 2 on windows== |
|
|
:*Download glob2_windows_runtime.tar.bz2 |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">wget http://globulation2.org/dev/glob2_windows_runtime.tar.bz2</td></tr></table> |
|
|
|
|
|
:*Extract it with : |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">tar jxf glob2_windows_runtime.tar.bz2</td></tr></table> |
|
|
|
|
|
:*Go in the glob2 directory where you have compiled glob2 and type |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">./syncdata</td></tr></table> |
|
|
::<table width="90%"><tr valign="top"><td style="border: 1px dashed #000000; padding: .3em .9em .3em; color: #000000; background-color: #F8F8FF">./syncmaps</td></tr></table> |
|
|
|
|
|
:*Copy the content of glob2/data/ to glob2_runtime/data/ |
|
|
|
|
|
:*Copy the content of glob2/maps/ to glob2_runtime/maps/ |
|
|
|
|
|
:*Copy glob2.exe which is in the src directory (glob2/src/) to glob2_runtime/ |
|
|
|
|
|
:*Run glob2.exe from the glob2_runtime directory and play :) |