[edit] Building widelands under Windows (MinGW)This page is about building widelands for win32-sytems (Like MS Windows XP or MS Windows 2k, ReactOS, etc). It describes, what you have to do, to get widelands compile under MinGW.
[edit] Installing MinGWMinGW is an minimal, unix-like environment, for building programs with gcc under Windows-systems. For installing a complete new mingw follow the instructions below. Get In the installation of MinGW, the setup will ask you, which packages you want to be installed. The best would be, if you use the "current"-packages. The following packages are needed for widelands-compile:
[edit] Installing MSYSInstall the MSYS (e.g. D:\MinGW\msys). After the installation a command prompt will pop up and ask you some questions: Do you wish to continue with the post install? -> press y Do you have MinGW installed? -> press y Where is your MinGW installation? -> d:/mingw (note the slash instead of usual backslash!). Because MinGW uses an older gcc version which causes trouble and a missing make you have to download and extract them into <yourmingwfolder> overwriting any files. Furthermore, you can get which isn't used in compile. But can be useful afterwards, if you want to chase bugs :-)! [edit] Installing the needed librariesAfter installing MinGW and MSYS, you need to install all libraries and programs, which are needed by widelands. [edit] Precompiled Packages[edit] SDL Packages
download and unpack them into a temporary folder and move over the directories for each package into <yourmingwfolder> [edit] boost Packagedownload and unpack into a temporary folder. go to Boost\include\boost_1_34_1 and move over the boost directorie into <yourmingwfolder>\include [edit] gettext and iconv Packages
download and unpack them into a temporary folder. You will have usr/local dir and more subdirectories. Move over those subdirectories into <yourmingwfolder>. [edit] zlib packagedownload and extract these directly into <yourmingwfolder> [edit] Python (only needed for locales)If you want to compile the locales download python and install it (e.g. to C:\Python). To use it you will need to set one environment variable. This is easy in Windows XP. Right Click My Computer > Properties > Advanced > Environment Variables > System Variables > Path > Edit Directories in the Path are separated by semicolons, so append ;C:\Python to your Path. Do not erase any part of your Path under any circumstances. Then bonk OK. [edit] Packages needed to compileWe recommend creating <yourmingwfolder>/src for these packages [edit] libpngdownload and unzip it to <yourmingwfolder>/src, go with msys in its folder and run ./configure --prefix=/mingw make make install [edit] SDLdownload and unzip it to <yourmingwfolder>/src, go with msys in its folder and run make install-sdl prefix=/mingw [edit] SDL_gfx
download and unzip it to <yourmingwfolder>/src, go with msys in its folder and run make -f Makefile.mingw prefix=/mingw make -f Makefile.mingw prefix=/mingw install To compile SDL_gfx-2.0.17, you'll have to change on source file: In SDL_gfxPrimitives.c, replace #ifdef WIN32
__inline long int
lrint (double ftl)
{
int intgr;
_asm
{
fld flt
fistp intgr
};
return intgr;
}
#endif
with #define lrint(x) (floor(x+(x>0) ? 0.5 : -0.5)) [edit] Compilling of widelands[edit] Download of Widelands-sourcecodeCheck out the widelands source code (see Download for infos on the SVNROOT and all). Rename build_id.h.default in widelands-directory/src to build_id.h - else the compiler will output an error. [edit] Compiling the sourceStart msys and go to widelands-directory/build/win32/mingw than run make all to generate the locales go to widelands-directory/build/win32 and run ./buildcat.sh
[edit] Further workIf you have compiled widelands, you must copy all needed dll-files in widelands-folder. Without these files widelands won't work. Normally the dll-files of these packages can be found in <yourmingwfolder>/bin <yourmingwfolder>/lib You need the following dlls-files (as at July 26th, 2008): jpeg.dll [edit] Problems?If there are any problems and you can't find a solution, please write on the forums or meet us on irc. |
![[Main Page]](/modules/mediawiki/images/mediawiki.png)
Building Widelands under Windows
From Widelands.org
Main Page | Recent changes | Edit this page | Page history | Switch to MediaWiki modePrintable version | Disclaimers | Privacy policy
