Cross-compiling Windows version from Linux

From Armagetron
Revision as of 22:56, 6 July 2007 by 69.61.60.178 (talk)

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