[Tux4kids-tuxtype-dev] Building on Windows (for a GCI2011 task)

David Bruce davidstuartbruce at gmail.com
Mon Nov 21 14:57:04 UTC 2011


Hi George,

> Found out it's cross-compiled over from linux. Sorry for the disturbance.

No problem - once you get a linux build set up, the main additional
thing is installing mingw-cross-env.  It's not hard, but looking at
tuxtype's doc/ directory, I see there isn't much of a description.
However, tuxmath's documentation is much better, and the process is
nearly identical, except simpler - tuxtype doesn't yet use t4k_common,
so you don't have to add that to mingw-cross-env.  If you put
mingw-cross-env at /opt/mingw-cross-env (the default), you should be
able to simply run "./ttwin.sh" from the buildw32/ directory.  Let me
know if you run into any snags.

Thanks,

David Bruce



(from tuxmath's doc/INSTALL):
--------------------------------------------------------------------

Windows
 365 -------
 366
 367 Tuxmath can be cross-compiled for Windows under Linux.  I have
done this on my
 368 Debian system. Once the crossbuild environment is set up, the
process is simple
 369 and nearly automatic.
 370
 371 To package TuxMath into the executable installer, you will need the nsis
 372 package, which is free software available in major distributions
(e.g.  "sudo
 373 aptitude install nsis" for Debian).
 374
 375 Starting with v1.8.0, the Windows cross-build uses the
mingw-cross-env project
 376 (http://www.nongnu.org/mingw-cross-env). One very great advantage
is that the
 377 entire build setup can be installed automatically instead of the
very laborious
 378 process of downloading and building 15-20 libs by hand.
 379
 380 Basically, go to the mingw-cross-env site listed above and follow the
 381 well-written directions to get the basic setup in place. Now, you need to
 382 cross-build t4k_common using mingw-cross-env.  As of this
writing, t4k_common
 383 has been added to the mingw-cross-env project, but is only in the
development
 384 version in the Mercurial repository, not in any stable release.  So, try
 385 running "make t4k_common" from your mingw-cross-env directory.
If it works,
 386 great, otherwise you need to copy the t4k_common.mk file from
tuxmath's source
 387 tree into mingw-cross-env's src/, e.g.:
 388
 389 cp t4k_common.mk /opt/mingw-cross-env/src
 390 cd /opt/mingw-cross-env
 391 make t4k_common
 392
 393 This should download and build everything needed for the
crossbuild, including
 394 t4k_common itself.  It will take some time (perhaps an hour).  There is a
 395 script in the tuxmath source tree under buildw32/ called
 396 "setup_mingw-cross-env.sh" that will do all of this automatically
(tested on
 397 Debian and Ubuntu systems). Be aware that if you have an existing
installation
 398 at /opt/mingw-cross-env, it will be clobbered.
 399
 400 A copy of t4k_common.mk is provided in the tuxmath source tree
until we get it
 401 added to mingw-cross-env itself.
 402
 403 Now you should be all set to do the actual cross-build.  If you put the
 404 cross-build setup in /usr/local/mingw-cross-env, and you are
building from a
 405 git clone, you can simply cd to tuxmath's buildw32 directory and
use the simple
 406 scripts there:
 407
 408 $ ./tmwin.sh
 409
 410 That's all - it should build a complete NSIS executable installer in the
 411 buildw32 directory, which will be around 17 MB in size. The new
crossbuild is
 412 statically linked, so you wind up with quite a large executable
(around 25M
 413 after decompression), but no dll's need to be included.  Also,
since SDL_Pango
 414 is supported, no fonts need to be bundled in.
-- 


David Bruce

For all your software needs, visit The Apt Store:
deb http://ftp.us.debian.org/debian stable main



More information about the Tux4kids-tuxtype-dev mailing list