Cross-compiling Windows version from Linux

From Armagetron
Revision as of 22:58, 3 July 2007 by 70.158.67.162 (talk)

buy diazepam tramadol online cheap wellbutrin free jazz ringtones rivotril online mtv ringtones lipitor online celexa online cheap ativan free nokia ringtones order norco motorola ringtones but ultram ultram online norco mono ringtones celexa online buy didrex free online pharmacy propecia online phentermine online buy viagra vicodin online cheap sildenafil lisinopril online sharp ringtones levitra free funny ringtones but hydrocodone valium cool ringtones clonazepam online buy cyclobenzaprine free verizon ringtones buy hgh cheap ambien free sony ringtones cheap cialis cingular ringtones cheap cialis prozac online qwest ringtones cheap didrex punk ringtones free jazz ringtones free free ringtones cheap ultracet order flexeril free nokia ringtones cheap ativan cheap viagra midi ringtones sony ericsson ringtones real ringtones cheap adipex free funny ringtones free punk ringtones cheap tenuate online meridia free kyocera ringtones free sprint ringtones online meridia cheap tenuate cheap clomid order ambien free sonyericsson ringtones cheap clomid music ringtones free ericsson ringtones levitra online free wwe ringtones kyocera ringtones cheap nexium free mp3 ringtones cheap hgh xanax online sagem ringtones xenical online but alprazolam music ringtones buy zanaflex verizon ringtones free nextel ringtones tracfone ringtones diethylpropion online cheap albuterol buy tramadol samsung ringtones mp3 ringtones free wwe ringtones cheap soma free sharp ringtones cheap lisinopril paxil online motorola ringtones samsung ringtones vigrx sildenafil online buy paxil zanaflex online cheap rivotril diethylpropion online sprint ringtones polyphonic ringtones free sagem ringtones cheap nexium cingular ringtones cheap cyclobenzaprine cheap pharmacy online alltel ringtones free sonyericsson ringtones free sony ericsson ringtones diazepam online online vicodin buy lipitor vigrx online free mtv ringtones cheap soma lorazepam online real ringtones cheap zyban albuterol online free ericsson ringtones cheap lorazepam but zoloft cheap adipex buy wellbutrin free alltel ringtones free cool ringtones free nextel ringtones zoloft online clonazepam online valium online order fioricet free midi ringtones cheap xanax polyphonic ringtones hoodia online but lortab alprazolam online hydrocodone online lortab online cheap ultracet free ringtones mono ringtones cheap carisoprodol sony ringtones ortho online tracfone ringtones but phentermine cheap ortho cheap xenical prozac online cheap carisoprodol propecia online but flexeril qwest ringtones buy fioricet cheap hoodia cheap zyban Just collecting cross-compilation notes.

Setting up the cross compiler under linux

Check your distribution for mingw packages. If it has it, install them. If not, try this:

http://www.libsdl.org/extras/win32/cross/

Export some environment variable:

export CC=i586-mingw32msvc-gcc
export CXX=i586-mingw32msvc-c  
export 

1000 LD=i586-mingw32msvc-ld

export AR=i586-mingw32msvc-ar
export AS=i586-mingw32msvc-as
export NM=i586-mingw32msvc-nm
export STRIP=i586-mingw32msvc-strip
export RANLIB=i586-mingw32msvc-ranlib
export DLLTOOL=i586-mingw32msvc-dlltool
export OBJDUMP=i586-mingw32msvc-objdump
export RESCOMP=i586-mingw32msvc-windres

You might want those in a script.

Libraries

You'll need to use the same configure command to configure and install the libraries. Get libSDL and libxml2 and do this:

./configure --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc

Prefix is the location of your cross-compiler, it should have "bin", "lib", and "include" in it.

To get libxml2 to cross-compile, use this as your configure command:

./configure --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc --with-python=no

Armagetron Advanced

You need to set some influential environment variables to make it configure.

XML2_CONFIG=/path/to/cross-compiled/xml2-config SDL_CONFIG=/path/to/cross-compiled/sdl-config

Example:

XML2_CONFIG=/usr/i586-mingw32msvc/bin/xml2-config SDL_CONFIG=/usr/i586-mingw32msvc/bin/sdl-config ../../armagetronadnew/configure --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc --disable-sound

Currently it's failing for me with this line:

 checking for glVertex3f in -lopengl32... no
 OpenGL not found. Maybe it needs X11 to compile? Checking that...

Dedicated Server

Same as above, only try this configure line instead:


XML2_CONFIG=/usr/i586-mingw32msvc/bin/xml2-config SDL_CONFIG=/usr/i586-mingw32msvc/bin/sdl-config CFLAGS="-I/usr/i586-mingw32msvc/include -DNO_SOCKLEN_T" CXXFLAGS="-I/usr/i586-mingw32msvc/include" ../../armagetronadnew/configure --host=i586-mingw32msvc --prefix=/home/dave/Projects/armagetronad/aabuild/win32install --disable-sound --disable-glout --disable-binreloc

This will configure and build the dedicated server with a recent trunk checkout. The dedicated server that's built this way has a few issues to work out, but it'll run in Win98 and Wine, the difference being that in Wine you can't connect a client to it.