Cross-compiling Windows version from Linux

From Armagetron
Revision as of 11:52, 12 June 2007 by 162.8.231.7 (talk)

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